This is a Keyblade stat changer script made in Python 3.7 for Kingdom Keys, a Minecraft mod, this script will take the values from a CSV file and write them to the JSON files for each keyblade in the CSV allowing quick changes to the stats for the 120+ keyblades in Kingdom Keys. This was created somewhat quickly so it's fairly simple but figured it'd be useful for not only our dev team but anyone wanting to make a datapack.
- Replace keyblade and organization weapon stats in the json files from Kingdom Keys with values in a CSV file
- Generate a CSV file from the json files
- Generate a log file showing the previous and the new stats, possibly useful for creating something like a changelog
- Automatically calculate the stats for all the levels for the upgrades
- Generate the code for the datagen with the stat changes to be used in the mod
- Downloads
names.jsonfrom the repo automatically
Here's a quick guide on using the tool without the need to edit the config
- Run
keybladestatchanger.py, you'll need Python 3.x installed - Enter
3to download the keyblade.jsonfiles from the Kingdom Keys repository - Enter
1to generate a.csvfile with all keyblades and stats from the.jsonfiles - Modify the values in the generated
.csvfile to your liking - Enter
0to write the values in the.csvfile to the.jsonfiles contained in thekeybladesfolder - Enter
Yto write the changes to the.jsonfiles.
The CSV file you supply should have the format name, strength, magic for example Kingdom Key, 1, 0.
You can generate the CSV file from the JSON files with the script
csvPath=keyblades.csvthe path of the CSV file containing the stats to change to. Can be a full path likeC:/keyblades.csv.keybladeJsonFolderPath=keyblades/the path of the folder that contains all the.jsonfiles for the keyblades. Can be a full path likeC:/keyblades/.organizationJsonFolderPath=keyblades/the path of the folder that contains all the.jsonfiles for the organization weapons. Can be a full path likeC:/organization/.levelToChange=0the keyblade upgrade level stats to change,0for the base stats and1-10for the upgrade level stats.autoLevelStats=TrueIf set to True the upgrade level stats after thelevelToChangelevel will be automatically calculated from the stats given from the CSV.namesFile=names.jsonthe path of the JSON file containing the names that will be mapped to the JSON file names. Can be a full path likeC:/names.json.writeLog=Trueenable whether the log should be createdskipMenuChoice=-1set value to one of the options on the menu to skip the choice when running the script, setting the value to anything else will cause it to display the optionsweaponType=keybladeset the weapon type to change the stats of eitherkeybladeororganization
- Ability to change other parts of the JSON files
- Alternative way to enter config options when running the script instead of relying on the config file
- Interface