Template:UnitInfobox: Difference between revisions
From Mechabellum Wiki
(define variables for use in page) |
m (test) |
||
Line 1: | Line 1: | ||
<!-- define parameter as variable so they can be used later on the page --> | <!-- define parameter as variable so they can be used later on the page --> | ||
{{#vardefine:atk|{{{atk|0}}} }} | {{#vardefine:atk|{{{atk|0}}} }} | ||
Line 13: | Line 12: | ||
{{#vardefine:range|{{{range|0}}} }} | {{#vardefine:range|{{{range|0}}} }} | ||
{{#vardefine:speed|{{{speed|0}}} }} | {{#vardefine:speed|{{{speed|0}}} }} | ||
<!-- calculated variables --> | <!-- calculated variables --> | ||
{{#vardefine:burst|{{#ifexpr: ({{{atk|0}}})<1 | 0 | {{#expr: abs({{{atk|0}}}) * {{{units|1}}} round 0 }} }} }} | {{#vardefine:burst|{{#ifexpr: ({{{atk|0}}})<1 | 0 | {{#expr: abs({{{atk|0}}}) * {{{units|1}}} round 0 }} }} }} | ||
Line 22: | Line 20: | ||
}} | }} | ||
}} | }} | ||
<div class="infobox" style="max-width: 100%;"> | <div class="infobox" style="max-width: 100%;"> | ||
<div class="infobox-title">{{PAGENAME}}</div> | <div class="infobox-title">{{PAGENAME}}</div> |
Revision as of 18:33, 4 June 2023
UnitInfobox
Mobility | Ground |
---|---|
Giant | No |
Unlock cost | Free |
Units | 1 |
Target | Ground Only |
Splash Damage | No |
Burst Damage | Minimal |
Max DPS | 0 |
Range | Melee |
Infobox for all ingame stats for this unit
Parameter | Description | Type | Status | |
---|---|---|---|---|
Image | image | File name | String | suggested |
Mobility | mobility | Air or Ground unit, defaults to Ground if not set
| String | suggested |
Giant | giant | Is unit a Giant? No if not set
| String | suggested |
Unit Type | type | A short description of the purpose
| String | suggested |
Unlock Cost | unlockcost | The cost for unlocking the unit. Defaults to 0=Free if not set
| Number | suggested |
Cost | cost | Purchase cost | Number | required |
Units | units | Number of units. Default 1 if not set
| Number | suggested |
HP | hp | Hit Points | Number | required |
Attack | atk | Damage of the unit. Usually a number for the damage of one unit. Can have a range or a multiplier.
| String | required |
Splash Damage | splashdmg | The AOE in meter, Defaults to 0=No if not set
| Number | suggested |
Target | target | Can attack ground and/or air units? Default "Ground Only" if not set
| String | suggested |
Attack Interval | atkint | Time between shots | Number | suggested |
Range | range | Range of the unit. Defaults to 0=Melee if not set
| Number | suggested |
Speed | speed | The Speed in meter per second (m/s) | Number | suggested |
Description | igdesc | The in-game description
| String | suggested |