String Operations

From Mount&Blade Modding Wiki
Jump to: navigation, search

Contents

[edit] Operations

[edit] Basic Manipulation

[edit] Basic Display

[edit] Graphical Display

For advanced text display, see module_presentations.

[edit] Game Objects

[edit] Troop

[edit] Agent/Class

[edit] Items

[edit] Other

name_links will refer to the in-game Notes section inside Logs.

[edit] Multiplayer

[edit] Special Characters

These operations may be used inside of strings in the Module System, to call and display certain data, or perform limited conditional operations via parameter substitution.

[edit] Prefix

Character Description
{!} The string will not be compiled into the translation csv files.
@ Initializes a quick-string which is not defined in module_strings

[edit] Line Manipulation

Character Description
\ Linebreak character. Allows formatting a long string onto the next line, which must be aligned without extra spaces.
^ Nextline character. Will visually insert a new line in-game.

[edit] Substitution

String Description
{s#} Outputs the contents of the specified string register.
{reg#} Outputs the value of the specified register.
{reg#?str1:str2} Displays str1 if the value of reg# is true (anything but 0), otherwise display str2.
{male/female} Displays either string depending on the player's gender.
{playername} Displays the player's name.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox