String Operations

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

Contents

Operations

Basic Manipulation

Basic Display

Graphical Display

For advanced text display, see module_presentations.

Game Objects

Troop

Agent/Class

Items

Other

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

Multiplayer

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.

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

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.

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