Difference between revisions of "TEXT"

From Battlepedia
Jump to navigationJump to search
Line 16: Line 16:
 
The text can be formatted by introducing tags. The tags are usually in the format:
 
The text can be formatted by introducing tags. The tags are usually in the format:
  
  {variable:value}
+
  {''<variable><value>''}
  {variable=value}
+
{''<variable>'':''<value>''}
  {variable}
+
  {''<variable>''=''<value>''}
 +
  {''<variable>''}
  
 
They usually either affect the text coming immediately after it, or insert something in the text (such as an image or variable).
 
They usually either affect the text coming immediately after it, or insert something in the text (such as an image or variable).
  
 
===Tag List (incomplete)===
 
===Tag List (incomplete)===
The tags and variables placed in [brackets] are optional.
+
The tags and variables placed in [brackets] are optional. Vectors are represented by comma-separated values.
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
! Tag Format !! Variable Type !! Description
+
! Tag Format !! Value !! Description
 
|-
 
|-
 
|
 
|
  {c=''<variable>''}
+
  {~:''<value>''}
  {color=''<variable>''}
+
{reset:''<value>''}
 +
|| Tag name
 +
|| Resets a previously changed tag to default. Possible tags:
 +
* auto-wait
 +
* color, c
 +
* tex
 +
|-
 +
|
 +
{color=''<value>''}
 +
  {c=''<value>''}
 
|| Hex Color (4 bytes, ''AARRGGBB'')
 
|| Hex Color (4 bytes, ''AARRGGBB'')
 
|| Customizes the text color.
 
|| Customizes the text color.
 
|-
 
|-
 
|
 
|
  {red:''<variable>''}
+
  {red:''<value>''}
 +
{r:''<value>''}
 
|| Float (range: 0 to 1)
 
|| Float (range: 0 to 1)
 
|| Customizes the red component of the text color.
 
|| Customizes the red component of the text color.
 
|-
 
|-
 
|
 
|
  {green=''<variable>''}
+
  {green=''<value>''}
 +
{g=''<value>''}
 
|| Float (range: 0 to 1)
 
|| Float (range: 0 to 1)
 
|| Customizes the green component of the text color.
 
|| Customizes the green component of the text color.
 
|-
 
|-
 
|
 
|
  {blue=''<variable>''}
+
  {blue=''<value>''}
 +
{b=''<value>''}
 
|| Float (range: 0 to 1)
 
|| Float (range: 0 to 1)
 
|| Customizes the blue component of the text color.
 
|| Customizes the blue component of the text color.
 
|-
 
|-
 
|
 
|
  {reset:c}
+
  {alpha*=''<value>''}
  {reset:color}
+
|| Float (range: 0 to 1)
 +
|| Customizes the alpha component of the text color.
 +
|-
 +
|
 +
  {auto_wait=off}
 
|| None
 
|| None
|| Resets color to default.
+
|| ?
 +
|-
 +
|
 +
{font=''<value>''}
 +
|| Integer
 +
|| ?
 
|-
 
|-
 
|
 
|
  {i:''<variable>''}
+
{h''<value>''}
 +
|| Float
 +
|| ?
 +
|-
 +
|
 +
{insert:''<value>''}
 +
  {i:''<value>''}
 
|| [[TEXT]] Asset Name
 
|| [[TEXT]] Asset Name
|| Gets replaced by the text in the specified asset. {i:keyword}, for example, inserts the '''keyword''' text (which is an asset in boot.HIP) that doesn't contain actual text but sets the text color to a shade of red.
+
|| Inserts text in the specified asset. {i:keyword}, for example, inserts the '''keyword''' text (which is an asset in boot.HIP) that doesn't contain actual text but sets the text color to a shade of red.
 
|-
 
|-
 
|
 
|
  {tex:''<variable1>''[;scale=''<variable2>'';dst=''<variable3>'';off=''<variable4>'']}
