Thanks to Xeavin, the creator of many great mods and most notably "The Insurgents Workshop", you can now script the modification of game files using pretty much any programming language that can interact with json. In this guide, you will learn how to prep files for modification and apply changes using python.
To get started with making your own changes first download the following software:
- VBF Browser
- The Insurgent's Workshop
- VM Script De/Compiler Tools
- Python 3.9 or Higher
- DrakLab Mod Loader
Once you have completed that extract The Insurgent's Workshop somewhere convenient. This will be the primary folder to work out of.
Run The Insurgent's Workshop one time and close it, it should generate the following folders:
- files/source
- files/unpacked
- files/newpack
- bin/
Extract the VM Script De/Compiler Tools and copy both "ff12-script.exe" and "ff12-text.exe" into the newly created "bin/" folder.
Note: Before completing this step, if you have any installed mods that modify any .ard file in the ps2data/plan_master/in/plan_map/*/area/*.ard directory, be aware that those mod changes will end up merging with the changes from the scripts. Please be careful to not upload other peoples work when extracting files from the vbf.
(For example, if you had hardcore enemies 4x installed, and then extracted files and ran the scripts, you would end up with a 16x version.)
Gather the vanilla source files:
- Extract VBF Browser anywhere, launch it, open VBF and browse to your FFXII_TZA.vbf
- Inside the browser, on the right side panel, navigate through to the "in" folder located at "ps2data/plan_master/in"
- Click the "plan_map" folder but do not enter it.
- Click Extract, navigate to where you extracted the workshop and select the "<workshop>/files/source/" source folder, then press OK.
- Be sure to let this complete and close VBF Browser before continuing.
Note: At this point if you have not installed Python, you will need it.,
Unpack Files:
- Download the scripts from here and place them in the "<workshop>/files/" directory.
- Double click the script "workshop_prep.py" and wait for it to complete.
- Launch The Insurgent's Workshop and select "Option 1: Unpack Packages", once complete select "Option 3: Unpack Files".
Note: Be careful to only run the "modifiers.py" once or the multipliers will get applied exponentially.
Modify Files:
- Use your favorite file editor (Notepad++, Pycharm, etc..) and open the "modifiers.py" script. Near the top of the file will be a bunch of capitalized variables, you can edit the multipliers to your liking before running the script.
- Once Edited to your liking, save the file and double click the script. A window should open and start providing information on the process and a log file should be generated.
(Optional): If you want to make individual manual changes to specific enemies, now would be the time. You can edit the .json files manually inside the <workshop>/files/unpacked/ directory. A simple example would be nerfing the HP of Yiazmat, which can be found in this file: ".\files\unpacked\plan_map\rwf_d\area\rwf_d.ard.dir\section_007.json" change the "Max HP" value to the new desired value. For information on .ard file structure see here.
Repack Files:
- Back in The Insurgent's Workshop and select "Option 4: Pack Files", once complete select "Option 2: Pack Packages".
- Now run the script "extractor.py" and a folder called "extracted/" will be generated with the ps2data folder structure inside.
- You can rename the "extracted/" folder to something so it appears in DrakLab (ie. Hardcore Enemies Custom).
Install Mod:
- Launch DrakLab Mod Loader, open VBF.
- Install mod, navigate to and select the renamed "extracted/" folder.
- Click the green checkmark, and finally apply changes.
- Close DrakLab before launching the game.
- Enjoy!
Troubleshooting:
Script not launching on double click:
If for some reason double clicking a script does not open a console and generate a log file then you can do the following:
Open file explorer, navigate to the "<workshop>/files/" directory from earlier where all the scripts should be.
Hold shift, and right click a blank/empty spot inside the file explorer, the option "Open Powershell Window Here" should be listed.
You should have a console open inside the directory The.Insurgents.Workshop.v1.0.0\files>:
Whenever I said to run a script or double click it, instead type: " python.exe ./<name_of_script.py> ", ie. python.exe .\modifiers.py
2 comments
I've a error message when I use option 4 in The Insurgent's Workshop which say to me:
"The JSON value could not be converted to System.UInt16. Path: $.Stats['Stats 0']['Max MP'] | LineNumber: 0 | BytePositionInLine: 57. --> Either the JSON value is not in a supported format, or is out of bounds for a UInt16."
=> If I change only HP value for Bosses for test I've this error message too...
All help will be appreciated^^
ps: I'm french so sorry if my english is not perfect:)
Also this was written for workshop version 1.0 if they updated it some scripts might not work.