Extract Events to Text File

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,436
Reaction score
12,957
First Language
English
Primarily Uses
RMMV
I think someone else made one before I got to it.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,436
Reaction score
12,957
First Language
English
Primarily Uses
RMMV
Because the data files are all json for MV, you can use a text editor to do a regex search. I know Sublime Text will do this.
 

Jatopian

Veteran
Veteran
Joined
Jul 5, 2015
Messages
51
Reaction score
14
First Language
English
Primarily Uses
Because the data files are all json for MV, you can use a text editor to do a regex search. I know Sublime Text will do this.
That is technically true, if you can work out which numeric values correspond to each event command and argument and then carefully form a query. It takes forever to do that, though.
 

VK90

Warper
Member
Joined
May 10, 2020
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMVXA

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,436
Reaction score
12,957
First Language
English
Primarily Uses
RMMV
I have made a small fix to the script. Please download the new version.
 

VK90

Warper
Member
Joined
May 10, 2020
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMVXA

VK90

Warper
Member
Joined
May 10, 2020
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Sorry, couldnt attach the file for some reason, the error message is:

Script 'Passive States' line 177: NoMethodError occurred.
unidentified method 'each' for nil:NilClass
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,436
Reaction score
12,957
First Language
English
Primarily Uses
RMMV
That is an error with the Passive States script, not with mine. Does it happen when you remove my script completely? If it doesn't, then there could be a conflict.
 

Jatopian

Veteran
Veteran
Joined
Jul 5, 2015
Messages
51
Reaction score
14
First Language
English
Primarily Uses
Because the data files are all json for MV, you can use a text editor to do a regex search. I know Sublime Text will do this.
That is technically true, if you can work out which numeric values correspond to each event command and argument and then carefully form a query. It takes forever to do that, though.
Perhaps I have not made this point very compellingly. Here's an example. Let's say I want to find out what events I have in the project that can bestow a new skill.

Procedure with an event dump from the VX Ace script:
Open in text editor, Ctrl+F for the name of that event command (e.g. "Change Skills"), decide whether you want a simple count or a display of every line, and read easily where each usage of that command is, from which event page on which map, with parameters in plain English.
Time taken: about as fast as you can read text, plus mere seconds for the initial search.

