Template:Table unit-list doc

From War Commander Wiki
Jump to navigation Jump to search
Description
This set of templates ({{Table unit-list start}}, {{Table unit-list row}}, {{Table unit-list end}}) are for creating tables of unit lists.

Parameters

Template:Table unit-list doc/TemplateData

Example 1

Code:

{{Table unit-list start}}
{{Table unit-list row|Nemesis-MainPic.png|[[Nemesis]]|Corpus|500|{{Icon damage-type|burst}}|{{Icon target|altitude=ground}}}}
{{Table unit-list row|BountyHunter-MainPic.png|[[Bounty Hunter]]|Survivors|500|{{Icon damage-type|burst}}|{{Icon target multi|ground|low}}}}
{{Table unit-list row|LegendaryLegion-MainPic.png|[[Legendary Legion|L. Legion]]|None|500|{{Icon damage-type|burst}}|{{Icon target multi|ground|low|none-missile}}}}
{{Table unit-list row|Ares-MainPic.png|[[Ares]]|Corpus|500|{{Icon damage-type multi|sustain|burst}}|{{Icon target multi|ground|low|high}}}}
{{Table unit-list row|ShadowSarkis-MainPic.png|[[Shadow Sarkis]]|None|500|{{Icon damage-type|burst}}|{{Icon target multi|ground|low}}}}
{{Table unit-list end}}

Output:

Unit Faction Size Damage Type Targets
Nemesis-MainPic.png Nemesis
Corpus units benefit from Adaptive Defenses and Loyalty.
500
Burst - Slow rate of fire, but high damage per projectile.
Can target ground infantry, vehicles, and buildings.
BountyHunter-MainPic.png Bounty Hunter
Survivors units benefit from Warlust and Loyalty.
500
Burst - Slow rate of fire, but high damage per projectile.
Can target ground infantry, vehicles, and buildings.    Can target airborne units and buildings.
LegendaryLegion-MainPic.png L. Legion
This unit does not benefit from any faction trait.
500
Burst - Slow rate of fire, but high damage per projectile.
Can target ground infantry, vehicles, and buildings.    Can target airborne units and buildings.    Can target missiles.
Ares-MainPic.png Ares
Corpus units benefit from Adaptive Defenses and Loyalty.
500
Sustain - Fast rate of fire, but low damage per projectile.    Burst - Slow rate of fire, but high damage per projectile.
Can target ground infantry, vehicles, and buildings.    Can target airborne units and buildings.    Can target high-altitude units and buildings.
ShadowSarkis-MainPic.png Shadow Sarkis
This unit does not benefit from any faction trait.
500
Burst - Slow rate of fire, but high damage per projectile.
Can target ground infantry, vehicles, and buildings.    Can target airborne units and buildings.


Example 2

Code:

{{Table unit-list start|contains high alt? = yes}}
{{Table unit-list row|Harbinger-MainPic.png|[[Harbinger]]|Sentinels|750|{{Table Entry - Yes}}|{{icon damage-type|area}}|{{Icon target|altitude=ground}}}}
{{Table unit-list row|LegendaryPhantom-MainPic.png|[[Legendary Phantom|L. Phantom]]|None|715|{{Table Entry - Yes}}|{{Icon damage-type|area}}|{{Icon target|altitude=ground}}}}
{{Table unit-list row|BuzzerDrone-MainPic.png|[[Buzzer Drone]]|Corpus|0|{{Table Entry - No}}|{{Icon damage-type|sustain}}|{{Icon target multi|low|high|none-missile}}}}
{{Table unit-list row|ChopperCompany-MainPic.png|[[Chopper Company]]|Survivors|750|{{Table Entry - No}}|{{Icon damage-type multi|burst|area}}|{{Icon target multi|ground|low}}}}
{{Table unit-list end}}

Output:

Unit Faction Size High Altitude? Damage Type Targets
Harbinger-MainPic.png Harbinger
Sentinels units benefit from Devotion and Loyalty.
750
Yes
Area - Big area of effect.
Can target ground infantry, vehicles, and buildings.
LegendaryPhantom-MainPic.png L. Phantom
This unit does not benefit from any faction trait.
715
Yes
Area - Big area of effect.
Can target ground infantry, vehicles, and buildings.
BuzzerDrone-MainPic.png Buzzer Drone
Corpus units benefit from Adaptive Defenses and Loyalty.
0
No
Sustain - Fast rate of fire, but low damage per projectile.
Can target airborne units and buildings.    Can target high-altitude units and buildings.    Can target missiles.
ChopperCompany-MainPic.png Chopper Company
Survivors units benefit from Warlust and Loyalty.
750
No
Burst - Slow rate of fire, but high damage per projectile.    Area - Big area of effect.
Can target ground infantry, vehicles, and buildings.    Can target airborne units and buildings.


Best Practice

To edit or experience with the templates, use the following sandbox and testcase pages:

Steps:

  1. The /sandbox may not have the latest version of the template code in it, so before you make a change, you need to synchronize it with the main template. Copy the entire contents of the main template to the /sandbox subpage, and save the page. Your edit summary should be something like "synchronize with the main template", or simply "sync".
  2. Have fun editing the sandbox. When you have some code you want to test, save the page.
  3. If you have added any new features or changed any parameters, you should add new test cases to the /testcases subpage so that they can be tested. Also, bear in mind that the existing test cases may not be complete. It's okay to rewrite the test cases if they aren't useful for what you're trying to achieve, but also consider editors who may use the test cases after you.
  4. Purge the /testcases page to update the results.
  5. Verify that the test case results are correct. If everything looks good, copy the code from the sandbox to the main template.