Difference between revisions of "Template:SetProp/doc"
From Salem Wiki
m (→Supported propname's: Skill-values are now displayed.) |
m (→Copy&Paste code for easy use: added 'Actions' and links to top) |
||
Line 86: | Line 86: | ||
==About==</pre> | ==About==</pre> | ||
+ | <span style="float:right;">⇑ [[#Description|back to top]] ⇑</span><span style="float:left;">⇑ [[#Description|back to top]] ⇑</span>{{-}} | ||
===Inspirationals=== | ===Inspirationals=== | ||
<pre> | <pre> | ||
Line 113: | Line 114: | ||
==About==</pre> | ==About==</pre> | ||
+ | <span style="float:right;">⇑ [[#Description|back to top]] ⇑</span><span style="float:left;">⇑ [[#Description|back to top]] ⇑</span>{{-}} | ||
===Technology=== | ===Technology=== | ||
<pre> | <pre> | ||
Line 140: | Line 142: | ||
==About==</pre> | ==About==</pre> | ||
+ | <span style="float:right;">⇑ [[#Description|back to top]] ⇑</span><span style="float:left;">⇑ [[#Description|back to top]] ⇑</span>{{-}} | ||
+ | ===Actions=== | ||
+ | <pre> | ||
+ | {{SetProp | ||
+ | |IsinGameMenu=menuname | ||
+ | |Has icon= | ||
+ | |Caption= | ||
+ | |Has fullview={{SUBPAGENAME}}.png | ||
+ | |RequiresTech= | ||
+ | |RequiresObj= | ||
+ | }}{{Infobox}} | ||
+ | |||
+ | ==About== | ||
+ | Acquired by Learning [[]]</pre> | ||
+ | <span style="float:right;">⇑ [[#Description|back to top]] ⇑</span><span style="float:left;">⇑ [[#Description|back to top]] ⇑</span>{{-}} | ||
==Examples== | ==Examples== |
Revision as of 23:47, 11 July 2012
Description
- This is a wrapper-template that calls {{SetProp/single}} to automatically set property values.
- It has a fixed-set of properties it supports, and can be expanded when needed in code...
- Some properties are fit to assign multiple values to, using a sep, but those of type Boolean are obviously not...
- For more documentation on functions used see
Syntax
- Type the below code on top of a page:
{{SetProp |propname=propvalues |propname=propvalues |... }}
- It supports this optional named-parameter for multi-value propname's:
- sep
- The default separator used in the propvalues to separate single-values from each other.
- It defaults to a comma ','
- sep
Supported propname's
It currently supports these properties in preferred sequence:
- IsGameMenu (Type: Boolean, single-value)
- Will always be set.
- Defaults to 'false'.
- IsinGameMenu (Type: String, multi-value)
- Default separator in this case is a ^ when no over-ride is used in sep, be careful this property can use a comma in its valid value!
- Has icon (Type: Page, single-value)
- Only supply the filename, it will automatically prepend the final property-value with
Image:
- When not used, it will auto-set this property to
Image:{{SUBPAGENAME}} icon.png
- Only supply the filename, it will automatically prepend the final property-value with
- Caption (Type: Text, single-value)
- Can hold free text.
- Has fullview (Type: Page, single-value)
- Only supply the filename, it will automatically prepend the final property-value with
Image:
- Only supply the filename, it will automatically prepend the final property-value with
- RequiresTech (Type: Page, multi-value)
- UnlocksTech (Type: Page, multi-value)
- RequiresObj (Type: String, multi-value)
- RepairedWith (Type: String, multi-value)
- IsLiftable (Type: Boolean, single-value)
- IsLiftableWhenEmpty (Type: Boolean, single-value)
- When used will always be set to 'true', and auto-set IsLiftable='true'.
- Locations (Type: Page, multi-value)
- HP (Type: Number, single-value)
- Soak (Type: Number, single-value)
- Loot (Type: String, multi-value)
- Skills (Type: Number, single-value)
- These are called Proficiencies ingame.
- If either one of the below Skills are set, then all will be set at same time.
- They will all default to '0', when not given a value explicitly.
- arts = Arts & Crafts
- cloak = Cloak & Dagger
- faith = Faith & Wisdom
- frontier = Frontier & Wilderness
- hammer = Hammer & Nail
- hunting = Hunting & Gathering
- law = Law & Lore
- mines = Mines & Mountains
- pots = Pots & Pans
- sparks = Sparks & Embers
- stocks = Stocks & Cultivars
- sugar = Sugar & Spice
- thread = Thread & Needle
- natural = Natural Philosophy
- perennial = Perennial Philosophy
- RequiredBy (Type: Page, multi-value)
- This will be automatically set using {{SetProp/RequiredBy auto}}, after any eventual manual assignments using this propname.
Copy&Paste code for easy use
- Type the below code at the top of the page, with values assigned to relevant parameters.
- Parameters can be in any order, and not all need to be used, but its preferred to use the ordering above for uniformity.
- The shown parameters are examples and most used.
- You can remove the unused ones if they are not likely to be set for your page.
Items
{{SetProp |IsinGameMenu=no (or the menu-name) |Has icon= |Caption= |Has fullview={{SUBPAGENAME}}.png |RequiresTech= |RequiresObj= |RepairedWith= |IsLiftable=y/n or IsLiftableWhenEmpty=y |HP=0 |Soak=0 }}{{Infobox}} ==About==
⇑ back to top ⇑⇑ back to top ⇑
Inspirationals
{{SetProp |IsinGameMenu=no (or the menu-name) |Has icon= |Caption= |Has fullview={{SUBPAGENAME}}.png |RequiresTech= |RequiresObj= |arts= |cloak= |faith= |frontier= |hammer= |hunting= |law= |mines= |pots= |sparks= |stocks= |sugar= |thread= |natural= |perennial= }}{{Infobox}} ==About==
⇑ back to top ⇑⇑ back to top ⇑
Technology
{{SetProp |IsinGameMenu=Learning |Has icon= |Caption= |Has fullview={{SUBPAGENAME}}.png |RequiresTech= |UnlocksTech= |arts= |cloak= |faith= |frontier= |hammer= |hunting= |law= |mines= |pots= |sparks= |stocks= |sugar= |thread= |natural= |perennial= }}{{Infobox}} ==About==
⇑ back to top ⇑⇑ back to top ⇑
Actions
{{SetProp |IsinGameMenu=menuname |Has icon= |Caption= |Has fullview={{SUBPAGENAME}}.png |RequiresTech= |RequiresObj= }}{{Infobox}} ==About== Acquired by Learning [[]]
⇑ back to top ⇑⇑ back to top ⇑
Examples
See the example(s) in the documentation of {{SetProp/single}}, this template just passes known multi-value properties with their values to it.
Or directly uses {{#set:propname=propvalue}}
for single-value properties.