+
  {tex:''<value1>''[;scale=''<value2>'';dst=''<value3>'';off=''<value4>'']}
|| [[RWTX]] Asset Name, Unknown, Vector4 (Unknown), Vector2 (Unknown)
+
|| [[RWTX]] Asset Name; Unknown; Vector4 (Unknown); Vector2 (Unknown)
|| Places a texture in the text.
+
|| Places a texture in the text (such as an image of a button).
 
|-
 
|-
 
|
 
|
  {reset:tex}
+
  {n}
 
|| None
 
|| None
|| Resets text texture to default.
+
|| Inserts new line character
 
|-
 
|-
 
|
 
|
  {n}
+
  {page_break}
 +
{pb}
 
|| None
 
|| None
|| New line character
+
|| Inserts page break character
 
|-
 
|-
 
|
 
|
  {page_break}
+
  {prompt}
 
|| None
 
|| None
|| Page break character (note: [[Industrial Park]]'s text editor uses a new line character to represent this)
+
|| ?
 
|-
 
|-
 
|
 
|
  {signal:''<variable>''[;need])
+
{pulse=''<value1>'';x=''<value2>'';y=''<value3>''}
 +
|| Vector2, Vector3, Vector3
 +
|| ?
 +
|-
 +
|
 +
  {signal:''<value>''[;need])
 
|| Integer
 
|| Integer
 
|| Unknown; camera?
 
|| Unknown; camera?
 
|-
 
|-
 
|
 
|
  {sound:''<variable1>''[;speaker=''<variable2>'']}
+
  {sound:''<value1>''[;speaker=''<value2>'']}
|| [[SNDS]] Asset Name, [[VIL]] Asset Name
+
|| [[SNDS]] Asset Name; [[VIL]] Asset Name
 
|| Defines sound (usually a voice line) to play when this line is reached.
 
|| Defines sound (usually a voice line) to play when this line is reached.
 
|-
 
|-
Line 96: Line 130:
 
|-
 
|-
 
|
 
|
  {timer:''<variable>''}
+
{turn on <value>}
 +
|| ?
 +
|| ?
 +
|-
 +
|
 +
  {timer:''<value>''}
 
|| [[TIMR]] Asset Name
 
|| [[TIMR]] Asset Name
|| Gets replaced by the timer's current time.
+
|| Inserts the timer's current time.
 
|-
 
|-
 
|
 
|
  {wait[:<variable1>];prompt[=<variable2>]}
+
{var:''<value>''}
 +
|| Variable
 +
|| Inserts one of the following possible variables:
 +
* ActivePad
 +
* BadCard
 +
* BadCardAvailable
 +
* BadCardNeeded
 +
* CorruptFileName
 +
* CurrentArea
 +
* CurrentDate
 +
* CurrentLevelCollectable
 +
* CurrentLevelPatsSocks
 +
* CurrentScene
 +
* CurrentTime
 +
* GameSlot0
 +
* GameSlot1
 +
* GameSlot2
 +
* GameSlot3
 +
* GameSlot4
 +
* GameSlot5
 +
* GameSlot6
 +
* GameSlot7
 +
* MCAccessType
 +
* MCAutoSaveCard
 +
* MCName
 +
* MCPS2MaxSpace
 +
* MCPS2MinSpace
 +
* MCSelectedCard
 +
* MCSelectedGame
 +
* PlayerHeShe
 +
* PlayerName
 +
* PlayerPosition
 +
* SelectedArea
 +
* ShinyCount
 +
* ShinyCountText
 +
* SoundFXVolume
 +
* SoundMusicVolume
 +
* SpaceAvailable
 +
* SpaceAvailableString
 +
* SpaceNeeded
 +
* TotalPatsSocks
 +
 
 +
|-
 +
|
 +
{w''<value>''}
 +
|| Float
 +
|| ?
 +
|-
 +
|
 +
  {wait[:<value>];prompt[=yesno]}
 +
|| Float
 +
|| ?
 +
|-
 +
|
 +
{xj=right}
 +
|| None
 
|| ?
 
|| ?
||
 
 
|}
 
