Template:Advancement: Difference between revisions

From Official Gamemode 4 Wiki
Jump to navigation Jump to search
(username removed)
(Better method incoming)
m (Added desc color defaults based on bg)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="advancement {{#ifeq: {{{hover}}}|true|hover-advancement|}}"><!--
<includeonly><div class="{{#ifeq: {{{hover}}}|true|hover-advancement|advancement}}"><!--
-->{{AdvancementIcon|{{{1|{{{item|Grass Block}}}}}}|{{{bg|plain}}}|{{{state|raw}}}}}<div class="advancement-title">{{{2|{{{title|Gamemode 4}}}}}}</div><div class="advancement-description">{{{3|{{{desc|Semi-funny blurb about GM4}}}}}}</div></div></includeonly><noinclude>
-->{{AdvancementIcon|{{{1|{{{item|Grass Block}}}}}}|{{{bg|plain}}}|{{{state|raw}}}|hover={{{hover|}}}|enchanted={{{enchanted|}}}}}
{{#ifeq:{{{hover}}}|true|<div class="hover-advancement-text">|}}<div class="{{#ifeq:{{{hover}}}|true|hover-title|advancement-title}}">{{{2|{{{title|Gamemode 4}}}}}}</div><div class="{{#ifeq:{{{hover}}}|true|hover-description|advancement-description}}">{{#if:{{{desc-color|{{#switch:{{{bg|}}}|oval=54FC54|fancy=A800A8|}}}}}|<span style="color:#{{{desc-color|{{#switch:{{{bg|}}}|oval=54FC54|fancy=A800A8|}}}}};">}}{{{3|{{{desc|Semi-funny blurb about GM4}}}}}}{{#if:{{{desc-color|}}}|</span>}}</div>{{#ifeq:{{{hover}}}|true|</div>|}}</div></includeonly><noinclude>
{{Documentation}}
{{Documentation}}
 
<templatedata>
{|
{
| {{Advancement|Grass Block|hover=true}}
"params": {
| {{Advancement|Grass Block|hover=true}}
"hover": {
|}
"label": "Hover",
</noinclude>
"description": "If true, this mimics the functionality from the Advancement tab",
"example": "true",
"type": "line",
"autovalue": ""
},
"item": {
"aliases": [
"1"
],
"label": "Display Item",
"description": "Advancement Icon",
"example": "Minecraft items can be written as seen in game (Grass Block), though Gamemode 4 items must be prefixed with gm4: (gm4:Boots of Ostara)",
"type": "line",
"required": true
},
"bg": {
"label": "Frame",
"description": "The Advancement icon frame",
"example": "oval for goal, fancy for challenge",
"type": "line"
},
"state": {
"label": "State",
"description": "Advancement completion state",
"example": "worn",
"type": "line"
},
"enchanted": {
"label": "Enchanted",
"description": "If true, the Advancement icon will show as enchanted",
"example": "true",
"type": "line"
},
"title": {
"aliases": [
"2"
],
"label": "Title",
"description": "The Advancement text",
"example": "Gamemode 4",
"type": "line",
"required": true
},
"desc-color": {
"label": "Description Color",
"description": "A hex code for the color of the Advancement description",
"example": "54FC54 for green, A800A8 for dark purple",
"type": "line"
},
"desc": {
"aliases": [
"3"
],
"label": "Description",
"description": "The Advancement description text",
"example": "Semi-funny blurb about GM4",
"type": "line",
"required": true
}
},
"description": "Create Advancements as seen within Minecraft.",
"paramOrder": [
"item",
"title",
"bg",
"state",
"desc",
"desc-color",
"enchanted",
"hover"
]
}
</templatedata></noinclude>

Latest revision as of 14:51, 4 November 2021

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

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

The badge is created using the [[Template:AdvancementIcon]] template, with images taken from {{Module:InvSprite}}.

Gamemode 4
Semi-funny blurb about GM4

Usage

Using the first parameter, {{{item}}}, 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.

The second and third parameters, {{{title}}} and {{{desc}}}, are used in the advancement title and its description.

Optional. {{{desc-color}}}, is used to give the description a different color. Hex codes are inputted without the hashtag. Example: {{Advancement|desc-color=A800A8}}

Optional. {{{hover}}}, is used to display only the advancement icon until hovered over. This is used to mimic the in-game advancement tab. When using hover advancements, spacing needs to be replicated using non-breaking spaces, &nbsp;. Note, this overlays the title and description over anything surrounding it, as it does in-game.

Icon

The badge and item are created with the first parameter, {{{item}}}, and uses the plain and uncompleted advancement badge.

The optional parameters of Template:AdvancementIcon can be given in the Advancement call, however they must be given by name.

Optional. {{{enchanted}}}, is used to give the advancement icon an enchanted glint.

Example Usage

{{Advancement|gm4:Boots of Ostara|Green Feet|Wear the Boots of Ostara}}
{{Advancement
 | item = Enchantment Table
 | title = Magical Thief
 | desc = Successfully extract the mending enchantment from a tool with an Enchantment Extractor
 | enchanted = true
}}
{{Advancement
 | item = Fire Charge
 | bg = fancy
 | state = worn
 | title = Return to Sender
 | desc = Destroy a Ghast with a fireball
 | desc-color = A800A8
}}
{{Advancement
 | item = Emerald
 | title = What a Deal!
 | desc = Successfully trade with a Villager
 | hover = true
}}
Green Feet
Wear the Boots of Ostara


Magical Thief
Successfully extract the mending enchantment from a tool with an Enchantment Extractor


Return to Sender
Destroy a Ghast with a fireball


What a Deal!
Successfully trade with a Villager

Create Advancements as seen within Minecraft.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Display Itemitem 1

Advancement Icon

Example
Minecraft items can be written as seen in game (Grass Block), though Gamemode 4 items must be prefixed with gm4: (gm4:Boots of Ostara)
Linerequired
Titletitle 2

The Advancement text

Example
Gamemode 4
Linerequired
Framebg

The Advancement icon frame

Example
oval for goal, fancy for challenge
Lineoptional
Statestate

Advancement completion state

Example
worn
Lineoptional
Descriptiondesc 3

The Advancement description text

Example
Semi-funny blurb about GM4
Linerequired
Description Colordesc-color

A hex code for the color of the Advancement description

Example
54FC54 for green, A800A8 for dark purple
Lineoptional
Enchantedenchanted

If true, the Advancement icon will show as enchanted

Example
true
Lineoptional
Hoverhover

If true, this mimics the functionality from the Advancement tab

Example
true
Auto value
Lineoptional