Difference between revisions of "Sims 3:Key table"

From SimsWiki
Jump to: navigation, search
m (Key Table and Resource References)
m
Line 1: Line 1:
[[Sims 3:Main Page]]
+
[[Tutorials:TS3 Advanced Coding Tutorials]]
 
<hr/>
 
<hr/>
 
==Key Table and Resource References==
 
==Key Table and Resource References==
Line 19: Line 19:
 
Lists of resource references in other formats (TIG, ITG, etc) do occur but these are not ''key tables'' per se.
 
Lists of resource references in other formats (TIG, ITG, etc) do occur but these are not ''key tables'' per se.
 
<hr/>
 
<hr/>
[[Sims 3:Main Page]]
+
[[Tutorials:TS3 Advanced Coding Tutorials]]

Revision as of 07:03, 3 January 2010

Tutorials:TS3 Advanced Coding Tutorials


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 or key: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 TGI_offset	// from after this DWORD
DWORD TGI_size		// 4 + tgiCount * 16

At TGI_offset will be the list of resource references.

DWORD tgiCount
--repetition tgiCount:
	DWORD TID
	DWORD GID
	QWORD I64

Lists of resource references in other formats (TIG, ITG, etc) do occur but these are not key tables per se.


Tutorials:TS3 Advanced Coding Tutorials

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox