Editing Template:Market Value Calculator/doc

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
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]]
+
Takes the data from the infobox and automatically calculates the [[Market Value]] of the item. This 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 currently support [[Quality]] and item HP effects but it is set up so  thise can be easily added if necessary.
  
 
It outputs a plain number.
 
It outputs a plain number.
==Parameters==
 
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 [[stuff]]able 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==
 
==Example usage==
 
On the page about a non-stuffable item in question:
 
On the page about a non-stuffable item in question:
Line 23: Line 16:
 
  <nowiki>{{Market Value Calculator|Duster|Devilstrand}}</nowiki>
 
  <nowiki>{{Market Value Calculator|Duster|Devilstrand}}</nowiki>
 
It would output: {{Market Value Calculator|Duster|Devilstrand}}
 
It would output: {{Market Value Calculator|Duster|Devilstrand}}
 
On a page about the stuffable item.
 
<nowiki>{{Market Value Calculator||Gold|Legendary}}</nowiki>
 
On [[Plate armor]], it would output: {{Market Value Calculator|Plate armor|Gold|Legendary}}
 
 
On a different page than the stuffable built item.
 
<nowiki>{{Market Value Calculator|Bed|Granite blocks||build}}</nowiki>
 
It would output: {{Market Value Calculator|Bed|Granite blocks||Build}}
 
 
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>
 

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)