Jump to content

Papyrus- do I have to relaunch FO4 after each compile?


Recommended Posts

After I compile a papyrus script to pex in my runtime directory, I will not see changes until I restart Fallout. I suspect this is due to my mod manager but I would just like to ask what is the recommended configuration for rapid code workflow? I figured out how to configure notepad++ and can inspect some of my runtime values via debug message sent to log file, but before I fork a runtime to run without a mod manager I'd like to know whether I am barking up the right tree or if there is some more optimal configuration.

 

I am currently running mod organizer which I guess could be somehow keeping new Pex's out of its sandbox, but OTOH, the script is triggered by a message sent by an object in worldspace. I could see maybe Bethesda doing a new binding to object pexs with a cell reload, in which case I could do that to force an update.

 

Any ideas? The way I am doing it is ok for the piddling thing I am writing just now, but I can't believe there isn't a way to make turnaround much faster.

 

 

Link to comment
Share on other sites

It depends on the script and how the script is used etc. Not sure whether a mod manager is relevant here.

A script/pex can be reloaded with the in-game console command ReloadScript

 

eg.

 

ReloadScript "UserNamespace:UserScript"

Quotes may be omitted if namespace is not used.

The command simply reloads the pex. It does not 'reset the world'.

 

So if the script has already run and the script has mutated the world, you may have to start the game / load a save etc. again to reset things.

 

You may use bat files to automate certain tasks. Eg. CenterOnCell, StartQuest, SetStage, Sleep etc.

I think bat files also supports some control structures like if/else.

 

Not sure if the list is complete and you may have to google for signatures,

https://gist.github.com/reg2k/bad5567d30787067dcaa42ba948ce87e

 

Link to comment
Share on other sites

Ah. ReloadScript. I have found bat files very handy in the past but forgot entirely that there were several obscure commands in there. I did not know they support any control structures whatever. I assumed they were nothing more than single shot command players, since they didn't seem to even be able to hold temporary variables. Nonetheless, I used a grepper to generate them for creating random clothing ensembles for settlers using equipitem. The trouble was, every time I inserted a new mod in the load order, many of the the formIDs would have the highest two digits change. So the grepper would just copy replace a symbol for the mod with the new two digit value. Anyway....

 

I believe ReloadScript is going to save me days of frustrating lags between tests. Thanks very much. I shall endeavor not to transmorgify the world too excessively.

 

Regards,

 

Shabnam.

 

Edit- Hey, tried this last night and was hugely productive due to the instant turnaround time. My problem turned out to be trivial- the ActorValue property was not properly binding to my script. My AutoPay bin fixed a couple of AOR bugs with their sell your stuff box feature. Thanks again.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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