Jump to content

Help creating a custom magazine that gives the player a perk point


Recommended Posts

You may have missed what I said earlier about setting up the script fragment at the quest stage that is active when the player picks up the magazine. If you are using Game.AddPerkPoints(x), add that to the script fragment window, substitute the number of points you want to x, and compile.

 

If you get stuck, open up the PerksQuest and look at stage 900. It's the unused Explorer perk that reveals all map markers. It has the structure you want to emulate. You also need to attach the MagStageScript to your magazine and set the SetStage property to the quest stage that your Papyrus fragment is attached to in the quest. That is what will trigger your Game.AddPerkPoints fragment when the player picks it up.

 

Again, look at how the vanilla mags are set up and use them as a guide for your own.

 

EDIT: Once you get that sorted, let me know. There are a few quirks about adding the mags to the world that are apparent until you test it in-game for the first time.

Link to comment
Share on other sites

There is absolutely no reason to do it in a more complicated way as Beth did it. You are not aiming for as modular system here as they were, so...

 

 

Open up your magazine and add a new script to it (to a misc object in the ObjectWindow or to a reference in the RenderWindow). Name it as ou like, script body should be like this:

 

Actor property PlayerREF auto
Int property iNumberOfPoints auto


Auto STATE INITIAL
  Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
    if akNewContainer == PlayerREF
      Game.AddPerkPoints(iNumberOfPoints)
      GoTo("DONE")
    endIf
  endEvent

ENDSTATE

STATE DONE
ENDSTATE
Don't forget to fill out the properties.
Link to comment
Share on other sites

I did as werr suggested, and the result was this:

 

 

Papyrus Compiler Version 2.8.0.4 for Fallout 4

Copyright © ZeniMax Media. All rights reserved.
Starting 1 compile threads for 1 files...
Compiling "LegendaryMagAddPerkPoints"...
C:\Users\Eric\AppData\Local\Temp\PapyrusTemp\LegendaryMagAddPerkPoints.psc(4,15): const scripts may only contain const auto properties. Property PlayerREF cannot be defined
C:\Users\Eric\AppData\Local\Temp\PapyrusTemp\LegendaryMagAddPerkPoints.psc(4,15): const scripts may not contain data, script variable ::PlayerREF_var cannot be defined
C:\Users\Eric\AppData\Local\Temp\PapyrusTemp\LegendaryMagAddPerkPoints.psc(5,13): const scripts may only contain const auto properties. Property iNumberOfPoints cannot be defined
C:\Users\Eric\AppData\Local\Temp\PapyrusTemp\LegendaryMagAddPerkPoints.psc(5,13): const scripts may not contain data, script variable ::iNumberOfPoints_var cannot be defined
C:\Users\Eric\AppData\Local\Temp\PapyrusTemp\LegendaryMagAddPerkPoints.psc(8,5): const scripts may not have states
C:\Users\Eric\AppData\Local\Temp\PapyrusTemp\LegendaryMagAddPerkPoints.psc(18,0): const scripts may not have states
No output generated for LegendaryMagAddPerkPoints, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on LegendaryMagAddPerkPoints
Edited by hyperdragon97
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...