banner
Rating
Voted0

Savegame Script Editor - Console Version

0
Mod version:1.9.1
Game version:all
The mod has been successfully tested for the absence of viruses
16049.38K368.39K

Report mod

  • image
  • image
  • image
modalImage

About This Mod

Fallout 4 uses the same scripting engine as Skyrim (Papyrus). Script data is written to your save in the same way.


This tool allows you to view script data inside a save, edit variable values, remove script instances from a save, end stuck threads, and more. This is the successor to my Skyrim tool.


This is a console application, meaning you will have to enter all commands in the cmd window (or you can use predefined batch files). In fact, the first console version was made two weeks after the game's release, and all the while I was trying to fix and polish the GUI wrapper, but I'm having a hard time and I don't know how soon it will be completed.


WARNING: the console version will NOT backup for you. That's your job.


Why do I need this?

- GECK is not out yet, but if you are going to create a script mode for FO4, you can already study how the existing game scripts are interrelated and plan your modification beforehand.

- You can see which scripts are running in the background (threads will be presented at the bottom of the output).

- You can gently interrupt a stuck script if it goes into an infinite loop [Make sure you understand the nature of the problem]. Rare case involving errors inside logic. There have been no real incidents so far.

- You can carefully change the specific script variable [Make sure you understand the nature of the problem].



Cases where you MUST NOT use this app:

- You do NOT want to use this tool as an attempt to "increase performance" or for any other abstract reason. Any editing of the save without knowledge of the nature of the problem will lead to a disastrous result.

- You DO NOT need it to "clean" FO4 saves in the traditional way, as (1) there are no script mods to delete yet, (2) I have never heard of any major problems associated with scripts in FO4.


There were a lot of reports that the game could not load the save (like "Broken saves, Fallout 4"), but make no mistake - these problems are NOT related to scripts (I personally checked). Just in case, I provided a "clean up" batch file. There are likely to be no orphans in your saves (if any, please provide a save sample for review).


In general, I hope that the tool will be useful to scripters and I do not think that it has any value for the general user.



How to use?

Copy the Fallout4 savegame (*.fos) file to the program folder.

Each edit operation WILL record changes to the savegame you provide. So make a backup copy of this save.


Open a command prompt (Program folder -> CTRL+ right click -> Open a command window here)


1) How to get the contents of the save:

PapyrusDataTransfer.exe -show Save.fos > ScriptRelatedContent.txt


2) How to change a script variable, Example:

PapyrusDataTransfer.exe -setvariable Save.fos 1 -filter "[and], ::MeleeEnabled_var ([variable_name]), ( FireFightStall_MasterScript ( [script_name] ), [and], 198a1a ( [ref_id] )"


After loading and saving the game, the value of this variable should be stored in all subsequent saves (until it is changed by the script itself or by any other script). You can verify the value of a variable by obtaining its contents using the show command.


Pointer variables must be associated with another script, they are also just integers, so they can be set in the same way (copy the ScriptID of the target instance).


3) How to remove script from save, example:


PapyrusDataTransfer.exe -remove Save.fos -filter "( FireFightStall_MasterScript ( [script_name] ), [and], 198a1a ( [ref_id] )".


After loading a new save, if the associated object (to which the script was linked) still exists in the world, the game must recreate the script with the default values (the same engine behavior as in Skyrim).


4) How to terminate threads (active running functions).

PapyrusDataTransfer.exe -terminate Save.fos -filter "Default2StateActivator ( [script_name] )"


If the function was started at the time of the save creation, its bytecode will be written to the save itself (as it was in Skyrim). The tool allows you to replace this bytecode with Nop (NoOperation) values, which allows you to unleash infinite loops or calls.



Save Game Structure

The structure of Fallout4 is different from Skyrim (several changes in the general structure, new tables in the Papyrus section, new object attributes, etc.). There are also new data types in the language itself. For example, you can now define your own structures and create them dynamically.


The tool is backwards compatible with Skyrim saves.


Huge thanks to AlexanderBlade for the link to the opcode for Fallout 4.

Similar Mods/Addons

Game Version *

all (Papyrus Data Transfer 1_9_1-10261-1-9-1.rar)