[Public][Welder] Map of Event Commands

Started by Ryex, May 13, 2015, 04:32:13 am

Previous topic - Next topic

Ryex

Map of Event Commands




Description

I 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
Code: 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
Code: 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


Priority

High



Prerequisites

None



Assigned





Everything else

some information that may come in handy
https://gist.github.com/Ryex/1f12aecc6a5e6b115c24

This 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

Code: yaml

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
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

KK20

Well, before I can get back to this, here's everything that I did like a year ago.
https://dl.dropboxusercontent.com/u/58874459/Formater.py

I noticed in the repository that you changed the formatting a bit, so there's always that for someone to fix. I also think I was in the middle of making a map filled with some events utilizing all possible event commands. Some of these commands might actually still be wrong in that regard.

Nevertheless, there's only the pictures and move route commands left to implement, which, if anyone wishes to assist with this task, will realize why I left those for last.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!