Post by kTeo on Oct 11, 2021 7:06:27 GMT 10
As we know, each port of this game needs a different set of tools for modding them. The Son of Persia's toolset is compatible with certain files from 2007vr but not all of them.
Today i want to share a cool trick that i've found to efficiently convert the AEV structure from 2007vr to UHD without compromising anything.
Today i want to share a cool trick that i've found to efficiently convert the AEV structure from 2007vr to UHD without compromising anything.
For this, you will need to understand how the hexadecimal structure of an AEV file works.
You can find a good tutorial HERE.
You can find a good tutorial HERE.
For this tutorial, we will be using the AEV file of r100 (starting area on main game). Both files will be opened at once in HxD with the 2007vr being the top one and UHD on the bottom.
The byte lenght of an AEV entry in UHD is ALWAYS equal to 9C, while on 2007vr we have a byte lenght of A0
At closer inspection, we can see 4 blank bytes in each entry at the 2007vr that is responsible for scrambling the output UHD structure.
For finding out those bytes, simply select the first byte of an AEV entry, press CTRL+G and jump 58 bytes foward.
when positioned there, simply press DELETE four times to delete the next 4 bytes.
After that, your AEV entry should have a byte lenght of 9C and be exactly the same as an entry on UHD. It's that simple!
It's a really quick process to do that with every entry in your AEVs, this could save a lot of time when porting projects from different platforms.
If you want convert in vice-versa (UHD to 2007) you do the same steps except you insert 00 00 00 00 (4 bytes) instead of deleting.
TIP: in some cases, you'll find AEV entries that don't start with 01 01 00 00 so you won't be able to find them easily. If that happens, make sure to delete/insert the required bytes and then just go back to the start and jump 9C or A0 bytes, depending on your platform.
I'm pretty sure the same trick can be done for the PS2 port but i never tested it myself. If anyone here wants to give it a try please send the results here or ask me for help.
~kTeo
The byte lenght of an AEV entry in UHD is ALWAYS equal to 9C, while on 2007vr we have a byte lenght of A0
At closer inspection, we can see 4 blank bytes in each entry at the 2007vr that is responsible for scrambling the output UHD structure.
For finding out those bytes, simply select the first byte of an AEV entry, press CTRL+G and jump 58 bytes foward.
when positioned there, simply press DELETE four times to delete the next 4 bytes.
After that, your AEV entry should have a byte lenght of 9C and be exactly the same as an entry on UHD. It's that simple!
It's a really quick process to do that with every entry in your AEVs, this could save a lot of time when porting projects from different platforms.
If you want convert in vice-versa (UHD to 2007) you do the same steps except you insert 00 00 00 00 (4 bytes) instead of deleting.
TIP: in some cases, you'll find AEV entries that don't start with 01 01 00 00 so you won't be able to find them easily. If that happens, make sure to delete/insert the required bytes and then just go back to the start and jump 9C or A0 bytes, depending on your platform.
I'm pretty sure the same trick can be done for the PS2 port but i never tested it myself. If anyone here wants to give it a try please send the results here or ask me for help.
~kTeo