Difference between revisions of "Sonic Heroes/Object Porting"
From Sonic Retro
Igorseabra4 (talk | contribs) (Created page with "{{SCHG SH}} This tutorial will teach you how to port SET objects between different levels. == 1. Editing the SET ID table == The SET ID table is the table that defines in wh...") |
Igorseabra4 (talk | contribs) (→1. Editing the SET ID table) |
||
Line 4: | Line 4: | ||
== 1. Editing the SET ID table == | == 1. Editing the SET ID table == | ||
− | The SET ID table is the table that defines in which level each object will be loaded. It is located in setidtbl.bin file, in the dvdroot folder.<br />The file is composed of a list of all the objects in the game, each in a 0x14 entry. The | + | The SET ID table is the table that defines in which level each object will be loaded. It is located in ''setidtbl.bin'' file, in the dvdroot folder.<br />The file is in little endian and is composed of a list of all the objects in the game, each in a 0x14 entry. The entries have the following layout: |
− | This is the only step needed for porting objects from the global list, as their models and textures are always loaded. | + | |
+ | {{red|00 00 00 00}} {{green|00 00 00 00}} {{blue|00 00 00 00}} {{grey|00 00 00 00 00 00}} {{cyan|00}} {{yellow|00}} | ||
+ | |||
+ | {| class="prettytable" | ||
+ | !Offset||Type||Description | ||
+ | |- | ||
+ | | {{red|0x00}} | ||
+ | | {{red|Binary (long)}} | ||
+ | | {{red|Availability in levels 0 to 31}} | ||
+ | |- | ||
+ | | {{green|0x04}} | ||
+ | | {{green|Binary (long)}} | ||
+ | | {{green|Availability in levels 32 to 63}} | ||
+ | |- | ||
+ | | {{blue|0x08}} | ||
+ | | {{blue|Binary (long)}} | ||
+ | | {{blue|Availability in levels 64 to 95}} | ||
+ | |- | ||
+ | | {{grey|0x0C}} | ||
+ | | {{grey|-}} | ||
+ | | {{grey|Null}} | ||
+ | |- | ||
+ | | {{cyan|0x12}} | ||
+ | | {{cyan|Byte}} | ||
+ | | {{cyan|List}} | ||
+ | |- | ||
+ | | {{yellow|0x13}} | ||
+ | | {{yellow|Byte}} | ||
+ | | {{yellow|Object}} | ||
+ | |} | ||
+ | |||
+ | For example:<br /> | ||
+ | *0000 0000 0000 0000 0000 0000 0000 0010 (binary) in the first long would make the object available only in level 01 (Seaside Hill).<br /> | ||
+ | *0000 0000 1000 0000 0000 0000 0010 0010 would make the object available also in level 05 (Casino Park) and level 23 (Egg Albatross).<br /> | ||
+ | *0000 0000 0000 0000 0000 1000 0000 0000 in the second long (offset 0x04) would make the object available in level 43 (Bonus Stage 4).<br /> | ||
+ | |||
+ | Notes:<br /> | ||
+ | *This is the only step needed for porting objects from the global list, as their models and textures are always loaded. | ||
+ | *Note that the file can also be edited in big endian, but that gets more complicated as you have to edit the binaries per byte instead of per long. | ||
+ | *The fourth long can probably also be used, but since there are no levels past 89, it's not needed. | ||
== 2. Adding the model == | == 2. Adding the model == |
Revision as of 00:19, 16 April 2016
SCHG: Sonic Heroes |
---|
Main Article |
Mechanic Editing |
DOL Editing |
Model Editing |
Collision Format Model Format |
Level Editing |
Camera Editing |
Particle Editing |
Particle Editing |
Sound Editing |
Music List |
SCHG How-Tos |
Custom Object Material Effect Tutorial |
This tutorial will teach you how to port SET objects between different levels.
1. Editing the SET ID table
The SET ID table is the table that defines in which level each object will be loaded. It is located in setidtbl.bin file, in the dvdroot folder.
The file is in little endian and is composed of a list of all the objects in the game, each in a 0x14 entry. The entries have the following layout:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Offset | Type | Description |
---|---|---|
0x00 | Binary (long) | Availability in levels 0 to 31 |
0x04 | Binary (long) | Availability in levels 32 to 63 |
0x08 | Binary (long) | Availability in levels 64 to 95 |
0x0C | - | Null |
0x12 | Byte | List |
0x13 | Byte | Object |
For example:
- 0000 0000 0000 0000 0000 0000 0000 0010 (binary) in the first long would make the object available only in level 01 (Seaside Hill).
- 0000 0000 1000 0000 0000 0000 0010 0010 would make the object available also in level 05 (Casino Park) and level 23 (Egg Albatross).
- 0000 0000 0000 0000 0000 1000 0000 0000 in the second long (offset 0x04) would make the object available in level 43 (Bonus Stage 4).
Notes:
- This is the only step needed for porting objects from the global list, as their models and textures are always loaded.
- Note that the file can also be edited in big endian, but that gets more complicated as you have to edit the binaries per byte instead of per long.
- The fourth long can probably also be used, but since there are no levels past 89, it's not needed.
2. Adding the model
Just adding the object to the SET ID table is not enough to make the object load, as its model will not be loaded unless you insert it in the s*obj.one file of the level.
- First, you must use the Sonic Heroes ONE Unpacker or HeroesONE to extract the compressed PRS model (or models, as some objects use more than one file) of the object from the source level s*obj.one file.
- If you don't know (or can't tell from the file names) which PRS files are for the object you want to port, you can either decompress them, convert them to OBJ and view them in a model editor (takes more work) or you can just pack the new ONE with every file from the source ONE (easier). This last method will allow you to use every object from the source level, but will create a larger file and is unnecessary if you're not going to use all the objects.
- Pack the s*obj.one file of the destination level with the extra PRS file(s) included using Sonic Heroes ONE Packer or HeroesONE. If you're using the ONE Packer, you will have to add the name of the PRS files to the ONE in a hex editor before packing, otherwise it will be ignored. You can also remove objects from the file at this point. Do not do this unless you are sure the model will not be loaded in the level (note that some models from the s*obj.one file might not be SET objects)
- Place the new ONE file in the dvdroot folder.
3. Adding the textures
The next step is to add the object textures to the TXD archive.
- Extract the object's textures from the source level's TXD file and add them to the destination level's TXD file.
- You might need to rebuild the entire archive, depending on which editor you are using and which level texture file you're trying to edit.
- If you're in doubt on which textures the object will use, you can add all of the source level's textures to the destination TXD file. This should not decrease game performance but will increase loading times and result in an extra large TXD file full of textures that will never be loaded.
If you want to use TXD Workshop, it will open and edit some of the game's TXD files, but not all of them. For it to open, for example, Seaside Hill's TXD, you will have to use ViceTXD or another editor to extract all the images from the file and rebuild the entire archive from scratch using TXDBuilder. Don't forget to set the archive version to GTA VC in TXD Workshop, or else the game will crash!