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)
 
m
(4 intermediate revisions by the same user 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 ==
+
==Obsolete Properties==
 +
The following properties are no longer used. These stats are from previous game versions.
  
 
[[Property:Can_Train_Obedience]]
 
[[Property:Can_Train_Obedience]]
Line 29: Line 35:
 
[[Property:Can_Train_Release]]
 
[[Property:Can_Train_Release]]
  
The following values are to be set for animals as of V1.1.2610: [[User:DJRedNightGaming/AnimalTrainingPropertyValues]]
+
==Example Output==
 +
The following is output when used on Muffalo.
  
== Example Output ==
 
  
{{TrainingTemplateUpdated}}
+
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=]]}}
 +
|}
  
<!-- Set the Declaration of Variables for the Animal Training Template-->
+
==Additional Info==
{{#set: Can_Train_Guard=true}}
+
* 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.
{{#set: Can_Train_Attack=false}}
+
 
{{#set: Can_Train_Rescue=true}}
+
* Trainability is partially determined by body size as specified in (RimWorld installation folder on PC) Defs\TrainableDefs\Trainables.xml
{{#set: Can_Train_Haul=false}}
 

Revision as of 15:01, 15 September 2020

Description

This template displays an animal's trainability.

Usage

Enter {{TrainingTable}} under the Training section.

No other syntax or parameters are used.

Prerequisites

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

The properties displayed by this template are:

Property:Can_Train_Guard

Property:Can_Train_Attack

Property:Can_Train_Rescue

Property:Can_Train_Haul

Obsolete Properties

The following properties are no longer used. These stats are from previous game versions.

Property:Can_Train_Obedience

Property:Can_Train_Release

Example Output

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

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.
  • Trainability is partially determined by body size as specified in (RimWorld installation folder on PC) Defs\TrainableDefs\Trainables.xml