WARFRAME Wiki
WARFRAME Wiki
WARFRAME Wiki
Official wiki
9,067
pages
Lotusiconsmall
This template is archived. The content was relevant to a previous formatting of WARFRAME Wiki. Please do not use or delete this template. It is being saved for later potential use.
Description
This template will make a link to the Avionic with a tooltip showing the avionic. It will only accept the exact name of the avionic.
Note: Some avionic articles have an "(Avionic)" suffix which shouldn't be included.
Uses Module:Avionics and its database
Tooltip is Template:Tooltip/Avionic
See also {{Avi/GetValue}}
Syntax
Type {{Avi|<Avionic>|<Custom Name>|<image=Image only?>|<size=(size?)px>|<icon=Icon type: none, icon>}} as a replacement for avionic link.
Input examples

{{Avi|Hyperstrike}}

{{Avi|Seeker Volley|Super Avionic}}

{{Avi|Seeker Volley|Super Avionic|image=qwe|size=30px}}

  • SeekerVolleyAvi

{{Avi||Hyperstrike}}

<span class="avionic-tooltip" data-param="Hyperstrike">Hyperstrike</span>

  • Hyperstrike
{{Avi|Hyperstrike}}
{{Avi|Hyperstrike|icon=none}}
{{Avi|Hyperstrike|icon=qwe}}
{{Avi|Hyperstrike|icon=icon}}

HouseVidar Hyperstrike Hyperstrike Avionics dark Hyperstrike HyperstrikeAvi Hyperstrike

{{Avi|The One Ring}} Incorrect avionic name gives an error.

  • {{Avionic}} "The One Ring" not found

You should always use the avionic's name without (Avionic) suffix.

Other Templates[]

