• 📚 Admin Project Update: I've added a major feature to PictureBooks.io called Avatar Studio! You can now upload photos to instantly turn your kids (and pets! 🐶) into illustrated characters that star in their own stories. Give it a try and let me know what you think!

Automatic Mod Patcher for VP 5.0

lolo123

Chieftain
Joined
Oct 12, 2018
Messages
20
This tool is a Python-based automatic patcher created with the help of ChatGPT.
It updates mod strings based on Renamed Text Keys and Component Names for Angry Modders so that VP 4 mods remain compatible with Vox Populi 5.0.


To use it, place the Python script in:

Documents\My Games\Sid Meier's Civilization 5\MODS​

Then run the script

It will update all mods in the MODS folder, except VP itself.
 
Last edited:
Imagine, maybe not this instance of this tool, but as VP modding code will continue to be claryfied and systemized, and AI tools would be be able to learn more about what's what, how many workhours of fidnding bugs in the code, how many hours of copying and rewriting and testing with IGE and so on, could be streamlined, and be devoted to actually playing the desired content, and and/or freeing up more for studying, significant others, family, and everything else. Coming from someone who learned the hours of narrowing and finally finding of not closed brackets in the code.
 
Imagine, maybe not this instance of this tool, but as VP modding code will continue to be claryfied and systemized, and AI tools would be be able to learn more about what's what, how many workhours of fidnding bugs in the code, how many hours of copying and rewriting and testing with IGE and so on, could be streamlined, and be devoted to actually playing the desired content, and and/or freeing up more for studying, significant others, family, and everything else. Coming from someone who learned the hours of narrowing and finally finding of not closed brackets in the code.
I’ve actually been thinking about this for about a year, and I really believe it’s completely possible with current AI technology.
It could also be a profitable business, since it would dramatically reduce B2B software maintenance costs.

The only problem is that I don’t have the resources to build it myself.
If there are any angel investors here, feel free to reach out.
 
Thanks, this was smarter than what I was going to do.
I did wonder how you noticed the ICON_RES_MARRIAGE thing!

p.s. I never knew THIS_KIND_OF_THING is called "screaming snake case"
lol
 
That's cool.
Is there a way to change the directory to "Documents\Firaxis ModBuddy\"?
So I can build the updated version of my mods with the right replaced text.
 
I think you can just run the python file from that directory, or give the path with --root flag.

I'm trying it now. First thing I noticed is the policy column replacement
ReligiousUnrestFlatReductionGlobal -> ReligiousUnrestFlatReduction
didn't fire. So it fails to patch Semper Fidelis atm (I will upload the updated mod soon anyway if you are reading this and worrying:)

Edit: the other thing it will miss are the icon atlases
 
Last edited:
Thanks, this was smarter than what I was going to do.
I did wonder how you noticed the ICON_RES_MARRIAGE thing!

p.s. I never knew THIS_KIND_OF_THING is called "screaming snake case"
lol
I asked ChatGPT to write another Python script to search all string occurrences in VP 5.0 and VP 4.22.
ICON_MARRIAGE does not appear anywhere in VP 5.0.

I think you can just run the python file from that directory, or give the path with --root flag.

I'm trying it now. First thing I noticed is the policy column replacement
ReligiousUnrestFlatReductionGlobal -> ReligiousUnrestFlatReduction
didn't fire. So it fails to patch Semper Fidelis atm (I will upload the updated mod soon anyway if you are reading this and worrying:)

Edit: the other thing it will miss are the icon atlases
I don’t have any policy-related mods installed, so I cannot figure out what the replacement rule is supposed to be.

The icon atlases are quite confusing. Renamed Text Keys and Component Names for Angry Modders lists a bunch of atlases, but it doesn’t explain what each one should be replaced with,
e.g:

PROMOTION_ATLAS_VP_00 - PROMOTION_ATLAS_VP_07
CORPORATION_ATLAS_VP
RESOURCE_ATLAS_VP
BUILD_ATLAS_VP
 
That's cool.
Is there a way to change the directory to "Documents\Firaxis ModBuddy\"?
So I can build the updated version of my mods with the right replaced text.
Hokath is correct. You can put the Python script in any folder, and it will replace all strings in its subfolders.
 
Hokath is correct. You can put the Python script in any folder, and it will replace all strings in its subfolders.
I clicked on it but it didn't work. Nothing changed.

Screenshot_1.png
 
you need to run it, so you need some kind of python installation
i.e.
Code:
python path/to/vp5_alpha_renamer.py --root top/level/folder/to/patch
 
Your instructions are not clear at all.

Screenshot_2.png


Screenshot_3.png
 
Screenshot_4.png
 
In your powershell type: python vp5_alpha_renamer.py
not in your python interpreter
the tab should show "Windows PowerShell", not "Python 3.12"
 
"Python was not found."

Screenshot_5.png
 
Back
Top Bottom