Map of Event Commands
DescriptionI had a shower though as to how to greatly simplify the management of the Event Editor.
Everything would just be so much simpler if I had a central map/structure of the event commands and their params for reference, at which point I could employ some meta programming and implement the formater, processor, properties panel etc. all in one class a piece instead of a new class for every single command.
The map should probably be made with JSON or YAML either one. the goal here is to map each command to a map of it's positional params and their types
for example in YAML command 132 "Change Battle BGM" would look like so in yaml
# command #
132:
# peram position
0:
# type is AudioFile, specifically a BGM
type: AudioFile_BGM
# peram name for display
name: file
and command 121 Control Switches might look like this in JSON
{
"121": {
"0": {
"name": "switch_1_id",
"type": "int"
},
"1": {
"name": "switch_2_id",
"type": "int"
},
"2": {
"name": "switch_state",
"type": "int"
}
}
}
as you can see YAML might be advantageous as it has the ability to place comments, YAML also can use JSON inline (JSON is actually a subset of YAML) which can be more readable that white space delineation in some cases
PriorityHigh
PrerequisitesNone
Assigned
Everything elsesome information that may come in handy
https://gist.github.com/Ryex/1f12aecc6a5e6b115c24This task will require actually opening a copy of rpgmaker xp and running some inspection on what different Event commands commands look like. I think the
formater.py file list every command but there may be some that are unknown. if you need help figuring out what the event commands look like I'm sure we can come up with a script to drop into XP and (so long as you have an event on the map with every event command used in it) dump a representation out to a file.
This task will also require you to read the xp event interpreter script to decipher the meaning of each positional param. Just remember that there are some commands that are completely ignored by the interpreter as they are place holders
There are cases where the properties of a param change based on what came before it in which case the values should be under keys with conditional statements, the exact syntax of this should be a topic of discussion in this thread.
an example of this case is command 111 the Conditional Branch
param[0] is the command mode and bases on it's value subsequent params may refer to switches, variables, self switches etc. and some params might not even exist
in the case where a param is an int but maps to different operations or modes there should be a "map" key that maps the modes. for example if the param refers to what math operator to use the map should have a map key like so
xxx:
x:
type: int
name: operator
map: { 0: '==', 1: '>=', 2: '<=', 3: '>', 4: '<', 5: '!='}
If there are any question or you would like to help out in making this map, please post below.
You don't have to contribute all of the map to be helpful!, even if you only contribute one command, or even one param for a command it's helpful