Author Topic: [Mod] Detailed Turret Tooltips  (Read 71168 times)

lyravega

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    85
    • View Profile
    • Steam
on: December 11, 2017, 12:06:54 PM
*snip*

I remember that I was trying to access the ship power generation and battery size, but I didn't find a way to dig further either. There is a chance that some stuff might not be exposed to the modders. I didn't dig it that much though, there can be a way but I wasn't able to find it.
Detailed Turret Tooltips - mod for all your turret info needs
Compass-like Gate Pixel Icons - unnecessary quality of life improvement

Poke me on Steam for updates



Solid

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
on: December 23, 2017, 12:55:49 AM
Forgive my newb question but where is the link to the latest download for beta branch?

Never mind...... had to register and login in I guess.....



Seik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
on: December 23, 2017, 02:02:02 PM
Forgive my newb question but where is the link to the latest download for beta branch?

Never mind...... had to register and login in I guess.....
Yapp.  ;)



Zaflis

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    15
    • View Profile
on: January 06, 2018, 10:49:44 PM
I'm getting a bunch of these in the clientlog:

Code: [Select]
2018-01-06 20-30-30| could not execute function 'FighterMerchant.renderUI' in '"data/scripts/entity/merchants/fightermerchant.lua"':
2018-01-06 20-30-30| data/scripts/lib/tooltipmaker.lua:29: attempt to index local 'wpn' (a nil value)
2018-01-06 20-30-30| stack traceback:
2018-01-06 20-30-30| data/scripts/lib/tooltipmaker.lua:29: in function 'fillWeaponTooltipData'
2018-01-06 20-30-30| data/scripts/lib/tooltipmaker.lua:651: in function 'makeFighterTooltip'
2018-01-06 20-30-30| data/scripts/lib/sellablefighter.lua:37: in function 'getTooltip'
2018-01-06 20-30-30| data/scripts/lib/shop.lua:844: in function <data/scripts/lib/shop.lua:829>
2018-01-06 20-30-30| (...tail calls...)

Everything seems to be working, but i don't really know. Just saw them accidentally. I added the mod just less than week ago.



Pasukaru

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
on: January 09, 2018, 01:10:58 AM
Awesome mod!
Would it also be possible to add the sorting by eDPS/Hull eDPS/Shield eDPS?



lyravega

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    85
    • View Profile
    • Steam
on: January 14, 2018, 02:36:48 PM
I'm getting a bunch of these in the clientlog:

Code: [Select]
2018-01-06 20-30-30| could not execute function 'FighterMerchant.renderUI' in '"data/scripts/entity/merchants/fightermerchant.lua"':
2018-01-06 20-30-30| data/scripts/lib/tooltipmaker.lua:29: attempt to index local 'wpn' (a nil value)
2018-01-06 20-30-30| stack traceback:
2018-01-06 20-30-30| data/scripts/lib/tooltipmaker.lua:29: in function 'fillWeaponTooltipData'
2018-01-06 20-30-30| data/scripts/lib/tooltipmaker.lua:651: in function 'makeFighterTooltip'
2018-01-06 20-30-30| data/scripts/lib/sellablefighter.lua:37: in function 'getTooltip'
2018-01-06 20-30-30| data/scripts/lib/shop.lua:844: in function <data/scripts/lib/shop.lua:829>
2018-01-06 20-30-30| (...tail calls...)

Everything seems to be working, but i don't really know. Just saw them accidentally. I added the mod just less than week ago.

Seems like a fighter had no weapons on it. I'll fix it soon.
Detailed Turret Tooltips - mod for all your turret info needs
Compass-like Gate Pixel Icons - unnecessary quality of life improvement

Poke me on Steam for updates



Ulrich_Rüstungjäger

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    119
    • View Profile
on: January 14, 2018, 03:45:18 PM
Yea, it's only the merchant fighters/cargo fighters or whatever they are called. I was meaning to report that but it slipped my mind :P



gorodoff

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    4
    • View Profile
