Noita Wiki
Vexx32 (talk | contribs)
(add doc for game message template)
 
Vexx32 (talk | contribs)
(Testing a slightly different usage)
 
(4 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
"label": "text",
 
"label": "text",
 
"description": "The text to show as a game message",
 
"description": "The text to show as a game message",
"example": "You have angered the gods",
+
"example": "The world has been restored",
 
"type": "string",
 
"type": "string",
 
"required": true
 
"required": true
  +
},
  +
"2": {
  +
"label": "text",
  +
"description": "The text to show as a the sub-message",
  +
"example": "and everyone is much happier",
  +
"type": "string",
  +
"required": false
 
}
 
}
 
},
 
},
Line 28: Line 35:
   
 
<pre style="display: table;">
 
<pre style="display: table;">
{{gameMessage|You have angered the gods}}
+
When you destroy a [[Holy Mountain]] you receive the message {{gameMessage|You have angered the gods}} and [[Stevari]] spawns shortly thereafter.
  +
</pre>
  +
  +
When you destroy a [[Holy Mountain]] you receive the message {{gameMessage|You have angered the gods}} and [[Stevari]] spawns shortly thereafter.
  +
  +
== Example ==
  +
  +
<pre style="display: table;">
  +
The message shown is {{gameMessage|main message|and sub message}} at some determined event
  +
</pre>
  +
  +
The message shown is {{gameMessage|main message|and sub message}} at some determined event
  +
  +
== Example ==
  +
  +
<pre style="display: table;">
  +
When picking up gold, the message {{gameMessage||Picked up X gold.}} appears in the lower left corner of the screen.
 
</pre>
 
</pre>
   
  +
When picking up gold, the message {{gameMessage||Picked up X gold.}} appears in the lower left corner of the screen.
{{gameMessage|You have angered the gods}}
 
   
 
{{doc/end}}
 
{{doc/end}}

Latest revision as of 15:40, 21 February 2021

Template-info.png Documentation

A minimal template to render a string of text in a similar way as in-game messages.

Template parameters

ParameterDescriptionTypeStatus
text1 text

The text to show as a game message

Example
The world has been restored
Stringrequired
text2

The text to show as a the sub-message

Example
and everyone is much happier
Stringoptional

Usage

{{gameMessage|message here}}

Example

When you destroy a [[Holy Mountain]] you receive the message {{gameMessage|You have angered the gods}} and [[Stevari]] spawns shortly thereafter.

When you destroy a Holy Mountain you receive the message You have angered the gods and Stevari spawns shortly thereafter.

Example

The message shown is {{gameMessage|main message|and sub message}} at some determined event

The message shown is main messageand sub message at some determined event

Example

When picking up gold, the message {{gameMessage||Picked up X gold.}} appears in the lower left corner of the screen.

When picking up gold, the message Picked up X gold. appears in the lower left corner of the screen.