Post by JADERLINK on Oct 13, 2023 6:51:27 GMT 10
Extract and repack RE4 RTP files (RE4 ubisoft/2007/steam/uhd/Ps2)
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-RTP-TOOL
Download: github.com/JADERLINK/RE4-RTP-TOOL/releases
The content below is a translation of the README.md file of the source code.
Programs designed to extract and repackage .RTP file from PS2 RE4, 2007, UHD.
Note: this is the file that defines which routes enemies will follow to reach the player. Then there's the "traveling salesman problem."
Update B.1.1.0.1
Added compatibility with other 3D editors that do not support special #: characters, such as 3dsMax;
Also added a check on the name of the groups, so if the name is wrong, the program will warn you;
Files from the previous version are compatible with this version;
Update B.1.1.0.0
Updated the path generation algorithm, now the generated routes are good enough compared to the game's original algorithm and compared to the "Son of percia" RTP tool algorithm;
I switched to ".Net Framework 4.8", for compatibility with Windows 7;
Files from the previous version are compatible with the current version;
RE4_RTP_EXTRACT.exe
Program designed to extract the RTP file, (choose the .bat from the same version as your game) and will generate the files:
.OBJ, this is the file in which it will be edited, see the information below.
.IDXRTP, this file is required for repack, but its contents do not matter.
.TXT2, this is a debug file, informational only, by default it is not generated.
OBJ FILE
The scale of the file is 100 times smaller than the game, with Y being the height.
See the Example:
The name of the objects must be exactly as described below:
Note: the program is not case sensitive.
_RTP#Node_000# where 000 is a decimal number that can range from 0 to 254, these are the points where the enemies will pass, the location is defined by the lowest point of the triangle.
Connection#000:True#001:True# are lines, the location of the line is not important for the repack, it is just for reference, the important thing is the name of the object, which makes the connection between two points: following the definition below :
Connection#000:True#001:True# will have a connection between node 0 and node 1, which can go from node 0 to 1, and from node 1 to 0
Connection#001:False#002:True# creates a connection that can go from node 2 to 1, but cannot go the other way around.
Connection#003:True#004:False# creates a connection that can go from node 3 to 4, but cannot go the other way around.
----> In Update B.1.1.0.1, the name of objects/groups can also be:
_RTP_Node_000_
Connection_000_True_001_True_
----> About group checks:
* In Repack, if the text "The group name is wrong;" appears on the right side of the group name, it means that the group name is wrong, and your RTP file will be wrong;
* And if the right side says "Warning: Group not used;" this group is being ignored by my program, if, in fact, you would like to use it, you must fix the group name;
RE4_RTP_REPACK.exe
Program designed to repackage the RTP file requires an .idxrtp file with the same name as the .obj file.
Note: choose the .bat from the same version as your game.
Traveling salesman problem
The .RTP file can be divided into 3 blocks, and the third block defines the paths between two nodes, in the "B.1.1.0.0" update, I corrected the paths problem, it is not necessarily the shortest path, but it's good enough to not notice any difference with the algorithm that was used in the game;
By: JADERLINK
2023-12-09
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-RTP-TOOL
Download: github.com/JADERLINK/RE4-RTP-TOOL/releases
The content below is a translation of the README.md file of the source code.
Programs designed to extract and repackage .RTP file from PS2 RE4, 2007, UHD.
Note: this is the file that defines which routes enemies will follow to reach the player. Then there's the "traveling salesman problem."
Update B.1.1.0.1
Added compatibility with other 3D editors that do not support special #: characters, such as 3dsMax;
Also added a check on the name of the groups, so if the name is wrong, the program will warn you;
Files from the previous version are compatible with this version;
Update B.1.1.0.0
Updated the path generation algorithm, now the generated routes are good enough compared to the game's original algorithm and compared to the "Son of percia" RTP tool algorithm;
I switched to ".Net Framework 4.8", for compatibility with Windows 7;
Files from the previous version are compatible with the current version;
RE4_RTP_EXTRACT.exe
Program designed to extract the RTP file, (choose the .bat from the same version as your game) and will generate the files:
.OBJ, this is the file in which it will be edited, see the information below.
.IDXRTP, this file is required for repack, but its contents do not matter.
.TXT2, this is a debug file, informational only, by default it is not generated.
OBJ FILE
The scale of the file is 100 times smaller than the game, with Y being the height.
See the Example:
The name of the objects must be exactly as described below:
Note: the program is not case sensitive.
_RTP#Node_000# where 000 is a decimal number that can range from 0 to 254, these are the points where the enemies will pass, the location is defined by the lowest point of the triangle.
Connection#000:True#001:True# are lines, the location of the line is not important for the repack, it is just for reference, the important thing is the name of the object, which makes the connection between two points: following the definition below :
Connection#000:True#001:True# will have a connection between node 0 and node 1, which can go from node 0 to 1, and from node 1 to 0
Connection#001:False#002:True# creates a connection that can go from node 2 to 1, but cannot go the other way around.
Connection#003:True#004:False# creates a connection that can go from node 3 to 4, but cannot go the other way around.
----> In Update B.1.1.0.1, the name of objects/groups can also be:
_RTP_Node_000_
Connection_000_True_001_True_
----> About group checks:
* In Repack, if the text "The group name is wrong;" appears on the right side of the group name, it means that the group name is wrong, and your RTP file will be wrong;
* And if the right side says "Warning: Group not used;" this group is being ignored by my program, if, in fact, you would like to use it, you must fix the group name;
RE4_RTP_REPACK.exe
Program designed to repackage the RTP file requires an .idxrtp file with the same name as the .obj file.
Note: choose the .bat from the same version as your game.
Traveling salesman problem
The .RTP file can be divided into 3 blocks, and the third block defines the paths between two nodes, in the "B.1.1.0.0" update, I corrected the paths problem, it is not necessarily the shortest path, but it's good enough to not notice any difference with the algorithm that was used in the game;
By: JADERLINK
2023-12-09