Interpreter EX is an RPG maker XP enginers tool that allows to obtain the event commands in text format.
More precisely, it's a plug-and-play script, compatible with everything; you add it above Main, change its configuration, execute the game (in Debug mode) to obtain the result, and remove it later.
Description
This script converts the event commands in text format and saves them in an RTF file in the main folder of the game, so you can later do whatever you want with it.
Apart from obtaining all the commands of an event, there are more similar options, read the instructions in the script for more information. For example, you can get only the text, with the formats \c[1] marked in green or without them. You can also get all the texts from the Database, including the names of the variables and switches.
Terms of Use
This code is completely free to use and doesn't require credits.
How to Use
Right after the instructions of the script there's an empty space inside the InterpreterEX with two basic examples of usage; the only thing you need to do is define there what text you want to output.
Utility
- Sharing engines in the forum can be complicated, but obtaining them as texts allows you to paste them, as you do with scripts.
- For development teams, the distribution of RTFs to check the engines is more optimized than sharing demos each time.
- Screenshots of large engines are tedious to make; you have more freedom with a document.
- Extracting only the event texts and database allows to check the spelling more easily.
Download
You can download both the English and Spanish versions here: Interpreter EX 1.0
More precisely, it's a plug-and-play script, compatible with everything; you add it above Main, change its configuration, execute the game (in Debug mode) to obtain the result, and remove it later.
Description
This script converts the event commands in text format and saves them in an RTF file in the main folder of the game, so you can later do whatever you want with it.
Apart from obtaining all the commands of an event, there are more similar options, read the instructions in the script for more information. For example, you can get only the text, with the formats \c[1] marked in green or without them. You can also get all the texts from the Database, including the names of the variables and switches.
Terms of Use
This code is completely free to use and doesn't require credits.
How to Use
Right after the instructions of the script there's an empty space inside the InterpreterEX with two basic examples of usage; the only thing you need to do is define there what text you want to output.
Utility
- Sharing engines in the forum can be complicated, but obtaining them as texts allows you to paste them, as you do with scripts.
- For development teams, the distribution of RTFs to check the engines is more optimized than sharing demos each time.
- Screenshots of large engines are tedious to make; you have more freedom with a document.
- Extracting only the event texts and database allows to check the spelling more easily.
Download
You can download both the English and Spanish versions here: Interpreter EX 1.0
Is there a way to import the engine text back into the game?
Sadly, the command texts are often a bit ambiguous, and I also prefer not to overwrite things on the game via script, so the answer is no.
Why for some people the document is opened automatically when you execute the game, and for others it doesn't?
It depends on the Windows version and language you're using. Even if it can't open it, it won't crash... so you can search it on the project folder as always. Also, make sure you're playing the game from the Editor to activate the Debug mode.
I use a custom message system, so some message codes aren't read properly by the tool when extracting text. Is there a way to fix that?
Sure! All you need to do is edit the methods
I'll add here a few examples: Universal Message System (UMS), Advenced Message System (AMS), and Wecoc's Message System (WMS).
Sadly, the command texts are often a bit ambiguous, and I also prefer not to overwrite things on the game via script, so the answer is no.
Why for some people the document is opened automatically when you execute the game, and for others it doesn't?
It depends on the Windows version and language you're using. Even if it can't open it, it won't crash... so you can search it on the project folder as always. Also, make sure you're playing the game from the Editor to activate the Debug mode.
I use a custom message system, so some message codes aren't read properly by the tool when extracting text. Is there a way to fix that?
Sure! All you need to do is edit the methods
gsub_format! and gsub_unformat! to include the extra message codes.I'll add here a few examples: Universal Message System (UMS), Advenced Message System (AMS), and Wecoc's Message System (WMS).
Ruby:
#--------------------------------------------------------------------------
# * [UMS 1.8.0] Change color of the special message codes
#--------------------------------------------------------------------------
def gsub_format!
self.gsub!(/\\\\face\[(.*?)\]/) { "\\cf[3]\\\\face[#{$1}]\\cf[0]" }
self.gsub!(/\\\\font\[(.*?)\]/) { "\\cf[3]\\\\font[#{$1}]\\cf[0]" }
self.gsub!(/\\\\bopc\[([0-9]+)\]/) { "\\cf[3]\\\\bopc[#{$1}]\\cf[0]" }
self.gsub!(/\\\\opc\[([0-9]+)\]/) { "\\cf[3]\\\\opc[#{$1}]\\cf[0]" }
self.gsub!(/\\\\nm\[(.*?)\]/) { "\\cf[3]\\\\nm[#{$1}]\\cf[0]" }
self.gsub!(/\\\\oa\[([0-9]+)\]/) { "\\cf[3]\\\\oa[#{$1}]\\cf[0]" }
self.gsub!(/\\\\oi\[([0-9]+)\]/) { "\\cf[3]\\\\oi[#{$1}]\\cf[0]" }
self.gsub!(/\\\\os\[([0-9]+)\]/) { "\\cf[3]\\\\os[#{$1}]\\cf[0]" }
self.gsub!(/\\\\ow\[([0-9]+)\]/) { "\\cf[3]\\\\ow[#{$1}]\\cf[0]" }
self.gsub!(/\\\\shk\[([0-9]+)\]/) { "\\cf[3]\\\\shk[#{$1}]\\cf[0]" }
self.gsub!(/\\\\slv\[(.*?)\]/) { "\\cf[3]\\\\slv[#{$1}]\\cf[0]" }
self.gsub!(/\\\\ta\[([0-9]+)\]/) { "\\cf[3]\\\\ta[#{$1}]\\cf[0]" }
self.gsub!(/\\\\ws\[([0-9]+)\]/) { "\\cf[3]\\\\ws[#{$1}]\\cf[0]" }
self.gsub!(/\\\\v\[([0-9]+)\]/) { "\\cf[3]\\\\v[#{$1}]\\cf[0]" }
self.gsub!(/\\\\V\[([0-9]+)\]/) { "\\cf[3]\\\\V[#{$1}]\\cf[0]" }
self.gsub!(/\\\\n\[([0-9]+)\]/) { "\\cf[3]\\\\n[#{$1}]\\cf[0]" }
self.gsub!(/\\\\N\[([0-9]+)\]/) { "\\cf[3]\\\\N[#{$1}]\\cf[0]" }
self.gsub!(/\\\\c\[(.*?)\]/) { "\\cf[3]\\\\c[#{$1}]\\cf[0]" }
self.gsub!(/\\\\C\[(.*?)\]/) { "\\cf[3]\\\\C[#{$1}]\\cf[0]" }
self.gsub!(/\\\\e\[([0-9]+)\]/) { "\\cf[3]\\\\e[#{$1}]\\cf[0]" }
self.gsub!(/\\\\p\[([0-9]+)\]/) { "\\cf[3]\\\\p[#{$1}]\\cf[0]" }
self.gsub!(/\\\\w\[([0-9]+)\]/) { "\\cf[3]\\\\w[#{$1}]\\cf[0]" }
self.gsub!(/\\\\fl/) { "\\cf[3]\\\\fl\\cf[0]" }
self.gsub!(/\\\\fr/) { "\\cf[3]\\\\fr\\cf[0]" }
self.gsub!(/\\\\jc/) { "\\cf[3]\\\\jc\\cf[0]" }
self.gsub!(/\\\\jl/) { "\\cf[3]\\\\jl\\cf[0]" }
self.gsub!(/\\\\jr/) { "\\cf[3]\\\\jr\\cf[0]" }
self.gsub!(/\\\\font/) { "\\cf[3]\\\\font\\cf[0]" }
self.gsub!(/\\\\width/) { "\\cf[3]\\\\width\\cf[0]" }
self.gsub!(/\\\\height/) { "\\cf[3]\\\\height\\cf[0]" }
self.gsub!(/\\\\ignr/) { "\\cf[3]\\\\ignr\\cf[0]" }
self.gsub!(/\\\\inc/) { "\\cf[3]\\\\inc\\cf[0]" }
self.gsub!(/\\\\pt/) { "\\cf[3]\\\\pt\\cf[0]" }
self.gsub!(/\\\\skip/) { "\\cf[3]\\\\skip\\cf[0]" }
self.gsub!(/\\\\t1/) { "\\cf[3]\\\\t1\\cf[0]" }
self.gsub!(/\\\\t2/) { "\\cf[3]\\\\t2\\cf[0]" }
self.gsub!(/\\\\tc/) { "\\cf[3]\\\\tc\\cf[0]" }
self.gsub!(/\\\\th/) { "\\cf[3]\\\\th\\cf[0]" }
self.gsub!(/\\\\tl/) { "\\cf[3]\\\\tl\\cf[0]" }
self.gsub!(/\\\\tr/) { "\\cf[3]\\\\tr\\cf[0]" }
self.gsub!(/\\\\g/) { "\\cf[3]\\\\g\\cf[0]" }
self.gsub!(/\\\\G/) { "\\cf[3]\\\\G\\cf[0]" }
self.gsub!(/\\\\b/) { "\\cf[3]\\\\b\\cf[0]" }
self.gsub!(/\\\\i/) { "\\cf[3]\\\\i\\cf[0]" }
self.gsub!(/\\\\m/) { "\\cf[3]\\\\m\\cf[0]" }
self.gsub!(/\\\\s/) { "\\cf[3]\\\\s\\cf[0]" }
return self
end
#--------------------------------------------------------------------------
# * [UMS 1.8.0] Remove the special message codes
#--------------------------------------------------------------------------
def gsub_unformat!
self.gsub!(/\\\\face\[(.*?)\]/, "")
self.gsub!(/\\\\font\[(.*?)\]/, "")
self.gsub!(/\\\\bopc\[([0-9]+)\]/, "")
self.gsub!(/\\\\opc\[([0-9]+)\]/, "")
self.gsub!(/\\\\nm\[(.*?)\]/, "")
self.gsub!(/\\\\oa\[([0-9]+)\]/, "")
self.gsub!(/\\\\oi\[([0-9]+)\]/, "")
self.gsub!(/\\\\os\[([0-9]+)\]/, "")
self.gsub!(/\\\\ow\[([0-9]+)\]/, "")
self.gsub!(/\\\\shk\[([0-9]+)\]/, "")
self.gsub!(/\\\\slv\[(.*?)\]/, "")
self.gsub!(/\\\\ta\[([0-9]+)\]/, "")
self.gsub!(/\\\\ws\[([0-9]+)\]/, "")
self.gsub!(/\\\\v\[([0-9]+)\]/, "")
self.gsub!(/\\\\V\[([0-9]+)\]/, "")
self.gsub!(/\\\\n\[([0-9]+)\]/, "")
self.gsub!(/\\\\N\[([0-9]+)\]/, "")
self.gsub!(/\\\\c\[(.*?)\]/, "")
self.gsub!(/\\\\C\[(.*?)\]/, "")
self.gsub!(/\\\\e\[([0-9]+)\]/, "")
self.gsub!(/\\\\p\[([0-9]+)\]/, "")
self.gsub!(/\\\\w\[([0-9]+)\]/, "")
self.gsub!(/\\\\fl/, "")
self.gsub!(/\\\\fr/, "")
self.gsub!(/\\\\jc/, "")
self.gsub!(/\\\\jl/, "")
self.gsub!(/\\\\jr/, "")
self.gsub!(/\\\\font/, "")
self.gsub!(/\\\\width/, "")
self.gsub!(/\\\\height/, "")
self.gsub!(/\\\\ignr/, "")
self.gsub!(/\\\\inc/, "")
self.gsub!(/\\\\pt/, "")
self.gsub!(/\\\\skip/, "")
self.gsub!(/\\\\t1/, "")
self.gsub!(/\\\\t2/, "")
self.gsub!(/\\\\tc/, "")
self.gsub!(/\\\\th/, "")
self.gsub!(/\\\\tl/, "")
self.gsub!(/\\\\tr/, "")
self.gsub!(/\\\\g/, "")
self.gsub!(/\\\\G/, "")
self.gsub!(/\\\\b/, "")
self.gsub!(/\\\\i/, "")
self.gsub!(/\\\\m/, "")
self.gsub!(/\\\\s/, "")
return self
end
Ruby:
#--------------------------------------------------------------------------
# * [AMS R4 #2] Change color of the special message codes
#--------------------------------------------------------------------------
def gsub_format!
self.gsub!(/\\\\[pP]rice\[([0-9]+)\]/) { "\\cf[3]\\\\price[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[cC]lass\[([0-9]+)\]/) { "\\cf[3]\\\\class[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[cC]olor\[([0-9]+)\]/) { "\\cf[3]\\\\color[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[nN]ame\[(.*?)\]/) { "\\cf[3]\\\\name[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[vV]\[i([0-9]+)\]/) { "\\cf[3]\\\\v[i#{$1}]\\cf[0]" }
self.gsub!(/\\\\[vV]\[a([0-9]+)\]/) { "\\cf[3]\\\\v[a#{$1}]\\cf[0]" }
self.gsub!(/\\\\[vV]\[w([0-9]+)\]/) { "\\cf[3]\\\\v[w#{$1}]\\cf[0]" }
self.gsub!(/\\\\[vV]\[s([0-9]+)\]/) { "\\cf[3]\\\\v[s#{$1}]\\cf[0]" }
self.gsub!(/\\\\[vV]\[([0-9]+)\]/) { "\\cf[3]\\\\v[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[nN]\[([0-9]+)\]/) { "\\cf[3]\\\\n[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[mM]\[([0-9]+)\]/) { "\\cf[3]\\\\m[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[oO]\[([0-9]+)\]/) { "\\cf[3]\\\\o[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[sS]\[([0-9]+)\]/) { "\\cf[3]\\\\s[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[hH]\[([0-9]+)\]/) { "\\cf[3]\\\\s[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[cC]\[(.*?)\]/) { "\\cf[3]\\\\c[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[zZ]\[(.*?)\]/) { "\\cf[3]\\\\z[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[fF]\[(.*?)\]/) { "\\cf[3]\\\\f[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[pP]\[(.*?)\]/) { "\\cf[3]\\\\p[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[tT]\[(.*?)\]/) { "\\cf[3]\\\\t[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[aA]\[(.*?)\]/) { "\\cf[3]\\\\a[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[mM]ap/) { "\\cf[3]\\\\map\\cf[0]" }
self.gsub!(/\\\\[gG]/) { "\\cf[3]\\\\g\\cf[0]" }
self.gsub!(/\\\\\[(.*?)\]([0-9]+)/) { "\\cf[9]\\\(#{$1}\^#{$2}\)\\cf[0]" }
self.gsub!(/\\\\\|/) { "\\cf[7]\\\\\|\\cf[0]" }
self.gsub!(/\\\\\./) { "\\cf[7]\\\\\.\\cf[0]" }
self.gsub!(/\\\\\~/) { "\\cf[7]\\\\\~\\cf[0]" }
self.gsub!(/\\\\\!/) { "\\cf[7]\\\\\!\\cf[0]" }
self.gsub!(/\\\\\</) { "\\cf[7]\\\\\<\\cf[0]" }
self.gsub!(/\\\\\>/) { "\\cf[7]\\\\\>\\cf[0]" }
self.gsub!(/\\\\\%/) { "\\cf[7]\\\\\%\\cf[0]" }
return self
end
#--------------------------------------------------------------------------
# * [AMS R4 #2] Remove the special message codes
#--------------------------------------------------------------------------
def gsub_unformat!
self.gsub!(/\\\\[pP]rice\[([0-9]+)\]/, "")
self.gsub!(/\\\\[cC]lass\[([0-9]+)\]/, "")
self.gsub!(/\\\\[cC]olor\[([0-9]+)\]/, "")
self.gsub!(/\\\\[nN]ame\[(.*?)\]/, "")
self.gsub!(/\\\\[vV]\[i([0-9]+)\]/, "")
self.gsub!(/\\\\[vV]\[a([0-9]+)\]/, "")
self.gsub!(/\\\\[vV]\[w([0-9]+)\]/, "")
self.gsub!(/\\\\[vV]\[s([0-9]+)\]/, "")
self.gsub!(/\\\\[vV]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[nN]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[mM]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[oO]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[sS]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[hH]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[cC]\[(.*?)\]/, "")
self.gsub!(/\\\\[zZ]\[(.*?)\]/, "")
self.gsub!(/\\\\[fF]\[(.*?)\]/, "")
self.gsub!(/\\\\[pP]\[(.*?)\]/, "")
self.gsub!(/\\\\[tT]\[(.*?)\]/, "")
self.gsub!(/\\\\[aA]\[(.*?)\]/, "")
self.gsub!(/\\\\[mM]ap/, "")
self.gsub!(/\\\\[gG]/, "")
self.gsub!(/\\\\\[(.*?)\]([0-9]+)/) { "\\cf[9]\\\(#{$1}\^#{$2}\)\\cf[0]" }
self.gsub!(/\\\\\|/, "")
self.gsub!(/\\\\\./, "")
self.gsub!(/\\\\\~/, "")
self.gsub!(/\\\\\!/, "")
self.gsub!(/\\\\\</, "")
self.gsub!(/\\\\\>/, "")
self.gsub!(/\\\\\%/, "")
return self
end
Ruby:
#--------------------------------------------------------------------------
# * [WMS 1.0] Change color of the special message codes
#--------------------------------------------------------------------------
def gsub_format!
self.gsub!(/\\\\[Ff][Oo][Nn][Tt]\[(.*?)\]/) {
"\\cf[3]\\\\font[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Ss][Ii][Zz][Ee]\[([0-9]+)\]/) {
"\\cf[3]\\\\size[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Ss][Hh][Xx]\[([0-9]+)\]/) {
"\\cf[3]\\\\shx[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Ss][Hh][Yy]\[([0-9]+)\]/) {
"\\cf[3]\\\\shy[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Ss][Hh][Cc]\[([0-9]+)\]/) {
"\\cf[3]\\\\shc[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Oo][Uu][Cc]\[([0-9]+)\]/) {
"\\cf[3]\\\\ouc[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Cc][Hh][Cc]\[([0-9]+)\]/) {
"\\cf[7]\\\\chc[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Bb][Oo][Pp][Cc]\[([0-9]+)\]/) {
"\\cf[3]\\\\bopc[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Oo][Pp][Cc]\[([0-9]+)\]/) {
"\\cf[3]\\\\opc[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Mm][Aa][Pp]\[([0-9]+)\]/) {
"\\cf[3]\\\\map[#{$1}]\\cf[0]"
}
self.gsub!(/\\\\[Ss][Cc]\[([0-9]+)\]/) { "\\cf[3]\\\\sc[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Ii][Cc]\[(.*?)\]/) { "\\cf[3]\\\\ic[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Oo][Aa]\[([0-9]+)\]/) { "\\cf[3]\\\\oa[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Oo][Ii]\[([0-9]+)\]/) { "\\cf[3]\\\\oi[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Oo][Ss]\[([0-9]+)\]/) { "\\cf[3]\\\\os[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Oo][Ww]\[([0-9]+)\]/) { "\\cf[3]\\\\ow[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Ww][Ss]\[([0-9]+)\]/) { "\\cf[3]\\\\ws[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Ww][Aa]\[([0-9]+)\]/) { "\\cf[3]\\\\wa[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Ll][Ss]\[([0-9]+)\]/) { "\\cf[3]\\\\ls[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Ss]\[([0-9]+)\]/) { "\\cf[7]\\\\s[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Qq]\[([0-9]+)\]/) { "\\cf[7]\\\\q[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Zz]\[([0-9]+)\]/) { "\\cf[3]\\\\z[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Ee]\[([0-9]+)\]/) { "\\cf[3]\\\\e[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Pp]\[([0-9]+)\]/) { "\\cf[3]\\\\p[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Nn]\[([0-9]+)\]/) { "\\cf[3]\\\\n[#{$1}]\\cf[0]" }
self.gsub!(/\\\\[Cc]\[([0-9]+)\]/) { "\\cf[3]\\\\c[#{$1}]\\cf[0]" }
self.gsub!(/\\\\dn/) { "\\cf[8]+\\cf[0]" }
self.gsub!(/\\\\\+/) { "\\cf[8]->\\cf[0]" }
self.gsub!(/\\\\\!/) { "\\cf[3]\\\\!\\cf[0]" }
self.gsub!(/\\\\[Dd][Ff]/) { "\\cf[3]\\\\df\\cf[0]" }
self.gsub!(/\\\\[Uu][Pp]/) { "\\cf[3]\\\\up\\cf[0]" }
self.gsub!(/\\\\[Ss][Hh]/) { "\\cf[3]\\\\sh\\cf[0]" }
self.gsub!(/\\\\[Oo][Uu]/) { "\\cf[3]\\\\ou\\cf[0]" }
self.gsub!(/\\\\[Jj][Ll]/) { "\\cf[3]\\\\jl\\cf[0]" }
self.gsub!(/\\\\[Jj][Cc]/) { "\\cf[3]\\\\jc\\cf[0]" }
self.gsub!(/\\\\[Jj][Rr]/) { "\\cf[3]\\\\jr\\cf[0]" }
self.gsub!(/\\\\[Tt][Ll]/) { "\\cf[3]\\\\tl\\cf[0]" }
self.gsub!(/\\\\[Tt][Cc]/) { "\\cf[3]\\\\tc\\cf[0]" }
self.gsub!(/\\\\[Tt][Rr]/) { "\\cf[3]\\\\tr\\cf[0]" }
self.gsub!(/\\\\[Bb]/) { "\\cf[3]\\\\b\\cf[0]" }
self.gsub!(/\\\\[Ii]/) { "\\cf[3]\\\\i\\cf[0]" }
self.gsub!(/\\\\[Gg]/) { "\\cf[3]\\\\g\\cf[0]" }
self.gsub!(/\\\\n/) { "\\line" }
self.gsub!(/\\\\t/) { "\\tab" }
return self
end
#--------------------------------------------------------------------------
# * [WMS 1.0] Remove the special message codes
#--------------------------------------------------------------------------
def gsub_unformat!
self.gsub!(/\\\\[Ff][Oo][Nn][Tt]\[(.*?)\]/, "")
self.gsub!(/\\\\[Ss][Ii][Zz][Ee]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ss][Hh][Xx]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ss][Hh][Yy]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ss][Hh][Cc]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Oo][Uu][Cc]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Cc][Hh][Cc]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Bb][Oo][Pp][Cc]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Oo][Pp][Cc]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Mm][Aa][Pp]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ss][Cc]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ii][Cc]\[(.*?)\]/, "")
self.gsub!(/\\\\[Oo][Aa]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Oo][Ii]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Oo][Ss]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Oo][Ww]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ww][Ss]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ww][Aa]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ll][Ss]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ss]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Qq]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Zz]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Ee]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Pp]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Nn]\[([0-9]+)\]/, "")
self.gsub!(/\\\\[Cc]\[([0-9]+)\]/, "")
self.gsub!(/\\\\dn/) { "\\cf[8]+\\cf[0]" }
self.gsub!(/\\\\\+/) { "\\cf[8]->\\cf[0]" }
self.gsub!(/\\\\\!/) { "\\cf[3]\\\\!\\cf[0]" }
self.gsub!(/\\\\[Dd][Ff]/, "")
self.gsub!(/\\\\[Uu][Pp]/, "")
self.gsub!(/\\\\[Ss][Hh]/, "")
self.gsub!(/\\\\[Oo][Uu]/, "")
self.gsub!(/\\\\[Jj][Ll]/, "")
self.gsub!(/\\\\[Jj][Cc]/, "")
self.gsub!(/\\\\[Jj][Rr]/, "")
self.gsub!(/\\\\[Tt][Ll]/, "")
self.gsub!(/\\\\[Tt][Cc]/, "")
self.gsub!(/\\\\[Tt][Rr]/, "")
self.gsub!(/\\\\[Bb]/, "")
self.gsub!(/\\\\[Ii]/, "")
self.gsub!(/\\\\[Gg]/, "")
self.gsub!(/\\\\n/) { "\\line" }
self.gsub!(/\\\\t/) { "\\tab" }
return self
end
You can add some Addons after the main code.
Message Text Finder searches through the event messages (and choices) of the entire game for a specific text, and then it returns a list of all the events that include it. It's useful for example if you change the name of a character or site and you want to be sure the old name was not left in any event.
Message Cut Warning checks the texts in all events and returns those that may appear cut out in the game.
Message Text Finder searches through the event messages (and choices) of the entire game for a specific text, and then it returns a list of all the events that include it. It's useful for example if you change the name of a character or site and you want to be sure the old name was not left in any event.
Ruby:
#==============================================================================
# ** [XP] Message Text Finder 1.0 (Interpreter EX Addon)
#==============================================================================
# Search specific texts on events
#==============================================================================
module InterpreterEX
CASE_SENSITIVE = true
def self.message_text_finder
text = ""
# Set here the text you want to search, with a string, regexp or array.
match = ""
if !match.nil? and match != "" and match != //
every_event do |map, event, page|
result = get_event_format_text(map, event, page)
x, y = get_event_pos(map, event)
if match.is_a?(Array)
for m in match
if CASE_SENSITIVE == false and m.is_a?(String)
if result.downcase.match(m.downcase)
text.concat("Map #{map}, Event #{event} (X: #{x}, Y: #{y})\n")
end
else
if result.match(m)
text.concat("Map #{map}, Event #{event} (X: #{x}, Y: #{y})\n")
end
end
end
else
if CASE_SENSITIVE == false and match.is_a?(String)
if result.downcase.match(match.downcase)
text.concat("Map #{map}, Event #{event} (X: #{x}, Y: #{y})\n")
end
else
if result.match(match)
text.concat("Map #{map}, Event #{event} (X: #{x}, Y: #{y})\n")
end
end
end
end
print text
#save_rtf(text) # Activate this line if you want to save the result
end
end
end
def get_event_pos(map_id, event_id)
map_r = sprintf("%03d", map_id)
ev_r = sprintf("%03d", event_id)
load_rxdata if $data_actors.nil?
$data_map = load_data(sprintf("Data/Map%03d.rxdata", map_id)) rescue nil
if $data_map == nil
print("Error: Invalid Map ID (#{map_r})")
return nil, nil
end
map = $data_map.clone
event = map.events[event_id]
return event.x, event.y
end
InterpreterEX.message_text_finder
Message Cut Warning checks the texts in all events and returns those that may appear cut out in the game.
Ruby:
#==============================================================================
# ** [XP] Message Cut Warning 1.0 (Interpreter EX Addon)
#==============================================================================
# This script checks the texts in all events and returns those that may appear cu
#==============================================================================
module InterpreterEX
# Display actor names with \n[X]
USE_DEFAULT_NAMES = true
CUSTOM_NAME = "< Name >"
# Number of characters per line (you can use the text width instead)
USE_TEXT_WIDTH = false
# You may need to set these parameters by hand if you use a custom font
LIMIT_TEXT_SIZE = 30 # Max characters per line
LIMIT_WIDTH = 380 # Max text width per line
def self.message_cut_warning
text = ""
every_event do |map, event, page|
lines = get_event_lines(map, event, page)
for line in lines
clean_text_format(line)
result = false
if USE_TEXT_WIDTH
bmp = Bitmap.new(1, 1)
if bmp.text_size(line).width >= LIMIT_WIDTH
result = true
end
end
if line.size >= LIMIT_TEXT_SIZE
result = true
end
if result == true
x, y = get_event_pos(map, event)
text.concat("Map #{map}, Event #{event} (X: #{x}, Y: #{y})\n")
text.concat("'#{line}'\n")
text.concat("---------------------------------------------\n")
end
end
end
print text
# save_rtf(text) # Activate this line if you want to save the result
end
end
def get_event_pos(map_id, event_id)
map_r = sprintf("%03d", map_id)
ev_r = sprintf("%03d", event_id)
load_rxdata if $data_actors.nil?
$data_map = load_data(sprintf("Data/Map%03d.rxdata", map_id)) rescue nil
if $data_map == nil
print("Error: Invalid Map ID (#{map_r})")
return nil, nil
end
map = $data_map.clone
event = map.events[event_id]
return event.x, event.y
end
def clean_text_format(text)
if InterpreterEX::USE_DEFAULT_NAMES && $data_actors.nil?
$data_actors = load_data("Data/Actors.rxdata")
end
if InterpreterEX::USE_DEFAULT_NAMES
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$data_actors[$1.to_i] != nil ? $data_actors[$1.to_i].name : ""
end
else
text.gsub!(/\\[Nn]\[([0-9]+)\]/, InterpreterEX::CUSTOM_NAME)
end
text.gsub!(/\\[Cc]\[([0-9]+)\]/, "")
text.gsub!(/\\[Gg]/, "")
text.gsub!(/\\[Vv]\[([0-9]+)\]/, "< Var >")
end
def get_event_lines(map_id, event_id, page_id=1)
map_r = sprintf("%03d", map_id)
ev_r = sprintf("%03d", event_id)
load_rxdata if $data_actors.nil?
$data_map = load_data(sprintf("Data/Map%03d.rxdata", map_id)) rescue nil
return "" if $data_map == nil
map = $data_map.clone
event = map.events[event_id]
return "" if event == nil
page = event.pages[page_id - 1]
return "" if page == nil
result = []
for command in page.list
case command.code
when 101, 401 # Show text
result.push(command.parameters[0])
when 402 # When [**]
result.push(command.parameters[1])
end
end
return result
end
InterpreterEX.message_cut_warning