Difference between revisions of "Sims 3:Key table"

From SimsWiki
Jump to: navigation, search
m (Key Table and Resource References)
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Key Table and Resource References==
+
{{TS3AdvancedModdingHeader}}
 +
 
 +
 
 +
==Overview==
 +
 
 +
==Format==
 +
===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:
 
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 type // '''T'''
  DWORD Resource group // '''G'''
+
  DWORD Resource group // '''G'''
  QWORD Instance       // '''I'''
+
  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.
+
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'':
 
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 TGI_offset // from after this DWORD
  DWORD length // 4 + entries * 16
+
  DWORD TGI_size // 4 + ''tgiCount'' * 16
At ''offset'' will be the list of resources. This is not '''always''' in TGI form.  TIG and ITG are also used.  The table layout is common, however:
+
At ''TGI_offset'' will be the list of resource references.
  DWORD count1
+
  DWORD tgiCount
  --repetition count1:
+
  --repetition tgiCount:
    {entry}
+
DWORD TID
where ''{entry}'' is the resource reference as TGI/TIG/ITG etc, consuming 16 bytes.
+
DWORD GID
 +
QWORD I64
 +
Lists of resource references in other formats (TIG, ITG, etc) do occur but these are not ''key tables'' per se.
 +
 
 +
{{TS3AdvancedModdingHeader}}

Latest revision as of 17:37, 4 May 2010

Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 


[edit] Overview

[edit] Format

[edit] 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.

Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox