Difference between revisions of "Template:Advancement"

From Gamemode 4
Jump to navigation Jump to search
m (Force 32px?)
m (Reverted edits by Epyon (talk) to last revision by BluePsychoRanger)
(Tag: Rollback)
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><span class style="display: inline-block; position: relative; width: 52px; height: 52px;">
+
<includeonly><span style="display: inline-block; position: relative; width: 52px; height: 52px;"><!--
[[File:Advancement-{{{2|{{{bg|plain}}}}}}-{{{3|{{{state|raw}}}}}}.png|link=]]
+
-->[[File:Advancement-{{{2|{{{bg|plain}}}}}}-{{{3|{{{state|raw}}}}}}.png|link=]]<!--
<span style = "position:absolute; left:10px; top:10px; line-height:0">
+
--><span style = "position:absolute; left:10px; top:10px; line-height:0"><!--
{{Stack
+
-->{{Stack
 
| {{{ 1 | Grass Block}}}
 
| {{{ 1 | Grass Block}}}
 
| link = {{{link|}}}
 
| link = {{{link|}}}
 
| inline = true
 
| inline = true
| size = {{{size|32}}}
+
}}</span><!--
}}<!--
 
 
{{#if: {{{file|}}}
 
{{#if: {{{file|}}}
 
| [[File:{{{file}}}| link{{{link|}}}|32px]]
 
| [[File:{{{file}}}| link{{{link|}}}|32px]]
Line 14: Line 13:
 
| link = {{{link|}}}
 
| link = {{{link|}}}
 
| inline = true
 
| inline = true
| size = {{{size|32}}}
+
  }}</span>
  }}
 
 
}}--></span></includeonly><noinclude>
 
}}--></span></includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 04:09, 23 May 2020

Template documentation[view] [edit] [history] [purge]

Using this template, you can create the advancements as seen within the game.

The images used are taken from {{InvSprite}}.

Advancement-plain-raw.png

Usage[edit source]

Image[edit source]

Using the first parameter, {{{1}}}, you can set the image to the specified block or item or a fallback image.

For Gamemode 4 specific items or blocks, gm4: must prefix the name, e.g., gm4:Boots of Ostara

Background[edit source]

Optional. The second parameter, {{{bg}}}, is used to set the background.

Optional. The third parameter, {{{state}}}, is used to display advancement completion state.

Background Parameters
Advancement-plain-raw.png plain|raw
Advancement-oval-raw.png oval|raw
Advancement-fancy-raw.png fancy|raw
Advancement-plain-worn.png plain|worn
Advancement-oval-worn.png oval|worn
Advancement-fancy-worn.png fancy|worn

Link[edit source]

NOTE: Link is not implemented, as {{Advancement}} currently uses {{Stack}} and not {{Inventory Icon}}.

Optional. An advancement icon can contain a link using {{{link}}}.

To link Boots of Ostara, you would use {{Advancement|gm4:Boots of Ostara|link=Boots of Ostara}}.

Example Usage[edit source]

Advancements can be placed inline by placing two {{Advancement}}s next to one another, without spaces or newlines.

New lines and spacing within {{Advancement}} is ignored, as long as the parameter is stated, e.g., bg = plain.

The second and third parameters can be written inline, as shown in the last example, but unless the template is written without spaces, the output will fail.

{{Advancement
 | Furnace
 | bg = plain
 | state = raw}}{{Advancement|Furnace|bg = oval|state = worn}}

{{Advancement
 | gm4:SCUBA Helmet
 | bg = fancy
 | state = worn
 | link = SCUBA Gear
}}{{Advancement|Diamond Hoe|fancy|raw}}

Advancement-plain-raw.pngAdvancement-oval-worn.png

Advancement-fancy-worn.pngAdvancement-fancy-raw.png

See Also[edit source]