on: January 14, 2018, 07:04:11 PM
Very nice mod I gave it a try yesterday and will keep it
There is just a little bug that prevent to view the tooltip for the new cargo "fighter" that has no turret
The mod detects it and the tooltip just show a invalidity warning so we loose the non turret related information (speed size ...)



gorodoff

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    4
    • View Profile
on: January 14, 2018, 08:06:02 PM
cargo problem solved in last version thks



lyravega

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    85
    • View Profile
    • Steam
on: January 18, 2018, 05:13:52 PM
Awesome mod!
Would it also be possible to add the sorting by eDPS/Hull eDPS/Shield eDPS?

Unfortunately that is not possible due to several reasons.
Detailed Turret Tooltips - mod for all your turret info needs
Compass-like Gate Pixel Icons - unnecessary quality of life improvement

Poke me on Steam for updates



Zaflis

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    15
    • View Profile
on: March 29, 2018, 12:39:34 AM
I guess this mod would need a complete rewrite now that update added dps in tooltips. What devs didn't add though is "dps per slot". Even if you find an awesome turret with 3000 dps with 4 slots, it is worse than 2 turrets of 2000 dps and 2 slots each.



voltoth

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    5
    • View Profile
on: April 21, 2018, 04:26:54 PM
Love the mod however, any chance of adding stats for torpedoes? I know this is a beta feature but still, would be nice to know what I'm dealing with when using torpedoes.



Mattoropael

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    15
    • View Profile
on: April 23, 2018, 09:10:41 AM
I guess this mod would need a complete rewrite now that update added dps in tooltips. What devs didn't add though is "dps per slot". Even if you find an awesome turret with 3000 dps with 4 slots, it is worse than 2 turrets of 2000 dps and 2 slots each.

The official turret tooltip is still not offering separate shield/hull DPS for weapons with shield/hull bonuses, or effective DPS for overheating weapons either.



maxfire

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    10
    • View Profile
on: April 23, 2018, 02:07:23 PM
The official turret tooltip is still not offering separate shield/hull DPS for weapons with shield/hull bonuses, or effective DPS for overheating weapons either.
As far as I know, official tooltip calculates eDPS. Still not usefull enough w/o eDPS per slot.



Raio_Verusia

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
on: April 26, 2018, 04:55:01 AM
This is for anyone missing their torpedo tooltips.

Edit: You just throw this into the tooltipmaker.lua, at the very bottom.

Code: [Select]
function makeTorpedoTooltip(torpedo)
    -- create tool tip
    local tooltip = Tooltip()
    tooltip.icon = torpedo.icon

    -- title
    local title

    local line = TooltipLine(25, 15)
    line.ctext = torpedo.name
    line.ccolor = torpedo.rarity.color
    tooltip:addLine(line)

    -- primary stats, one by one
    local fontSize = 14
    local lineHeight = 20

    -- rarity name
    local line = TooltipLine(5, 12)
    line.ctext = tostring(torpedo.rarity)
    line.ccolor = torpedo.rarity.color
    tooltip:addLine(line)

    -- primary stats, one by one
    local fontSize = 14
    local lineHeight = 20

    local line = TooltipLine(lineHeight, fontSize)
    line.ltext = "Tech"%_t
    line.rtext = torpedo.tech
    line.icon = "data/textures/icons/circuitry.png";
    line.iconColor = iconColor
    tooltip:addLine(line)

    -- empty line
    tooltip:addLine(TooltipLine(15, 15))

    if torpedo.hullDamage > 0 and torpedo.damageVelocityFactor == 0 then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Damage"%_t
        line.rtext = toReadableValue(round(torpedo.hullDamage), "")
        line.icon = "data/textures/icons/screen-impact.png";
        line.iconColor = iconColor
        tooltip:addLine(line)
    elseif torpedo.damageVelocityFactor > 0 then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Hull Damage"%_t
        line.rtext = "up to ${damage}"%_t % {damage = toReadableValue(round(torpedo.maxVelocity * torpedo.damageVelocityFactor), "")}
        line.icon = "data/textures/icons/screen-impact.png";
        line.iconColor = iconColor
        tooltip:addLine(line)
    end

    if torpedo.shieldDamage > 0 and torpedo.shieldDamage ~= torpedo.hullDamage then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Shield Damage"%_t
        line.rtext = toReadableValue(round(torpedo.shieldDamage), "")
        line.icon = "data/textures/icons/screen-impact.png";
        line.iconColor = iconColor
        tooltip:addLine(line)
    end

    -- empty line
    tooltip:addLine(TooltipLine(15, 15))

    -- maneuverability
    local line = TooltipLine(lineHeight, fontSize)
    line.ltext = "Maneuverability"%_t
    line.rtext = round(torpedo.turningSpeed, 2)
    line.icon = "data/textures/icons/dodge.png";
    line.iconColor = iconColor
    tooltip:addLine(line)

    local line = TooltipLine(lineHeight, fontSize)
    line.ltext = "Speed"%_t
    line.rtext = round(torpedo.maxVelocity * 10.0)
    line.icon = "data/textures/icons/afterburn.png";
    line.iconColor = iconColor
    tooltip:addLine(line)

    if torpedo.acceleration > 0 then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Acceleration"%_t
        line.rtext = round(torpedo.acceleration * 10.0)
        line.icon = "data/textures/icons/blaster.png";
        line.iconColor = iconColor
        tooltip:addLine(line)
    end

    local line = TooltipLine(lineHeight, fontSize)
    line.ltext = "Range"%_t
    line.rtext = "${range} km" % {range = round(torpedo.reach * 10 / 1000, 2)}
    line.icon = "data/textures/icons/target-shot.png";
    line.iconColor = iconColor
    tooltip:addLine(line)

    if torpedo.storageEnergyDrain > 0 then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Storage Energy"%_t
        line.rtext = toReadableValue(round(torpedo.storageEnergyDrain), "W")
        line.icon = "data/textures/icons/electric.png";
        line.iconColor = iconColor
        tooltip:addLine(line)
    end

    -- empty line
    tooltip:addLine(TooltipLine(15, 15))

    -- size
    local line = TooltipLine(lineHeight, fontSize)
    line.ltext = "Size"%_t
    line.rtext = round(torpedo.size, 1)
    line.icon = "data/textures/icons/missile-pod.png";
    line.iconColor = iconColor
    tooltip:addLine(line)

    -- durability
    local line = TooltipLine(lineHeight, fontSize)
    line.ltext = "Durability"%_t
    line.rtext = round(torpedo.durability)
    line.icon = "data/textures/icons/health-normal.png";
    line.iconColor = iconColor
    tooltip:addLine(line)

    -- empty line
    tooltip:addLine(TooltipLine(15, 15))
    tooltip:addLine(TooltipLine(15, 15))

    -- specialties
    local extraLines = 0

    if torpedo.damageVelocityFactor > 0 then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Damage Dependent on Velocity"%_t
        tooltip:addLine(line)

        extraLines = extraLines + 1
    end

    if torpedo.shieldDeactivation then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Briefly Deactivates Shields"%_t
        tooltip:addLine(line)

        extraLines = extraLines + 1
    end

    if torpedo.energyDrain then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Drains Target's Energy"%_t
        tooltip:addLine(line)

        extraLines = extraLines + 1
    end

    if torpedo.shieldPenetration then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Penetrates Shields"%_t
        tooltip:addLine(line)

        extraLines = extraLines + 1
    end

    if torpedo.shieldAndHullDamage then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Damages Both Shield and Hull"%_t
        tooltip:addLine(line)

        extraLines = extraLines + 1
    end

    if torpedo.storageEnergyDrain > 0 then
        local line = TooltipLine(lineHeight, fontSize)
        line.ltext = "Requires Energy in Storage"%_t
        tooltip:addLine(line)

        extraLines = extraLines + 1
    end

    for i = 1, 3 - extraLines do
        -- empty line
        tooltip:addLine(TooltipLine(15, 15))
    end


    return tooltip

end
« Last Edit: May 11, 2018, 02:03:07 AM by Raio_Verusia »