View Single Post
  #27    
Old December 12th, 2008 (02:09 AM). Edited January 4th, 2009 by SCV.
SCV's Avatar
SCV
DPP Game Researcher
 
Join Date: Dec 2007
Location: Los Angeles
Gender:
Nature: Calm
Send a message via AIM to SCV Send a message via Windows Live Messenger to SCV
OK, here is an example of trainer battle events and of trainer battle scripts.

These are trainers in Route 202.
Code:
00 00 04 00 0F 00 01 00 00 00 B8 0B 01 00 05 00
00 00 00 00 00 00 00 00 A6 00 2D 03 00 00 01 00 
01 00 06 00 0F 00 01 00 00 00 BA 0B 01 00 04 00 
00 00 00 00 00 00 00 00 B5 00 32 03 00 00 01 00
02 00 04 00 0F 00 01 00 00 00 B9 0B 01 00 05 00 
00 00 00 00 00 00 00 00 B9 00 24 03 00 00 01 00
For certain battles, the battle is linked from the event file by using a number between 0xBB8 and 0xF09. These battles are ordered according to trdata.narc and trpoke.narc

This is the second battle with Cyrus:

E5 00 94 01 00 00 EC

If you search the script file for E500 you will get 102 instances. Not all of these are trainer battles. Only the ones that have a number between 0x1 and 0x1 and 0x351.

Quote originally posted by pichu2000:
A warp is showed in this way

74(bOH) 6B 03(Animation) 9C 01(Maps in which you are going to go)

Here's a list of Warp - Maps
This should be

74 00 6B 03 9C 01 00 00
[2 bytes for X coordinate] [2 bytes for Y coordinate] [two bytes for Map Number] [2 bytes for warp number within that map]

Will update later with a bit more about the structure of event files.

EDIT:
As promised, here is some information on the structure of the event files.

The event files have 4 sections.
As of now I don't know what the first and last are for but I will figure it out.

The file starts out with 4 bytes telling you how many of the first type of events there are. Then each entry is 0x14 bytes long.
Then come 4 bytes telling you how many "person" events there are. Each person event is 0x20 bytes long.
Then come 4 bytes telling you how many warps there are. Each warp event is 0xC bytes long.
Then come 4 bytes telling you how many of the fourth type of events there are. Each of these events is 0x10 bytes long.

Not all locations use all of these types of event. When a type is not used the 4 bytes which tell you how many of that type there are will be 00000000, then then next 4 bytes will be how many of the next type of event there are.

There are a few event files which don't have any events at all. The look like:
00000000 0000000 00000000 00000000
Reply With Quote