TGI

From SimsWiki
Revision as of 16:00, 17 September 2012 by Kiwi tea (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/TGI
TGI or Type Group Instance is the sorting format of the Database Packed File (DBPF) Archive

Type is the filetype or filetype maingroup Group is the Subgrouping Instance is the unique ID of the file for that group

In TS2 a new ID called (R) for Resource ID is present. This is actually a second Instance ID that further randomizes things. It uses 32bit crc as opposed to standard 3d resources instances which use 24 bit crc.

Hashes

This is all use at your own risk. Information provided by MaxoidTom (but don't bug him if it doesn't work ;) )

In most of the RCOl File Types the Resource ID and Instance are used as Hash values over the Filename. This will help the Game to load RCOL Files (which seem to be referenced by their Filename) faster, as it only has to look in Files with a matching Hash.

The has Value is created from the lowercase Filename without the #0x12345678! Part (User Group ID). (so #0xE345B2!TestMod_txtr would be testmod_txtr)

Resource ID: CRC-32 (Poly=0x04C11DB7, Seed=0xFFFFFFFF, reflection=false, XOR Output=0x00000000) Instance: CRC-24(Poly=0x01864CFB, Seed=0x00B704CE, reflection=false, XOR Output=0x00000000) | 0xFF000000

The User Group ID is needed if you set the Group of an RCOL Instance to 0xFFFFFFFF (which is the default for custom Files). User Group ID: CRC-24(Poly=0x01864CFB, Seed=0x00B704CE, reflection=false, XOR Output=0x00000000) | 0x7F000000

Anyone who uses .NET as Developing Platform can use the Open Source Library from http:''www.classless.net/projects/hasher/ http:''www.classless.net/projects/hasher/

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox