Template:Spell slot: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
(Use documentation/template demo templates)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{trim|
<includeonly>{{trim|
{{#lvardef: min-w | {{#if: {{{w|}}} | {{{w}}} | {{#if: {{{size|}}} | {{{size}}} | 40 }} }} }}
{{#lvardef: min-w | {{#if: {{{w|}}} | {{{w}}} | {{#if: {{{size|}}} | {{{size}}} | 30 }} }} }}
{{#lvardef: max-w | {{{w|}}} }}
{{#lvardef: max-w | {{{w|}}} }}
{{#lvardef: max-h | {{#if: {{{h|}}} | {{{h}}} | {{#if: {{{size|}}} | {{{size}}} | 40 }} }} }}
{{#lvardef: max-h | {{#if: {{{h|}}} | {{{h}}} | {{#if: {{{size|}}} | {{{size}}} | 30 }} }} }}
}}{{#if: {{{block|}}}
}}{{#if: {{{block|}}}
| <span style="display: inline-flex; align-items: center; {{#if: {{{gap|}}} | gap: {{{gap}}}px; }}">
| <span style="display: inline-flex; align-items: center; {{#if: {{{gap|}}} | gap: {{{gap}}}px; }}">
Line 19: Line 19:
}}</span></span>{{#if: {{{block|}}}
}}</span></span>{{#if: {{{block|}}}
| </span>
| </span>
}}</includeonly><noinclude>
}}</includeonly><noinclude>{{Documentation|content=
{{shortcut|SpellSlot}}
Adds spell slot icon.
Adds spell slot icon.


Examples: {{SpellSlot|cantrip}}{{SpellSlot|1|4}} {{SpellSlot|2|3}} {{SpellSlot|3|2}} {{SpellSlot|5|1}} {{SpellSlot|5|1|w=24|h=24}} {{SpellSlot|6|1|w=24}} {{SpellSlot|0|h=24}} {{SpellSlot|2 Warlock|2}}
== Examples ==
{{Template demo
| style = table
| caption 1 = Cantrips
| <nowiki>{{SpellSlot|cantrip}}</nowiki>
| caption 2 = 4 level 1 slots
| <nowiki>{{SpellSlot|1|4}}</nowiki>
| caption 3 = 3 level 2 slots
| <nowiki>{{SpellSlot|2|3}}</nowiki>
| caption 4 = 2 level 3 slots
| <nowiki>{{SpellSlot|3|2}}</nowiki>
| caption 5 = 1 level 5 slot
| <nowiki>{{SpellSlot|5|1}}</nowiki>
| caption 6 = Custom size
| <nowiki>{{SpellSlot|5|1|w=24|h=24}}</nowiki>
| caption 7 = Custom width
| <nowiki>{{SpellSlot|6|1|w=40}}</nowiki>
| caption 8 = Custom height
| <nowiki>{{SpellSlot|0|h=24}}</nowiki>
| caption 9 = 2 level 2 Warlock slots
| <nowiki>{{SpellSlot|2 Warlock|2}}</nowiki>
}}


{{InfoBlob|<nowiki>{{SpellSlot|cantrip}}{{SpellSlot|1|4}} {{SpellSlot|2|3}} {{SpellSlot|3|2}} {{SpellSlot|5|1}} {{SpellSlot|5|1|w=24|h=24}} {{SpellSlot|6|1|w=24}} {{SpellSlot|0|h=24}} {{SpellSlot|2 Warlock|2}}</nowiki>}}
}}
[[Category:Templates]]
[[Category:Templates]]
</noinclude>

Latest revision as of 19:06, 19 January 2025

Template documentation
Shortcut

Adds spell slot icon.

Examples

Example Markup Renders as
Cantrips
{{SpellSlot|cantrip}}
Cantrips Icon.png
4 level 1 slots
{{SpellSlot|1|4}}
4 Level 1 Spell Slots.png
3 level 2 slots
{{SpellSlot|2|3}}
3 Level 2 Spell Slots.png
2 level 3 slots
{{SpellSlot|3|2}}
2 Level 3 Spell Slots.png
1 level 5 slot
{{SpellSlot|5|1}}
1 Level 5 Spell Slots.png
Custom size
{{SpellSlot|5|1|w=24|h=24}}
1 Level 5 Spell Slots.png
Custom width
{{SpellSlot|6|1|w=40}}
1 Level 6 Spell Slots.png
Custom height
{{SpellSlot|0|h=24}}
Cantrips Icon.png
2 level 2 Warlock slots
{{SpellSlot|2 Warlock|2}}
2 Level 2 Warlock Spell Slots.png