{{#invoke:Avionics|AvionicTable|SortBy|Find|Image?}}


View Selected Type List

{{#invoke:Avionics|AvionicTable|Type|Integrated}}

Icon Name Description
AblativeShellAvi HouseLavan Ablative Shell Reduces Chem damage taken by Railjack
AnodeCellAvi HouseZetki Anode Cell Increases Railjack shield recharge rate
ArtilleryCheapShotAvi HouseZetki Artillery Cheap Shot Gives Forward Artillery a chance not to consume Dome Charges
BreachAdrenalineAvi HouseLavan Breach Adrenaline Increases Railjack shield recharge rate during a hull breach
BulkheadAvi HouseVidar Bulkhead Increases Railjack health
ConicNozzleAvi HouseZetki Conic Nozzle Increases Railjack base speed
CruisingSpeedAvi HouseZetki Cruising Speed Increases Railjack base speed when no enemies are nearby
DeepHoldAvi HouseLavan Deep Hold Increases Resource Forge maximum capacity
ForwardArtilleryAvi HouseZetki Forward Artillery Increases Forward Artillery damage
HardenedCasingAvi HouseLavan Hardened Casing Reduces the chance of a hull breach
HeatSinkAvi HouseLavan Heat Sink Reduces Incendiary damage taken by Railjack
HullWeaveAvi HouseVidar Hull Weave Increases Railjack armor
HyperfluxAvi HouseLavan Hyperflux Increases Railjack Flux Energy capacity
HyperstrikeAvi HouseVidar Hyperstrike Increases turret damage
IonBurnAvi HouseZetki Ion Burn Increases Railjack boost speed
LastStandAvi HouseZetki Last Stand Increases turret damage when Railjack health is low
MaximaAvi HouseZetki Maxima Increases Railjack shield
OrdnanceCheapShotAvi HouseLavan Ordnance Cheap Shot Gives Ordnance a chance not to consume Munitions when used
OrdnanceVelocityAvi HouseLavan Ordnance Velocity Increases Ordnance projectile speed
OverloaderAvi HouseLavan Overloader Increases maximum Munitions capacity
PhasicWeaveAvi HouseLavan Phasic Weave Reduces Ionic damage taken by Railjack
PolarCoilAvi HouseVidar Polar Coil Increases turret heat capacity
PredatorAvi HouseVidar Predator Increases turret critical chance
QuicklockAvi HouseLavan Quicklock Decreases Ordnance lock-on time
RevoReducerAvi HouseLavan Revo Reducer Reduces Revolite usage
RiploadAvi HouseLavan Ripload Decreases Ordnance reload time
SectionDensityAvi HouseVidar Section Density Increases turret critical damage
SentientFortitudeAvi HouseLavan Sentient Fortitude Reduces damage done to Railjack shields by Sentient enemies
SentientScalpelAvi HouseVidar Sentient Scalpel Increases turret damage against Sentient enemies
ThermaticAvi HouseLavan Thermatic Reduces Frost damage taken by Railjack
TurretVelocityAvi HouseVidar Turret Velocity Increases turret range and projectile speed
WarheadAvi HouseLavan Warhead Increases Ordnance damage
WingedCycloneAvi HouseZetki Winged Cyclone Increases nearby Archwings' speed
WingedForceAvi HouseZetki Winged Force Increases nearby Archwings' shields
WingedSteelAvi HouseZetki Winged Steel Increases nearby Archwings' armor
WingedStormAvi HouseZetki Winged Storm Increases nearby Archwings' damage
View Sorted Category List

{{#invoke:Avionics|AvionicTable|Type}}

Type Icon Name Description
Tactical
BattleForgeAvi Avionics dark Battle Forge Reduces Resource Forge cooldown time
BattleStationsAvi Avionics dark Battle Stations Temporarily boosts turret damage
BreachQuantaAvi Avionics dark Breach Quanta Temporarily stalls a hull breach
DeathBlossomAvi Avionics dark Death Blossom Temporarily prevents turrets from overheating
FireSuppressionAvi Avionics dark Fire Suppression Fixes a single fire hazard
FlowBurnAvi Avionics dark Flow Burn Temporarily increases Railjack speed and boost speed
FormUpAvi Avionics dark Form Up Recalls all teammates to the Railjack and heals them
IntruderStasisAvi Avionics dark Intruder Stasis Temporarily freezes all enemy boarding parties
SquadRenewAvi Avionics dark Squad Renew Heals all Railjack squad members
VoidCloakAvi Avionics dark Void Cloak Makes the Railjack invisible at the expense of engine speed
Integrated
AblativeShellAvi HouseLavan Ablative Shell Reduces Chem damage taken by Railjack
AnodeCellAvi HouseZetki Anode Cell Increases Railjack shield recharge rate
ArtilleryCheapShotAvi HouseZetki Artillery Cheap Shot Gives Forward Artillery a chance not to consume Dome Charges
BreachAdrenalineAvi HouseLavan Breach Adrenaline Increases Railjack shield recharge rate during a hull breach
BulkheadAvi HouseVidar Bulkhead Increases Railjack health
ConicNozzleAvi HouseZetki Conic Nozzle Increases Railjack base speed
CruisingSpeedAvi HouseZetki Cruising Speed Increases Railjack base speed when no enemies are nearby
DeepHoldAvi HouseLavan Deep Hold Increases Resource Forge maximum capacity
ForwardArtilleryAvi HouseZetki Forward Artillery Increases Forward Artillery damage
HardenedCasingAvi HouseLavan Hardened Casing Reduces the chance of a hull breach
HeatSinkAvi HouseLavan Heat Sink Reduces Incendiary damage taken by Railjack
HullWeaveAvi HouseVidar Hull Weave Increases Railjack armor
HyperfluxAvi HouseLavan Hyperflux Increases Railjack Flux Energy capacity
HyperstrikeAvi HouseVidar Hyperstrike Increases turret damage
IonBurnAvi HouseZetki Ion Burn Increases Railjack boost speed
LastStandAvi HouseZetki Last Stand Increases turret damage when Railjack health is low
MaximaAvi HouseZetki Maxima Increases Railjack shield
OrdnanceCheapShotAvi HouseLavan Ordnance Cheap Shot Gives Ordnance a chance not to consume Munitions when used
OrdnanceVelocityAvi HouseLavan Ordnance Velocity Increases Ordnance projectile speed
OverloaderAvi HouseLavan Overloader Increases maximum Munitions capacity
PhasicWeaveAvi HouseLavan Phasic Weave Reduces Ionic damage taken by Railjack
PolarCoilAvi HouseVidar Polar Coil Increases turret heat capacity
PredatorAvi HouseVidar Predator Increases turret critical chance
QuicklockAvi HouseLavan Quicklock Decreases Ordnance lock-on time
RevoReducerAvi HouseLavan Revo Reducer Reduces Revolite usage
RiploadAvi HouseLavan Ripload Decreases Ordnance reload time
SectionDensityAvi HouseVidar Section Density Increases turret critical damage
SentientFortitudeAvi HouseLavan Sentient Fortitude Reduces damage done to Railjack shields by Sentient enemies
SentientScalpelAvi HouseVidar Sentient Scalpel Increases turret damage against Sentient enemies
ThermaticAvi HouseLavan Thermatic Reduces Frost damage taken by Railjack
TurretVelocityAvi HouseVidar Turret Velocity Increases turret range and projectile speed
WarheadAvi HouseLavan Warhead Increases Ordnance damage
WingedCycloneAvi HouseZetki Winged Cyclone Increases nearby Archwings' speed
WingedForceAvi HouseZetki Winged Force Increases nearby Archwings' shields
WingedSteelAvi HouseZetki Winged Steel Increases nearby Archwings' armor
WingedStormAvi HouseZetki Winged Storm Increases nearby Archwings' damage
Battle
BlackoutPulseAvi Avionics dark Blackout Pulse Emit a pulse that disables and damages ships
CountermeasuresAvi Avionics dark Countermeasures Deploys flares to destract enemy projectiles
FieryPhoenixAvi Avionics dark Fiery Phoenix Enhances the Railjack, leaving a trail of damaging fire
MunitionsVortexAvi Avionics dark Munitions Vortex Deploys a bubble that absorbs damage and projectiles
ParticleRamAvi Avionics dark Particle Ram Creates a damaging shield-like projection
SeekerVolleyAvi Avionics dark Seeker Volley Deploys a volley of homing missiles
ShatterBurstAvi Avionics dark Shatter Burst Deploys an explosive area of effect
TetherAvi Avionics dark Tether Ensnares enemies, increasing vulnerability to Railjack weaponry
VoidHoleAvi Avionics dark Void Hole Creates a field that draws enemies to its center
View No Category List

{{#invoke:Avionics|AvionicTable}}

Icon Name Description
AblativeShellAvi HouseLavan Ablative Shell Reduces Chem damage taken by Railjack
AnodeCellAvi HouseZetki Anode Cell Increases Railjack shield recharge rate
ArtilleryCheapShotAvi HouseZetki Artillery Cheap Shot Gives Forward Artillery a chance not to consume Dome Charges
BattleForgeAvi Avionics dark Battle Forge Reduces Resource Forge cooldown time
BattleStationsAvi Avionics dark Battle Stations Temporarily boosts turret damage
BlackoutPulseAvi Avionics dark Blackout Pulse Emit a pulse that disables and damages ships
BreachAdrenalineAvi HouseLavan Breach Adrenaline Increases Railjack shield recharge rate during a hull breach
BreachQuantaAvi Avionics dark Breach Quanta Temporarily stalls a hull breach
BulkheadAvi HouseVidar Bulkhead Increases Railjack health
ConicNozzleAvi HouseZetki Conic Nozzle Increases Railjack base speed
CountermeasuresAvi Avionics dark Countermeasures Deploys flares to destract enemy projectiles
CruisingSpeedAvi HouseZetki Cruising Speed Increases Railjack base speed when no enemies are nearby
DeathBlossomAvi Avionics dark Death Blossom Temporarily prevents turrets from overheating
DeepHoldAvi HouseLavan Deep Hold Increases Resource Forge maximum capacity
FieryPhoenixAvi Avionics dark Fiery Phoenix Enhances the Railjack, leaving a trail of damaging fire
FireSuppressionAvi Avionics dark Fire Suppression Fixes a single fire hazard
FlowBurnAvi Avionics dark Flow Burn Temporarily increases Railjack speed and boost speed
FormUpAvi Avionics dark Form Up Recalls all teammates to the Railjack and heals them
ForwardArtilleryAvi HouseZetki Forward Artillery Increases Forward Artillery damage
HardenedCasingAvi HouseLavan Hardened Casing Reduces the chance of a hull breach
HeatSinkAvi HouseLavan Heat Sink Reduces Incendiary damage taken by Railjack
HullWeaveAvi HouseVidar Hull Weave Increases Railjack armor
HyperfluxAvi HouseLavan Hyperflux Increases Railjack Flux Energy capacity
HyperstrikeAvi HouseVidar Hyperstrike Increases turret damage
IntruderStasisAvi Avionics dark Intruder Stasis Temporarily freezes all enemy boarding parties
IonBurnAvi HouseZetki Ion Burn Increases Railjack boost speed
LastStandAvi HouseZetki Last Stand Increases turret damage when Railjack health is low
MaximaAvi HouseZetki Maxima Increases Railjack shield
MunitionsVortexAvi Avionics dark Munitions Vortex Deploys a bubble that absorbs damage and projectiles
OrdnanceCheapShotAvi HouseLavan Ordnance Cheap Shot Gives Ordnance a chance not to consume Munitions when used
OrdnanceVelocityAvi HouseLavan Ordnance Velocity Increases Ordnance projectile speed
OverloaderAvi HouseLavan Overloader Increases maximum Munitions capacity
ParticleRamAvi Avionics dark Particle Ram Creates a damaging shield-like projection
PhasicWeaveAvi HouseLavan Phasic Weave Reduces Ionic damage taken by Railjack
PolarCoilAvi HouseVidar Polar Coil Increases turret heat capacity
PredatorAvi HouseVidar Predator Increases turret critical chance
QuicklockAvi HouseLavan Quicklock Decreases Ordnance lock-on time
RevoReducerAvi HouseLavan Revo Reducer Reduces Revolite usage
RiploadAvi HouseLavan Ripload Decreases Ordnance reload time
SectionDensityAvi HouseVidar Section Density Increases turret critical damage
SeekerVolleyAvi Avionics dark Seeker Volley Deploys a volley of homing missiles
SentientFortitudeAvi HouseLavan Sentient Fortitude Reduces damage done to Railjack shields by Sentient enemies
SentientScalpelAvi HouseVidar Sentient Scalpel Increases turret damage against Sentient enemies
ShatterBurstAvi Avionics dark Shatter Burst Deploys an explosive area of effect
SquadRenewAvi Avionics dark Squad Renew Heals all Railjack squad members
TetherAvi Avionics dark Tether Ensnares enemies, increasing vulnerability to Railjack weaponry
ThermaticAvi HouseLavan Thermatic Reduces Frost damage taken by Railjack
TurretVelocityAvi HouseVidar Turret Velocity Increases turret range and projectile speed
VoidCloakAvi Avionics dark Void Cloak Makes the Railjack invisible at the expense of engine speed
VoidHoleAvi Avionics dark Void Hole Creates a field that draws enemies to its center
WarheadAvi HouseLavan Warhead Increases Ordnance damage
WingedCycloneAvi HouseZetki Winged Cyclone Increases nearby Archwings' speed
WingedForceAvi HouseZetki Winged Force Increases nearby Archwings' shields
WingedSteelAvi HouseZetki Winged Steel Increases nearby Archwings' armor
WingedStormAvi HouseZetki Winged Storm Increases nearby Archwings' damage
View Selected Type, with Images List
{{#invoke:Avionics|AvionicTable|Type|Integrated|img}}
AblativeShellAviAnodeCellAviArtilleryCheapShotAviBreachAdrenalineAviBulkheadAviConicNozzleAviCruisingSpeedAviDeepHoldAviForwardArtilleryAviHardenedCasingAviHeatSinkAviHullWeaveAviHyperfluxAviHyperstrikeAviIonBurnAviLastStandAviMaximaAviOrdnanceCheapShotAviOrdnanceVelocityAviOverloaderAviPhasicWeaveAviPolarCoilAviPredatorAviQuicklockAviRevoReducerAviRiploadAviSectionDensityAviSentientFortitudeAviSentientScalpelAviThermaticAviTurretVelocityAviWarheadAviWingedCycloneAviWingedForceAviWingedSteelAviWingedStormAvi
View Sorted Category, with Images List
{{#invoke:Avionics|AvionicTable|Type||img}}
House Avionic
HouseZetki

AnodeCellAvi ArtilleryCheapShotAvi ConicNozzleAvi CruisingSpeedAvi ForwardArtilleryAvi IonBurnAvi LastStandAvi MaximaAvi WingedCycloneAvi WingedForceAvi WingedSteelAvi WingedStormAvi

HouseLavan

AblativeShellAvi BreachAdrenalineAvi DeepHoldAvi HardenedCasingAvi HeatSinkAvi HyperfluxAvi OrdnanceCheapShotAvi OrdnanceVelocityAvi OverloaderAvi PhasicWeaveAvi QuicklockAvi RevoReducerAvi RiploadAvi SentientFortitudeAvi ThermaticAvi WarheadAvi

HouseVidar

BulkheadAvi HullWeaveAvi HyperstrikeAvi PolarCoilAvi PredatorAvi SectionDensityAvi SentientScalpelAvi TurretVelocityAvi

Avionics dark

BattleForgeAvi BattleStationsAvi BlackoutPulseAvi BreachQuantaAvi CountermeasuresAvi DeathBlossomAvi FieryPhoenixAvi FireSuppressionAvi FlowBurnAvi FormUpAvi IntruderStasisAvi MunitionsVortexAvi ParticleRamAvi SeekerVolleyAvi ShatterBurstAvi SquadRenewAvi TetherAvi VoidCloakAvi VoidHoleAvi

View No Category, with Images List
{{#invoke:Avionics|AvionicTable|||img}}
AblativeShellAviAnodeCellAviArtilleryCheapShotAviBattleForgeAviBattleStationsAviBlackoutPulseAviBreachAdrenalineAviBreachQuantaAviBulkheadAviConicNozzleAviCountermeasuresAviCruisingSpeedAviDeathBlossomAviDeepHoldAviFieryPhoenixAviFireSuppressionAviFlowBurnAviFormUpAviForwardArtilleryAviHardenedCasingAviHeatSinkAviHullWeaveAviHyperfluxAviHyperstrikeAviIntruderStasisAviIonBurnAviLastStandAviMaximaAviMunitionsVortexAviOrdnanceCheapShotAviOrdnanceVelocityAviOverloaderAviParticleRamAviPhasicWeaveAviPolarCoilAviPredatorAviQuicklockAviRevoReducerAviRiploadAviSectionDensityAviSeekerVolleyAviSentientFortitudeAviSentientScalpelAviShatterBurstAviSquadRenewAviTetherAviThermaticAviTurretVelocityAviVoidCloakAviVoidHoleAviWarheadAviWingedCycloneAviWingedForceAviWingedSteelAviWingedStormAvi


Technical stuff

Database

Codebase

Copied:

Mostly the same as in the text below, but now the work is done by Module:Mods.
Old notes below:
The template checks if first argument matches the name of the mod in Module:Mods/data. This is to check if a mod with that name actually exists. Another possibility would've been to check if an article with that name exists but it's limited to 250 calls per article and is not ideal as it would break on Mods 2.0.

  • If the mod exists, class="mod-tooltip" data-param="{{#var:Name}}" tells javascript that this text wants a tooltip, which is made by {{Tooltip/Mod}}.
  • If the mod doesn't exist, the error is shown instead of a redlink along with Category:Mod Tooltip error added on that page.

If second argument is used -> Category:Mod Tooltip rename is added on the page as to list pages with second argument, as they are harder to edit automatically if there's a need for that. Note: commented out until needed


local AvionicData = mw.loadData([[Module:Avionics/data]])
local Table = require([[Module:Table]])
local String = require([[Module:String]])
--local Icon = require([[Module:Icon]])
--local Version = require([[Module:Version]])

local function getAvionic(name)
    local data = AvionicData.Avionics
    
    local _av = data[name] or data[String.titleCase(name)]
    if _av ~= nil then return _av end
    
    for avionicName, Avionic in pairs(data) do
        if Avionic.Link == name then return Avionic end
    end--if page address is named
end

--local function Introduction(Update) return Version.getVersionLink({args={Update}}) end

p = {

Value = function(frame)
    local AvionicName, ValName = frame.args[1], frame.args[2]
    
    if not AvionicName then error("No avionic specified") end
    local Avionic = getAvionic(AvionicName)
    if not Avionic then error("No such avionic '"..AvionicName.."' found") end
    
    if(Avionic == nil or type(Avionic) ~= 'table') then
        error("No avionic")
    elseif(ValName == nil or ValName == '') then
        error("No value specified")
    end--nilcheck
    
    ValName = String.titleCase(ValName)
    return Avionic[({--dictionary:
        ['Trade Tax']='Tradetax',
        ['House Icon']='Houseicon',
        --['Description']='Desc',
        ['Update']='Intro',
        ['Introduction']='Intro',
    })[ValName] or ValName]
end,

AvionicTable = function(frame)
    local Parameter,searchParameter,imgOnly = frame.args[1],frame.args[2],frame.args[3]
    --    Var       Val             Image Only
    --Without Val, display all avionics, sorted by var
    
    if Parameter == '' then Parameter = nil end
    if searchParameter == '' then searchParameter = nil end
    if imgOnly == nil or imgOnly == '' then imgOnly = false end
    
    local buildTable = {'{| border="1" cellpadding="1" cellspacing="1" class="article-table"\n', insert=table.insert,--[[ consert=function(self,tab)self:insert(table.concat(tab))end ]]}
    local tablePart, indexes = {House={None=''}},{}
    
    -- for k, v in pairs {'|', (imgOnly and '' or '-\n!'),
    --     (searchParameter or not Parameter
    --         and (imgOnly and '' or Parameter..' !!')
    --         or table.concat {'-\n!', Parameter, ' !!', ' Avionic\n'} ),
    -- (imgOnly and ' Icon !! Name !! Description\n|-' or '' )} do buildTable:insert(v) end
    -- --header
    if not imgOnly then 
        if searchParameter or not Parameter then
            buildTable:insert('|-\n! Icon !! Name !! Description\n')
        else
            buildTable:insert('|-\n!'..Parameter..' !! Icon !! Name !! Description\n|-')
        end
    else 
        if searchParameter or not Parameter then 
            buildTable:insert('|')
        else
            buildTable:insert('|-\n!'..Parameter..' !! Avionic\n')
        end
    end--header
    
    --local isFirst = true
    for Name, Avionic in Table.skpairs(AvionicData["Avionics"]) do
        
        local avpart
        if imgOnly then
            avpart =
            p.tooltipImage({ args = {Avionic.Name or Name,'135px'} })
        else
            avpart =
            '| ' .. p.tooltipImage({ args = {Avionic.Name or Name,'40px'} }) ..'\n'..
            '| ' .. p.tooltipText({ args={Avionic.Name or Name} }) ..'\n'..
            '| ' .. Avionic.Desc ..'\n'
        end--make part
        
        if searchParameter then
            --one param
            if Avionic[String.titleCase(Parameter)] == searchParameter then
                if not imgOnly then
                    buildTable:insert '|-\n'
                end
                buildTable:insert(avpart)
            end
        elseif not Parameter then
            if not imgOnly then
                buildTable:insert '|-\n'
            end
            buildTable:insert(avpart)
        else
            --multiple params
            local param = Avionic[String.titleCase(Parameter)]
            if param then
                if not tablePart[Parameter] then tablePart[Parameter]={} end
                if imgOnly then
                    tablePart[Parameter][param] = (tablePart[Parameter][param] or '') .. avpart .. '\n'
                else
                    tablePart[Parameter][param] = (tablePart[Parameter][param] or '') .. '|-\n' .. avpart
                end
                if not indexes[Parameter] then indexes[Parameter]={} end
                indexes[Parameter][param] = (indexes[Parameter][param] or 0) + 1
            end
        end--join part
        
        --if isFirst then isFirst = false end
    end
    if searchParameter or not Parameter then 
        if imgOnly then
            buildTable:insert '\n'
        end
    else
        for key, _part in pairs(tablePart[Parameter]) do
            if imgOnly then
                buildTable:insert('|-\n! '..
                (
                    Parameter=='House' and 
                        (
                            '[[File:'..(key=='None' and 'Avionics_dark' or 'House'..key)
                            --..({Sigma='HouseSigma.png', Lavan='HouseLavan.png', Vidar='HouseVidar.png', Zetki='HouseZetki.png', None='Avionics_dark.png'})[key]
                            ..'.png|60px|link=House '..key..']]'
                        )
                        or key
                )
                ..'\n|\n')
                buildTable:insert(_part)
            else
                buildTable:insert(table.concat{'\n|-\n! rowspan = ',(indexes[Parameter][key]+1),' |',key,'\n',_part})
            end
        end
    end
    buildTable:insert "|}"
    return table.concat(buildTable)
end,

tooltipText = function(frame)
    local Name = frame.args ~= nil and frame.args[1] or nil
    if Name == nil then
        --error('No avionic name')
        return '<span style="color:red;">{{[[Template:Avi]]}}</span> Insert an avionic name.['..'[Category:Avionic Tooltip error]]'
    end
    
    local Avionic = getAvionic(Name)
    if Avionic == nil then
        --error(Name..' not found')
        return '<span style="color:red;">{{[[Template:Avi|Avionic]]}}</span> "'..Name..'" not found['..'[Category:Avionic Tooltip error]]'
    end
    
    local newName = frame.args ~= nil and frame.args[2]
    if newName == '' then newName = nil end
    
    local Link = Avionic.Link
    local linkText = ''
    if Link == nil then
        Link = Name
    end
    
    local showIcon = ((frame.args[3] ~= '') and frame.args[3]) or nil
    
    local dataname
    if newName ~= nil then
        linkText = Link..'|'..newName
        dataname = newName
    else
        if Name == Link then
            linkText = Link
        else
            linkText = Link..'|'..Name
        end
        dataname = ''
    end--link
    
    local tAvionic ={}
    table.insert(tAvionic,'<span class="avionic-tooltip" data-param="'..Name..'" data-name="'..dataname..'">')
    --20px thumb, 200px hover
    
    if Avionic.House ~= nil then
        if showIcon == nil then
            table.insert(tAvionic,'[[File:'..Avionic.Houseicon..'|20px|link='..Avionic.Link..']]&nbsp;')
        elseif showIcon == "none" then
            --table.insert(tAvionic, '')
        elseif showIcon == "icon" then
            table.insert(tAvionic, '[[File:'..Avionic.Image..'|20px|link='..Avionic.Link..']]&nbsp;')
        else
            table.insert(tAvionic, '[[File:Avionics_dark.png|20px|link='..Avionic.Link..']]&nbsp;')
        end
    else
        table.insert(tAvionic, '[[File:Avionics_dark.png|20px|link='..Avionic.Link..']]&nbsp;')
    end
    
    table.insert(tAvionic,'[['..linkText..']]</span>')--link
    
    return table.concat(tAvionic)
end,
tooltipImage = function(frame)
    local Name = frame.args ~= nil and frame.args[1]
    if Name == nil then
        return '<span style="color:red;">{{[[Template:Avi]]}}</span> Insert an avionic name. [[Category:'..'Avionic Tooltip error]]'
    end
    local Avionic = getAvionic(Name)
    local size = frame.args[2]
    if size == nil then size = '130px' end
    
    
    if Avionic == nil then
        return '<span style="color:red;">{{[[Template:Avi|Avionic]]}}</span> "'..Name..'" not found [[Category:'..'Avionic Tooltip error]]'
    end
    
    local tAvionic ={}
    table.insert(tAvionic,'<span class="avionic-tooltip" data-param="'..Name..'" data-name="imageonly">')--hover
    
    -- if Avionic.House ~= nil then
    --         table.insert(tAvionic,'[[File:House'..Avionic['House']..'.png|20px|link='..Avionic['LINK']..']]&nbsp;')
    -- else
    --     table.insert(tAvionic, '[[File:Avionics_dark.png|20px|link='..Avionic['LINK']..']]&nbsp;')
    -- end--20px thumb
    
    table.insert(tAvionic,'[[file:'..Avionic.Image..'|'..size..'|link='..Avionic.Link..']]</span>')--text, end hover
    
    return table.concat(tAvionic)
end,

tooltip = function(frame)
    local AvionicName = frame.args ~= nil and frame.args[1] or nil
    local renamed = frame.args ~= nil and frame.args[2] or nil
    if renamed == '' then renamed = nil end
    
    local Avionic = getAvionic(AvionicName, "Name");
    if Avionic == nil then
        --error("no avionic "..AvionicName.."")
        return "Something went wrong with Module:Avionics (p.tooltip: no avionic "..AvionicName..")"
    end
    
    
    return '{| class="Tooltip"\n|-\n| style="padding:0px;"|\n{| class="Sub"\n|-\n| class="Image"| ['..'[File:'..Avionic.Image..'|180px]]\n|-\n| class="Spacer"|'--Main image
    
    ..(renamed and ('\n|-\n! class="Title"|'..AvionicName..'\n|-\n| class="Spacer"|') or '')--Name
    
    ..'\n|-\n| style="background-color: #0D1B1C; color: #eeeeee; padding: 10px; font-size:13px; line-height: 16px;"|<span style="font-weight: bold;font-size: 14px;">'
    ..(renamed == 'imageonly' and Avionic.House..' ' or '')--House
    ..Avionic.Rarity..'</span><br />'
    ..(Avionic.Description ~= "''No description''" and Avionic.Description or Avionic.Desc)
    ..'\n|}\n|-\n|}'
end,

}

return p