Difference between revisions of "Template:Infobox main/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(→‎Example #1: Updating example)
(→‎Usage: Massive update to bring documentation up to speed with existing infobox code and usage.)
Line 1: Line 1:
 
==Usage==
 
==Usage==
 
<div class="pull-left">
 
<div class="pull-left">
*Everything is optional;
+
*Everything is optional for the template to function; however, relevant sections should be filled in for the sake of completeness.
 
*You can add a "name" and "image". Fill these values if the PAGENAME macro is not adequate (if the page name has a disambig qualifier for example)
 
*You can add a "name" and "image". Fill these values if the PAGENAME macro is not adequate (if the page name has a disambig qualifier for example)
 
<pre>
 
<pre>
{{infobox main| (animal/plant/weapon/area/structure/building/security/furniture) - used for color theme | additional styles (optional)
+
{{infobox main
|name = use for item header
+
|animal/plant/weapon/area/structure/production/security/furniture (used to set color theme)
|image = picture name.(jpg/png)| variables such as size, alt text (optional)
+
|additional styles (optional)
|info = use for short description
+
 
 +
|name = Title of the infobox. Defaults to current page name if not specified.
 +
|image = Picture name.(jpg/png)| variables such as size, alt text (optional)
 +
|description = Short description of the item. Recommended to use the description from the in-game info page.
 
|type = use for main category  
 
|type = use for main category  
 
|type2 = use for subcategory (optional)
 
|type2 = use for subcategory (optional)
Line 14: Line 17:
 
|hp = use for objects that have hit points
 
|hp = use for objects that have hit points
 
|beauty = use for beauty
 
|beauty = use for beauty
|bodysize = required in order to display meat and leather yields
+
 
|healthscale = use for health scale (determines hit points for each body part)
+
<!-- All pawns (animals, humanoids, mechanoids) -->
|movepeed = use for base movement speed
+
|movespeed = base movement speed
 
|mobdamage = use for base attack damage
 
|mobdamage = use for base attack damage
 
|mobdamagetype = damage type (blunt, scratch, bite, etc)
 
|mobdamagetype = damage type (blunt, scratch, bite, etc)
Line 23: Line 26:
 
|mobdamage3 = as above for third attack
 
|mobdamage3 = as above for third attack
 
|mobdamagetype3 = as above for third attack
 
|mobdamagetype3 = as above for third attack
|leathername = use only if leather, skin, or fur is dropped when animal is butchered  
+
|armorblunt = blunt armor rating
|speed = use for tiles
+
|armorsharp = sharp armor rating
|time = use for plants lifespan (measured in days)
+
|armorheat = head armor rating
|yield = use for food-plants
+
|bodysize = required in order to calculate meat yield, leather yields, and carrying capacity
|wood = use for how much wood plants give when cut
+
|leathername = use only if leather, skin, or fur is dropped when butchered
|power = use for power input/output (+/-)
 
  
## Don't copy this line ###Weapons part###
+
<!-- Animals only -->
|class = Neolithic/Modern/Advanced
+
|manhunter = chance to turn manhunter when attacked (0.00 - 1.00)
|damage = use for weapon damage
+
|manhuntertame = chance to turn manhunter on a failed taming attempt (0.00 - 1.00)
|range = used for weapon range
+
|hungerrate = base hunger rate
|minrange = used for weapon minimum range
+
|diet = carnivorous/herbivorous/omnivorous
|area = used for explosive area
+
|lifespan = life expectancy
 +
|trainable = none/simple/intermediate/advanced
 +
|handleskill = minimum handling skill
 +
|wilderness = wilderness level of creature
 +
|milk = amount of milk produced
 +
|milktime = milking interval
 +
|wool = wool amount
 +
|sheartime = shearing interval
 +
|eggsmin = eggs per clutch minimum
 +
|eggsmax = eggs per clutch maximum
 +
|eggtime = egg laying interval
 +
|eggs_avg = eggs per clutch average
 +
|eggs_avg10 = eggs per month average
 +
|gestation = gestation period
 +
|offspring = offspring per birth
 +
|maturityage = age of maturity
 +
|livesin_aridshrubland = yes or <omit>
 +
|livesin_borealforest = yes or <omit>
 +
|livesin_desert = yes or <omit>
 +
|livesin_icesheet = yes or <omit>
 +
|livesin_temperateforest = yes or <omit>
 +
|livesin_tropicalrainforest = yes or <omit>
 +
|livesin_tundra = yes or <omit>
  
## Don't copy this line ###Weapon Accuracy###
+
<!-- Plants -->
|accuracy = use for weapon accuracy (OUTDATED, USE THE NEW STUFF)
+
|time = number of days to grow
 +
|yield = how much food given when harvested
 +
|wood = how much wood given when harvested
  
 +
<!-- All Weapons -->
 +
|class = neolithic/modern/advanced/mechanoid
 +
|damage = Base weapon damage
 +
|cooldown = use for cooldown time of weapon (in ticks)
 +
|mode = Melee/Single-Shot/Burst
 +
|warmup = How long it takes to aim (in ticks). Set to 0 if melee weapon.
 +
 +
<!-- Ranged Weapons Only -->
 +
|burst = Shots per burst. Set to 1 for single-shot weapons.
 +
|burstticks = Time between bursts (in ticks)
 +
|range = Weapon range
 +
|minrange = Minimum weapon range AKA forced-miss range
 +
|missRadius = Missed shots are forced to land within this radius of the target
 +
|area = Explosive area (in squares)
 +
|velocity = use for projectile velocity
 
|accuracyTouch = use for touch accuracy  
 
|accuracyTouch = use for touch accuracy  
 
|accuracyShort = use for short range accuracy  
 
|accuracyShort = use for short range accuracy  
 
|accuracyMedium = use for medium range accuracy  
 
|accuracyMedium = use for medium range accuracy  
 
|accuracyLong = user for long range accuracy
 
|accuracyLong = user for long range accuracy
 +
|blastRadius = use for blast radius of explosive weapons
  
## Don't copy this line ###Other weapon stats###
+
<!-- Miscellaneous -->
|mode = Single-Shot/Burst
+
|power = power generated Format: + 3600 or - 150
|burst = shots per burst
+
|marketvalue = market value. Format: {{icon|silver|500}}
|warmup = use for warm-up time of weapon (in ticks)
+
|buy = Amount of resource to buy or build this item. Format: {{icon|metal|75}} (More info at Template:Icon)
|cooldown = use for cooldown time of weapon (in ticks)
+
|sell = Amount of resource to sell or deconstruct this item. Format: {{icon|cloth|18}} (More info at Template:Icon)
|velocity = use for projectile velocity
 
|missRadius = use for miss radius of weapon
 
|blastRadius = use for blast radius of explosive weapons
 
|DPS = use for DPS of weapon
 
  
## Don't copy this line ##################
+
<!-- Deprecated parameters -->
|buy = use for price {{icon|type|amount}} more info at Template:Icon
+
|info = Removed and replaced with description =.
|sell = use for price {{icon|type|amount}} more info at Template:Icon
+
|walkSpeed = Superseded by moveSpeed
 +
|speed = Superseded by moveSpeed
 +
|accuracy = Superseded by accuracyTouch, accuracyShort, accuracyMedium, and accuracyLong.
 +
|DPS = Removed. Now calculated automatically.
 +
|healthscale = Unused. Would determine hit points for each body part.
 +
|armorelectric = Not currently used.
 +
|armorpoison = Not currently used.
 
}}</pre>
 
}}</pre>
 
