Difference between revisions of "Template:Infobox pawn"

From RimWorld Wiki
Jump to navigation Jump to search
(Updated)
(New update with training code)
Line 47: Line 47:
 
| packanimal        = Boolean
 
| packanimal        = Boolean
 
| carryingcapacity  = Integer
 
| carryingcapacity  = Integer
| train_haul        = Boolean
 
 
| train_obedience    = Boolean
 
| train_obedience    = Boolean
 
| train_release      = Boolean
 
| train_release      = Boolean
 
| train_rescue      = Boolean
 
| train_rescue      = Boolean
 +
| train_haul        = Boolean
 
| wildness          = Float
 
| wildness          = Float
 
<!--  Product  -->
 
<!--  Product  -->
Line 74: Line 74:
 
</noinclude><!--
 
</noinclude><!--
  
--><includeonly><!-- Cargo store section  --><!--
+
--><includeonly><!-- Cargo store section  --><!-- disable namespacecheck for now
--><!--{{#ifeq: {{NAMESPACENUMBER}} | 0 |-->
+
{{#ifeq: {{NAMESPACENUMBER}} | 0 | -->
 
{{#cargo_store:_table = Animal
 
{{#cargo_store:_table = Animal
 
| name              = {{{name|}}}
 
| name              = {{{name|}}}
Line 91: Line 91:
 
| diet              = {{{diet|}}}
 
| diet              = {{{diet|}}}
 
| flammability      = {{{flammability|}}}
 
| flammability      = {{{flammability|}}}
| has_gender        = {{{has_gender|}}}
+
| has_gender        = {{#if: {{{has_gender|}}} | {{{has_gender}}} | yes}}
 
| marketvalue        = {{{marketvalue|}}}
 
| marketvalue        = {{{marketvalue|}}}
 
| movespeed          = {{{movespeed|}}}
 
| movespeed          = {{{movespeed|}}}
Line 124: Line 124:
 
| trainability      = {{{trainability|}}}
 
| trainability      = {{{trainability|}}}
 
| packanimal        = {{{packanimal|}}}
 
| packanimal        = {{{packanimal|}}}
| carryingcapacity  = {{{carryingcapacity|}}}
+
| carryingcapacity  = {{#vardefine: carryingcapacity | {{#if: {{{basebodysize|}}} | {{#expr: 75 * {{{basebodysize|}}} round0}} }} }} {{#var: carryingcapacity}}
| train_obedience    = {{{train_obedience|}}}
+
| train_obedience    = {{#vardefine: train_obedience | {{#ifeq: {{{trainability|}}}|none|no|yes}} }} {{#var: train_obedience}}
| train_release      = {{{train_release|}}}
+
| train_release      = {{#vardefine: train_release | {{#switch: {{{trainability|}}}
| train_rescue      = {{{train_rescue|}}}
+
    |none|simple = no
| train_haul        = {{{train_haul|}}}
+
    |intermediate|advanced = yes }} }} {{#var: train_release}}
 +
| train_rescue      = {{#vardefine: train_rescue | {{#switch: {{{trainability|}}}
 +
    |none|simple|intermediate = no
 +
    |advanced = {{#ifexpr: {{{basebodysize}}} >= 0.65 |yes|no}} }} }} {{#var: train_rescue}}
 +
| train_haul        = {{#vardefine: train_haul | {{#switch: {{{trainability|}}}
 +
    |none|simple|intermediate = no
 +
    |advanced = {{#ifexpr: {{{basebodysize}}} >= 0.40 |yes|no}} }} }} {{#var: train_haul}}
 
| wildness          = {{{wildness|}}}
 
| wildness          = {{{wildness|}}}
 
<!--  Product  -->
 
<!--  Product  -->
Line 149: Line 155:
 
| tradetags          = {{{tradetags|}}}
 
| tradetags          = {{{tradetags|}}}
 
<!--| butcherproducts?? (mechs) = List (,) of String -->
 
<!--| butcherproducts?? (mechs) = List (,) of String -->
}}<!-- }} --><!--
+
}}<!-- }}don't forget me! --><!--
 
     ===  #vardefine to use variables outside the infobox  ===
 
     ===  #vardefine to use variables outside the infobox  ===
 
      
 
      
Line 226: Line 232:
 
{{#if: {{{maxpreybodysize|}}} | {{!}} <div>Max prey body size</div> {{!!}} {{{maxpreybodysize}}} }}
 
{{#if: {{{maxpreybodysize|}}} | {{!}} <div>Max prey body size</div> {{!!}} {{{maxpreybodysize}}} }}
 
|-
 
|-
{{#if: {{{manhunter_damage|}}} {{{manhunter_tamefail|}}} | {{!}} <div>Manhunter chance</div> {{!!}} {{#if: {{{manhunter_damage|}}} |  
+
{{#if: {{{manhunter_damage|}}} {{{manhunter_tamefail|}}} | {{!}} <div>Manhunter chance</div> {{!!}} {{#if: {{{manhunter_damage|}}} |
* {{#expr: {{{manhunter_damage}}}*100}}% on damage }} {{#if: {{{manhunter_tamefail|}}} |  
+
  {{#ifeq: {{{manhunter_damage|}}} | 0 |
* {{#expr: {{{manhunter_tamefail}}}*100}}% on tame failure }} }}
+
* Never on damage |  
 +
* {{#expr: {{{manhunter_damage}}}*100}}% on damage }} }} {{#if: {{{manhunter_tamefail|}}} | {{#ifeq: {{{manhunter_tamefail|}}} | 0 |
 +
* Never on tame failure |  
 +
* {{#expr: {{{manhunter_tamefail}}}*100}}% on tame failure }} }} }}
 
|-
 
|-
 
{{#if: {{{wildness|}}} | {{!}} <div>Wildness</div> {{!!}} {{#expr:{{{wildness}}}*100}}% }}
 
{{#if: {{{wildness|}}} | {{!}} <div>Wildness</div> {{!!}} {{#expr:{{{wildness}}}*100}}% }}
Line 238: Line 247:
 
{{#if: {{{packanimal|}}} | {{!}} <div>Pack animal</div> {{!!}} {{#ifeq: {{{packanimal|}}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
 
{{#if: {{{packanimal|}}} | {{!}} <div>Pack animal</div> {{!!}} {{#ifeq: {{{packanimal|}}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
 
|-
 
|-
{{#if: {{{carryingcapacity|}}} | {{!}} <div>Carry capacity</div> {{!!}} {{{carryingcapacity}}} kg }}
+
{{#if: {{#var:carryingcapacity}} | {{!}} <div>Carry capacity</div> {{!!}} {{#var:carryingcapacity}} kg }}
|-<!--
+
|-
{{#if: {{#var:carryingcapacity}} | {{!}} <div>Carry capacity test</div> {{!!}} {{#var:carryingcapacity}} kg }}
+
{{#if: {{#var: train_obedience}} | {{!}} <div>Train obedience</div> {{!!}} {{#ifeq: {{#var: train_obedience|}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
|--->
 
{{#if: {{{train_obedience|}}} | {{!}} <div>Train obedience</div> {{!!}} {{#ifeq: {{{train_obedience|}}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
 
 
|-
 
|-
{{#if: {{{train_release|}}} | {{!}} <div>Train release</div> {{!!}} {{#ifeq: {{{train_release|}}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
+
{{#if: {{#var: train_release}} | {{!}} <div>Train release</div> {{!!}} {{#ifeq: {{#var: train_release|}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
 
|-
 
|-
{{#if: {{{train_rescue|}}} | {{!}} <div>Train rescue</div> {{!!}} {{#ifeq: {{{train_rescue|}}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
+
{{#if: {{#var: train_rescue}} | {{!}} <div>Train rescue</div> {{!!}} {{#ifeq: {{#var: train_rescue|}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
 
|-
 
|-
{{#if: {{{train_haul|}}} | {{!}} <div>Train haul</div> {{!!}} {{#ifeq: {{{train_haul|}}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
+
{{#if: {{#var: train_haul}} | {{!}} <div>Train haul</div> {{!!}} {{#ifeq: {{#var: train_haul|}} | yes | [[File:Checkon.png|20px]] | [[File:Checkoff.png|20px]] }} }}
 
|-
 
|-
 
{{#if: {{{petness|}}} | {{!}} <div>Petness</div> {{!!}} {{{petness}}} }}
 
{{#if: {{{petness|}}} | {{!}} <div>Petness</div> {{!!}} {{{petness}}} }}

Revision as of 04:29, 27 July 2019

This template defines the table "Animal". This table has not been created yet.

Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

This documentation is for the new infobox pawn template.

{{Infobox pawn
| name               = 
| image              = 
| description        = 
| description_markup = 
| type               = 
| subtype            = 
<!--   General   -->
| basebodysize       = 
| basehealthscale    = 
| basehungerrate     = 
| comfytemp_min      = 
| comfytemp_max      = 
| diet               = 
| flammability       = 
| has_gender         = 
| marketvalue        = 
| movespeed          = 
<!--   Combat   -->
| armorrating_blunt  = 
| armorrating_heat   = 
| armorrating_sharp  = 
| combatpower        = 
<!-- Life phases -->
| life_expectancy    = 
| mass_adult         = 
| mass_baby          = 
| mass_juvenile      = 
| maturity_age       = 
| minage_adult       = 
| minage_baby        = 
| minage_juvenile    = 
| gestation_period   = 
| offspring_low      = 
| offspring_high     = 
<!--   Taming/hunting   -->
| handleskill        = 
| manhunter_damage   = 
| manhunter_tamefail = 
| nameontamechance   = 
| nuzzlehours        = 
| petness            = 
| predator           = 
| maxpreybodysize    = 
| trainability       = 
| packanimal         = 
| carryingcapacity   = 
| wildness           = 
<!--   Product   -->
| egg_amountlow      = 
| egg_amounthigh     = 
| egg_type           = 
| egg_time           = 
| leather_amount     = 
| leather_type       = 
| meat_amount        = 
| meat_type          = 
| milk_amount        = 
| milk_time          = 
| shear_time         = 
| wool_amount        = 
| wool_type          = 
<!--   Other      -->
| ecosystemweight    = 
| recipes_operation  = 
| tradetags          = 
<!--| butcherproducts?? (mechs) = -->
}}