SCV
DPP Game Researcher
- 178
- Posts
- 17
- Years
- Los Angeles
- Seen Jan 9, 2015
I posted this in pichu2000's tutorial but I'm not sure anyone noticed it, it was a sequence of three edits:
Here is an example of trainer battle events and of trainer battle scripts.
These are trainers in Route 202.
For certain battles, the battle is linked from the event file by using a number between 0xBB8 and 0xF08. 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.
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]
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.
Now 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
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 [B]B8 0B[/B] 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 [B]BA 0B[/B] 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 [B]B9 0B[/B] 01 00 05 00
00 00 00 00 00 00 00 00 B9 00 24 03 00 00 01 00
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.
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]
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.
Now 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