Hello, Today I'm gonna be explaining how to add both existing and new objects into a stage. Some tools your gonna need are Crzosk's bio_etm_edit.exe and bio4_ets_edit.exe. Also included in the DL link below.
First before we start lets make backups of the rxxx.dat were going to be using. I'm gonna be using r100.dat To do this your gonna need to extract your StX.dat and extract your rxxx.dat that you want to edit. Make sure to get the objects from Perquisites. So with that being said lets start.
Perquisites:
Objects With that being said lets start.
1. Using bio_etm_edit.exe
Lets go ahead and open bio_etm_edit.exe, and we will see this.
If your text is messed up, do not be alarmed as this is your computer trying to output the Japanese text in Unicode. but lets continue.
Lets go ahead and open a ETM file, lets click the file options that are located in the top left with the "F" in parentheses. Then lets go ahead and click the first option from the top. Navigate to your extracted rxxx.dat folder that you want to use. Then Open that ETM file and we get this or something similar(If you used different room data than me).
2. Adding objects
Now to add completely new object. Lets go ahead and add some new objects by going to the File Options and click the option 6 boxes down from the top the one with the "A" in parentheses. Luckily i already got some models set in the "Objects folder" you might noticed that the objects have a .etb as a extra extension. These are created when we extract a object from a ETM using the tool. I will explain how to do this later.
Okay go ahead and add your objects make sure to get everything inside the folders and sub-folders these are crucial to making the Object work as it supposed too. I'm gonna be adding Et15, Et10, and Et11. Now Go ahead and save by using the "save as" function thats right below the open option (what you used to open the file)
So if you decided to copy me you will have 7 new files inside the ETM
3. Preparing the ETS
Now adding the files in the ETM is not enough now were going to have to open the ETS in hex and add new objects new. Doing this will be very simple as everything is neatly organized.
First we must understand ETS in hex in order to add objects so taking a quick look at this picture I made this will define each color coded box that will appear in the ETS (Picture tooken using 010_r100.ETS)
⦁ Black Box: Represents a "Object"
⦁ Blue Box: This tells us that this is this object. Example:0D=Wooden Door 01=Small Box
⦁ Orange Box: These means what ID these are. if we add a new object we can simply follow numerically or make it a number larger. MUST NOT BE A NUMBER ALREADY USED!
⦁ Green Box: Co-ordiantes -XYZ
⦁ Yellow Box: Rotation -XYZ
⦁ Red line: Unused/Unkown data
and the most important of all the very first 4 bytes at the top of the file "0B 00" acts as a header so each time we add a new object this must increase by 1 byte. Obviously it will be different for each file.
Now lets go ahead and add a object lets just go ahead and use another object specifics make sure to include all the data don't leave anything out and paste at the bottom of the file but before the "CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD" but after the last object. and it should look like this
Make sure to update it ETS ID. Since we copied the coordinates as the "box" above this will appear in the same position as the "Large Box" So lets not do anything and Open cheat engine and lets use
Exact coordinates player tool.CT and the latest version of
Cheat Engine. Then lets start up the game go to the stage to the position you want to add this object at. After that pause the game for Exact position and copy it from the Cheat Engine Script. Make sure its the the coordinates have Only 12 bytes in it not any unnecessary extra bytes. Then Go back and paste those bytes in the Coordinates section using the above supplied picture.
Here i changed the Coordinates of my added 3 items...
Then save the hex and repack the rxxx.dat and stick in a folder called "St1" that is in your Resident Evil 4 Directory, that or repack the whole "Stx" included with your edited rxxx.dat
4. Trying in game
With everything done and hopefully right lets start the game, and view the newly placed objects
looks pretty good except for the lantern lets raise it a little bit. To do this it would be easier to use bio4_ets_edit.exe Lets do this in Section 5
5. Improving Objects
Now lets open bio4_ets_edit.exe and open the rxxx.dat file we just edited. Luckily we don't need to extract the rxxx.dat again as this tool instead reads the the dat instead! Lets open by going to the top left click "File" with "F" in parentheses and click the first option and navigate to the your rxxx.dat.
With the file opened it should look a-bit similar like this...
Now if you see something odd with your last segment like above in segment 14. Don't worry this won't hurt anything but why it does this is unknown, but lets continue, lets use the Object ID list to depict what these other PMD ares like 00 is window 01 is a small box and 02 is a large box while 0D being a metal door and with our items being last in the list. Now since I want to edit the lantern I'm going edit the section that contain the PMD 10 Now lets raise the Y coordinates positive wise
and make it 3.41560 now lets save by using the option right below the open file icon.
We get this in game...
With this being raised this was succesful the ETS tool is good for editing Position, Rotation, PMD, and editng ETS ID assign. Another thing is use the ETS ID here to place ITA items in barrels and boxes and etc.
Visual Explaination
Here's a simple ETS and ETM test I did showing what these tools are capable of...
With all this being said this concludes the tutorial. check the "Extra" the section for more stuff and translations. Have any question or problems please comment below.