Difference between revisions of "Template:GURPS Equipment List"

From Bearscape Wiki
Jump to: navigation, search
m (More testing, gotta see what the hell is going on here.)
m (Well, I'm dumb, cost != weight, duh.)
Line 2: Line 2:
 
| value
 
| value
 
|{{#switch: {{#expr: {{#var: number}} mod 8}}
 
|{{#switch: {{#expr: {{#var: number}} mod 8}}
−
   | 4 = {{#vardefineecho: status | {{#var: value|-}}}}
+
   | 4 = {{#vardefine: status | {{#var: value|-}}}}
 
   | 5 = {{#vardefine: quantity | {{#var: value|0}}}}
 
   | 5 = {{#vardefine: quantity | {{#var: value|0}}}}
−
   | 6 = {{#ifeq: {{#var: status}} | - | | {{#vardefine: total_cost | {{#expr: {{#var: total_cost}} + {{#var: value|0}} * {{#var: quantity}}}}}}}}
+
   | 6 = {{#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 = {{#ifeq: {{#var: status}} | - | | {{#vardefine: total_weight | {{#expr: {{#var: total_weight}} + {{#var: value|0}} * {{#var: quantity}}}}}}}}
 
   }}
 
   }}
 
}}<table class="wikitable gurps">
 
}}<table class="wikitable gurps">
Line 16: Line 16:
 
   | 2 = <tr {{#ifeq: {{#expr: {{#var: number}} mod 16}} | 10 | style="background-color: #e2f9e2"}}><td class="width100p">{{Indent|text={{#var: value}}|levels={{#var: indent}}}}
 
   | 2 = <tr {{#ifeq: {{#expr: {{#var: number}} mod 16}} | 10 | style="background-color: #e2f9e2"}}><td class="width100p">{{Indent|text={{#var: value}}|levels={{#var: indent}}}}
 
   | 3 = {{#if: {{#var: value|}} | <div class="gray">{{Indent|text={{#var: value}}|levels={{#var: indent}}}}</div>}}</td>
 
   | 3 = {{#if: {{#var: value|}} | <div class="gray">{{Indent|text={{#var: value}}|levels={{#var: indent}}}}</div>}}</td>
−
   | 4 = <td class="centeralign">{{#var: value|-}} ({{#len: {{#var: value|-}}}})</td>
+
   | 4 = <td class="centeralign">{{#var: value|-}}</td>
 
   | 5 = {{#vardefine: quantity | {{#var: value|0}}}}<td class="rightalign">{{#var: value|0}}</td>
 
   | 5 = {{#vardefine: quantity | {{#var: value|0}}}}<td class="rightalign">{{#var: value|0}}</td>
 
   | 6 = {{#vardefine: cost | {{#var: value|0}}}}<td class="rightalign">{{formatnum: {{#var: value|0}}}}</td>
 
   | 6 = {{#vardefine: cost | {{#var: value|0}}}}<td class="rightalign">{{formatnum: {{#var: value|0}}}}</td>

Revision as of 16:54, 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 left out, will default to -). 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|||5|30|0.5|B272
}}

renders as:

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