</div>
 
</div>
 +
  
 
{{clear}}
 
{{clear}}

Revision as of 15:32, 3 July 2016

Usage

  • Everything is optional for the template to function; however, relevant sections should be filled in for the sake of completeness.
  • You can add a "name" and "image". Fill these values if the PAGENAME macro is not adequate (if the page name has a disambig qualifier for example)
{{infobox main
|animal/plant/weapon/area/structure/production/security/furniture (used to set color theme)
|additional styles (optional)

|name = Title of the infobox. Defaults to current page name if not specified.
|image = Picture name.(jpg/png)| variables such as size, alt text (optional)
|description = Short description of the item. Recommended to use the description from the in-game info page.
|type = use for main category 
|type2 = use for subcategory (optional)
|placeable = Yes/No
|size = two values, separated by | - (1|2)
|hp = use for objects that have hit points
|beauty = use for beauty

<!-- All pawns (animals, humanoids, mechanoids) -->
|movespeed = base movement speed
|mobdamage = use for base attack damage
|mobdamagetype = damage type (blunt, scratch, bite, etc)
|mobdamage2 = use for secondary attack damage
|mobdamagetype2 = damage type of secondary attack (blunt, scratch, bite, etc)
|mobdamage3 = as above for third attack
|mobdamagetype3 = as above for third attack
|armorblunt = blunt armor rating
|armorsharp = sharp armor rating
|armorheat = head armor rating
|bodysize = required in order to calculate meat yield, leather yields, and carrying capacity
|leathername = use only if leather, skin, or fur is dropped when butchered

<!-- Animals only -->
|manhunter = chance to turn manhunter when attacked (0.00 - 1.00)
|manhuntertame = chance to turn manhunter on a failed taming attempt (0.00 - 1.00)
|hungerrate = base hunger rate
|diet = carnivorous/herbivorous/omnivorous
|lifespan = life expectancy
|trainable = none/simple/intermediate/advanced
|handleskill = minimum handling skill
|wilderness = wilderness level of creature
|milk = amount of milk produced
|milktime = milking interval
|wool = wool amount
|sheartime = shearing interval
|eggsmin = eggs per clutch minimum
|eggsmax = eggs per clutch maximum
|eggtime = egg laying interval
|eggs_avg = eggs per clutch average
|eggs_avg10 = eggs per month average
|gestation = gestation period
|offspring = offspring per birth
|maturityage = age of maturity
|livesin_aridshrubland = yes or <omit>
|livesin_borealforest = yes or <omit>
|livesin_desert = yes or <omit>
|livesin_icesheet = yes or <omit>
|livesin_temperateforest = yes or <omit>
|livesin_tropicalrainforest = yes or <omit>
|livesin_tundra = yes or <omit>

<!-- Plants -->
|time = number of days to grow
|yield = how much food given when harvested
|wood = how much wood given when harvested

<!-- All Weapons -->
|class = neolithic/modern/advanced/mechanoid
|damage = Base weapon damage
|cooldown = use for cooldown time of weapon (in ticks)
|mode = Melee/Single-Shot/Burst
|warmup = How long it takes to aim (in ticks). Set to 0 if melee weapon.

<!-- Ranged Weapons Only -->
|burst = Shots per burst. Set to 1 for single-shot weapons.
|burstticks = Time between bursts (in ticks)
|range = Weapon range
|minrange = Minimum weapon range AKA forced-miss range
|missRadius = Missed shots are forced to land within this radius of the target
|area = Explosive area (in squares)
|velocity = use for projectile velocity
|accuracyTouch = use for touch accuracy 
|accuracyShort = use for short range accuracy 
|accuracyMedium = use for medium range accuracy 
|accuracyLong = user for long range accuracy
|blastRadius = use for blast radius of explosive weapons

<!-- Miscellaneous -->
|power = power generated Format: + 3600 or - 150
|marketvalue = market value. Format: {{icon|silver|500}}
|buy = Amount of resource to buy or build this item. Format: {{icon|metal|75}} (More info at Template:Icon)
|sell = Amount of resource to sell or deconstruct this item. Format: {{icon|cloth|18}} (More info at Template:Icon)

<!-- Deprecated parameters -->
|info = Removed and replaced with description =.
|walkSpeed = Superseded by moveSpeed
|speed = Superseded by moveSpeed
|accuracy = Superseded by accuracyTouch, accuracyShort, accuracyMedium, and accuracyLong.
|DPS = Removed. Now calculated automatically.
|healthscale = Unused. Would determine hit points for each body part.
|armorelectric = Not currently used.
|armorpoison = Not currently used.
}}