|}
  
 
[[Category:Asset]]
 
[[Category:Asset]]

Revision as of 03:03, 12 September 2018

TEXT assets contain text that is used ingame in message boxes and other places.

Format

Offset Type Description
0x00 int Character count
0x04 char[charCount] Text (zero-terminated; the terminator is not included in charCount)
charCount + 0x04 byte[] Padding (0x00 until the data is aligned to 0x04)

Text Formatting

The text can be formatted by introducing tags. The tags are usually in the format:

{<variable><value>}
{<variable>:<value>}
{<variable>=<value>}
{<variable>}

They usually either affect the text coming immediately after it, or insert something in the text (such as an image or variable).

Tag List (incomplete)

The tags and variables placed in [brackets] are optional. Vectors are represented by comma-separated values.

Tag Format Value Description
{~:<value>}
{reset:<value>}
Tag name Resets a previously changed tag to default. Possible tags:
  • auto-wait
  • color, c
  • tex
{color=<value>}
{c=<value>}
Hex Color (4 bytes, AARRGGBB) Customizes the text color.
{red:<value>}
{r:<value>}
Float (range: 0 to 1) Customizes the red component of the text color.
{green=<value>}
{g=<value>}
Float (range: 0 to 1) Customizes the green component of the text color.
{blue=<value>}
{b=<value>}
Float (range: 0 to 1) Customizes the blue component of the text color.
{alpha*=<value>}
Float (range: 0 to 1) Customizes the alpha component of the text color.
{auto_wait=off}
None ?
{font=<value>}
Integer ?
{h<value>}
Float ?
{insert:<value>}
{i:<value>}
TEXT Asset Name Inserts text in the specified asset. {i:keyword}, for example, inserts the keyword text (which is an asset in boot.HIP) that doesn't contain actual text but sets the text color to a shade of red.
{tex:<value1>[;scale=<value2>;dst=<value3>;off=<value4>]}
RWTX Asset Name; Unknown; Vector4 (Unknown); Vector2 (Unknown) Places a texture in the text (such as an image of a button).
{n}
None Inserts new line character
{page_break}
{pb}
None Inserts page break character
{prompt}
None ?
{pulse=<value1>;x=<value2>;y=<value3>}
Vector2, Vector3, Vector3 ?
{signal:<value>[;need])
Integer Unknown; camera?
{sound:<value1>[;speaker=<value2>]}
SNDS Asset Name; VIL Asset Name Defines sound (usually a voice line) to play when this line is reached.
{teleport}
None Teleports the player at this point in the text.
{turn on <value>}
? ?
{timer:<value>}
TIMR Asset Name Inserts the timer's current time.
{var:<value>}
Variable Inserts one of the following possible variables:
  • ActivePad
  • BadCard
  • BadCardAvailable
  • BadCardNeeded
  • CorruptFileName
  • CurrentArea
  • CurrentDate
  • CurrentLevelCollectable
  • CurrentLevelPatsSocks
  • CurrentScene
  • CurrentTime
  • GameSlot0
  • GameSlot1
  • GameSlot2
  • GameSlot3
  • GameSlot4
  • GameSlot5
  • GameSlot6
  • GameSlot7
  • MCAccessType
  • MCAutoSaveCard
  • MCName
  • MCPS2MaxSpace
  • MCPS2MinSpace
  • MCSelectedCard
  • MCSelectedGame
  • PlayerHeShe
  • PlayerName
  • PlayerPosition
  • SelectedArea
  • ShinyCount
  • ShinyCountText
  • SoundFXVolume
  • SoundMusicVolume
  • SpaceAvailable
  • SpaceAvailableString
  • SpaceNeeded
  • TotalPatsSocks
{w<value>}
Float ?
{wait[:<value>];prompt[=yesno]}
Float ?
{xj=right}
None ?