Resident Evil 2 .RDT Information

Resident Evil 2 .RDT Information

Enrico Marini
Nemesis T-Type I
Enrico Marini
Nemesis T-Type I
Joined: Jun 23 2008, 01:08 PM

Jun 23 2008, 01:33 PM #1

Here is some basic information regarding the RDT format:

Resident Evil 2's RDT Header:






DOOR CODE: 32 Bytes Long

3B NN 01 31 ?? 00 XX XX YY YY ZZ ZZ RR RR NX NX NY NY NZ NZ NR NR ST RN CA ?? DR DO ?? LF KK ??


ST = Stage (for example Kendo's shop is Stage 0 Room 1 so it would appear as 0001)
RN = Room Number
CA = Camera Angle of next room (I.E. Where the Camera is).
NN = Door Number (Guess since my test room had 4 possible doors. Stairs are doors.)
LF = Locked Flag (If I set another door to the same Hex as a locked door, it too becomes locked but if either door is opened the other becomes unlocked.)
KK = Key Needed

XX = X co-ords (Co-ords go Low High).
YY = Y co-ords
ZZ = Z co-ords
RR = Rotation ?? (those two seemed to affect the Door position but not the NextRoom Position.


NX = Next Room Start X co-ords (doors have an access width as to why each co-ord has 2, a beginning and an end).
NY = Next Room Start Y co-ords (This is normally 0000)
NZ = Next Room Start Z co-ords
NR = Next Room Rotation

DR = Door type. Wooden, metal, Stairs, lift. (Remember there is an UP/Down,In/Out version of Doors/Stairs/Lifts etc.)

00 = Wooden 4 Rectangle Door (Handle Left) (Opens away from Player)
01 = Wooden 3 rectangle door (Handle left) (Opens away from Player)
02 = Wooden 4 rectangle door Blue (Handle left) (Opens away from Player)
03 = Wooden Rectangle with Diamonds door (Handle left) (Opens away from Player)
04 = Wooden 6 Rectangle Blue (Handle left) (Opens away from Player)
05 = Wooden 3 Rectangle (Handle left) (Opens away from Player)
06 = Metal Door X (Handle Left) (Opens away from Player)
07 = Metal Door Plain with small grill at bottom.(Handle left) (Opens away from Player)
08 = Metal Door 2 Rectangles (Handle left) (Opens away from Player)
09 = Wooden Door 6 Rectangles (Handle left) (Opens away from Player)
0a = Gate with Bars (Handle left) (Opens away from Player)
0B = 2 Windows 4 Diamonds (Handle left) (Opens away from Player)
0C = RPD Doors (open towards Player) (Opens away from Player)
0D = Wooden 3 rectangle door (Silver Handle left) (Opens away from Player)
0E = Metal Stairs Up
0f = Wooden Stairs (1F West Stairs)
10 = Lift Gate (Open Right to Left)
11 = Double wooden door. Metal Grill at bottom, right door opens away from player.
12 = Stone Basement Steps. Up
13 = Grey Metal Door. Big window (with XXX)
14 = Double Width Metal Door. Slides Right to Left (handle on Right)
15 = Metal Door 2 X, 1 High, 1 Low, Black/Yellow /// in centre.
16 = Metal Ladders
17 = Old Ring Handle Door Left opens away from player
18 = Green Wooden Door Gold Handle Left Opens away from player
19 = Metal Circle Handle Left Lab Door. Slides Left to Right.
1a = Metal Door 3 Rectangles Handle Left Opens away from player
1b = Autopsy Double Doors, Opens towards player.
1c = Metal Door. Knob (left). Grill at bottom. Barred Window
1D = Metal Door Brown. Grill at top.
1E = Air Vent
1F = Metal Door Opens Up/Down by Splitting. Sewer X-DR
20 = No Door Ada Scream.
21 = No Door Birkin Sounds
22 = Brown Rusty Metal Door Handle Left Opens away from player
23 = Grey Metal Door with Border (sorta B ) Handle Left Opens away from player
24 = Grey/Green Metal Door, Metal Foot Guard, Window Handle Left Opens away from player
25 = Shaft Type L Automatic Door.
26 = Brown Metal Doors with twist Handle Left. Left Door opens Away From Player
27 = Double Teethed Metal Doors. Doors Slide apart.
28 = Red Small Elevator Up
29 = Shaft Type M metal Door, Handle Left Opens away From Player
2A = Metal Slide Left to Right Door. Small Window Up, Small Grill Bottom.
2b = Dumping Area B2 Shutter.
2c = Black/Red Sliding Doors with small windows.
2D = Scenario 1 End Lift Up
2e = Metal Door Bars, Handle Left Opens AFP RED Green light Above handle
2f = Turquoise Inverview Room Door. HL AFP
30 = Bus Double Doors open AFP
31 = Frozen Type-P Double Metal Door. Left Door opens AFP
32 = Please Wait Clothes Change.
33 = Vent
34 = Side Pack is being equipped.
35 = Vent
36 = Black Screen. *Drip Drip*

DO = Door Open.
0 = Handle Left, open Away From Player Lifts/Stairs/Ladders Up
1= Handle Right towards player. Lifts/Stairs/Ladders Down.
Some rooms use above 1 for the Door open but most doors end up with a blank screen if you do.

?? = Unknown at the moment

ENEMY CODE: 22 Bytes

44 00 NN EM PP @@ ** SN TX FL XX XX YY YY ZZ ZZ RR RR 00 00 00 00

NN = Enemy number (room), starts at 00 for 1 (Ada and Sherry seem to use FF)
EM = Enemy (take the last two characters from the EMD folder, 1f is the standard 3 Body Zombie)
PP = Pose
Zombie:
00 Waiting
01 Lyiny Down
02 Walking
03 Crawling
04 Getting Up
05 On back
06 ?
07 Face down no head
08 Slow shuffle
09 Crawl
43 Crawling
48 Eating
86 Fine
C2 On Fire Gets up from Face Down
C3 Crawling on Fire
C6 On Fire Gets up from Face UP

@@ = Unknown (flag, extra animation info
** =

(Set @@ to 04 and ** to 01 if you are putting in a partner)

SN = Sound Set
TX = Texture (Zombie 1F has 3)
FL = Enemy Flag (Each enemy has a different Value)


XX = X co-ords (Co-ords go Low High).
YY = Y co-ords
ZZ = Z co-ords
RR = Rotation (The way the enemy faces).

ITEMS:

examples:
14 00 0f 00 00 00 01 00 02 31 00 00 04 BE 0B A1 94 07 66 08
14 00 0F 00 01 00 02 00 2C 0D 04 31 00 00 68 B6 2F A9 86 06

HH 00 VV 00 ?? 00 MA 00 ?? MB (never worked out the rest after this)

HH = Items Hex Number
VV = Quantity

The items in a room do not make sense. I can't see a start header.

As for the model the item uses, this too is wierd. Each room has a specific EM with the model
data for those items. MA and MB are used to indicate that item. Some rooms the two have the
same value and others they have a different value. Also some items have a different value even
if they are the same type (e.g. the Kendo gun Shop's two handgun bullits). If MA and MB are
not set up correctly, the item will still appear on screen after it is picked up though it
cannot be picked up again.

In these special EMDs also appear room items, like crates, diaries, notes, and statues to name a few.

BA (Hons) First Class
Quote
Like
Share

Joseph Frost
Crimson Head
Joseph Frost
Crimson Head
Joined: Jun 27 2008, 08:39 PM

Jun 28 2008, 06:50 PM #2

Usefull But Very Confusing! ;)
You were almost a Jill sandwich!
Hey guys over here........ahh ahhh!!!!  *gets killed by zombie dogs*
How would you like it if you got killed in the beginning of game by a zombie dog it was only several hours later when Jill noticed and shouted Joseph!?.They didn't do nothing.

BTW Wesker Has great Hair!
Quote
Like
Share

Whatsamatta
Birkin G-Type II
Whatsamatta
Birkin G-Type II
Joined: Jun 28 2008, 07:34 PM

Jul 20 2009, 05:29 PM #3

in the door code:

?? DR DO ?? LF KK ??

one of these ??s controls what scenario the game thinks it is for that room. i tried to get Claire A to go into a room that is normally only accessible to Claire B. the result was that enemies paid no attention to me, i could walk through environmental objects, and no doors or items would work. i changed the end of the code (what i quoted) to match exactly what the original door to the room said, and now everything works fine.

sadly, it seems claire cannot use the manhole opener in the kennel no matter what
Quote
Like
Share

MonkeyMan2000
Tyrant R
Joined: Jul 17 2009, 01:20 AM

Jul 20 2009, 08:25 PM #4

This could be right. When ive reversed engineered the exe, there is is a variable which decides whether to load up scenario a data and scenario b data. I did initially think that this variable could point to an offset index in the rdt file. But it could be for comparrison.
I will look further into this after ive done work on adt's
Quote
Like
Share

wesker
Zombie
wesker
Zombie
Joined: Jul 5 2009, 09:46 PM

Jul 24 2009, 05:52 PM #5

i tried it and i suck at hexing <_<
Death is only the beginning
Quote
Like
Share

mortician
Nemesis T-Type III
mortician
Nemesis T-Type III
Joined: Jun 25 2008, 05:49 PM

Jul 25 2009, 12:30 AM #6

Enrico, you managed to bring in the Calico right? i mean you managed to change fire-rate and the amount of ammo that can be hold in a gun.. would you be willing to tell me/us a bit about how you did that?

i guess its handled in the .exe but i don't know where to find it exactly
I left this place, find all of my new stuff or updates from me on http://re123.bplaced.net
Quote
Like
Share

MonkeyMan2000
Tyrant R
Joined: Jul 17 2009, 01:20 AM

Jul 25 2009, 02:06 PM #7

I know where in the exe where the animation for a weapon is. Just the power of the weapon I dont know yet.
Quote
Like
Share

PmData
T-091
Joined: Nov 1 2008, 10:15 AM

Aug 6 2009, 09:18 AM #8

Hello,

Someone sent me a while ago a file (supposed to come from RE3 Dreamcast CD), which is the source of a script for room R11B. Well, I was able to find where in the RDT the corresponding script was stored, and how.

It seems in each RDT there is 2 scripts: one to initialize the room (executed once when loading the room), and one to execute while the player is in the room.

I started writing for Reevengi, routines to display said script for RE1 and RE3 (the bytecodes are different between games), and I will start the one for RE2 soon. I started a Rewiki page for RE1, and will create the ones for RE2 and RE3 thereafter.

Edit:
Here are the script bytecodes for Resident Evil 2 and Resident Evil 3. Now I just need to fill the blanks :).
Quote
Like
Share

EvilMarshy
Birkin G-Type I
EvilMarshy
Birkin G-Type I
Joined: Jun 29 2008, 02:55 PM

Jan 8 2010, 03:59 PM #9

The items in a room do not make sense. I can't see a start header.
4E ID 02 31 < You mean that?
For my new work please check out Resident Evil Modding Community. Thank you for the support.
Quote
Like
Share

PmData
T-091
Joined: Nov 1 2008, 10:15 AM

Jan 22 2010, 08:46 PM #10

Hello,

I started this year by going back digging the RDT file format (RE2). So I decipher a bit more bytecodes for scripts (some related to changing lights), and just finished finding most infos about the background image masks (to be drawn above 3D models or animations).

Script bytecodes
Background image masks

Originally, I did not plan to do that at all, I was just thinking to add some menu in Reevengi to test/load fonts and display text :).
Quote
Like
Share

MarkGrass
Birkin G-Type IV
MarkGrass
Birkin G-Type IV
Joined: Jun 28 2008, 03:53 AM

Jan 23 2010, 03:48 AM #11

Great job, PmData! Your work is much appreciated! :D
Quote
Like
Share

PmData
T-091
Joined: Nov 1 2008, 10:15 AM

Aug 13 2010, 07:17 PM #12

Hello,

Just a little up to say that I made some small progress regarding the script bytecodes:
Script bytecodes

In particulary, instructions 0x21 (bit test) and 0x22 (bit clear or set) have all their info stored in a list of several arrays of bits, each one storing different info about the game status. There is a max of 256 arrays * 256 bits = 256 arrays * (256/8) bytes = 8KB, but I don't think the game use 256 arrays.

What I found about these arrays is also on the same page:
Bits arrays of game status
Quote
Like
Share

mortician
Nemesis T-Type III
mortician
Nemesis T-Type III
Joined: Jun 25 2008, 05:49 PM

Aug 14 2010, 06:30 PM #13

Awesome, thanks for sharing your knowledge pmdata, its unbelievable how much info you gathered about the RDT format.
I left this place, find all of my new stuff or updates from me on http://re123.bplaced.net
Quote
Like
Share

Cyberdemon5150
Super Licker
Cyberdemon5150
Super Licker
Joined: Sep 17 2010, 01:36 AM

Oct 15 2010, 04:44 AM #14

A lot of you have probably already noticed this by now, but I found that the first set of ??'s in the Door Code (immediately following the 31) are normally set to 00, except in the case of doors like the door nailed shut in the RPD 2F West Wing, which has this flag set to 02. I tried this flag on another door, and it had the same effect- the door was completely inoperable.
Additionally, in the Main Hall, the door to the office where Marvin is and the door that leads back outside have this flag set to 01, whilst the door to the waiting room with the item box has it set to 00 (mysteriously, the door to the East Wing did not seem to appear in my .rdt)
I know my notes on the 01 function probably don't shed any new light on this flag, but I don't know if anybody else noticed what setting the flag to 02 does.
Quote
Like
Share

xXsoapXx
Crow
Joined: Nov 10 2010, 02:55 PM

Nov 15 2010, 11:35 AM #15

i need new tutorial for edit the file INIT0000.SCD or INIT0000.C i extracted with biofat
Quote
Like
Share