Example #1

Muffalo

Base Stats

Type
Animals

Pawn Stats

Health Scale
1.75
Body Size
2.0
Mass - Baby
24 kg
Mass - Juvenile
60 kg
Mass - Adult
120 kg
Carrying Capacity
150 kg
Filth Rate
1

Production

Meat Yield
280 muffalo meat
Leather Yield
80 muffalo wool

Melee Combat

Damage
10
Damage Type
blunt

{{infobox main|animal|pull-left
|name = Muffalo
|image = Animal Muffalo side.png|200px{{!}}Muffalo
|info = A large herding herbivore descended from buffalo and adapted for some exotic environment. Peaceful unless disturbed.
|bodysize = 2.0
|healthscale = 1.75
|movepeed = 3.6
|mobdamage = 10
|mobdamagetype = blunt
|leathername = Muffalo Wool
}}

Example #2

Pistol

Base Stats

Type
EquipmentWeapons
Weapon Class
Modern

Ranged Combat

Mode
Single-Shot
Damage
10 dmg
Warm-Up
68 ticks (1.13 secs)
Cooldown
40 ticks (0.67 secs)
Range
24 tile(s)
Accuracy
91% - 71% - 50% - 32%
Velocity
55 (m/s)
Burst Count
1 (per burst)
DPS
5.56 (Expression error: Unexpected / operator.)

{{infobox main|weapon|pull-left
|name = Pistol
|image = Equipment Pistol.png|Pistol
|type = Equipment{{!}}Equipment
|type2 = Weapons{{!}}Weapons
|info = "Ancient pattern automatic pistol. Weak and short range, but quick."
|class = Modern
|damage = 10
|range = 24
|accuracyTouch = 91
|accuracyShort = 71
|accuracyMedium = 50
|accuracyLong = 32
|mode = Single-Shot
|warmup = 68
|cooldown = 40
|DPS = DPS
|velocity = 55
|burst = 1
|buy  = {{icon|silver|60}}
}}