Text Extractor - extract all text in your game into a single readable file

Introduction
Spellchecking text in your game is a bit of a pain, isn't it? There's no simple way to just find every typo in the whole project, or at least to look at all the text at once... or at least there wasn't until now 😉

This plugin will take the contents of every message in your project and put it all into a single file, organised by maps and events. You'll then by able to read through it in a text editor of your choice and easily spot any typos. Or even paste it into ChatGPT to help spot mistakes which are valid words that are used wrong.

How to use it
Download the attached file, add it as a plugin, run the game, open devtools (F12), select the console tab, type runExtractor() and press Enter. This will create an extractedText.txt file in your project's folder. What you do with that file is completely up to you. Optionally, you can change a plugin parameter to instead create a folder called extractedText, with separate files for each map.

Optionally you can add a <NoExtraction> notetag to events or maps - those will be skipped in extraction.

If you're trying to find typos, I'd recommend adding "EV" to your personal dictionary, so that event names don't register as one. Same with "Event", "Common", "Map", "Choice" and "Troop" if your game's language isn't English.

When it comes to fixing any mistakes you find, there are two ways. You can use the editor, open the map where the mistake is from, and then use Ctrl+F to search for the event's name.
Alternatively, open the corresponding map json file (in the data folder in your project), search for the mistake, and correct it there. Just make sure you have those files backed up first.

If you're using an LLM to spot further mistakes, I recommend only pasting small fragments of the file at a time, e.g. a single map, or even a part of a map if it's particularly large. It tends to work reasonably well.

Terms
This plugin is available under the MIT Licence. You're free to use it in any games, commercial or not, or use the code in your own plugins. Credit is appreciated if you find it useful, but not required.
Very cool - I can see this being useful not just for spellchecking, but translation and working in group projects with a writer.

What do you think about adding optional arguments to runExtractor()? You might specify by text type - e.g. runExtractor(maps) - and by a specific map's events - runExtractor(5).
Very cool - I can see this being useful not just for spellchecking, but translation and working in group projects with a writer.

What do you think about adding optional arguments to runExtractor()? You might specify by text type - e.g. runExtractor(maps) - and by a specific map's events - runExtractor(5).
Extracting text from a single event should be rather simple - there's already a function that does that internally, I'd just need to expose it.

I'm not sure what would "text type" be - do you mean specifying whether we want the data from maps or common events?
Extracting text from a single event should be rather simple - there's already a function that does that internally, I'd just need to expose it.
I meant more from a single map's worth of events (although you could certainly add both functionalities).

I'm not sure what would "text type" be - do you mean specifying whether we want the data from maps or common events?
Right. Just the map text, just the common event text, just from one map. I haven't looked at how you structured the extraction function, I'm just assuming narrowing the scope like that wouldn't be too challenging.
I meant more from a single map's worth of events (although you could certainly add both functionalities).


Right. Just the map text, just the common event text, just from one map. I haven't looked at how you structured the extraction function, I'm just assuming narrowing the scope like that wouldn't be too challenging.
That's probably doable reasonably easily, I'll think about it tomorrow.
I'm also thinking about making an option to write each map to a separate file, since then you could just grab whichever one you want.
It sure has been a while, but I finally got to my backlog of plugin updates. So with that:

Version 1.1 is now available

New features:

- You can now choose to split the output across multiple files (with one map per file)
I like what you did with this plugin, I will use it to check spelling and translation, although I think it lacks the ability to extract messages contained in Troops
I like what you did with this plugin, I will use it to check spelling and translation, although I think it lacks the ability to extract messages contained in Troops
Looks like troop events are really similar to regular events, so that was a surprisingly simple feature to add.

Version 1.2 is now available

New features:

- Text from troop events will now also be extracted
Xcellaint sinse aye catn speel.
Could this plugin be used to extract the text from a project, send it to somebody for checking, then re-insert with the changes?

Apologies if that is already possible and I'm too daft to figure it out!
I had to reinsert the edits manually...
And OMG there were so many!
Could this plugin be used to extract the text from a project, send it to somebody for checking, then re-insert with the changes?

Apologies if that is already possible and I'm too daft to figure it out!
You can do the first two of these, but unfortunately there's no way to automatically change the map files afterwards. A plugin that could do that would be a lot more complicated than this one, though I might make one some day...

Original thread: https://forums.rpgmakerweb.com/threads/text-extractor-extract-all-text-in-your-game-into-a-single-readable-file.164708/