Difference between revisions of "Template:Artifact"
m |
m |
||
| Line 72: | Line 72: | ||
{{!}} class="sidebar-label" {{!}} Version / Patch: | {{!}} class="sidebar-label" {{!}} Version / Patch: | ||
{{!}} class="sidebar-value" {{!}} {{{version|N/A}}} | {{!}} class="sidebar-value" {{!}} {{{version|N/A}}} | ||
| + | |} | ||
| + | </includeonly> | ||
| + | |||
| + | <noinclude> | ||
| + | ==Usage== | ||
| + | <pre> | ||
| + | {{Artifact | ||
| + | |image=[[File:Blade_of_the_Fallen_Star.png|250px|center]] | ||
| + | |name=Blade of the Fallen Star | ||
| + | |type=Sword | ||
| + | |rarity=Legendary | ||
| + | |origin=Champions' Gauntlet IV | ||
| + | |owner=Seraphine the Radiant | ||
| + | |effect=+3 attack vs. celestial beings | ||
| + | |passiv=Regenerates 1 HP per turn while unsheathed | ||
| + | |activ=Once per long rest, can cast ''Falling Nova'' | ||
| + | |limit=Wielder takes radiant damage when striking mortals | ||
| + | |status=Active | ||
| + | |ID=A-042 | ||
| + | |version=1.3.5 | ||
| + | }} | ||
| + | </pre> | ||
| + | </noinclude> | ||
| + | If you still see layout weirdness, make sure the opening {| ... style="... #switch ..."} is all on one line (no unintended newlines inside the style attribute). Want me to also add a tiny shadow or rounded corners while keeping the same class? | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | Du: | ||
| + | still get this: | ||
| + | style="float:right; clear:right; font-size:smaller; border:2px solid ;" | ||
| + | |||
| + | |||
| + | |||
| + | ChatGPT: | ||
| + | |||
| + | Nachgedacht für 36s | ||
| + | Thanks for the detail — this is a quirk with how parser functions expand inside the opening table’s style attribute. Easiest fix: don’t set the border there. Instead, we’ll build a “fake border” using a thin, rarity-colored outer table (top/bottom rows + left/right columns), with your existing sidebar table nested inside. This renders the same visually and works reliably on wikis without the Variables extension. | ||
| + | |||
| + | Below is a drop-in replacement that: | ||
| + | |||
| + | Keeps your sidebar look | ||
| + | |||
| + | Keeps rarity-colored header | ||
| + | |||
| + | Shows N/A for empty fields | ||
| + | |||
| + | Adds a rarity-colored border that won’t vanish | ||
| + | |||
| + | Template:Artifact (robust rarity border + N/A defaults) | ||
| + | wiki | ||
| + | Code kopieren | ||
| + | <includeonly> | ||
| + | <!-- OUTER FRAME: creates a rarity-colored border without relying on style in the opening table tag --> | ||
| + | {| align="right" cellpadding="0" cellspacing="0" style="float:right; clear:right; margin-left:1em; margin-bottom:1em;" | ||
| + | |- | ||
| + | <!-- TOP BORDER --> | ||
| + | | style="height:2px; background-color: {{#switch: {{{rarity|Common}}} | ||
| + | {{!}}Common=#bfbfbf | ||
| + | {{!}}Uncommon=#3cb371 | ||
| + | {{!}}Rare=#3b6bdc | ||
| + | {{!}}Epic=#7b3bdc | ||
| + | {{!}}Legendary=#d48a00 | ||
| + | {{!}}Mythic=#b80000 | ||
| + | {{!}}#default=#bfbfbf | ||
| + | }};" colspan="3" | | ||
| + | |- | ||
| + | <!-- LEFT BORDER --> | ||
| + | | style="width:2px; background-color: {{#switch: {{{rarity|Common}}} | ||
| + | {{!}}Common=#bfbfbf | ||
| + | {{!}}Uncommon=#3cb371 | ||
| + | {{!}}Rare=#3b6bdc | ||
| + | {{!}}Epic=#7b3bdc | ||
| + | {{!}}Legendary=#d48a00 | ||
| + | {{!}}Mythic=#b80000 | ||
| + | {{!}}#default=#bfbfbf | ||
| + | }};" | | ||
| + | |||
| + | <!-- INNER CONTENT --> | ||
| + | | style="padding:0; background:transparent;" | | ||
| + | {| width="250" cellpadding="3" cellspacing="0" class="sidebar" style="font-size:smaller;" | ||
| + | |- | ||
| + | {{#if: {{{image|}}}| | ||
| + | {{!}} colspan="2" class="sidebar-heading-image" {{!}} {{{image}}} | ||
| + | }} | ||
| + | |||
| + | <!-- ===== HEADER (RARITY-COLORED) ===== --> | ||
| + | |- | ||
| + | {{#switch: {{{rarity|Common}}} | ||
| + | {{!}}Common = {{!}} colspan="2" class="sidebar-heading-heading" style="text-align:center; font-variant:small-caps; background-color:#bfbfbf; color:black;" {{!}} '''{{{name|N/A}}}''' | ||
| + | {{!}}Uncommon = {{!}} colspan="2" class="sidebar-heading-heading" style="text-align:center; font-variant:small-caps; background-color:#3cb371; color:white;" {{!}} '''{{{name|N/A}}}''' | ||
| + | {{!}}Rare = {{!}} colspan="2" class="sidebar-heading-heading" style="text-align:center; font-variant:small-caps; background-color:#3b6bdc; color:white;" {{!}} '''{{{name|N/A}}}''' | ||
| + | {{!}}Epic = {{!}} colspan="2" class="sidebar-heading-heading" style="text-align:center; font-variant:small-caps; background-color:#7b3bdc; color:white;" {{!}} '''{{{name|N/A}}}''' | ||
| + | {{!}}Legendary = {{!}} colspan="2" class="sidebar-heading-heading" style="text-align:center; font-variant:small-caps; background-color:#d48a00; color:white;" {{!}} '''{{{name|N/A}}}''' | ||
| + | {{!}}Mythic = {{!}} colspan="2" class="sidebar-heading-heading" style="text-align:center; font-variant:small-caps; background-color:#b80000; color:white;" {{!}} '''{{{name|N/A}}}''' | ||
| + | {{!}}#default = {{!}} colspan="2" class="sidebar-heading-heading" style="text-align:center; font-variant:small-caps; background-color:#bfbfbf; color:black;" {{!}} '''{{{name|N/A}}}''' | ||
| + | }} | ||
| + | |||
| + | <!-- ===== BASIC INFORMATION ===== --> | ||
| + | |- | ||
| + | {{!}} colspan="2" class="sidebar-heading-subheading" style="text-align:center;" {{!}} '''Basic Information''' | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Type: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{type|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Rarity: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{rarity|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Origin / Event: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{origin|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Owner / Winner: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{owner|N/A}}} | ||
| + | |||
| + | <!-- ===== ATTRIBUTES ===== --> | ||
| + | |- | ||
| + | {{!}} colspan="2" class="sidebar-heading-subheading" style="text-align:center;" {{!}} '''Attributes''' | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Effect: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{effect|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Passive: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{passiv|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Active: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{activ|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Limitation: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{limit|N/A}}} | ||
| + | |||
| + | <!-- ===== STATUS / GAME DATA ===== --> | ||
| + | |- | ||
| + | {{!}} colspan="2" class="sidebar-heading-subheading" style="text-align:center;" {{!}} '''Status / Game Data''' | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Status: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{status|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} ID: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{ID|N/A}}} | ||
| + | |- | ||
| + | {{!}} class="sidebar-label" {{!}} Version / Patch: | ||
| + | {{!}} class="sidebar-value" {{!}} {{{version|N/A}}} | ||
| + | |} | ||
| + | <!-- END INNER CONTENT --> | ||
| + | |||
| + | <!-- RIGHT BORDER --> | ||
| + | | style="width:2px; background-color: {{#switch: {{{rarity|Common}}} | ||
| + | {{!}}Common=#bfbfbf | ||
| + | {{!}}Uncommon=#3cb371 | ||
| + | {{!}}Rare=#3b6bdc | ||
| + | {{!}}Epic=#7b3bdc | ||
| + | {{!}}Legendary=#d48a00 | ||
| + | {{!}}Mythic=#b80000 | ||
| + | {{!}}#default=#bfbfbf | ||
| + | }};" | | ||
| + | |- | ||
| + | <!-- BOTTOM BORDER --> | ||
| + | | style="height:2px; background-color: {{#switch: {{{rarity|Common}}} | ||
| + | {{!}}Common=#bfbfbf | ||
| + | {{!}}Uncommon=#3cb371 | ||
| + | {{!}}Rare=#3b6bdc | ||
| + | {{!}}Epic=#7b3bdc | ||
| + | {{!}}Legendary=#d48a00 | ||
| + | {{!}}Mythic=#b80000 | ||
| + | {{!}}#default=#bfbfbf | ||
| + | }};" colspan="3" | | ||
|} | |} | ||
</includeonly> | </includeonly> | ||
Revision as of 12:28, 30 October 2025
Usage
{{Artifact
|image=[[File:Blade_of_the_Fallen_Star.png|250px|center]]
|name=Blade of the Fallen Star
|type=Sword
|rarity=Legendary
|origin=Champions' Gauntlet IV
|owner=Seraphine the Radiant
|effect=+3 attack vs. celestial beings
|passiv=Regenerates 1 HP per turn while unsheathed
|activ=Once per long rest, can cast ''Falling Nova''
|limit=Wielder takes radiant damage when striking mortals
|status=Active
|ID=A-042
|version=1.3.5
}}
If you still see layout weirdness, make sure the opening {| ... style="... #switch ..."} is all on one line (no unintended newlines inside the style attribute). Want me to also add a tiny shadow or rounded corners while keeping the same class?
Du: still get this: style="float:right; clear:right; font-size:smaller; border:2px solid ;"
ChatGPT:
Nachgedacht für 36s Thanks for the detail — this is a quirk with how parser functions expand inside the opening table’s style attribute. Easiest fix: don’t set the border there. Instead, we’ll build a “fake border” using a thin, rarity-colored outer table (top/bottom rows + left/right columns), with your existing sidebar table nested inside. This renders the same visually and works reliably on wikis without the Variables extension.
Below is a drop-in replacement that:
Keeps your sidebar look
Keeps rarity-colored header
Shows N/A for empty fields
Adds a rarity-colored border that won’t vanish
Template:Artifact (robust rarity border + N/A defaults) wiki Code kopieren
Usage
{{Artifact
|image=
|name=
|type=
|rarity=
|origin=
|owner=
|effect=
|passiv=
|activ=
|limit=
|status=
|ID=
|version=
}}
Example
{{Artifact
|image=[[File:Your_Picture.png|250px|center]]
|name= Names have Power
|type= Weapon/Amulett/Material
|rarity= Pick one (Common/Uncommon/Rare/Epic/Legendary/Mythic)
|origin= Event this Artifact was won in
|owner= House/Member
|effect= Short Description of what the artifact does
|passiv= Any ongoing or always-on effect
|activ= How to use it, cooldowns, or conditions
|limit= Limitations the artifact has
|status= (Active/Lost/Buried/In Storage)
|ID= Assigned Library Number (the DC will assign)
|version= 0.0 (first number changes if artifact changes owner/second number after a major wiki update)
}}
Rarity Colors
- Common – Gray (#bfbfbf)
- Uncommon – Green (#3cb371)
- Rare – Blue (#3b6bdc)
- Epic – Purple (#7b3bdc)
- Legendary – Orange (#d48a00)
- Mythic – Red-Gold (#b80000)