List of Event Codes

Howdy, folks-

New week, new query. Thank you to everybody who has given me help thus far.

I have tried to crawl through Google to find an answer but am not able to find anything- is there a list that exists anywhere that indicates the event codes for events as they appear in the map JSON files?

For example,

"Show Text" is code: 401
"Show Choices" is code: 102

etc.

If not, I am willing to go through the JSON and list them manually- I thought I might just ask, in case anybody has tackled this before?

Thanks in advance!
Check these ...

https://forums.rpgmakerweb.com/index.php?threads/extract-events-to-text-file.17444/ (for Ace, but most of the codes are the same)

https://forums.rpgmakerweb.com/index.php?threads/cross-reference-tool.72563/

I think they both have a list of all the event codes along with their descriptions. I know the MV one (second link) has. Obviously you just need that one little portion of the script/plugin, not the whole thing.
Check these ...

https://forums.rpgmakerweb.com/index.php?threads/extract-events-to-text-file.17444/ (for Ace, but most of the codes are the same)

https://forums.rpgmakerweb.com/index.php?threads/cross-reference-tool.72563/

I think they both have a list of all the event codes along with their descriptions. I know the MV one (second link) has. Obviously you just need that one little portion of the script/plugin, not the whole thing.

Most excellent- thanks, @Shaz !
@Shaz 's scripts pointed me in the right direction.

But for my purposes, I just ended up:

  1. Manually creating a list of the 105 Event Commands.
  2. Creating an event with each of these commands, all separated by an identical comment ("separator")
  3. Writing a function which I ran in the console, which interspersed my list of the 105 Event Commands with the created Event's actual list of all the commands (replacing "separator") and dumped them to a text file.
Code:
$._dumpEvents = function(event_id, separator, text_filename) {
    const fs = require('fs');
    const CMD_LIST = ["Show Text","Show Choices","Input Number","Select Item","Show Scrolling Text","Control Switches","Control Variables","Control Self Switch","Control Timer","Conditional Branch","Loop","Break Loop","Exit Event Processing","Common Event","Label","Jump to Label","Comment","Change Gold","Change Items","Change Weapons","Change Armors","Change Party Member","Change HP","Change MP","Change TP","Change State","Recover All","Change EXP","Change Level","Change Parameter","Change Skill","Change Equipment","Change Name","Change Class","Change Nickname","Change Profile","Transfer Player","Set Vehicle Location","Set Event Location","Scroll Map","Set Movement Route","Get on/off Vehicle","Change Transparency","Change Player Followers","Gather Followers","Show Animation","Show Balloon Icon","Erase Event","Show Picture","Move Picture","Rotate Picture","Tint Picture","Erase Picture","Wait","Fadeout Screen","Fadein Screen","Tint Screen","Flash Screen","Shake Screen","Set Weather Effect","Play BGM","Fadeout BGM","Save BGM","Replay BGM","Play BGS","Fadeout BGS","Play ME","Play SE","Stop SE","Play Movie","Battle Processing","Shop Processing","Name Input Processing","Open Menu Screen","Open Save Screen","Gave Over","Return to Title Screen","Change Battle BGM","Change Victory ME","Change Defeat ME","Change Vehicle BGM","Change Save Access","Change Menu Access","Change Encounter","Change Formation Access","Change Window Color","Change Actor Images","Change Vehicle Image","Change Map Name Display","Change Tileset","Change Battle Back","Change Parallax","Get Location Info","Change Enemy HP","Change Enemy MP","Change Enemy TP","Change Enemy State","Enemy Recover All","Enemy Appear","Enemy Transform","Show Battle Animation","Force Action","Abort Battle","Script","Plugin Command"]

    var event_object_list = $gameMap.event(event_id).list();

    var event_list_array = Object.keys(event_object_list).map(function(key) {
        return [Number(key), event_object_list[key]];
    });

    var new_array = [];
    var cmd_list_count = 0;

    for (var i = 0; i < event_list_array.length; i++) {

        if (event_list_array[i][1].parameters[0] === separator) {
            new_array.push(CMD_LIST[cmd_list_count] + ":");
            cmd_list_count++;
        } else {
            new_array.push(event_list_array[i][1].code + "\n");
        };
    };

    fs.writeFile(text_filename, new_array.join('\n'), 'utf8', function (err) {
        if (err) {
            return console.log(err);
        } console.log("The file was saved!");
    });

};
Double-post notice: @p0_boy
You can use the edit button instead. 😉
By the way, a cool script, useful if you need to tangle with these codes for some reason.
Why changing things in JSON though? I mean do you have something particular in mind?
Double-post notice: @p0_boy
You can use the edit button instead. 😉
By the way, a cool script, useful if you need to tangle with these codes for some reason.
Why changing things in JSON though? I mean do you have something particular in mind?

