User:Crashaholic/ActionTemplate: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (NoSeo feels redundant i think, cant think of a situation where its needed.)
Tags: Mobile edit Mobile web edit
(Save improved, added bullet points)
Line 14: Line 14:
     |{{#if: {{#pos: {{{cost|}}}|,}}
     |{{#if: {{#pos: {{{cost|}}}|,}}
         |{{#if: {{trim|{{#explode: {{{cost|}}}|,|0}}}}
         |{{#if: {{trim|{{#explode: {{{cost|}}}|,|0}}}}
        | {{InfoBlob|{{action|{{#explode: {{{cost|}}}|,|0}}}} + {{#explode: {{{cost|}}}|,|1}}}}
        | *{{InfoBlob|{{action|{{#explode: {{{cost|}}}|,|0}}}} + {{#explode: {{{cost|}}}|,|1}}}}
| {{InfoBlob|{{#explode: {{{cost|}}}|,|1}}}}
| *{{InfoBlob|{{#explode: {{{cost|}}}|,|1}}}}
}}
}}
|{{InfoBlob|{{action|{{#explode: {{{cost}}}|,|0}}}}}}
|*{{InfoBlob|{{action|{{#explode: {{{cost}}}|,|0}}}}}}
     }}| {{blank}}
     }}| {{blank}}
}}}}
}}}}
{{trim|{{#if: {{{concentration|}}} | * {{Concentration}} | {{blank}}}}}}
{{trim|{{#if: {{{concentration|}}} |*{{Concentration}} | {{blank}}}}}}
{{trim|{{#if: {{{damage|}}} | * {{{damage}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{damage|}}} |*{{{damage}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{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|}}}
|{{#ifeq:{{{duration|}}}| LR
|{{#ifeq:{{{duration|}}}| LR
|* {{Duration|Until Long Rest}}
|*{{Duration|Until Long Rest}}
|{{#ifeq: {{{duration|}}} |Perm
|{{#ifeq: {{{duration|}}} |Perm
|* {{Duration|Permanent}}
|*{{Duration|Permanent}}
|* {{Duration|{{{duration}}}}}
|*{{Duration|{{{duration}}}}}
}}
}}
}}
}}
Line 35: Line 35:
}}
}}
}}
}}
{{trim|{{#if: {{{range|}}} | * {{{range}}}| {{blank}}}}}} <!-- TODO: make this a bit smarter -->
{{trim|{{#if: {{{range|}}} |*{{{range}}}| {{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|
{{#if: {{{save|}}}
{{#if: {{{save|}}}
| * {{SmallIcon|Saving Throw Icons.png}} {{#switch: {{#if: {{#pos:{{{save|}}}|,}} | {{#explode:{{{save|}}}|,|0}} | {{{save|}}}}}
        {{#vardefine: saveicon | }} {{#vardefine: savetext | }}
<!-- wait this copy pasted thing looks bad and can be improved -->
{{#vardefine: savetype | {{#if: {{#pos:{{{save|}}}|,}} | {{#explode:{{{save|}}}|,|0}} | {{{save|}}}}}}}
| strength | Strength | str | STR = [[Saving Throw|STR Save]]
{{#vardefine: saverslt | {{#if: {{#pos:{{{save|}}}|,}} | {{#explode:{{{save|}}}|,|1}} | ""}}}}
| dexterity | Dexterity | dex | DEX = [[Saving Throw|DEX Save]]
| {{#switch: {{lc:{{#var: savetype}}}}
| constitution | Constitution | con | CON = [[Saving Throw|CON Save]]
| strength | str =  {{#vardefine: saveicon | Strength}} {{#vardefine: savetext | STR}}
| intelligence | Intelligence | int | INT = [[Saving Throw|INT Save]]
| dexterity | dex = {{#vardefine: saveicon | Dexterity}} {{#vardefine: savetext | DEX}}
| wisdom | Wisdom | wis | WIS = [[Saving Throw|WIS Save]]
| constitution | con | = {{#vardefine: saveicon | Constitution}} {{#vardefine: savetext | CON}}
| charisma | Charisma | cha | CHA = [[Saving Throw|CHA Save]]  
| intelligence | int | = {{#vardefine: saveicon | Intelligence}} {{#vardefine: savetext | INT}}
| #default = *[[Saving Throw]]  
| wisdom | wis = {{#vardefine: saveicon | Wisdom}} {{#vardefine: savetext | WIS}}
}}{{#if: {{#pos:{{{save|}}}|,}}
| charisma | cha  = {{#vardefine: saveicon | Charisma}} {{#vardefine: savetext | CHA}}
|   (On Save: {{#explode:{{{save|}}}|,|1}})
| #default = {{#vardefine: saveicon |Alert}} {{#vardefine: savetext | EDITOR SHOULD CHECK TEMPLATE}}
}}*{{SmallIcon|Saving Throw Icons.png}} [[File:{{#var: saveicon}} icon.png|frameless|25px|{{#var: saveicon}}]][[{{#var: saveicon}}|{{#var: savetext}}]] [[Saving Throw|Save]] {{#if: {{#pos:{{{save|}}}|,}}
| (On Save: {{#explode:{{{save|}}}|,|1}})
}}| {{blank}}
}}| {{blank}}
}}
}}

Revision as of 15:37, 16 August 2023

This is a page to transclude to generate action pages. It is generally for pages that do not fit the {{SpellPage}} Template

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).

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. You can use the same parameters as with {{action}}, but you can add an additional resource to it as well.

For example:

  • If a skill takes a {{action|bonus}} and a Superiority Die (D8): | cost = bonus,[[File:Superiority_Die_d8_Icon.png|25px]]
  • If a skill takes an {{action}}: | cost = action
  • If a skill takes just a class resource like 2Ki Points: | cost = ,2{{User:Tc/Ki}}s
    • Result: 2Ki Points
cost = ({{action}} parameters), (text)

cost = ({{action}} parameters)
cost = , (text)

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 = action, 2{{User:Tc/Ki}}s
| damage = {{DamageInfo|1d4+1|Bludgeoning}}
| recharge = {{Recharge|Long Rest}}
| 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

  • abcd

At Higher Levels

go far

How to Learn

Monk Monk 3

Notes

bar