RE4 2007 SCENARIO SMD TOOL by JADERLINK
Oct 3, 2023 7:10:46 GMT 10
Re-Play games, LeonEx, and 4 more like this
Post by JADERLINK on Oct 3, 2023 7:10:46 GMT 10
Extract and repack RE4 2007 scenario smd/pmd files into a single .obj file
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-2007-SCENARIO-SMD-TOOL
Download: github.com/JADERLINK/RE4-2007-SCENARIO-SMD-TOOL/releases
The content below is a translation of the README.md file of the source code.
Programs designed to extract and repackage scenarios using only an .OBJ file
# Update B.1.0.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;
RE4_2007_SCENARIO_SMD_Extractor.exe
Program designed to extract the scenario, in a bat file use the following command:
Extract Scenario:
RE4_2007_SCENARIO_SMD_Extractor.exe ".smd File patch" "Pmds Files folder" "Pmd base name"
Example:
RE4_2007_SCENARIO_SMD_Extractor.exe "D:\Games\Re4\st2\r209\r209_04.SMD" "D:\Games\Re4\xscr\r209" "r209"
In this example, the files will be generated in the folder: D:\Games\Re4\xscr\r209
* r209.scenario.idxscenario // important settings file;
* r209.scenario.obj // content of the entire scenario, this is the file you will edit;
* r209.scenario.mtl // file that accompanies the .obj;
* r209.scenario.DrawDistance.obj // informational file, but not used in the repack.
About rXXX.scenario.obj
This file is where the entire scenario is, in which the PMD files are repaired by groups, in which the nomenclature must be respected:
Example:
SCENARIO#PMD_000#SMX_001#TYPE_09#
SCENARIO#PMD_001#SMX_002#TYPE_09#
Being:
* The group name must begin with "SCENARIO", and be divided by #
* PMD_000 this is the ID of the .PMD file, the numbering is in decimal
* SMX_001 this is the SMX ID, see the .SMX file, the numbering is in decimal
* TYPE_09 I don't know what it is, the numbering is in hexadecimal.
* the group name must end with # (because after saving the file, Blender puts more text at the end of the group name)
----> In Update B.1.0.0.1, the name of objects/groups can also be:
SCENARIO_PMD_000_SMX_001_TYPE_09_
SCENARIO_PMD_001_SMX_002_TYPE_09_
----> 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 SMD 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;
Editing the .obj file in Blender
In the .obj importer, check the "Split By Group" box on the right side of the screen.
With the imported file, each object represents a .PMD Groups file
Note: if you have a problem with transparent textures turning black, use this plugin: (github.com/JADERLINK/Blender_Transparency_Fix_Plugin)
When saving the file
Check the "Triangulated Mesh" and "Object Groups" and "Colors" boxes.
In the .obj file, the group name will have "_Mesh" at the end of the name (so in the editor, end the group name with # to avoid problems)
RE4_2007_SCENARIO_SMD_Repack.exe
Repacks the scenario, receives the ".idxscenario" file as a parameter,
which in the example would be the file "r209.scenario.idxscenario"
and in the folder there should be the files "r209.scenario.obj" and "r209.scenario.mtl"
and as a result it will generate the files:
* r209_000.pmd, r209_001.pmd, r209_002.pmd, r209_003.pmd, until the last one that goes to r209_126.pmd (in this example)
* and the file "r209_04.SMD", which you must place in the folder "D:\Games\Re4\st2\r209" and recompile your .DAT file
About rXXX.scenario.idxscenario
Below is the list of most important commands present in the file:
SmdAmount:127 // represents the amount of Smd/Pmd entries/files (you can change it but in some scenarios it may crash the game)
SmdFileName:r209_04.SMD // this is the name of the Smd file that will be generated
PmdBaseName:r209 // this is the base name for Pmd files
the other commands that start with numbers are self-descriptive (the number is the Pmd/Smd ID) (avoid messing with these values)
DrawDistance
If your model is too far away from the original position, it may start to appear and disappear, this is because of the values that define how far away the models will be seen.
change the values of "xxx_DrawDistanceNegative*" to -3276.7
and the values of "xxx_DrawDistancePositive*:" to 3276.7
This will ensure that the model is visible, however it may cause a bug in the lighting.
Update B.1.0.0.1, I changed the file "r209.scenario.DrawDistance.obj", for correct representation, as "xxx_DrawDistancePositive*" is not a position, but must be added with "xxx_DrawDistanceNegative*" to have the second correct position;
bugs
When changing the original values of the fields "xxx_scale*", "xxx_angle*", "xxx_position*", "xxx_DrawDistanceNegative*" and "xxx_DrawDistancePositive*", it can cause a bug in the model's lighting, which I don't know how to resolve.
If you know how to resolve this problem, please get in touch.
## Print:
By: JADERLINK
2023-12-27
Note: the topic is being translated by google translator, because I only know Portuguese Brazil.
SourceCode: github.com/JADERLINK/RE4-2007-SCENARIO-SMD-TOOL
Download: github.com/JADERLINK/RE4-2007-SCENARIO-SMD-TOOL/releases
The content below is a translation of the README.md file of the source code.
Programs designed to extract and repackage scenarios using only an .OBJ file
# Update B.1.0.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;
RE4_2007_SCENARIO_SMD_Extractor.exe
Program designed to extract the scenario, in a bat file use the following command:
Extract Scenario:
RE4_2007_SCENARIO_SMD_Extractor.exe ".smd File patch" "Pmds Files folder" "Pmd base name"
Example:
RE4_2007_SCENARIO_SMD_Extractor.exe "D:\Games\Re4\st2\r209\r209_04.SMD" "D:\Games\Re4\xscr\r209" "r209"
In this example, the files will be generated in the folder: D:\Games\Re4\xscr\r209
* r209.scenario.idxscenario // important settings file;
* r209.scenario.obj // content of the entire scenario, this is the file you will edit;
* r209.scenario.mtl // file that accompanies the .obj;
* r209.scenario.DrawDistance.obj // informational file, but not used in the repack.
About rXXX.scenario.obj
This file is where the entire scenario is, in which the PMD files are repaired by groups, in which the nomenclature must be respected:
Example:
SCENARIO#PMD_000#SMX_001#TYPE_09#
SCENARIO#PMD_001#SMX_002#TYPE_09#
Being:
* The group name must begin with "SCENARIO", and be divided by #
* PMD_000 this is the ID of the .PMD file, the numbering is in decimal
* SMX_001 this is the SMX ID, see the .SMX file, the numbering is in decimal
* TYPE_09 I don't know what it is, the numbering is in hexadecimal.
* the group name must end with # (because after saving the file, Blender puts more text at the end of the group name)
----> In Update B.1.0.0.1, the name of objects/groups can also be:
SCENARIO_PMD_000_SMX_001_TYPE_09_
SCENARIO_PMD_001_SMX_002_TYPE_09_
----> 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 SMD 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;
Editing the .obj file in Blender
In the .obj importer, check the "Split By Group" box on the right side of the screen.
With the imported file, each object represents a .PMD Groups file
Note: if you have a problem with transparent textures turning black, use this plugin: (github.com/JADERLINK/Blender_Transparency_Fix_Plugin)
When saving the file
Check the "Triangulated Mesh" and "Object Groups" and "Colors" boxes.
In the .obj file, the group name will have "_Mesh" at the end of the name (so in the editor, end the group name with # to avoid problems)
RE4_2007_SCENARIO_SMD_Repack.exe
Repacks the scenario, receives the ".idxscenario" file as a parameter,
which in the example would be the file "r209.scenario.idxscenario"
and in the folder there should be the files "r209.scenario.obj" and "r209.scenario.mtl"
and as a result it will generate the files:
* r209_000.pmd, r209_001.pmd, r209_002.pmd, r209_003.pmd, until the last one that goes to r209_126.pmd (in this example)
* and the file "r209_04.SMD", which you must place in the folder "D:\Games\Re4\st2\r209" and recompile your .DAT file
About rXXX.scenario.idxscenario
Below is the list of most important commands present in the file:
SmdAmount:127 // represents the amount of Smd/Pmd entries/files (you can change it but in some scenarios it may crash the game)
SmdFileName:r209_04.SMD // this is the name of the Smd file that will be generated
PmdBaseName:r209 // this is the base name for Pmd files
the other commands that start with numbers are self-descriptive (the number is the Pmd/Smd ID) (avoid messing with these values)
DrawDistance
If your model is too far away from the original position, it may start to appear and disappear, this is because of the values that define how far away the models will be seen.
change the values of "xxx_DrawDistanceNegative*" to -3276.7
and the values of "xxx_DrawDistancePositive*:" to 3276.7
This will ensure that the model is visible, however it may cause a bug in the lighting.
Update B.1.0.0.1, I changed the file "r209.scenario.DrawDistance.obj", for correct representation, as "xxx_DrawDistancePositive*" is not a position, but must be added with "xxx_DrawDistanceNegative*" to have the second correct position;
bugs
When changing the original values of the fields "xxx_scale*", "xxx_angle*", "xxx_position*", "xxx_DrawDistanceNegative*" and "xxx_DrawDistancePositive*", it can cause a bug in the model's lighting, which I don't know how to resolve.
If you know how to resolve this problem, please get in touch.
## Print:
By: JADERLINK
2023-12-27