Procedure with MV right now:
First, find the Javascript file with the interpreter that lists all the event commands. Ctrl+F for the name of the basic command you wanted. (At this point you've already spent as much time as in the VX Ace event dump approach!) Take note of the internal name for that command, of the form "command###", and be careful to get those numbers right.
If you only want some usages of the command (e.g. you only want to see when skills are given rather than removed, or only particular skills or actors) look up a tutorial on Regular Expressions. These are tricky, but you can probably learn to use them within a few hours if you're technically minded. Construct a regular expression that starts with the command name and skips over any info you're not interested, such as "indent", but does include the array of parameters. Remember to escape special characters like quote marks and brackets. If you're interested in a particular parameter you need to modify your regex to accept any value including a null value for the parameters that may be between the first one and the one you care about in the array, but only the desired values for the parameter you want.
Now to search for or just understand the parameters, you have to figure out what order they're in and what each value represents. The easiest way may be to create a throwaway project with just that command and do some trial & error until you understand what each parameter does, (minutes? hours?), or you can look at the Javascript code for that command and try to parse it (go learn Javascript, come back in a few weeks?), or you can just look at the event in the editor, assuming it's your project, which will take a couple of minutes for each instance, longer or shorter depending on the size of the project, the map, and the event page. (XY coordinates are at the end of the event's bracketed block, but as for which page, you'll have to count them. A tool like JSFormat may help.)
Time taken: Wildly varies from a few more minutes for finding just one thing, to a lot longer, based on project complexity and technical skills. Expect pain if you're a child ("Simple Enough for a Child. Powerful Enough for a Developer." ~RPG Maker MV store page) or just not that technically inclined.

See how much longer even the explanation of the second approach is? How much time has been spent on this approach for lack of a better way?


Or, an example from another angle: How many minutes does it take to look at this event and tell what's happening?
JavaScript:
{"id":2,"name":"EV002","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":true,"image":{"tileId":0,"characterName":"!Crystal","direction":4,"pattern":1,"characterIndex":2},"list":[{"code":103,"indent":0,"parameters":[1,4]},{"code":111,"indent":0,"parameters":[1,1,0,0,3]},{"code":314,"indent":1,"parameters":[0,0]},{"code":101,"indent":1,"parameters":["",0,0,2]},{"code":401,"indent":1,"parameters":["There. Come again whenever you need."]},{"code":0,"indent":1,"parameters":[]},{"code":411,"indent":0,"parameters":[]},{"code":318,"indent":1,"parameters":[0,0,0,8]},{"code":101,"indent":1,"parameters":["",0,0,2]},{"code":401,"indent":1,"parameters":["Perhaps this is something you should do yourself "]},{"code":401,"indent":1,"parameters":["in future."]},{"code":321,"indent":1,"parameters":[1,4,true]},{"code":0,"indent":1,"parameters":[]},{"code":412,"indent":0,"parameters":[]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":16,"indent":null},{"code":17,"indent":null},{"code":19,"indent":null},{"code":18,"indent":null},{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":5,"moveType":3,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":9,"y":7}
]
}
That's one event, about 10 lines in the editor. With the VX Ace script it was possible to follow a whole event flow from a text editor.

But this? You'd have to be some kind of machine, like say a machine programmed with a script to translate MV event commands into English. A Shazbot, one could call it.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,436
Reaction score
12,957
First Language
English
Primarily Uses
RMMV
You are talking about a port of this for MV? I honestly thought someone else did it.

Well, given MZ will be out in a little while, I might port it to both MV and MZ at the same time.
 

Jatopian

Veteran
Veteran
Joined
Jul 5, 2015
Messages
51
Reaction score
14
First Language
English
Primarily Uses
You are talking about a port of this for MV? I honestly thought someone else did it.
We had that discussion a few posts up, but I searched for it again before I posted today and still nothing more than a dialogue extractor seems to exist.
Well, given MZ will be out in a little while, I might port it to both MV and MZ at the same time.
Sounds efficient.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,436
Reaction score
12,957
First Language
English
Primarily Uses
RMMV
You reported a few other bugs higher up - transfer to map that doesn't exist crashes game, something about equips showing the wrong actor. Did I fix those, or are they still issues?
 

Jatopian

Veteran
Veteran
Joined
Jul 5, 2015
Messages
51
Reaction score
14
First Language
English
Primarily Uses
Transfer to nonexistent map seems to be fixed.
These are the known issues I still see with 1.02:
Show Balloon Icon shows the wrong type of icon, e.g. Anger when it's actually Heart.
Change Equipment shows the wrong actor, e.g. Actor 3 (Terence) instead of Actor 2 (Natalie)
Change Nickname shows ... a pointer I think, instead of the actor's name.

Example output for all of these issues:
1^3^Map 1 ( - )^1^EV001 (8,7) - EV001^1^1^213^Show Balloon Icon^4 (Anger) on Player
10^3^Map 1 ( - )^1^EV001 (8,7) - EV001^1^10^319^Change Equipment^Actor 3 (Terence) Weapon 12 Zephyrus Claw
11^3^Map 1 ( - )^1^EV001 (8,7) - EV001^1^11^319^Change Equipment^Actor 3 (Terence) Headgear 28 Sarett
14^3^Map 1 ( - )^1^EV001 (8,7) - EV001^1^14^324^Change Nickname^Actor 2 (#<RPG::Actor:0x978db20>) to Tasha
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,436
Reaction score
12,957
First Language
English
Primarily Uses
RMMV
Thanks for that! I'll fix these in the Ace script as well.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

https://s12.directupload.net/images/200715/34vwhkoz.png Finally have a concept I am happy with, now I just have to decide wheather I really want to do it as vector art.
I just keep coming up with weird ideas, and then spend the time trying to make sense out of it.:kaocry:
Hi, Erm... My name is zozobie! I just had a snack.
Face masks are to be compulsory when inside shops in England from the 24th of July. People can be fined £100 if they fail to comply.

Forum statistics

Threads
99,692
Messages
968,072
Members
131,381
Latest member
3dprintindex
Top