Noita Wiki
Vexx32 (talk | contribs)
(enhanced tempate to be able to be used for the log messages in the lower left corner of the screen as well, by omitting the main message entirely.)
Vexx32 (talk | contribs)
(use noita-font class for easier font handling in spoilers)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
<includeonly>{{#if:{{{1|}}}{{{2|}}}|<span class="GameMessage noita-font" {{#if:{{{1|}}}|style="text-transform: uppercase;"}}
<includeonly>{{#if:{{{1|}}}{{{2|}}}|<span style="display: inline-grid; grid-template-rows: auto auto; font-family: 'noita','04b03',sans-serif;{{#if:{{{1|}}}| text-transform: uppercase;}} color: #fff; margin: 2px 5px; vertical-align: middle; text-align: center;">{{#if:{{{1|}}}|<span style="grid-row: 1 / 2; background-color: rgba(248,144,0,0.25); border-radius: 8px; border: 2px solid rgb(248,144,0); border-left: 5px groove rgb(248,144,0); border-right: 5px ridge rgb(248,144,0); padding: 4px 15px 0 15px; font-size: 1.2em">{{{1|}}}</span>}}{{#if:{{{2|}}}|<span style="grid-row: 2 / 3; font-size: 0.8em;>{{{2|}}}</span>}}</span>}}</includeonly><noinclude>
 
  +
  +
">{{#if:{{{1|}}}|<span class="GameMessageInner" style="grid-row: 1 / 2;">{{{1|}}}</span>}}{{#if:{{{2|}}}|<span class="GameMessageUnder" style="
  +
grid-row: 2 / 3;
  +
">{{{2|}}}</span>}}</span>}}</includeonly><noinclude>
 
{{doc}}
 
{{doc}}
  +
[[Category:Content templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 01:16, 17 April 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.