Hello, I'm back with another, I hope, useful thingy:
This script replaces all occurrences of uses of a variable number in a game and replaces it with another number. This is helpful when you need to move some variables to keep your variables list organized.
Get it from here: https://github.com/narnianpony/Variable-Replacer-RPGMAKER
Feel free to send me commits if there is anything you want to add, or bugs to fix
If not, you can either install php and use it from command line or use a portable version of php
ALWAYS BACKUP YOUR FILES BEFORE USING THIS SCRIPT
Consider possible permissions issues as RPGMAKER usually saves files as 664 (Linux)
From webserver
Navigate to this php file and use the following GET parameters
From command line
Should work with RPG Maker MZ and MV
Also, thanks a lot to @Trihan because his post MV/MZ - The interpreter and you: what makes an event? was incredibly helpful to develop this
This script replaces all occurrences of uses of a variable number in a game and replaces it with another number. This is helpful when you need to move some variables to keep your variables list organized.
Get it from here: https://github.com/narnianpony/Variable-Replacer-RPGMAKER
Feel free to send me commits if there is anything you want to add, or bugs to fix
How to use:
If you use the game within a webserver, just drop the php file in the root directory of the gameIf not, you can either install php and use it from command line or use a portable version of php
ALWAYS BACKUP YOUR FILES BEFORE USING THIS SCRIPT
Consider possible permissions issues as RPGMAKER usually saves files as 664 (Linux)
From webserver
Navigate to this php file and use the following GET parameters
variableReplacer.php?variable=250&to=251 To move variable 250 to 251variableReplacer.php?switch=250&to=251 To move switch 250 to 251From command line
php -f variableReplacer.php variable 250 251 To move variable 250 to 251php -f variableReplacer.php switch 250 251 To move switch 250 to 251Should work with RPG Maker MZ and MV
What this does
- This replaces all variables/switches occurrences in RPGMAKER commands, in maps or common events
- This replaces all variables/switches used in the \v[] \s[] format
- This replaces all variables/switches used in javascript files with the functions $gameVariables and $gameSwitches, in case you wrote internal plugins for your game
- Some plugins accept <<s[]>> and <<v[]>> formats, those are also replaced
- Replace the name of the variable/switch in the system
What this does not
- Replace variables or switches used within "ranges" in the game, when the variable or switch is not the first one or the last one. AKA: When you modify a lot of variables or switches in one command
- Replace variables or switches used in command plugin parameters
Also, thanks a lot to @Trihan because his post MV/MZ - The interpreter and you: what makes an event? was incredibly helpful to develop this