Sims 2 String Substitutions

From SimsWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:05, 31 July 2010
MogHughson (Talk | contribs)

← Previous diff
Revision as of 12:36, 31 July 2010
MogHughson (Talk | contribs)
(Special Substitution inserts)
Next diff →
Line 20: Line 20:
|$Object||''Insert catalog name of current stack object into string'' |$Object||''Insert catalog name of current stack object into string''
|- |-
-|$Local:X||''Insert value of local var X''+|$Local:X||Insert value of [[Sims 2 Local|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 '' |$TimeLocal||''Insert hour of day in text using in index of local var to point at var with hour value in it new ones ''
Line 40: Line 40:
|$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 (?)'' |$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 table X, string Y''+|$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'' |$LastName||''Gets the current family's last name''
|} |}

Revision as of 12:36, 31 July 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.

SubstitutionDescription
$NeighborInsert name of neighbor pointed at by neighbor ID in stackObject ID
$FamilyAssetsInsert family monetary Net worth into string from family index in local var
$FamilyInsert house-hold name of person in stack object into string
$MeInsert catalog name of current person into string
$ObjectInsert catalog name of current stack object into string
$Local:XInsert value of Local variable X
$TimeLocalInsert hour of day in text using in index of local var to point at var with hour value in it new ones
$NameLocal:XInsert catalog name of object with ID pointed at inside of local var X
$NameAttrib:XInsert catalog name of object with ID pointed at index X of stack objects attribute (?)
$NeighborLocal:XInsert name of neighbor pointed at by neighbor ID with ID pointed at inside of local var X (?)
$Attrib:XInsert attribute value X of stack objects attribute (?)
$CatalogLocal:XInsert catalog description of object with ID of local var X (?)
$TokenNameLocal:XInsert catalog name of object type pointed at by token type, which is indexed by local var X
$DayLocal:XInsert text name of day given in local var X. Day values are 0-6, 0 being Sunday (?)
$JobTitle:XInsert 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:YGets 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
$LastNameGets the current family's last name
Personal tools
game select