User:Crashaholic/ActionTemplate: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
(Save improved, added bullet points)
(copied ActionCost over, THIS WILL BREAK PAGES!)
Line 11: Line 11:


== Properties ==
== Properties ==
{{trim|{{#if: {{{cost|}}}
{{trim|{{#if: {{{damage|}}} |{{{damage}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
    |{{#if: {{#pos: {{{cost|}}}|,}}
{{trim|<!--DONT DO HACKS AT HOME KIDS-->
        |{{#if: {{trim|{{#explode: {{{cost|}}}|,|0}}}}
{{#vardefine:action|0}}
        | *{{InfoBlob|{{action|{{#explode: {{{cost|}}}|,|0}}}} + {{#explode: {{{cost|}}}|,|1}}}}
{{#vardefine:bonus|0}}
| *{{InfoBlob|{{#explode: {{{cost|}}}|,|1}}}}
{{#vardefine:reaction|0}}
}}
{{#vardefine:movement|0}}
|*{{InfoBlob|{{action|{{#explode: {{{cost}}}|,|0}}}}}}
{{#vardefine:ar|0}}
    }}| {{blank}}
{{#vardefine:bi|0}}
}}}}
{{#vardefine:ki|0}}
{{#vardefine:sd|0}}
{{#vardefine:rg|0}}
{{#vardefine:hasaction|0}}
{{#vardefine:hasothers|0}}
{{#rmatch: string={{{cost|}}}|pattern=\W([Aa]ction)|then = {{#vardefine:action|1}} {{#vardefine:hasaction|1}}<!--add cargo in this place-->|caseless=1}} <!--Action-->
{{#rmatch: string={{{cost|}}}|pattern=([Bb]onus)|then = {{#vardefine:bonus|1}} {{#vardefine:hasaction|1}}<!--add cargo in this place-->|caseless=1}} <!--Bonus-->
{{#rmatch: string={{{cost|}}}|pattern=([Rr]eaction)|then = {{#vardefine:reaction|1}} {{#vardefine:hasaction|1}}<!--add cargo in this place-->|caseless=1}} <!--Reaction-->
{{#rmatch: string={{{cost|}}}|pattern=([Mm]ovement)| then = {{#vardefine:movement|1}} {{#vardefine:hasaction|1}}<!--add cargo in this place-->|caseless=1}} <!--Movement-->
{{#rmatch: string={{{cost|}}}|pattern=([Aa]rc[Rr]ec)|then={{#vardefine:ar|{{#rmatch:{{{cost|}}}|[Aa]rc[Rr]ec:\s?([^\s]*)|$1}}}} {{#vardefine:hasothers|1}}<!--add cargo in this place-->|caseless=1}} <!--Arcane Recovery-->
{{#rmatch: string={{{cost|}}}|pattern=([Bb]ar[Ii]ns)|then={{#vardefine:bi|{{#rmatch:{{{cost|}}}|[Bb]ar[Ii]ns:\s?([^\s]*)|$1}}}} {{#vardefine:hasothers|1}}<!--add cargo in this place-->|caseless=1}} <!--Bardic Inspiration-->
{{#rmatch: string={{{cost|}}}|pattern=([Kk]i)|then={{#vardefine:ki|{{#rmatch:{{{cost|}}}|[Kk]i:\s?([^\s]*)|$1}}}} {{#vardefine:hasothers|1}}<!--add cargo in this place-->|caseless=1}} <!--Ki-->
{{#rmatch: string={{{cost|}}}|pattern=([Ss]up[Dd]ie)|then={{#vardefine:sd|{{#rmatch:{{{cost|}}}|[Ss]up[Dd]ie:\s?([^\s]*)|$1}}}} {{#vardefine:hasothers|1}}<!--add cargo in this place-->|caseless=1}} <!--Superiority Die-->
{{#rmatch: string={{{cost|}}}|pattern=([Rr]age)|then={{#vardefine:rg|{{#rmatch:{{{cost|}}}|[Rr]age:\s?([^\s]*)|$1}}}} {{#vardefine:hasothers|1}}<!--add cargo in this place-->|caseless=1}} <!--Rage-->
 
{{#ifexpr: {{#ifeq: {{#var:hasaction}} | 1 | 1 | 0}} or {{#ifeq: {{#var:hasothers}} | 1 | 1 | 0}} | *}}{{#ifeq: {{#var: reaction}} | 1 | {{action|reaction}} | {{#ifeq: {{#var: action}} | 1 | {{#ifeq: {{#var: bonus}}| 1 | {{action|both}}<!--1,1--> | {{action}}<!--1,0-->}} | {{#ifeq: {{#var: bonus}} | 1 | {{action|bonus}}<!--0,1--> | {{blank}}<!--0,0-->}}}}}} {{#ifeq: {{#var: hasaction}} | 1 | {{#ifeq: {{#var: hasothers}} | 1 | +}}}} {{#ifexpr: {{#var: ki}} > 0|{{R|name=ki|count={{#var: ki}}}}}}{{#ifexpr: {{#var: sd}} > 0|{{R|name=sd|count={{#var: sd}}}}}}{{#ifexpr: {{#var: ar}} > 0|{{R|name=ar|count={{#var: ar}}}}}}{{#ifexpr: {{#var: bi}} > 0|{{R|name=bi|count={{#var: bi}}}}}}{{#ifexpr: {{#var: rg}} > 0|{{R|name=rg|count={{#var: rg}}}}}}
}}
{{trim|{{#if: {{{concentration|}}} |*{{Concentration}} | {{blank}}}}}}
{{trim|{{#if: {{{concentration|}}} |*{{Concentration}} | {{blank}}}}}}
{{trim|{{#if: {{{damage|}}} |*{{{damage}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{recharge|}}} |*{{Recharge|{{{recharge}}}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{recharge|}}} |*{{{recharge}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|
{{trim|
{{#if: {{{duration|}}}
{{#if: {{{duration|}}}
Line 35: Line 50:
}}
}}
}}
}}
{{trim|{{#if: {{{range|}}} |*{{{range}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{distance|}}} |* {{Distance|{{{distance}}}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{aoe|}}} |*{{{aoe}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{aoe|}}} |*{{{aoe}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|
{{trim|
Line 66: Line 81:
{{#if: {{{notes|}}} | == Notes == }}
{{#if: {{{notes|}}} | == Notes == }}
{{trim|{{#if: {{{notes|}}} | {{{notes}}}| {{blank}}}}}}</includeonly><noinclude>This is a page to transclude to generate action pages. It is generally for pages that do not fit the [[Template:SpellPage | <code><nowiki>{{SpellPage}} Template</nowiki></code>]]
{{trim|{{#if: {{{notes|}}} | {{{notes}}}| {{blank}}}}}}</includeonly><noinclude>This is a page to transclude to generate action pages. It is generally for pages that do not fit the [[Template:SpellPage | <code><nowiki>{{SpellPage}} Template</nowiki></code>]]
If this is too egregious, do reach out to me on Discord and tell me if there are alternatives instead of using transclusion (which I'm trying to use for custom templates).
<!-- im just lazy and tired of copy pasting from other page sources, i just want to lazily type out something PLEASE-->


=Usage=
=Usage=
Line 112: Line 124:
|-
|-
| {{C|cost}}  
| {{C|cost}}  
| The resource cost of the action. You can use the same parameters as with <code><nowiki>{{action}}</nowiki></code>, but you can add an additional resource to it as well.
| The resource cost of the action. '''REWRITE PENDING'''
For example:
* If a skill takes a <code><nowiki>{{action|bonus}}</nowiki></code> and a [[Battle Master|Superiority Die]] (D8): <code><nowiki>| cost = bonus,[[File:Superiority_Die_d8_Icon.png|25px]]</nowiki></code>
** Result: <code>{{action|bonus}} + [[File:Superiority_Die_d8_Icon.png|25px]]</code>
* If a skill takes an <code><nowiki>{{action}}</nowiki></code>: <code><nowiki>| cost = action</nowiki></code>
** Result: <code>{{action}}</code>
* If a skill takes just a class resource like 2{{User:Tc/Ki}}s: <code><nowiki>| cost = ,2{{User:Tc/Ki}}s</nowiki></code>
** Result: <code>2{{User:Tc/Ki}}s</code>
| <code>cost = (<nowiki>{{action}}</nowiki> parameters), (text)</code><br/>
<code>cost = (<nowiki>{{action}}</nowiki> parameters)</code><br/>
<code>cost = , (text)</code>
|-
|-
| {{C|concentration}}
| {{C|concentration}}
Line 135: Line 137:
| image = Fly Icon.png
| image = Fly Icon.png
| summary = fly you fools
| summary = fly you fools
| cost = action, 2{{User:Tc/Ki}}s
| cost = ki:2
| damage = {{DamageInfo|1d4+1|Bludgeoning}}
| damage = {{DamageInfo|1d4+1|Bludgeoning}}
| recharge = {{Recharge|Long Rest}}
| recharge = Long Rest
| distance = melee
| duration = LR
| duration = LR
| save = DEX, abc
| save = DEX, abc
Line 156: Line 159:
| image = Fly Icon.png
| image = Fly Icon.png
| summary = fly you fools
| summary = fly you fools
| cost = action, 2{{User:Tc/Ki}}s
| cost = ki:2 action
| damage = {{DamageInfo|1d4+1|Bludgeoning}}
| damage = {{DamageInfo|1d4+1|Bludgeoning}}
| recharge = {{Recharge|Long Rest}}
| recharge = Long Rest
| distance = melee
| duration = LR
| duration = LR
| save = DEX, abc
| save = DEX, abc

Revision as of 14:14, 19 August 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 =
| 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.

Parameter Name Description Usage
description The in-game description of the action. This description is NOT for SEO 'See: summary'. description = Lorem ipsum
image The image that will be used in the page's SEO and be the page's main image.
IF THIS IS LEFT EMPTY, Alert Icon.png WILL BE USED INSTEAD!
image = Wiki_Link_To_Image_Here
summary The summary of the action. This will be used as the wiki's description as well as the SEO text. summary = Lorem Ipsum
cost The resource cost of the action. REWRITE PENDING
concentration If this skill is a concentration, type something here. Can be any value you want. Otherwise, leave it blank or delete the field entirely. concentration = This action is a concentration!

concentration=

Example

{{User:Crashaholic/ActionTemplate
| description = abc
| image = Fly Icon.png
| summary = fly you fools
| cost = ki:2
| damage = {{DamageInfo|1d4+1|Bludgeoning}}
| 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 Icon.png

fly you fools

Description

abc

Properties

D4 Bludgeoning.png 1d4 + 1 (2~5) Damage TypesBludgeoning damage

  • 1.5 m / 5 ft

  • abcd

At Higher Levels

go far

How to Learn

Monk 3

Notes

bar