Template:Ammo Infobox: Difference between revisions

From AoP Wiki
Unresolved issue
Added Width to Infobox
 
(9 intermediate revisions by the same user not shown)
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.
{{#for_external_table:|
Of course just using get_file_data as shown further down works as well.
{{{!}} class="wikitable" style="width:30%; float:right"
{{#get_web_data:
! colspan="1" {{!}} {{#if: {{{Name|}}} | [[{{{Name}}}]] |Ammo}}<br>Tier {{#if: {{{Tier}}} | {{{Tier}}} |Unknown}}
    source=http://localhost/foaop/planner/ammo.json
! colspan="1" align="center"{{!}}{{#if: {{{PicInv}}} | https://uralez.de/foaop/planner/{{{PicInv}}} |No Image}}
    |format=json
{{!}}-
    |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
{{!}} colspan="2" {{!}} {{#if: {{{Description|}}} | {{{Description}}} | No Description}}
    |filters=ProtoId=-1
{{!}}-
}}
{{!}} Damage Resistance Mod {{!}}{{!}} {{#if: {{{Ammo_DRMod|}}} | {{{Ammo_DRMod}}} | 0}}%
 
{{!}}-
 
{{!}} Damage Threshold Mod {{!}}{{!}} {{#if: {{{Ammo_DTMod|}}} | {{{Ammo_DTMod}}} | 0}}%
{{#get_file_data:
{{!}}- {{#if: {{{Ammo_Radius|}}}||style="display: none;"}}
    source=planner
{{!}} Radius {{!}}{{!}} {{{Ammo_Radius}}} Hex
    |file name=ammo.csv
{{!}}- {{#if: {{{Weapon_BleedStr|}}}||style="display: none;"}}
    |format=csv with header
{{!}} Bleed Strength {{!}}{{!}} {{{Weapon_BleedStr}}}%
    |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
{{!}}- {{#if: {{{Weapon_DmgType_0|}}}||style="display: none;"}}
    |filters=ProtoId={{{id|14017}}}
{{!}} '''{{#switch: {{{Weapon_DmgType_0}}}
}}
{| 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" align="center"|{{#if: {{#external_value:PicInv}} | https://uralez.de/foaop/planner/{{#external_value:PicInv}} |No Image}}
|-
| colspan="2" | {{#if: {{#external_value:Description|}} | {{#external_value:Description}} | No Description}}
|-
| Damage Type || {{#switch: {{#external_value:Weapon_DmgType_0}}
  | 0 = Uncalled
  | 0 = Uncalled
  | 1 = Normal
  | 1 = Normal
Line 33: Line 25:
  | 8 = Heal
  | 8 = Heal
  | #default = Error
  | #default = Error
}}
}}''' Damage {{!}}{{!}} {{{Weapon_DmgMin_0|}}} %
|-
{{!}}- {{#if: {{{Weapon_DmgType_1|}}}||style="display: none;"}}
| Damage Resistance Mod || {{#if: {{#external_value:Ammo_DRMod|}} | {{#external_value:Ammo_DRMod}} | 0}}%
{{!}} '''{{#switch: {{{Weapon_DmgType_1}}}
|-
| Damage Threshold Mod || {{#if: {{#external_value:Ammo_DTMod|}} | {{#external_value:Ammo_DTMod}} | 0}}%
|- {{#if: {{#external_value:Ammo_Radius|}}||style="display: none;"}}
| Radius || {{#external_value:Ammo_Radius}} Hex
|- {{#if: {{#external_value:Weapon_BleedStr|}}||style="display: none;"}}
| Bleed Strength || {{#external_value:Weapon_BleedStr}}%
|- {{#if: {{#external_value:Weapon_DmgType_0|}}||style="display: none;"}}
| {{#switch: {{#external_value:Weapon_DmgType_0}}
  | 0 = Uncalled
  | 0 = Uncalled
  | 1 = Normal
  | 1 = Normal
Line 54: Line 38:
  | 8 = Heal
  | 8 = Heal
  | #default = Error
  | #default = Error
}} Damage || {{#external_value:Weapon_DmgMin_0|}} %
}}''' Damage {{!}}{{!}} {{{Weapon_DmgMin_1|}}} %
|- {{#if: {{#external_value:Weapon_DmgType_1|}}||style="display: none;"}}
{{!}}- {{#if: {{{Ammo_SubShots|}}}||style="display: none;"}}
| {{#switch: {{#external_value:Weapon_DmgType_1}}
{{!}} Subshots {{!}}{{!}} {{{Ammo_SubShots}}}x
| 0 = Uncalled
{{!}}- {{#if: {{{Weapon_Spread_0|}}}||style="display: none;"}}
| 1 = Normal
{{!}} Ammo Spread {{!}}{{!}} {{{Weapon_Spread_0}}}
| 2 = Laser
{{!}}-
| 3 = Fire
{{!}} ID: {{!}}{{!}} {{#if: {{{ProtoId}}} | {{{ProtoId}}} | No ID}}
| 4 = Plasma
{{!}}-
| 5 = Electric
{{!}} Weight: {{!}}{{!}} {{#if: {{{Weight}}} | {{{Weight}}} | 0}}g
| 6 = EMP
{{!}}}|source=planner
| 7 = Explode
    |file name=ammo.json
| 8 = Heal
    |format = json with jsonpath
| #default = Error
    |data =
}} Damage || {{#external_value:Weapon_DmgMin_1|}} %
Name=$[?(@.ProtoId == {{{id|14017}}})].Name,
|- {{#if: {{#external_value:Ammo_SubShots|}}||style="display: none;"}}
Description=$[?(@.ProtoId == {{{id|14017}}})].Description,
| Subshots || {{#external_value:Ammo_SubShots}}x
ProtoId=$[?(@.ProtoId == {{{id|14017}}})].ProtoId,
|- {{#if: {{#external_value:Weapon_Spread_0|}}||style="display: none;"}}
Weight=$[?(@.ProtoId == {{{id|14017}}})].Weight,
| Ammo Spread || {{#external_value:Weapon_Spread_0}}
PicInv=$[?(@.ProtoId == {{{id|14017}}})].PicInv,
|-
Ammo_Caliber=$[?(@.ProtoId == {{{id|14017}}})].Ammo_Caliber,
| ID: || {{#if: {{#external_value:ProtoId}} | {{#external_value:ProtoId}} | No ID}}
Ammo_Caliber_EXT=$[?(@.ProtoId == {{{id|14017}}})].Ammo_Caliber_EXT,
|-
Ammo_DmgMult=$[?(@.ProtoId == {{{id|14017}}})].Ammo_DmgMult,
| Weight: || {{#if: {{#external_value:Weight}} | {{#external_value:Weight}} | 0}}g
Ammo_DmgDiv=$[?(@.ProtoId == {{{id|14017}}})].Ammo_DmgDiv,
|}
Tier=$[?(@.ProtoId == {{{id|14017}}})].Tier,
Poison=$[?(@.ProtoId == {{{id|14017}}})].Poison,
Ammo_AcMod=$[?(@.ProtoId == {{{id|14017}}})].Ammo_AcMod,
Ammo_DRMod=$[?(@.ProtoId == {{{id|14017}}})].Ammo_DRMod,
Ammo_DTMod=$[?(@.ProtoId == {{{id|14017}}})].Ammo_DTMod,
Ammo_SubShots=$[?(@.ProtoId == {{{id|14017}}})].Ammo_SubShots,
Weapon_DmgType_0=$[?(@.ProtoId == {{{id|14017}}})].Weapon_DmgType_0,
Weapon_DmgMin_0=$[?(@.ProtoId == {{{id|14017}}})].Weapon_DmgMin_0,
NoCrit=$[?(@.ProtoId == {{{id|14017}}})].NoCrit,
Weapon_DmgType_1=$[?(@.ProtoId == {{{id|14017}}})].Weapon_DmgType_1,
Weapon_DmgMin_1=$[?(@.ProtoId == {{{id|14017}}})].Weapon_DmgMin_1,
Weapon_BleedStr=$[?(@.ProtoId == {{{id|14017}}})].Weapon_BleedStr,
Ammo_Radius=$[?(@.ProtoId == {{{id|14017}}})].Ammo_Radius,
Special=$[?(@.ProtoId == {{{id|14017}}})].Special,
Fuse=$[?(@.ProtoId == {{{id|14017}}})].Fuse,
Weapon_Extra_0=$[?(@.ProtoId == {{{id|14017}}})].Weapon_Extra_0,
Weapon_Extra_1=$[?(@.ProtoId == {{{id|14017}}})].Weapon_Extra_1,
Weapon_Spread_0=$[?(@.ProtoId == {{{id|14017}}})].Weapon_Spread_0}}

Latest revision as of 18:31, 24 February 2025

Paper Cartridges
Tier 1
papercartridges.png
No Description
Damage Resistance Mod 20%
Damage Threshold Mod 0%
Radius {{{Ammo_Radius}}} Hex
Bleed Strength 150%
Normal Damage 250 %
Error Damage %
Subshots {{{Ammo_SubShots}}}x
Ammo Spread {{{Weapon_Spread_0}}}
ID: 14017
Weight: 35g