Difference between revisions of "Template:GURPS Equipment List"

From Bearscape Wiki
Jump to: navigation, search
m (Change the example just to see if the last edit is actually working...)
m (Used the altrow CSS class for simplification.)
 
(4 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
   | 4 = {{#vardefine: 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 14: Line 14:
 
   {{#switch: {{#var: mod}}
 
   {{#switch: {{#var: mod}}
 
   | 1 = {{#vardefine: indent | {{#var: value|0}}}}
 
   | 1 = {{#vardefine: indent | {{#var: value|0}}}}
−
   | 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 | class="altrow"}}><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}}</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>
Line 37: Line 37:
 
<pre>{{GURPS Equipment List
 
<pre>{{GURPS Equipment List
 
||Blaster Rifle|NOTES!|E|1|18000|10|B280
 
||Blaster Rifle|NOTES!|E|1|18000|10|B280
−
|1|Small Knife||-|5|30|0.5|B272
+
|1|Small Knife|||5|30|0.5|B272
 
}}</pre>
 
}}</pre>
 
renders as:
 
renders as:
 
{{GURPS Equipment List
 
{{GURPS Equipment List
 
||Blaster Rifle|NOTES!|E|1|18000|10|B280
 
||Blaster Rifle|NOTES!|E|1|18000|10|B280
−
|1|Small Knife||-|5|30|0.5|B272
+
|1|Small Knife|||5|30|0.5|B272
 
}}
 
}}
 
</noinclude>
 
</noinclude>

Latest revision as of 23:48, 27 January 2016

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

Usage[edit]

{{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[edit]

{{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