Template:AdvancementIcon/doc: Difference between revisions
(Documentation created.) |
(Added another example usage) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
{{Advancement}} | {{Advancement}} | ||
== Image == | == Usage == | ||
=== Image === | |||
Using the first parameter, {{Code|{{{1}}}}}, you can set the image to the specified block or item or a fallback image. | Using the first parameter, {{Code|{{{1}}}}}, you can set the image to the specified block or item or a fallback image. | ||
Line 11: | Line 12: | ||
For Gamemode 4 specific items or blocks, <code>gm4:</code> must prefix the name, e.g., <code>gm4:Boots of Ostara</code> | For Gamemode 4 specific items or blocks, <code>gm4:</code> must prefix the name, e.g., <code>gm4:Boots of Ostara</code> | ||
== Background == | === Background === | ||
''Optional.'' The second parameter, {{Code|{{{bg}}}}}, is used to set the background. | ''Optional.'' The second parameter, {{Code|{{{bg}}}}}, is used to set the background. | ||
Line 18: | Line 19: | ||
{| class = "wikitable" | {| class = "wikitable" | ||
! Background | ! style = "text-align:center" | Background | ||
! Parameters | ! Parameters | ||
|- | |- | ||
| {{Advancement|Air|bg=plain|state=raw}} | | style = "text-align:center" | {{Advancement|Air|bg=plain|state=raw}} | ||
| {{Code|plain<nowiki>|</nowiki>raw}} | |||
|- | |- | ||
| {{Advancement|Air|bg=oval|state=raw}} | | style = "text-align:center" | {{Advancement|Air|bg=oval|state=raw}} | ||
| {{Code|oval<nowiki>|</nowiki>raw}} | |||
|- | |- | ||
| {{Advancement|Air|bg=fancy|state=raw}} | | style = "text-align:center" | {{Advancement|Air|bg=fancy|state=raw}} | ||
| {{Code|fancy<nowiki>|</nowiki>raw}} | |||
|- | |- | ||
| {{Advancement|Air|bg=plain|state=worn}} | | style = "text-align:center" | {{Advancement|Air|bg=plain|state=worn}} | ||
| {{Code|plain<nowiki>|</nowiki>worn}} | |||
|- | |- | ||
| {{Advancement|Air|bg=oval|state=worn}} | | style = "text-align:center" | {{Advancement|Air|bg=oval|state=worn}} | ||
| {{Code|oval<nowiki>|</nowiki>worn}} | |||
|- | |- | ||
| {{Advancement|Air|bg=fancy|state=worn}} | | style = "text-align:center" | {{Advancement|Air|bg=fancy|state=worn}} | ||
| {{Code|fancy<nowiki>|</nowiki>worn}} | |||
|} | |} | ||
== Link== | === Link === | ||
<span style = "color:red">NOTE: Link is not implemented, as <code><nowiki>{{</nowiki>Advancement<nowiki>}}</nowiki></code> currently uses <code><nowiki>{{</nowiki>Stack<nowiki>}}</nowiki></code> and not <code><nowiki>{{</nowiki>Inventory Icon<nowiki>}}</nowiki></code>.</span> | <span style = "color:red">NOTE: Link is not implemented, as <code><nowiki>{{</nowiki>Advancement<nowiki>}}</nowiki></code> currently uses <code><nowiki>{{</nowiki>Stack<nowiki>}}</nowiki></code> and not <code><nowiki>{{</nowiki>Inventory Icon<nowiki>}}</nowiki></code>.</span> | ||
Line 47: | Line 54: | ||
New lines and spacing within <code><nowiki>{{</nowiki>Advancement<nowiki>}}</nowiki></code> is ignored, as long as the parameter is stated, e.g., <code>bg = plain</code>. | New lines and spacing within <code><nowiki>{{</nowiki>Advancement<nowiki>}}</nowiki></code> is ignored, as long as the parameter is stated, e.g., <code>bg = plain</code>. | ||
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. | |||
<pre> | <pre> | ||
Line 59: | Line 68: | ||
| state = worn | | state = worn | ||
| link = SCUBA Gear | | link = SCUBA Gear | ||
}}</pre> | }}{{Advancement|Diamond Hoe|fancy|raw}} | ||
</pre> | |||
{{Advancement | {{Advancement | ||
Line 72: | Line 82: | ||
| state = worn | | state = worn | ||
| link = SCUBA Gear | | link = SCUBA Gear | ||
}} | }}{{Advancement|Diamond Hoe|fancy|raw}} | ||
== See Also == | |||
* <code><nowiki>{{</nowiki>[[Module:InvSprite|InvSprite]]<nowiki>}}</nowiki></code> | |||
__NOTOC__ | __NOTOC__ |
Revision as of 20:31, 25 May 2020
Using this template, you can create the advancements as seen within the game.
The images used are taken from {{InvSprite}}
.
Usage
Image
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
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 |
---|---|
Gamemode 4 Semi-funny blurb about GM4 |
plain|raw
|
Gamemode 4 Semi-funny blurb about GM4 |
oval|raw
|
Gamemode 4 Semi-funny blurb about GM4 |
fancy|raw
|
Gamemode 4 Semi-funny blurb about GM4 |
plain|worn
|
Gamemode 4 Semi-funny blurb about GM4 |
oval|worn
|
Gamemode 4 Semi-funny blurb about GM4 |
fancy|worn
|
Link
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
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}}
See Also
{{InvSprite}}