TUTORIAL: How to edit SMX (UBISOFT)
Aug 21, 2023 2:24:42 GMT 10
ndorobei and UNKNOWN MODDER like this
Post by ilyas on Aug 21, 2023 2:24:42 GMT 10
In this tutorial you will learn
-How to edit smx file
-How to link it to smd
-How to add new smx entry
FIrst we need to extract Room we want to edit i will use r100 for example
i am gonna use in this tutorial Dat tool and smx tool by (Son of Persia)
After extracting r100 copy smx file to SMX Tool
Once the SMX file has been copyed, we will proceed to open the SMX tool folder and paste it and execute the “smx_extract.bat” file. It will extract a .TXT file with the same name as the SMX. We will open "r100_05.txt" and it will show us the following:
EntryCount = 97 (How much smx entries in this file)
# SMX Entry 0 (This is the SMX ID in DECIMAL)
ID = 0x0 (This is the SMX ID in HEXADECIMAL)
Mode = 0x0 (Set to 0x1 for rotary models 0x2 for swinging models)
OpacityHierarchy = 0x5 (Sets the hierarchy on Transparent models)
Offset[3] = 0x0 Set to 0x2 for double-sided models
# Light Control Switches (BYTE #0)
LightSwitch_00 = 0
LightSwitch_01 = 1
LightSwitch_02 = 1
LightSwitch_03 = 1
LightSwitch_04 = 0
LightSwitch_05 = 0
LightSwitch_06 = 1
LightSwitch_07 = 0
# Light Control Switches (BYTE #1)
LightSwitch_08 = 0
LightSwitch_09 = 0
LightSwitch_10 = 1
LightSwitch_11 = 1
LightSwitch_12 = 0
LightSwitch_13 = 0
LightSwitch_14 = 0
LightSwitch_15 = 0
# Light Control Switches (BYTE #2)
LightSwitch_16 = 1
LightSwitch_17 = 1
LightSwitch_18 = 1
LightSwitch_19 = 1
LightSwitch_20 = 1
LightSwitch_21 = 1
LightSwitch_22 = 1
LightSwitch_23 = 1
# Light Control Switches (BYTE #3)
LightSwitch_24 = 1
LightSwitch_25 = 1
LightSwitch_26 = 1
LightSwitch_27 = 1
LightSwitch_28 = 1
LightSwitch_29 = 1
LightSwitch_30 = 1
LightSwitch_31 = 1 Determines which lights hit the model
Offset[8..11] = 0x20
Color_R = 0x46 (3 offest Color affects the model)
Color_G = 0x46
Color_B = 0x46
Color_A = 0x3 (The alpha of color)
Angle_X = 0.000000
Angle_Y = -0.000000 (Options of rotary models) Mode = 0x1
Angle_Z = 0.000000
Swing_1 = 0.000000
Swing_2 = 0.000000
SwingIntensity = 0.000000
SwingSpeed = 0.000000 (Options of swinging models) Mode = 0x2
Offset[44..47] = 0.000000
Offset[48..51] = 0.000000
Offset[52..55] = 0.000000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000 (Options of scrolling Textures)
TextureMovement_Y = 0.000000
Example of rotate or move an SMD this is activated with the option “Mode = 0x2” or “Mode = 0x1” and in combination with other functions, example:
Example of Mode = 0x1
ROTATION “Mode = 0x1”
ID=0x50
Mode = 0x1
OpacityHierarchy = 0x3
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x20
Color_R = 0xFF
Color_G = 0xFF
Color_B = 0xFF
Color_A = 0x0
Angle_X = 1.160428
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 0.000000
Swing_2 = 0.000000
SwingIntensity = 0.000000
SwingSpeed = 0.000000
Offset[44..47] = 0.000000
Offset[48..51] = 0.000000
Offset[52..55] = 0.000000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000
TextureMovement_Y = -0.000000
Example of Mode = 0x2
Mode = 0x2
ID=0x53
Mode = 0x2
OpacityHierarchy = 0x5
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x0
Color_R = 0xFF
Color_G = 0xFF
Color_B = 0xFF
Color_A = 0x0
Angle_X = 0.000000
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 247974.000000
Swing_2 = 5.000000
SwingIntensity = 0.110000
SwingSpeed = 0.110000
Offset[44..47] = 9.967492
Offset[48..51] = 0.130000
Offset[52..55] = 0.090000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000
TextureMovement_Y = -0.000000
ASSIGNMENT OF SCROLLING TEXTURES
To assign its moving texture, we will use the “TextureMovement” option
It is very important to make sure that our model that we want to assign movement to its texture has only one texture assigned to it, otherwise, all the textures of that model (PMD) will move.
If we want to isolate an area of a model for the texture to move, it must be exported individually and given a unique SMX ID.
Example of an SMX input with a moving texture.
In the case of “r100” it is the sky:
ID=0x2
Mode = 0x0
OpacityHierarchy = 0x2
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x42
Color_R = 0xD2
Color_G = 0xD2
Color_B = 0xD2
Color_A = 0x0
Angle_X = 0.000000
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 0.000000
Swing_2 = 0.000000
SwingIntensity = 0.000000
SwingSpeed = 0.000000
Offset[44..47] = 0.000000
Offset[48..51] = 0.000000
Offset[52..55] = 0.000000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = -0.001212
TextureMovement_Y = -0.000001
if we want to add new smx entry we have to update EntryCount
And copy a smx entry and past it to be the last one and update smx entry id in decimal and hexadecimal
How to assigne a SMX entry to specific SMD
lets say that we want to assigne this smx entry:
Mode = 0x2
ID=0x53
Mode = 0x2
OpacityHierarchy = 0x5
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x0
Color_R = 0xFF
Color_G = 0xFF
Color_B = 0xFF
Color_A = 0x0
Angle_X = 0.000000
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 247974.000000
Swing_2 = 5.000000
SwingIntensity = 0.110000
SwingSpeed = 0.110000
Offset[44..47] = 9.967492
Offset[48..51] = 0.130000
Offset[52..55] = 0.090000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000
TextureMovement_Y = -0.000000
We need to see ID in this case is ID = 0x53
then we need to open smd file by Any Hex editor
Eache smd entry is 4 lines at 16 bytes
Blue bytes is ID SMX ID = 0x53
Green Bytes is SMD bin number
let's edit SMX of SMD 4D We had to change the SMX ID From 05 To 53 Thats all
(SOP Toolset Download)
Click Here
All this information came from Mr.Curious Tutorial
-How to edit smx file
-How to link it to smd
-How to add new smx entry
FIrst we need to extract Room we want to edit i will use r100 for example
i am gonna use in this tutorial Dat tool and smx tool by (Son of Persia)
After extracting r100 copy smx file to SMX Tool
Once the SMX file has been copyed, we will proceed to open the SMX tool folder and paste it and execute the “smx_extract.bat” file. It will extract a .TXT file with the same name as the SMX. We will open "r100_05.txt" and it will show us the following:
EntryCount = 97 (How much smx entries in this file)
# SMX Entry 0 (This is the SMX ID in DECIMAL)
ID = 0x0 (This is the SMX ID in HEXADECIMAL)
Mode = 0x0 (Set to 0x1 for rotary models 0x2 for swinging models)
OpacityHierarchy = 0x5 (Sets the hierarchy on Transparent models)
Offset[3] = 0x0 Set to 0x2 for double-sided models
# Light Control Switches (BYTE #0)
LightSwitch_00 = 0
LightSwitch_01 = 1
LightSwitch_02 = 1
LightSwitch_03 = 1
LightSwitch_04 = 0
LightSwitch_05 = 0
LightSwitch_06 = 1
LightSwitch_07 = 0
# Light Control Switches (BYTE #1)
LightSwitch_08 = 0
LightSwitch_09 = 0
LightSwitch_10 = 1
LightSwitch_11 = 1
LightSwitch_12 = 0
LightSwitch_13 = 0
LightSwitch_14 = 0
LightSwitch_15 = 0
# Light Control Switches (BYTE #2)
LightSwitch_16 = 1
LightSwitch_17 = 1
LightSwitch_18 = 1
LightSwitch_19 = 1
LightSwitch_20 = 1
LightSwitch_21 = 1
LightSwitch_22 = 1
LightSwitch_23 = 1
# Light Control Switches (BYTE #3)
LightSwitch_24 = 1
LightSwitch_25 = 1
LightSwitch_26 = 1
LightSwitch_27 = 1
LightSwitch_28 = 1
LightSwitch_29 = 1
LightSwitch_30 = 1
LightSwitch_31 = 1 Determines which lights hit the model
Offset[8..11] = 0x20
Color_R = 0x46 (3 offest Color affects the model)
Color_G = 0x46
Color_B = 0x46
Color_A = 0x3 (The alpha of color)
Angle_X = 0.000000
Angle_Y = -0.000000 (Options of rotary models) Mode = 0x1
Angle_Z = 0.000000
Swing_1 = 0.000000
Swing_2 = 0.000000
SwingIntensity = 0.000000
SwingSpeed = 0.000000 (Options of swinging models) Mode = 0x2
Offset[44..47] = 0.000000
Offset[48..51] = 0.000000
Offset[52..55] = 0.000000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000 (Options of scrolling Textures)
TextureMovement_Y = 0.000000
Example of rotate or move an SMD this is activated with the option “Mode = 0x2” or “Mode = 0x1” and in combination with other functions, example:
Example of Mode = 0x1
ROTATION “Mode = 0x1”
ID=0x50
Mode = 0x1
OpacityHierarchy = 0x3
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x20
Color_R = 0xFF
Color_G = 0xFF
Color_B = 0xFF
Color_A = 0x0
Angle_X = 1.160428
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 0.000000
Swing_2 = 0.000000
SwingIntensity = 0.000000
SwingSpeed = 0.000000
Offset[44..47] = 0.000000
Offset[48..51] = 0.000000
Offset[52..55] = 0.000000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000
TextureMovement_Y = -0.000000
Example of Mode = 0x2
Mode = 0x2
ID=0x53
Mode = 0x2
OpacityHierarchy = 0x5
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x0
Color_R = 0xFF
Color_G = 0xFF
Color_B = 0xFF
Color_A = 0x0
Angle_X = 0.000000
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 247974.000000
Swing_2 = 5.000000
SwingIntensity = 0.110000
SwingSpeed = 0.110000
Offset[44..47] = 9.967492
Offset[48..51] = 0.130000
Offset[52..55] = 0.090000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000
TextureMovement_Y = -0.000000
ASSIGNMENT OF SCROLLING TEXTURES
To assign its moving texture, we will use the “TextureMovement” option
It is very important to make sure that our model that we want to assign movement to its texture has only one texture assigned to it, otherwise, all the textures of that model (PMD) will move.
If we want to isolate an area of a model for the texture to move, it must be exported individually and given a unique SMX ID.
Example of an SMX input with a moving texture.
In the case of “r100” it is the sky:
ID=0x2
Mode = 0x0
OpacityHierarchy = 0x2
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x42
Color_R = 0xD2
Color_G = 0xD2
Color_B = 0xD2
Color_A = 0x0
Angle_X = 0.000000
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 0.000000
Swing_2 = 0.000000
SwingIntensity = 0.000000
SwingSpeed = 0.000000
Offset[44..47] = 0.000000
Offset[48..51] = 0.000000
Offset[52..55] = 0.000000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = -0.001212
TextureMovement_Y = -0.000001
if we want to add new smx entry we have to update EntryCount
And copy a smx entry and past it to be the last one and update smx entry id in decimal and hexadecimal
How to assigne a SMX entry to specific SMD
lets say that we want to assigne this smx entry:
Mode = 0x2
ID=0x53
Mode = 0x2
OpacityHierarchy = 0x5
Offset[3] = 0x0
LightControl_0 = 0x1
LightControl_1 = 0x1
LightControl_2 = 0x1
LightControl_3 = 0x1
Offset[8..11] = 0x0
Color_R = 0xFF
Color_G = 0xFF
Color_B = 0xFF
Color_A = 0x0
Angle_X = 0.000000
Angle_Y = -0.000000
Angle_Z = 0.000000
Swing_1 = 247974.000000
Swing_2 = 5.000000
SwingIntensity = 0.110000
SwingSpeed = 0.110000
Offset[44..47] = 9.967492
Offset[48..51] = 0.130000
Offset[52..55] = 0.090000
Swing_3 = 0.000000
Swing_4 = 0.000000
Swing_5 = 0.000000
TextureMovement_X = 0.000000
TextureMovement_Y = -0.000000
We need to see ID in this case is ID = 0x53
then we need to open smd file by Any Hex editor
Eache smd entry is 4 lines at 16 bytes
Blue bytes is ID SMX ID = 0x53
Green Bytes is SMD bin number
let's edit SMX of SMD 4D We had to change the SMX ID From 05 To 53 Thats all
(SOP Toolset Download)
Click Here
All this information came from Mr.Curious Tutorial