Extract Events to Text File

Hello Shaz, this error appears right after the game starts and the program crashes before the title screen is shown:
1652011706411.png

Is it due to a change in Game Engine?
@muveex this error is from a Show Choices command - specifically, you appear to have a When [**] with no value for [**]

You can try changing line 503 from this:
Code:
@arg = "When " + @params[1]

to this:
Code:
@arg = "When " + @params[1].to_s

and if it still gives you an error on the same line, try this instead:
Code:
@arg = "When " + @params[1] ? @params[1] : ""

If that doesn't work, I can take a look at your game if you're able to zip up the whole project and get it to me.
Extract Events to Text File 1.03
Shaz
​
Introduction
This is a DEVELOPMENT script (should not be included in released games) that will let you extract the contents of ALL of your events into text files that can be opened and viewed in a spreadsheet.
This is for VIEWING events only - checking your event logic, proofreading (or as a starting point for translation), searching for switch/variable/item usage, etc. There is NO facility to make changes to these files and merge the changes back into the game. I will not be creating such a facility.


Versions
Spoiler
Code:
1.02  11 May 2020  Fix crash with Change Parallax Background
1.01  22 Jun 2014  Fix crash with troop event conditions
1.03  22 Jul 2020  Fix name on Show Balloon Icon
                   Fix actor in Change Equipment
                   Fix actor in Chagne Nickname

Features
- Optionally extract common events
- Optionally extract battle events
- Extract events from all maps, or from a single map
- Open extracted data in a spreadsheet to convert to columns, browse, search and sort
- Data/_EventContents.txt contains ALL event commands
- Data/_EventDialogue.txt contains all event commands causing text to be displayed (Show Text, Show Choices, name processing, etc)
- Data/_EventSwitchesVariables.txt contains all event commands and conditions that use or change switches or variables

Screenshots

Data/_EventContents.txt converted to columns:
Spoiler
ExtractEvents1.png
Data/_EventDialogue.txt converted to columns:
Spoiler
ExtractEvents2.png
Data/_EventSwitchesVariables.txt converted to columns:
Spoiler
ExtractEvents3.png
How to Use
Copy and paste the script into a new slot in Materials, below all other scripts.
Check the customize options. They are explained in the script header, and the constants/variables to change are in the first few lines of script.

Enable or disable the script by commenting out the entire thing. It does not use switches or get called - if it's not commented out, it runs.
Run your game. When your title screen appears, the script has run and the files have been created.
Close the game and disable the script (Ctrl A, Ctrl Q will select and disable, or select and enable the whole thing).

Open the .txt files and copy and paste the contents into spreadsheets.
Use the spreadsheet's Convert Text to Columns feature to separate the text using a delimiter. The default delimiter is the ^ character.

Script
Download here

FAQ


Credit and Thanks

- You do NOT need to list me in your game credits if you use this script - it is for development only and should be removed before you release your game
- Okay to use in development of commercial games

Author's Notes
Missing parameters
On some event commands I have not included all the parameters (for example, Show Picture and Move Picture do not include the Zoom parameters).
I don't have a complete list of these.
If you use a command and discover some of its parameters are missing, please post below with the command name and the missing parameters, and I will include it in a future update.

Stuff not included
I don't extract the sprite name or autonomous move route details from event pages.
I should do this.
I will include it in a future update.

BUGS!!!
I have not tested every single event command with every single possible combination of options.
I fully expect that some of you will be using commands I have not yet tested, and MAY result in the script crashing before the title screen appears.
If this happens, please take a screenshot of the error message, or type the FULL error message text here EXACTLY as it appears in the error window.
Also indicate in your post what version of the script you are using.
Then disable the script so you can continue working on your game while waiting for a fix.

Bug Fixes
Any bugs and fixes will be listed here until they are added to a new version.

Hello, do you have a script to import text file to events ?

Hello Shaz, this error appears right after the game starts and the program crashes before the title screen is shown:
1724805044220.png
@nhatsang Shaz hasn't been on the site for over a year so it's unlikely that she will reply.

As far as I know, there is no script to import data into events, only export it, so your first question is a simple no. The lack of this was always a great disappointment to me, as such a thing existed for XP.

For your second question - did you paste this script below all others?
@nhatsang Shaz hasn't been on the site for over a year so it's unlikely that she will reply.

As far as I know, there is no script to import data into events, only export it, so your first question is a simple no. The lack of this was always a great disappointment to me, as such a thing existed for XP.

For your second question - did you paste this script below all others?
That so sad.
I try to remove the command .clone in line 312 and now this script is working. I asked gpt and it say that error appear because in ruby don't have command clone
Err, nope. This is the actual reason: numbers in Ruby can't be duplicated nor cloned. They're unique even if they're not exactly primitives as it's the case in C or C++.
Sorry if this is another novice question. But the instruction to install says
"Copy and paste into a new slot in materials, below all other scripts." But I don't understand where "materials" is in RPGMZ. Is this not usable in MZ?

Edit: Yes, it was a novice question. MZ does not run Ruby but JS so can't execute this script. Too bad.

Original thread: https://forums.rpgmakerweb.com/threads/extract-events-to-text-file.17444/