Difference between revisions of "Template:GURPS Equipment List"
m (More testing, gotta see what the hell is going on here.) |
m (Used the altrow CSS class for simplification.) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
| value | | value | ||
|{{#switch: {{#expr: {{#var: number}} mod 8}} | |{{#switch: {{#expr: {{#var: number}} mod 8}} | ||
| − | | 4 = {{# | + | | 4 = {{#vardefine: status | {{#var: value|-}}}} |
| 5 = {{#vardefine: quantity | {{#var: value|0}}}} | | 5 = {{#vardefine: quantity | {{#var: value|0}}}} | ||
| − | | 6 = | + | | 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 | | + | | 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|-}} | + | | 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> | ||
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 | ∑ $ | ∑ W | Ref |
|---|---|---|---|---|---|---|---|
| Blaster Rifle NOTES! | E | 1 | 18,000 | 10 lb | 18,000 | 10 lb | B280 |
| Small Knife | - | 5 | 30 | 0.5 lb | 150 | 2.5 lb | B272 |