Template:Weapon List Row: Difference between revisions
From AoP Wiki
Hiding row if no Tier |
Adjusted Weapon List Row to work with new .json system instead of .csv Tag: Reverted |
||
Line 1: | Line 1: | ||
{{!}}- {{#if: {{ | {{#get_file_data: | ||
{{!}} {{ | source=planner | ||
{{!}} {{#switch: {{ | |file name=weapons.json | ||
|format=json with jsonpath | |||
|data=Name=$[?(@.ProtoId == {{{ProtoId|18000}}})].Name,PicInv=$[?(@.ProtoId == {{{ProtoId|18000}}})].PicInv,Weapon_MinStrength=$[?(@.ProtoId == {{{ProtoId|18000}}})].Weapon_MinStrength,Tier=$[?(@.ProtoId == {{{ProtoId|18000}}})].Tier,Weapon_Skill_0=$[?(@.ProtoId == {{{ProtoId|18000}}})].Weapon_Skill_0,Weapon_DmgType_0=$[?(@.ProtoId == {{{ProtoId|18000}}})].Weapon_DmgType_0,Weapon_MaxDist_0=$[?(@.ProtoId == {{{ProtoId|18000}}})].Weapon_MaxDist_0,Weapon_MaxDist_1=$[?(@.ProtoId == {{{ProtoId|18000}}})].Weapon_MaxDist_1 | |||
}} | |||
{{!}}- {{#if: {{#external_value:Tier}} | | style="display: none;" }} | |||
{{!}} {{#external_value:Tier}} | |||
{{!}} {{#switch: {{#external_value:Weapon_Skill_0}} | |||
| 200 = Small Guns | | 200 = Small Guns | ||
| 201 = Big Guns | | 201 = Big Guns | ||
Line 9: | Line 16: | ||
| #default = Error | | #default = Error | ||
}} | }} | ||
{{!}} [[{{ | {{!}} [[{{#external_value:Name}}]] | ||
{{!}} https://uralez.de/foaop/planner/{{ | {{!}} https://uralez.de/foaop/planner/{{#external_value:PicInv}} | ||
{{!}} {{ | {{!}} {{#external_value:Weapon_MinStrength}} | ||
{{!}} {{#switch: {{ | {{!}} {{#switch: {{#external_value:Weapon_DmgType_0}} | ||
| 0 = Uncalled | | 0 = Uncalled | ||
| 1 = Normal | | 1 = Normal | ||
Line 24: | Line 31: | ||
| #default = Error | | #default = Error | ||
}} | }} | ||
{{!}} {{ | {{!}} {{#external_value:Weapon_MaxDist_0}} | ||
{{!}} {{ | {{!}} {{#external_value:Weapon_MaxDist_1|}} |
Revision as of 13:48, 21 February 2025
|-
| 1
| Small Guns
| Pepperbox
|
| 3
| Normal
| 20
|