0 : Script Source Data

Holds information about technically anything that is linked to by a function in the main script file.

Description

Section 0 is the main script of an ebp file that basically handles most of the logic in a location. This includes:

  • Characters (Foe, NPC, ...)

  • Traps

  • Treasures

  • Dialogue

  • Quests

  • Animations

  • and much more.

The main script is basically just a list of functions on when, where, what should happen. In some of these functions, the data isn't saved directly with the function itself, but instead in another file called Source Data. This binary file holds all sorts of information. This includes:

  • Treasures

  • Traps

  • Foe Status Effects

  • Graphics (.tm2, .msp, ...)

  • and much more.

This was done for a number of reasons, the most important of which is that the referenced data can be very huge (e.g. graphics), or is not convertible to a readable format unlike the functions of the main script file (e.g. wait, healall, setpos).

Usage (Dynamic)

Unlike the other editors where you know what you are editing and navigate the list of entries by an identifier, this section requires you figure out where the data you want to edit is saved and then navigate the list of entries by an offset.

You can also skip this step if someone else already did it, saved their findings and shared it with everyone else, as how it was done with treasures for example.

Each type of data is tied to a function in the main script file.

Data
Function

Treasure

setuptreasure

Foe Status Effects

btlAtelSetStatus

Texture Icons

registshape

With it, you can find all offsets by doing the following:

  1. Extract the .ebp file via the VBF Browser (e.g. sav_a01.ebp).

  2. Unpack it via the VM Script De/Compiler.

  3. Decide what you want to edit (e.g. Treasures).

  4. Note which function it is tied to according to the table above.

  5. Open the main script of the .ebp file (e.g. sav_a01.c).

  6. Search for all instances of the function name (e.g. setuptreasure).

  7. Select any of them (e.g. setuptreasure(0x30000C0)).

  8. Subtract 0x03000000 from the value between the brackets to get the offset (e.g. 0x030000C0 - 0x03000000 = 0x000000C0).

  9. Enter the offset in the editor (should never be higher than the value of the Size field).

  10. Edit everything to your liking.

There is no way to know beforehand which offset points to which data entry. You can either guess it after viewing the data in the editor, or go through the code of the script entry where the function was used.

Usage (Traps)

  1. Click on the Traps checkbox to expand the group.

  2. Edit everything to your liking.

You can navigate through the list of entries by modifying the Identifier.

Notes

For a list of treasures with their offset and location, you can view the treasure spreadsheet in Resources.

Last updated