Difference between revisions of "Sims 2 String Substitutions"

From SimsWiki
Jump to: navigation, search
(Special Substitution inserts)
(Special Substitution inserts)
Line 34: Line 34:
 
|$CatalogLocal:X||Insert [[CTSS|catalog description]] of object with ID contained in [[Sims 2 Local|Local variable]] X
 
|$CatalogLocal:X||Insert [[CTSS|catalog description]] of object with ID contained in [[Sims 2 Local|Local variable]] X
 
|-
 
|-
|$GUIDCatalogNameLocal:X:Y||Insert [[CTSS|catalog description]] of object with [[GUID]] contained in [[Sims 2 Local|Local variables]] X and Y
+
|$GUIDCatalogNameLocal:X:Y||Insert [[CTSS|catalog description]] of object with [[GUID]] contained in [[Sims 2 Local|Local variables]] X and Y. Availabled with Pets or higher
 
|-
 
|-
 
|$TokenNameLocal:X||''Insert catalog name of object type pointed at by token type, which is indexed by local var X''
 
|$TokenNameLocal:X||''Insert catalog name of object type pointed at by token type, which is indexed by local var X''

Revision as of 15:58, 16 August 2010

Overview

When creating a String Resource for one of the many uses in Sims 2 (including dialogs) you can use special substitution strings to have your string filled in at runtime with something that isn't static, for example a Sims name, or a value calculated at runtime.


Special Substitution inserts

Italics in the table below indicates an unconfirmed description.

Substitution Description
$Neighbor Insert name of neighbor pointed at by neighbor ID in stackObject ID
$FamilyAssets Insert family monetary Net worth into string from family index in local var
$Family Insert house-hold name of person in stack object into string
$Me Insert catalog name of current object/Sim contained in the special My variable
$Object Insert catalog name of current stack object into string
$Local:X Insert value of Local variable X
$TimeLocal Insert hour of day in text using in index of local var to point at var with hour value in it new ones
$NameLocal:X Insert catalog name of object/Sim with ID contained in Local variable X
$NameAttrib:X Insert catalog name of object with ID pointed at index X of stack objects attribute (?)
$NeighborLocal:X Insert name of Sim pointed at by Neighbor ID contained in Local variable X
$Attrib:X Insert attribute value X of stack objects attribute (?)
$CatalogLocal:X Insert catalog description of object with ID contained in Local variable X
$GUIDCatalogNameLocal:X:Y Insert catalog description of object with GUID contained in Local variables X and Y. Availabled with Pets or higher
$TokenNameLocal:X Insert catalog name of object type pointed at by token type, which is indexed by local var X
$DayLocal:X Insert text name of day given in local var X. Day values are 0-6, 0 being Sunday (?)
$JobTitle:X Insert text name of a job title of given object. Using index passed in via local var X, this indexes into string table 800 (?)
$PrivateString:X:Y Gets the Private string from the String Resource number in Local:X (have made it work for 0x0101), and the string within that table which is in Local:Y
$LastName Gets the current family's last name
$FullNameLocal:X Insert full name of Sim pointed at by Neighbor ID contained in Local variable X
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox