Difference between revisions of "Template:CommoditiesRatioTable/row"
Jump to navigation
Jump to search
m (The #trim, is actually not needed. Removed #trims. Fixed rows in last column having an extra blank space.) |
m (Base Version. Fixed line breaks. Remember: Use and abuse comments.) |
||
Line 1: | Line 1: | ||
<noinclude>'''{{c|+|WORKING: [INCOMPLETE]}}'''<br> | <noinclude>'''{{c|+|WORKING: [INCOMPLETE]}}'''<br></noinclude><includeonly><!-- | ||
<includeonly><! | |||
--- Define variables, goal is to only load each property from the Data page once. --- | --- Define variables, goal is to only load each property from the Data page once. --- | ||
--- Loads the parameters from the NPC specified in the first parameter --- | --- Loads the parameters from the NPC specified in the first parameter --- | ||
Line 6: | Line 5: | ||
-->{{#vardefine:NPC|{{{2}}}}}<!-- Defines NPC = second parameter | -->{{#vardefine:NPC|{{{2}}}}}<!-- Defines NPC = second parameter | ||
-->{{#vardefine:DataCategories|{{:CommoditiesRatio data|{{{1}}}}}}}<!-- Fetches data for the specified Location | -->{{#vardefine:DataCategories|{{:CommoditiesRatio data|{{{1}}}}}}}<!-- Fetches data for the specified Location | ||
-->{{#vardefine:NPCData|{{#explode:{{#var:DataCategories}}|{{{2}}}}}}}<!-- Fetches the data for the specified NPC | -->{{#vardefine:NPCData|{{#explode:{{#var:DataCategories}}|{{{2}}}}}}}<!-- Fetches the data (Ratios) for the specified NPC | ||
-->{{#vardefine:RatiosList|{{#explode:{{:CommoditiesRatio data|{{{1}}}|{{{2}}}}}}}}} | -->{{#vardefine:RatiosList|{{#explode:{{:CommoditiesRatio data|{{{1}}}|{{{2}}}}}}}}} | ||
|- | |- | ||
<!-- Display Location Block (Possible to gather Location in a single block?) --> | <!-- Display Location Block (Possible to gather Location in a single block?) --> | ||
Line 22: | Line 19: | ||
| '''{{#if:{{#explode:{{#var:RatiosList}}|;|4}}|{{#explode:{{#var:RatiosList}}|;|4}}|No data}}''' | | '''{{#if:{{#explode:{{#var:RatiosList}}|;|4}}|{{#explode:{{#var:RatiosList}}|;|4}}|No data}}''' | ||
| '''{{#if:{{#explode:{{#var:RatiosList}}|;|5}}|{{#explode:{{#var:RatiosList}}|;|5}}|No data}}''' | | '''{{#if:{{#explode:{{#var:RatiosList}}|;|5}}|{{#explode:{{#var:RatiosList}}|;|5}}|No data}}''' | ||
| '''{{#if:{{#explode:{{#var:RatiosList}}|;|6}}|{{#explode:{{#var:RatiosList}}|;|6}}|No data}}''' | | '''{{#if:{{#explode:{{#var:RatiosList}}|;|6}}|{{#explode:{{#var:RatiosList}}|;|6}}|No data}}'''<!-- | ||
--></includeonly><noinclude> | |||
{{doc|Template:NPCLootTable/row}} | {{doc|Template:NPCLootTable/row}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 00:13, 31 January 2025
WORKING: [INCOMPLETE]
Usage
{{CommoditiesRatioTable/head}}
*
{{CommoditiesRatioTable/row|Osbrook|Brukk}}
- head can use -> |town=Osbrook
Examples
Previous usage
Osbrook NPCs Ratios | ||||||||
---|---|---|---|---|---|---|---|---|
NPCs | Sacks of Grain | Crates of Charcoal | Sacks of Salt | Shipment of Timber | Barrel of Beer | Crates of Wine | Pails of Cider | |
Osbrook | ![]() Brukk |
No data | No data | 1.32 | No data | 1.21 | 1.26 | 1.21 |
Osbrook | ![]() Bert |
No data | 1.16 | 1.32 | 1.16 | No data | 1.21 | 1.21 |
Osbrook | ![]() Jurg |
No data | No data | No data | 1.26 | No data | No data | No data |
Osbrook | ![]() Jebar |
No data | 1.26 | No data | No data | No data | No data | No data |
New implementation
The new implementation used in Commodities, do not define 'town' and uses the <tabber> parser tag, in the page itself, instead of the template.
More information on the <tabber> parser tag, can be found in the Community Portal, under "Tabs".
NPCs | Sacks of Grain | Crates of Charcoal | Sacks of Salt | Shipment of Timber | Barrel of Beer | Crates of Wine | Pails of Cider | |
---|---|---|---|---|---|---|---|---|
Osbrook | ![]() Brukk |
No data | No data | 1.32 | No data | 1.21 | 1.26 | 1.21 |
Osbrook | ![]() Bert |
No data | 1.16 | 1.32 | 1.16 | No data | 1.21 | 1.21 |