Difference between revisions of "Template:Market Value Calculator/doc"

From RimWorld Wiki
Jump to navigation Jump to search
m
 
(One intermediate revision by one other user not shown)
Line 28: Line 28:
 
On [[Plate armor]], it would output: {{Market Value Calculator|Plate armor|Gold|Legendary}}
 
On [[Plate armor]], it would output: {{Market Value Calculator|Plate armor|Gold|Legendary}}
  
On a diffent page about the stuffable built item.
+
On a different page than the stuffable built item.
 
  <nowiki>{{Market Value Calculator|Bed|Granite blocks||build}}</nowiki>
 
  <nowiki>{{Market Value Calculator|Bed|Granite blocks||build}}</nowiki>
 
It would output: {{Market Value Calculator|Bed|Granite blocks||Build}}
 
It would output: {{Market Value Calculator|Bed|Granite blocks||Build}}
  
<includeonly>[[Category:Templates]]</includeonly>
+
On a different page than an item with a set market value.
 +
<nowiki>{{Market Value Calculator|Persona monosword||Legendary}}</nowiki>
 +
It would output: {{Market Value Calculator|Persona monosword||Legendary}}
 +
 
 +
<includeonly>[[Category:Math templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 00:13, 6 October 2022

Automatically calculates the Market Value of the item from the resources and work to make properties of the item, as set by Template:Infobox main

It outputs a plain number.

Parameters[edit]

The item can be manually chosen by the first argument, otherwise it automatically uses the page the template is used on.

For stuffable items, the stuff ingredient can and must be defined in the second argument of the template and the page must correctly have "Stuff" as its Resource 1. It does not prevent selection of options not allowed by the item's Stuff Tags property. Where needed, this must be handled outside of this template.

The third argument is optional and sets the Quality of the item in question. The Quality must be entered by a capitalized string. E.g. "Awful", with no quotes. It does not prevent selection of qualities for items that do not have quality. Where needed, this must be handled outside of this template.

The fourth argument is optional and sets whether a stuffable item uses the Work To Make Factor or Work To Build Factor of the material used. It will attempt to uses the Type property to select the right option, and will default to Make when type is either not set, or isn't recongised. However, it can also be manually set to either Build or Make by having "make" or "build" as the argument.

Example usage[edit]

On the page about a non-stuffable item in question:

{{Market Value Calculator}}

On tool cabinet, it would output: 385

On a different page than the non-stuffable item.

{{Market Value Calculator|Flak vest}}

It would output: 225

On a different page than the stuffable item.

{{Market Value Calculator|Duster|Devilstrand}}

It would output: 475

On a page about the stuffable item.

{{Market Value Calculator||Gold|Legendary}}

On Plate armor, it would output: 20125

On a different page than the stuffable built item.

{{Market Value Calculator|Bed|Granite blocks||build}}

It would output: 58

On a different page than an item with a set market value.

{{Market Value Calculator|Persona monosword||Legendary}}

It would output: 6000