Difference between revisions of "Template:TrainingTable/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(Updated Docs for use of the Training Template on Animals listed in Animals Category)
 
(Added the note to the example)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Required Code on Every Animal Page ===
+
{{TOCright}}
 +
==Description==
 +
This template displays an animal's trainability.
  
The following code is going to now be required on every [[Animals]] page. This is to "set" or "define" the properties of the specific animal when it comes to training. Whenever you use this template there are four Page Properties you have to manually set on each Animal Page. These are vital for the template to work as the template pulls information from these properties in order to properly set the values within the template.
+
==Usage==
 +
Enter <code><nowiki>{{TrainingTable}}</nowiki></code> under the Training section.</p>
 +
No other syntax or parameters are used.
  
<pre>
+
==Prerequisites==
<!-- Set the Declaration of Variables for the Animal Training Template-->
+
The animal's page must include its trainability stat, written as one of the following:
{{#set: Can_Train_Guard=true}}
+
: <code>|trainable = none</code>
{{#set: Can_Train_Attack=false}}
+
: <code>|trainable = simple</code>
{{#set: Can_Train_Rescue=true}}
+
: <code>|trainable = intermediate</code>
{{#set: Can_Train_Haul=false}}
+
: <code>|trainable = advanced</code>
</pre>
 
  
== New Template Properties ==
+
The animal's page must include its body size, written like:
 +
: <code>|bodysize = 0.55</code>
  
The following properties are used for the new template.
+
==Properties==
 +
The properties displayed by this template are:
  
 
[[Property:Can_Train_Guard]]
 
[[Property:Can_Train_Guard]]
Line 23: Line 28:
 
[[Property:Can_Train_Haul]]
 
[[Property:Can_Train_Haul]]
  
== Deprecated Template Properties ==
+
==Example Output==
 +
The following is output when used on Muffalo.
  
[[Property:Can_Train_Obedience]]
 
  
[[Property:Can_Train_Release]]
+
This animal can be trained as follows:
 +
{| style="border-style: solid; border-width: 0px; text-align:left;"
 +
! scope="row" | Guard:
 +
| &nbsp;{{#switch: {{#show: Muffalo|?Can Train Guard|link=none}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 +
|-
 +
! scope="row" |Attack:
 +
| &nbsp;{{#switch: {{#show: Muffalo|?Can Train Attack|link=none}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 +
|-
 +
! scope="row" |Rescue:
 +
| &nbsp;{{#switch: {{#show: Muffalo|?Can Train Rescue|link=none}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 +
|-
 +
! scope="row" |Haul:
 +
| &nbsp;{{#switch: {{#show: Muffalo|?Can Train Haul|link=none}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 +
|}
 +
<small>*As of [[version/1.1.2610|version 1.1.2610]], all animals can be tamed. The percentage of likelihood of success depends on factors such as the Animals Wildness Percentage, Pawn Handling Skill, and others. More information can be found on the [[Animals#Animal_husbandry|animals]] page.</small>
  
The following values are to be set for animals as of V1.1.2610: [[User:DJRedNightGaming/AnimalTrainingPropertyValues]]
+
==Additional Info==
 +
* This template displays information from properties, it does not set them, instead, they are set in [[Template:Infobox main]]. Go there for updates or adjustments.
  
== Example Output ==
+
* Trainability is partially determined by body size as specified in (RimWorld installation folder on PC) Defs\TrainableDefs\Trainables.xml
  
{{TrainingTemplateUpdated}}
 
  
<!-- Set the Declaration of Variables for the Animal Training Template-->
+
<includeonly>[[Category:Customized table templates]]</includeonly>
{{#set: Can_Train_Guard=true}}
+
<noinclude>[[Category:Template documentation]]</noinclude>
{{#set: Can_Train_Attack=false}}
 
{{#set: Can_Train_Rescue=true}}
 
{{#set: Can_Train_Haul=false}}
 

Latest revision as of 14:48, 29 September 2021

Description[edit]

This template displays an animal's trainability.

Usage[edit]

Enter {{TrainingTable}} under the Training section.

No other syntax or parameters are used.

Prerequisites[edit]

The animal's page must include its trainability stat, written as one of the following:

|trainable = none
|trainable = simple
|trainable = intermediate
|trainable = advanced

The animal's page must include its body size, written like:

|bodysize = 0.55

Properties[edit]

The properties displayed by this template are:

Property:Can_Train_Guard

Property:Can_Train_Attack

Property:Can_Train_Rescue

Property:Can_Train_Haul

Example Output[edit]

The following is output when used on Muffalo.


This animal can be trained as follows:

Guard:  Ex.png
Attack:  Ex.png
Rescue:  Ex.png
Haul:  Ex.png

*As of version 1.1.2610, all animals can be tamed. The percentage of likelihood of success depends on factors such as the Animals Wildness Percentage, Pawn Handling Skill, and others. More information can be found on the animals page.

Additional Info[edit]

  • This template displays information from properties, it does not set them, instead, they are set in Template:Infobox main. Go there for updates or adjustments.
  • Trainability is partially determined by body size as specified in (RimWorld installation folder on PC) Defs\TrainableDefs\Trainables.xml