Hi!
I would like to request a little program that raises the common event IDs referred to from other places (other common events and maps).
The .json files in the data folder can be read with a text editor, and I found out what the event command for calling a common event looks like:
"{"code":117,"indent":0,"parameters":[x]}"With x being the ID of the common event called.
Now every so often you want to move common events in the database. The most common scenario for me is that I want to insert a common event, thus having to move all following common events down by a step.
Unfortunately, as you all know, RPG Maker MV does not change the references of the common events that were moved. So if I move down common event 10 to position 11, other events still falsely want to call 10. The solution to this is to go through all your other events and manually change which common event is called.
That is, of course, not a real solution. It takes a lot of time, and you may even miss some instances where a common event is called, resulting in bugs.
Therefore, I would like to request a program that does this for me. I wrote some pseudo code to explain what I would like to do. I would like to put the program into the "data" folder, and when I click it, it runs something like this:
User-Input: $min = ? // Number of the first common event that is moved.User-Input: $max = ? // Number of the second-to-last common event.cycle { search all .json files in directory for this: "{"code":117,"indent":0,"parameters":[$max]}" for each match { $new = $max + 1; replace matched text with this: "{"code":117,"indent":0,"parameters":[$new]}"; } $max = $max - 1; if ($max == $min) { break; }}end;I hope this is kind of understandable.
Does anyone here feel up to this task that could potentially save hours of frustration? 🙂
I would like to request a little program that raises the common event IDs referred to from other places (other common events and maps).
The .json files in the data folder can be read with a text editor, and I found out what the event command for calling a common event looks like:
"{"code":117,"indent":0,"parameters":[x]}"With x being the ID of the common event called.
Now every so often you want to move common events in the database. The most common scenario for me is that I want to insert a common event, thus having to move all following common events down by a step.
Unfortunately, as you all know, RPG Maker MV does not change the references of the common events that were moved. So if I move down common event 10 to position 11, other events still falsely want to call 10. The solution to this is to go through all your other events and manually change which common event is called.
That is, of course, not a real solution. It takes a lot of time, and you may even miss some instances where a common event is called, resulting in bugs.
Therefore, I would like to request a program that does this for me. I wrote some pseudo code to explain what I would like to do. I would like to put the program into the "data" folder, and when I click it, it runs something like this:
User-Input: $min = ? // Number of the first common event that is moved.User-Input: $max = ? // Number of the second-to-last common event.cycle { search all .json files in directory for this: "{"code":117,"indent":0,"parameters":[$max]}" for each match { $new = $max + 1; replace matched text with this: "{"code":117,"indent":0,"parameters":[$new]}"; } $max = $max - 1; if ($max == $min) { break; }}end;I hope this is kind of understandable.
Does anyone here feel up to this task that could potentially save hours of frustration? 🙂