Difference between revisions of "Template:GURPS Equipment List"

From Bearscape Wiki
Jump to: navigation, search
(Added template for GURPS equipment.)
 
m (Made it so only equipped or carried equipment applies to the total equipment weight.)
Line 2: Line 2:
 
| value
 
| value
 
|{{#switch: {{#expr: {{#var: number}} mod 8}}
 
|{{#switch: {{#expr: {{#var: number}} mod 8}}
 +
  | 4 = {{#vardefine: status | {{#var: value|-}}}}
 
   | 5 = {{#vardefine: quantity | {{#var: value|0}}}}
 
   | 5 = {{#vardefine: quantity | {{#var: value|0}}}}
−
   | 6 = {{#vardefine: total_cost | {{#expr: {{#var: total_cost}} + {{#var: value|0}} * {{#var: quantity}}}}}}
+
   | 6 = {{#ifeq: {{#var: status}} | - | | {{#vardefine: total_cost | {{#expr: {{#var: total_cost}} + {{#var: value|0}} * {{#var: quantity}}}}}}}}
 
   | 7 = {{#vardefine: total_weight | {{#expr: {{#var: total_weight}} + {{#var: value|0}} * {{#var: quantity}}}}}}
 
   | 7 = {{#vardefine: total_weight | {{#expr: {{#var: total_weight}} + {{#var: value|0}} * {{#var: quantity}}}}}}
 
   }}
 
   }}
Line 31: Line 32:
 
Where [ITEMS] is in the following format:
 
Where [ITEMS] is in the following format:
 
<pre>|indent level|item name|optional notes|status|quantity|cost|weight|page reference</pre>
 
<pre>|indent level|item name|optional notes|status|quantity|cost|weight|page reference</pre>
−
Include for as many items as you want to list. If any value is left blank, you must still include the pipe character before the next value. Indent level may be left out and will default to 0. The optional notes will show up in gray if given.
+
Include for as many items as you want to list. Status must be one of either: E, C, or -. If any value is left blank, you must still include the pipe character before the next value. Indent level may be left out and will default to 0. The optional notes will show up in gray if given.
  
 
== Example ==
 
== Example ==

Revision as of 16:27, 16 January 2016

This template will list equipment for GURPS. It is meant for use with the GURPS Character Sheet template.

Usage

{{GURPS Equipment List
[ITEMS]
}}

Where [ITEMS] is in the following format:

|indent level|item name|optional notes|status|quantity|cost|weight|page reference

Include for as many items as you want to list. Status must be one of either: E, C, or -. If any value is left blank, you must still include the pipe character before the next value. Indent level may be left out and will default to 0. The optional notes will show up in gray if given.

Example

{{GURPS Equipment List
||Blaster Rifle|NOTES!|E|1|18000|10|B280
|1|Small Knife||E|5|30|0.5|B272
}}

renders as:

Equipment (12.5 lb; $18,150)√#$W∑ $∑ WRef
Blaster Rifle
NOTES!
E118,00010 lb18,00010 lbB280
Small KnifeE5300.5 lb1502.5 lbB272