@Dreadshadow sorry for double-posting.

I am working on a script that lets me build and destroy events dynamically- in an effort to make the enemies in my game more interesting (since I am using an ABS system), among other things.

I spent last week creating a shorthand interpreter for the MoveRoute codes which is working pretty well:

Code:
"*:!chest|0,l,r,u,%:2|This is a test!,d,$:2|true,@:2|2,@:3,!:4,!:c5,t:true,&:beep|25,`:2|b|true,o:25,?:shake|5|-1|30|120,?:tint|#FFD12A|30|120,?:flash|BUBBLE GUM|60|30,?:fade|in,?:fade|out|60,?:weather|rain|10|10|80,!:$gameMessage.add('another test')"

becomes

Code:
{"list": [{"code": 41, "parameters": ["!chest", 0]},{"code": 17},{"code": 17},{"code": 17},{"code": 18},{"code": 18},{"code": 18},{"code": 19},{"code": 19},{"code": 19},{"code": 45, "parameters": ["$gameVariables.setValue(2,'This is a test!');"]},{"code": 16},{"code": 16},{"code": 16},{"code": 27, "parameters": [2]},{"code": 45, "parameters": ["$gameMap.event(2).requestAnimation(2);"]},{"code": 45, "parameters": ["$gamePlayer.requestAnimation(3);"]},{"code": 45, "parameters": ["0;"]},{"code": 45, "parameters": ["$gameTemp.reserveCommonEvent(5);"]},{"code": 39},{"code": 44, "parameters": [{"name": "beep", "volume": 25, "pitch": 100, "pan": 0}]},{"code": 45, "parameters": ["$gameSelfSwitches.setValue([1,2,'B'],true);"]},{"code": 42, "parameters": [64]},{"code": 45, "parameters": ["$gameScreen.startShake(5,-1,30); $gameInterpreter.wait(120);"]},{"code": 45, "parameters": ["$gameScreen.startTint([255,209,42],30); $gameInterpreter.wait(120);"]},{"code": 45, "parameters": ["$gameScreen.startFlash([255,211,248],60); $gameInterpreter.wait(30);"]},{"code": 45, "parameters": ["$gameScreen.startFadeIn(24); $gameInterpreter.wait(24);"]},{"code": 45, "parameters": ["$gameScreen.startFadeOut(60); $gameInterpreter.wait(60);"]},{"code": 45, "parameters": ["$gameScreen.changeWeather(rain,10,10); $gameInterpreter.wait(80);"]},{"code": 45, "parameters": ["$gameMessage.add('another test');"]},{"code": 0}], "repeat": false, "skippable": false, "wait": false}

Which I can then use to control events created solely by code, forceMoveRoute calls, etc.

And now I have moved on to the Event List commands.

But the List of Event Codes is much more extensive than MoveRoute, so I am reading through the JSONs and writing out a guide to myself before I extend my interpreter.

It's a lot of work but I am also learning / teaching myself JavaScript in the process (I only started using RPG Maker at the end of February this year) so I am enjoying it quite a bit and glad for the pointers everybody on the forum is giving me.

I apologize again for double-posting.
sorry for double-posting.
I am working on a script that lets me build and destroy events dynamically- in an effort to make the enemies in my game more interesting (since I am using an ABS system), among other things.

No problem mate. We blue text to remind, not to patronize, especially on new members. 🙂
Aha! VERY interesting approach and I like it.

Original thread: https://forums.rpgmakerweb.com/threads/list-of-event-codes.109661/