Maklane’s Better Scripts
Tired of balancing line by line by hand? Would you like to be able to balance thousands of variables in a few seconds? Then this is for you!
v1.0
Scripts to make your mods and balance changes easier and faster.
For example, you can change the thousands of variables in the .cfg files to reduce loot by % without having to change each value by hand.
My script will do it for you and you only have to choose the variables and the desired multiplier, all in a matter of seconds.
If you download it, you will find a PDF with the instructions and the script code.
If this has helped you, consider clicking on endorse, give kudos and credit my authorship of
the script in your mod page and I will continue to make other useful tools for the community.
What would you need?
1. A free Google account
2. Sign in to Google Colab (free)
Summary of How the Script Works:
1. Purpose:
This Python script automates the process of adjusting certain integer-based
configuration values (such as “MinCount”, “MaxCount”, “AmmoMinCount”, and
“AmmoMaxCount”) in a configuration file. Each of these fields can be scaled by a
specific multiplier.
2. How It Works:
– When run in Google Colab, it prompts you to upload your original config file.
– It scans through each line, using regular expressions to find specific fields
(“MinCount”, “MaxCount”, “AmmoMinCount”, and “AmmoMaxCount”).
– For each field, it applies the pre-defined multiplier, rounds the result, and
replaces the original value with the updated integer value.
– It then saves a new output file with all the adjusted values.
3. Benefits:
– No need to manually adjust numerous values by hand.
– Easily fine-tune each field type with its own multiplier.
– Ensures values remain integers (no decimals), which is useful for items that
can’t be fractioned (like bullets or consumables).
4. Usage:
– Open the script in Google Colab.
– Adjust the patterns with the desire variable names.
– Run the provided cell and upload your original configuration file.
– After the process completes, download the modified file.
– After that, rename the file to match the original and repack it.
You have the code ready to copy-paste in the download file.