Difference between revisions of "Sims 3:Key table"
From SimsWiki
m (→Key Table and Resource References) |
|||
Line 9: | Line 9: | ||
DWORD offset // from after reading ''offset'' | DWORD offset // from after reading ''offset'' | ||
DWORD length // 4 + entries * 16 | DWORD length // 4 + entries * 16 | ||
− | At ''offset'' will be the list of resources. | + | At ''offset'' will be the list of resources. |
DWORD count1 | DWORD count1 | ||
--repetition count1: | --repetition count1: | ||
{entry} | {entry} | ||
− | where ''{entry}'' is the resource reference as TGI | + | where ''{entry}'' is the resource reference as TGI, consuming 16 bytes. |
Revision as of 09:12, 13 June 2009
Key Table and Resource References
Many resources in Sims 3 packages refer to other resources. Resources are identified by a 16 byte value made up of:
DWORD Resource type // T DWORD Resource group // G QWORD Instance // I
These are known as the resource key. Generally they appear in the order shown above and the canonical reference format you may see is "TGI" or a string of numbers like 00000000-00000000-0000000000000000.
Where one resource contains many references to others, there is frequently a table listing the TGI values. Within the resource, the location of this table is given by a value known as the key table:
DWORD offset // from after reading offset DWORD length // 4 + entries * 16
At offset will be the list of resources.
DWORD count1 --repetition count1: {entry}
where {entry} is the resource reference as TGI, consuming 16 bytes.