Template:TechRow

From SotS2
Jump to: navigation, search
Template documentation (for the above template, sometimes hidden or invisible)

Contents

This template is designed to allow creating of the tech links from one tech to another. It creates a table row that can be used in any wiki table and uses a switch statement to control whether the displayed tech name if the tech the link is from or the tech the link is to.

Usage

All parameters have a default of n/a except for ToFromBoth, which must be set (see below). The percent sign is a part of the template and is not needed in the parameters.

{{TechRow|ToFromBoth= |LinksFromTechName= |LinksToTechName= |ResearchCost= |HiverChance= |HumanChance=
|LiirChance= |LoaChance= |MorrigiChance= |TarkaChance= |ZuulChance=}}
  • ToFromBoth is the switch parameter. It must be LinksTo, LinksFrom or Both. When set to LinksTo, the wiki row is created using the LinksToTechName but not the LinksFromTechName. When set to LinksFrom , the wiki row is created using the LinksFromTechNamebut not the LinksToTechName. When set to Both, the wiki row is created using both the LinksFromTechNameand the LinksToTechName.
  • LinksFromTechName is the name of the tech that the tech link is coming from. A tech link between Plasma Cannon and Fusion Cannon would have [[Plasma Cannon]] as the LinksFromTechName.
  • LinksToTechName is the name of the tech that the tech link is going to. A tech link between Plasma Cannon and Fusion Cannon would have [[Fusion Cannonn]] as the LinksToTechName.
  • ResearchCost is the cost of the tech link from the LinksFromTechNameto the LinksToTechName.
  • HiverChance is the percentage chance of Hivers getting the tech.
  • HumanChance is the percentage chance of Humans getting the tech.
  • LiirChance is the percentage chance of Liir-Prester Zuul getting the tech.
  • LoaChance is the percentage chance of Loa getting the tech.
  • MorrigiChance is the percentage chance of Morrigi getting the tech.
  • TarkaChance is the percentage chance of Tarka getting the tech.
  • ZuulChance is the percentage chance of Suul'ka Horde getting the tech.

Example

{{TechRow|ToFromBoth=LinksTo|LinksFromTechName=Fusion Cannon|LinksToTechName=Anti-Matter Cannon
|ResearchCost=180000|HiverChance=65|HumanChance=75|LiirChance=95|LoaChance=90|MorrigiChance=85|TarkaChance=70|ZuulChance=30}}

returns:

Name Cost Hiver Human Liir Loa Morrigi Tarka Zuul
Anti-Matter Cannon 180000 65% 75% 95% 90% 85% 70% 30%

Visit Template:TechRow/doc to edit this text! (How does this work?)