Template:Ammo Infobox: Difference between revisions

From AoP Wiki
Unresolved issue
Testing
Line 1: Line 1:
In case anyone reads this from the https://www.mediawiki.org/wiki/Extension_talk:External_Data - uralez.de is this exact machine so in order to read the web_data it will need to be provided with "localhost" instead (As otherwise the connection will be refused) - I just adjusted the link inside the topic so people understand the concept of the error.
{|
Of course just using get_file_data as shown further down works as well.
! Name !! ProtoId
{{#get_web_data:
{{#for_external_table:|
     source=http://localhost/foaop/planner/ammo.json
{{!}}-
     |format=json
{{!}} {{{$[?(@.ProtoId == {{{id}}})].Name|—}}} {{!}}{{!}} {{{$[?(@.ProtoId == {{{id}}})].ProtoId|—}}}
    |data=Name,ProtoId,Weight,PicInv,Ammo_Caliber,Ammo_Caliber_EXT,Ammo_DmgMult,Ammo_DmgDiv,Tier,Poison,Ammo_AcMod,Ammo_DRMod,Ammo_DTMod,Ammo_SubShots,Weapon_DmgType_0,Weapon_DmgMin_0,NoCrit,Weapon_DmgType_1,Weapon_DmgMin_1,Weapon_BleedStr,Ammo_Radius,Special,Fuse,Weapon_Extra_0,Weapon_Extra_1,Weapon_Spread_0
     |source = http://localhost/foaop/planner/ammo.json
    |filters=ProtoId=-1
     |format = json with jsonpath
}}
}}
|}


{{#get_file_data:
    source=planner
    |file name=ammo.csv
    |format=csv with header
    |data=Name,ProtoId,Weight,PicInv,Ammo_Caliber,Ammo_Caliber_EXT,Ammo_DmgMult,Ammo_DmgDiv,Tier,Poison,Ammo_AcMod,Ammo_DRMod,Ammo_DTMod,Ammo_SubShots,Weapon_DmgType_0,Weapon_DmgMin_0,NoCrit,Weapon_DmgType_1,Weapon_DmgMin_1,Weapon_BleedStr,Ammo_Radius,Special,Fuse,Weapon_Extra_0,Weapon_Extra_1,Weapon_Spread_0
    |filters=ProtoId={{{id|14017}}}
}}
{| class="wikitable" style="float:right"
{| class="wikitable" style="float:right"
! colspan="1" | {{#if: {{#external_value:Name|}} | [[{{#external_value:Name}}]] |Ammo}}<br>Tier {{#if: {{#external_value:Tier}} | {{#external_value:Tier}} |Unknown}}
! colspan="1" | {{#if: {{#external_value:Name|}} | [[{{#external_value:Name}}]] |Ammo}}<br>Tier {{#if: {{#external_value:Tier}} | {{#external_value:Tier}} |Unknown}}

Revision as of 09:49, 21 February 2025

Name ProtoId

Illegal JSONpath $[?(@.ProtoId == {{{id (Illegal JSONpath $1)

Ammo
Tier Error: no local variable "Tier" has been set.
https://uralez.de/foaop/planner/Error: no local variable "PicInv" has been set.
No Description
Damage Type Error
Damage Resistance Mod 0%
Damage Threshold Mod 0%
Radius Error: no local variable "Ammo_Radius" has been set. Hex
Bleed Strength Error: no local variable "Weapon_BleedStr" has been set.%
Error Damage %
Error Damage %
Subshots Error: no local variable "Ammo_SubShots" has been set.x
Ammo Spread Error: no local variable "Weapon_Spread_0" has been set.
ID: Error: no local variable "ProtoId" has been set.
Weight: Error: no local variable "Weight" has been set.g