User:Crashaholic/ActionTemplate: Difference between revisions
Jump to navigation
Jump to search
Crashaholic (talk | contribs) (fixes weird infoblob being weird) |
Crashaholic (talk | contribs) m (swap to lvar and lvardef usage) |
||
Line 3: | Line 3: | ||
| image = {{#if: {{{image|}}} | {{{image|}}} | NoImage Icon.webp}} | | image = {{#if: {{{image|}}} | {{{image|}}} | NoImage Icon.webp}} | ||
}} | }} | ||
__NOTOC__ | __NOTOC__ | ||
[[File:{{#if: {{{image|}}} | {{{image|}}} | NoImage Icon.webp}}|frameless|right]] | [[File:{{#if: {{{image|}}} | {{{image|}}} | NoImage Icon.webp}}|frameless|right]] | ||
{{{summary}}} | {{{summary}}} | ||
== Description == | == Description == | ||
{{{description}}} | {{{description}}} | ||
{{# | {{#lvardef: hasprop | {{#if: {{{damage|}}} | 1}}{{#if: {{{cost|}}} | 1}}{{#if: {{{concentration|}}} | 1}}{{#if: {{{recharge|}}} | 1}}{{#if: {{{distance|}}} | 1}}{{#if: {{{aoe|}}} | 1}}0}} | ||
{{#ifexpr: {{# | {{#ifexpr: {{#lvar: hasprop}} > 0| == Properties == | ||
{{trim| | {{trim| | ||
{{#if: {{{damage|}}} | | {{#if: {{{damage|}}} | | ||
{{# | {{#lvardef: amt|}}{{#lvardef: typ|}}{{#lvardef: mod|}}{{#lvardef: per|}}{{#lvardef: sav|}}{{#lvardef: sfx|}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|amount:}}||| {{# | {{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|amount:}}||| {{#lvardef: amt|{{#rmatch: {{{damage|}}}|amount:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|type:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|type:}}|||{{#lvardef: typ|{{#rmatch: {{{damage|}}}|type:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|mod:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|mod:}}|||{{#lvardef: mod|{{#rmatch: {{{damage|}}}|mod:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|per:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|per:}}|||{{#lvardef: dot|{{#rmatch: {{{damage|}}}|per:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|save:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|save:}}|||{{#lvardef: sav|{{#rmatch: {{{damage|}}}|save:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|save effect:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage|}}}}}|save effect:}}|||{{#lvardef: sfx|{{#rmatch: {{{damage|}}}|save effect:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{# | {{#lvardef: dmg1|{{DamageInfo|{{#lvar: amt}}|{{#lvar: typ}}|modifier = {{#lvar:mod}}|per = {{#lvar: dot}}|save = {{#lvar: sav}}|save effect = {{#lvar: sfx}}}}}}}} | ||
{{#if: {{{damage2|}}} | | {{#if: {{{damage2|}}} | | ||
{{# | {{#lvardef: amt|}}{{#lvardef: typ|}}{{#lvardef: mod|}}{{#lvardef: per|}}{{#lvardef: sav|}}{{#lvardef: sfx|}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|amount:}}||| {{# | {{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|amount:}}||| {{#lvardef: amt|{{#rmatch: {{{damage2|}}}|amount:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|type:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|type:}}|||{{#lvardef: typ|{{#rmatch: {{{damage2|}}}|type:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|mod:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|mod:}}|||{{#lvardef: mod|{{#rmatch: {{{damage2|}}}|mod:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|per:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|per:}}|||{{#lvardef: dot|{{#rmatch: {{{damage2|}}}|per:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|save:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|save:}}|||{{#lvardef: sav|{{#rmatch: {{{damage2|}}}|save:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|save effect:}}|||{{# | {{#ifeq:{{#pos:{{lc:{{{damage2|}}}}}|save effect:}}|||{{#lvardef: sfx|{{#rmatch: {{{damage2|}}}|save effect:\s?([^\s][^,]*)|$1|caseless=1}}}}}} | ||
{{# | {{#lvardef: dmg2|{{DamageInfo|{{#lvar: amt}}|{{#lvar: typ}}|modifier = {{#lvar:mod}}|per = {{#lvar: dot}}|save = {{#lvar: sav}}|save effect = {{#lvar: sfx}}}}}}}} | ||
{{#if: {{{damage|}}}| {{#if:{{{damage2|}}}| {{InfoBlob|{{# | {{#if: {{{damage|}}}| {{#if:{{{damage2|}}}| {{InfoBlob|{{#lvar: dmg1}} + {{#lvar: dmg2}}}} | {{#lvar: dmg1}}}}|{{blank}}}} | ||
}} | }} | ||
{{trim|<!--DONT DO HACKS AT HOME KIDS--> | {{trim|<!--DONT DO HACKS AT HOME KIDS--> | ||
{{# | {{#lvardef:action|0}} | ||
{{# | {{#lvardef:bonus|0}} | ||
{{# | {{#lvardef:reaction|0}} | ||
{{# | {{#lvardef:movement|0}} | ||
{{# | {{#lvardef:ar|0}} | ||
{{# | {{#lvardef:bi|0}} | ||
{{# | {{#lvardef:cd|0}} | ||
{{# | {{#lvardef:co|0}} | ||
{{# | {{#lvardef:ki|0}} | ||
{{# | {{#lvardef:lh|0}} | ||
{{# | {{#lvardef:nr|0}} | ||
{{# | {{#lvardef:rg|0}} | ||
{{# | {{#lvardef:sd|0}} | ||
{{# | {{#lvardef:wp|0}} | ||
{{# | {{#lvardef:ws|0}} | ||
{{# | {{#lvardef:hasaction|0}} | ||
{{# | {{#lvardef:hasmovemt|0}} | ||
{{# | {{#lvardef:hasothers|0}} | ||
{{#rmatch: {{{cost|}}}|\Waction|{{# | {{#rmatch: {{{cost|}}}|\Waction|{{#lvardef:action|1}} {{#lvardef:hasaction|1}}<!--add cargo in this place-->|caseless=1}} <!--Action--> | ||
{{#rmatch: {{{cost|}}}|bonus|{{# | {{#rmatch: {{{cost|}}}|bonus|{{#lvardef:bonus|1}} {{#lvardef:hasaction|1}}<!--add cargo in this place-->|caseless=1}} <!--Bonus--> | ||
{{#rmatch: {{{cost|}}}|reaction|{{# | {{#rmatch: {{{cost|}}}|reaction|{{#lvardef:reaction|1}} {{#lvardef:hasaction|1}}<!--add cargo in this place-->|caseless=1}} <!--Reaction--> | ||
{{#rmatch: {{{cost|}}}|movement|{{# | {{#rmatch: {{{cost|}}}|movement|{{#lvardef:movement|1}} {{#lvardef:hasmovemt|1}}<!--add cargo in this place-->|caseless=1}} <!--Movement--> | ||
{{#rmatch: {{{cost|}}}|arcrec|{{# | {{#rmatch: {{{cost|}}}|arcrec|{{#lvardef:ar|{{#rmatch:{{{cost|}}}|arcrec:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Arcane Recovery--> | ||
{{#rmatch: {{{cost|}}}|barins|{{# | {{#rmatch: {{{cost|}}}|barins|{{#lvardef:bi|{{#rmatch:{{{cost|}}}|barins:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Bardic Inspiration--> | ||
{{#rmatch: {{{cost|}}}|chadiv|{{# | {{#rmatch: {{{cost|}}}|chadiv|{{#lvardef:cd|{{#rmatch:{{{cost|}}}|chadiv:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Channel Divinity--> | ||
{{#rmatch: {{{cost|}}}|chaoat|{{# | {{#rmatch: {{{cost|}}}|chaoat|{{#lvardef:co|{{#rmatch:{{{cost|}}}|chaoat:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Channel Oath--> | ||
{{#rmatch: {{{cost|}}}|ki|{{# | {{#rmatch: {{{cost|}}}|ki|{{#lvardef:ki|{{#rmatch:{{{cost|}}}|ki:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Ki--> | ||
{{#rmatch: {{{cost|}}}|layonh|{{# | {{#rmatch: {{{cost|}}}|layonh|{{#lvardef:lh|{{#rmatch:{{{cost|}}}|layonh:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Lay On Hands--> | ||
{{#rmatch: {{{cost|}}}|natrec|{{# | {{#rmatch: {{{cost|}}}|natrec|{{#lvardef:nr|{{#rmatch:{{{cost|}}}|natrec:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Natural Recovery--> | ||
{{#rmatch: {{{cost|}}}|rage|{{# | {{#rmatch: {{{cost|}}}|rage|{{#lvardef:rg|{{#rmatch:{{{cost|}}}|rage:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Rage--> | ||
{{#rmatch: {{{cost|}}}|supdie|{{# | {{#rmatch: {{{cost|}}}|supdie|{{#lvardef:sd|{{#rmatch:{{{cost|}}}|supdie:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--Superiority Die--> | ||
{{#rmatch: {{{cost|}}}|warpri|{{# | {{#rmatch: {{{cost|}}}|warpri|{{#lvardef:wp|{{#rmatch:{{{cost|}}}|warpri:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->| <!--War Priest--> | ||
{{#rmatch: {{{cost|}}}|wldshp|{{# | {{#rmatch: {{{cost|}}}|wldshp|{{#lvardef:ws|{{#rmatch:{{{cost|}}}|wldshp:\s?([^\s][^,]*)|$1|caseless=1}}}} {{#lvardef:hasothers|1}}<!--add cargo in this place-->|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}}|caseless=1}} <!--Wild Shape--> | ||
<!--if you think i know what im doing, ymmv--> | <!--if you think i know what im doing, ymmv--> | ||
{{#ifeq: {{# | {{#ifeq: {{#lvar: reaction}} | 1 | {{action|reaction}} | {{#ifeq: {{#lvar: action}} | 1 | {{#ifeq: {{#lvar: bonus}}| 1 | {{action|both}}<!--1,1--> | {{action}}<!--1,0-->}} | {{#ifeq: {{#lvar: bonus}} | 1 | {{action|bonus}}<!--0,1--> | {{blank}}<!--0,0-->}}}}}} {{#ifeq: {{#lvar: hasaction}} | 1 | {{#ifeq: {{#lvar: hasothers}} | 1 | +}}}} {{#ifexpr: {{#lvar: ar}} > 0|{{R|name=ar|count={{#lvar: ar}}}}}}{{#ifexpr: {{#lvar: bi}} > 0|{{R|name=bi|count={{#lvar: bi}}}}}}{{#ifexpr: {{#lvar: cd}} > 0|{{R|name=cd|count={{#lvar: cd}}}}}}{{#ifexpr: {{#lvar: co}} > 0|{{R|name=co|count={{#lvar: co}}}}}}{{#ifexpr: {{#lvar: ki}} > 0|{{R|name=ki|count={{#lvar: ki}}}}}}{{#ifexpr: {{#lvar: lh}} > 0|{{R|name=lh|count={{#lvar: lh}}}}}}{{#ifexpr: {{#lvar: rg}} > 0|{{R|name=rg|count={{#lvar: rg}}}}}}{{#ifexpr: {{#lvar: sd}} > 0|{{R|name=sd|count={{#lvar: sd}}}}}}{{#ifexpr: {{#lvar: wp}} > 0|{{R|name=wp|count={{#lvar: wp}}}}}}{{#ifexpr: {{#lvar: ws}} > 0|{{R|name=ws|count={{#lvar: ws}}}}}} | ||
}} | }} | ||
{{trim|{{#if: {{{concentration|}}} |<br/>{{Concentration}} | {{blank}}}}}} | {{trim|{{#if: {{{concentration|}}} |<br/>{{Concentration}} | {{blank}}}}}} | ||
{{trim|{{#if: {{{recharge|}}} |<br/>{{Recharge|{{{recharge}}}}}| {{blank}}}}}} | {{trim|{{#if: {{{recharge|}}} |<br/>{{Recharge|{{{recharge}}}}}| {{blank}}}}}} | ||
{{trim| | {{trim| | ||
{{#if: {{{duration|}}} | |||
|<br/>{{#ifeq:{{lc:{{{duration|}}}}}| LR | |||
|{{Duration|Until Long Rest}} | |||
|{{#ifeq: {{{duration|}}} |Perm | |||
|{{Duration|Permanent}} | |||
|{{Duration|{{{duration}}}}} | |||
}} | |||
}} | }} | ||
|{{blank}} | |||
}} | }} | ||
}} | }} | ||
{{trim|{{#if: {{{distance|}}} |<br/>{{Distance|{{{distance}}}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter --> | {{trim|{{#if: {{{distance|}}} |<br/>{{Distance|{{{distance}}}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter --> | ||
{{trim|{{#if: {{{aoe|}}} |<br/>{{{aoe}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter --> | {{trim|{{#if: {{{aoe|}}} |<br/>{{{aoe}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter --> | ||
{{trim| | {{trim| | ||
{{#if: {{{save|}}} | |||
{{#lvardef: saveicon | }} {{#lvardef: savetext | }} | |||
{{#lvardef: savetype | {{#if: {{#pos:{{{save|}}}|,}} | {{#explode:{{{save|}}}|,|0}} | {{{save|}}}}}}} | |||
{{#lvardef: saverslt | {{#if: {{#pos:{{{save|}}}|,}} | {{#explode:{{{save|}}}|,|1}} | ""}}}} | |||
| {{#switch: {{lc:{{#lvar: savetype}}}} | |||
| strength | str = {{#lvardef: saveicon | Strength}} {{#lvardef: savetext | STR}} | |||
| dexterity | dex = {{#lvardef: saveicon | Dexterity}} {{#lvardef: savetext | DEX}} | |||
| constitution | con | = {{#lvardef: saveicon | Constitution}} {{#lvardef: savetext | CON}} | |||
| intelligence | int | = {{#lvardef: saveicon | Intelligence}} {{#lvardef: savetext | INT}} | |||
| wisdom | wis = {{#lvardef: saveicon | Wisdom}} {{#lvardef: savetext | WIS}} | |||
| charisma | cha = {{#lvardef: saveicon | Charisma}} {{#lvardef: savetext | CHA}} | |||
| #default = {{#lvardef: saveicon |Alert}} {{#lvardef: savetext | EDITOR SHOULD CHECK TEMPLATE}} | |||
}}<br/>{{SmallIcon|Saving Throw Icons.png}} [[File:{{#lvar: saveicon}} icon.png|frameless|25px|{{#lvar: saveicon}}]][[{{#lvar: saveicon}}|{{#lvar: savetext}}]] [[Saving Throw|Save]] {{#if: {{#pos:{{{save|}}}|,}} | |||
| (On Save: {{#explode:{{{save|}}}|,|1}}) | |||
}}| {{blank}} | |||
}} | |||
}} | }} | ||
{{trim|{{#if: {{{additional|}}} | {{{additional}}}| {{blank}}}}}} | {{trim|{{#if: {{{additional|}}} | {{{additional}}}| {{blank}}}}}} | ||
Line 107: | Line 107: | ||
{{#if: {{{higherlevels|}}} | == At Higher Levels ==}} | {{#if: {{{higherlevels|}}} | == At Higher Levels ==}} | ||
{{trim|{{#if: {{{higherlevels|}}} | {{{higherlevels}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter --> | {{trim|{{#if: {{{higherlevels|}}} | {{{higherlevels}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter --> | ||
{{#if: {{{learns|}}} | == How to Learn ==}} | {{#if: {{{learns|}}} | == How to Learn ==}} | ||
{{trim|{{#if: {{{learns|}}} | {{{learns|}}}}}}} <!-- TODO: make this a bit smarter --> | {{trim|{{#if: {{{learns|}}} | {{{learns|}}}}}}} <!-- TODO: make this a bit smarter --> | ||
{{clear}} | {{clear}} | ||
{{#if: {{{notes|}}} | == Notes == }} | {{#if: {{{notes|}}} | == Notes == }} |
Revision as of 14:30, 3 September 2023
This is a page to transclude to generate action pages. It is generally for pages that do not fit the {{SpellPage}} Template
Usage
{{User:Crashaholic/ActionTemplate | description = | image = | summary = | cost = | concentration = | damage = | damage2 = | recharge = | duration = | range = | aoe = | save = | additional = | higherlevels = | learns = | notes = }}
The following is a table to further explain what each parameter takes, and how to use them.
Example
{{User:Crashaholic/ActionTemplate | description = abc | image = Fly Icon.png | summary = fly you fools | cost = ki:2, action | damage = amount: 1d4+1, type:Bludgeoning | damage2 = amount: 1d6, type: Fire | recharge = Long Rest | distance = melee | duration = LR | save = DEX, abc | additional = * abcd {{User:Tc/FXBox | name = Fly | icon = Fly Icon.png | effect = go on, fly | duration = 1 }} | higherlevels = go far | notes = bar | learns = {{class|Monk}} 3 }}
fly you fools
Description
abc
Properties
1d4 + 1 (2~5) Bludgeoning
+ 1d6 (1~6) Fire
Action + 2UNDEFINED
Recharge: Long rest
Duration: LR turns
1.5 m / 5 ft
DEX Save (On Save: abc)
- abcd
Fly |
---|
Duration: 1 turn
go on, fly |
At Higher Levels
go far
How to Learn
3
Notes
bar