• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Utilizing the Extract Text function for other purposes

To start this thread off right, I just have to say this: To err is human, and that is exactly what I am. A human who makes mistakes. These mistakes often result in many things, particularly oversights. In this example, typographical errors and grammatical issues. Or in laymans terms, typos and grammar.

In a moderately sized game, it can become tedious to check over every single event for typos and grammar errors. Of course, checking for these things is required for a good game, but this procedure is a bit long-winded.

Recently, I was hit with an idea - the Extract Text function in the Editor provided with Pokemon Essentials. One could, theoretically, use that to fix typos on massive scale without having to go through each event individually, and then compile it back to game.

For my question, it's as simple as this: is my theory actually possible? Can I actually use the Extract Text function as a way to fix typos and grammar issues on a large scale? And if so... How do I do it? I don't quite understand exactly how the Extract Text function and Compile Text functions work.
 
Hah, I was actually thinking the same thing, especially with getting the é into all the correct places.

From what I understand, the Extract/Compile Text function is so that you can make a single text file, translate it into another language, then recompile it so that you can translate your game with ease.

If that's indeed how it works, then it should be able to work as an easy way to grammar/spell check the entire game in one go.

I really hope that's how it works, because my computer makes typing é a pain in Essentials/RGXP....
 
I did some tests. Looks like the file that you get by compiling text is of the same format
as the 'messages.dat' file that stores all the messages in the game. Now, I replaced the
messages.dat with the intl.dat that Compile Text generated and the NPCs in the game
were saying the same things as before, so I'm assuming that it works.

Now, what this means is, you can extract the text, run a grammar/spelling fixing program
on the intl.txt file, compile it to intl.dat, remove messages.dat (Data folder), copy intl.dat
in the data folder and rename it to messages.dat. Backup messages.dat before doing this,
just in case.

@Jackey
I'm having the same pain putting that é, so I inserted a couple of lines in
method 'Kernel.pbMessage', before the line msgwindow=Kernel...

Code:
message = message.gsub("pokemon", "pokémon")
message = message.gsub("Pokemon", "Pokémon")

Hope this helps :]
 
Last edited:
Leave messages.dat alone. Don't replace it with anything. It gets rewritten each time you fully compile your game, and it acts as the backup language. The contents of this file are just copies of text found elsewhere, and changing them won't change the originals.

What you basically want to do here is to make a new language pack (albeit one that's also English but with some different text). That's perfectly possible.

Extract the text, make the changes, compile it to a new file and call it what you want ("ProperEnglish.dat" or something). Put that file in the Data folder.

You'll need to tweak a couple of things to make the game load your new language pack, as by default it'll only do so if you have 2 or more languages defined (and you only want one). I'm not sure offhand what to do about that, though.

The alternative, of course, is to use proper English in the first place. Or you can at least extract the text to have it all in one place for checking, and figure out where in the actual game is the text you want to fix and do that.
 
Back
Top