Difference between revisions of "Type Group Instance"

From SC4D Encyclopaedia
Jump to navigation Jump to search
m (10 revisions imported)
(Added information from Speeder's Reverse Engineering thread that had not been.)
Line 1: Line 1:
The '''Type Group Instance''', typically abbreviated '''TGI''', is the sorting format of the Database Packed File (DBPF) archive, and is used to identify, reference, and link files within [[DBPF]] files.  A file's TGI consists of three, eight-digit [[hexadecimal]] numbers, the [[Type ID]], [[Group ID]], and [[Instance ID]], respectively.  As TGI's are relatively unique to a particular object, they are the preferred method for referencing game objects, which might have multiple names in a variety of languages or naming conventions.  Additionally, objects sometimes have very similar names, making the TGI an ideal way to differentiate between the two.
+
The '''Type Group Instance''', officially '''GZPersistResourceKey'''<ref>SC4D User Speeder, ""TGI" has a official name ...the name of TGI is GZPersistResourceKey", 22nd January, 2016 [https://www.sc4devotion.com/forums/index.php?topic=17302.msg504536#msg504536]</ref>, and typically abbreviated '''TGI''', is the sorting format of the Database Packed File (DBPF) archive, and is used to identify, reference, and link files within [[DBPF]] files.  A file's TGI consists of three, eight-digit [[hexadecimal]] numbers, the [[Type ID]], [[Group ID]], and [[Instance ID]], respectively.  As TGI's are relatively unique to a particular object, they are the preferred method for referencing game objects, which might have multiple names in a variety of languages or naming conventions.  Additionally, objects sometimes have very similar names, making the TGI an ideal way to differentiate between the two.
  
 
While efforts are generally made to prevent two objects from having the same TGI, this still sometimes occurs, and can cause conflicts or bugs in the game, particularly when it happens with buildings, props, or textures.  Sometimes, particularly in the case of mods, it is desired to give an object the same TGI as another, so that one will override the other.  Typically, this involves creating a mod that has the same TGI as a Maxis object that came with the game, so that the custom mod will overwrite the default settings.
 
While efforts are generally made to prevent two objects from having the same TGI, this still sometimes occurs, and can cause conflicts or bugs in the game, particularly when it happens with buildings, props, or textures.  Sometimes, particularly in the case of mods, it is desired to give an object the same TGI as another, so that one will override the other.  Typically, this involves creating a mod that has the same TGI as a Maxis object that came with the game, so that the custom mod will overwrite the default settings.
Line 17: Line 17:
 
See also:
 
See also:
 
* [[InstanceFormats]]
 
* [[InstanceFormats]]
 +
 +
== References ==
 +
 +
{{reflist}}
  
 
[[Category:Modding]]
 
[[Category:Modding]]

Revision as of 09:17, 5 May 2021

The Type Group Instance, officially GZPersistResourceKey[1], and typically abbreviated TGI, is the sorting format of the Database Packed File (DBPF) archive, and is used to identify, reference, and link files within DBPF files. A file's TGI consists of three, eight-digit hexadecimal numbers, the Type ID, Group ID, and Instance ID, respectively. As TGI's are relatively unique to a particular object, they are the preferred method for referencing game objects, which might have multiple names in a variety of languages or naming conventions. Additionally, objects sometimes have very similar names, making the TGI an ideal way to differentiate between the two.

While efforts are generally made to prevent two objects from having the same TGI, this still sometimes occurs, and can cause conflicts or bugs in the game, particularly when it happens with buildings, props, or textures. Sometimes, particularly in the case of mods, it is desired to give an object the same TGI as another, so that one will override the other. Typically, this involves creating a mod that has the same TGI as a Maxis object that came with the game, so that the custom mod will overwrite the default settings.

An object's TGI is commonly written in full as:

AAAAAAAA BBBBBBBB CCCCCCCC

where "AAAAAAAA" is the Type ID, "BBBBBBBB" is the Group ID, and "CCCCCCCC" is the Instance ID.

During certain modding operations, a TGI File may be generated. These are not native to the game and serve no purpose in modding SC4.


Maxis official name for TGI is "Persistant Resource Key", and the debug symbols present on the Mac version refer to TGI data as GZPersistResourceKey


See also:

References

  1. SC4D User Speeder, ""TGI" has a official name ...the name of TGI is GZPersistResourceKey", 22nd January, 2016 [1]