Jump to content

Raio_Verusia

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Raio_Verusia

  1. I made some updates to the script. Due note that a majority of this script is still the same as v24 from lyravega

     

    lyravega I hope you don't mind me re-posting this here. Feel free to incorporate any my changes into your next update.

     

    v24.2 Updates

    * Includes core game Torpedo code that Raio_Verusi posted earlier in thread.

    * Includes Turret slot size info

    * Includes Turret per slot size eDPS/DPS info

    * Includes Fighter per volume size eDPS/DPS info

     

    Notes:

    * Still using same eDPS/DPS calculations as @lyravega, so concerns about calculations from his last post still exist.

     

    I haven't played in a while and the torpedo code doesn't seem to work for me currently in the lastest stable branch build, unless I've forgotten how I did it last time. I will download your version and see, I was talking to Lyra when we worked on that snippet of code.

     

    Edit: By the way, don't be shy, if you have Steam go ahead and have a chat with Lyravega if it concerns their mod, like I did. They're quite friendly and helpful.

  2. This is for anyone missing their torpedo tooltips.

     

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

     

    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

  3. If it helps, this is the updated weapons list:

     

    avorion/data/scripts/lib/cmd/weapons.lua

    return
    {
    {function (str) return str:find("^[cC]ha") end,  0, "ChainGun"},
    {function (str) return str:find("^[pP]dc") end,  1, "PdChainGun"},
    {function (str) return str:find("^[pP]dl") end,  2, "PdLaser"},
    {function (str) return str:find("^[lL]as") end,  3, "Laser"},
    {function (str) return str:find("^[mM]in") end,  4, "MiningLaser"},
    {function (str) return str:find("^[pP]la") end,  5, "PlasmaGun"},
    {function (str) return str:find("^[rR]oc") end,  6, "RocketLauncher"},
    {function (str) return str:find("^[cC]an") end,  7, "Cannon"},
    {function (str) return str:find("^[rR]ai") end,  8, "RailGun"},
    {function (str) return str:find("^[rR]ep") end,  9, "RepairBeam"},
    {function (str) return str:find("^[bB]ol") end,  10, "Bolter"},
    {function (str) return str:find("^[lL]ig") end,  11, "LightningGun"},
    {function (str) return str:find("^[tT]es") end, 12, "TeslaGun"},
    {function (str) return str:find("^[fF]or") end, 13, "ForceGun"},
    {function (str) return str:find("^[sS]al") end, 14, "SalvagingLaser"},
    {function (str) return str:find("^[pP]ul") end, 15, "PulseCannon"},
    {function (str) return str:find("^[cC]ar") end, 16, "CargoShuttle"}
    }

     

    What about Anti-fighter Cannons? AFCs?

  4. Is it just me, or, is it a little silly that the assembly blocks can produce fighters en-masse (okay not really but my 7-slot carrier produces them well enough), but torpedoes are out of the question? Self-sufficient Aegis torpedo boats would be cool, a ship built for torpedoes and countering torpedoes and fighters...

     

    I understand the balance side of things, believe me I do. A ship able to produce torpedoes would be extremely powerful. But I want my LRM boat darn-it!

     

     

  5. LordHavoc you missed on the custom fighters reddit post that there's an updated XML further down someone modified to enable 'amount' call to work. Now when you specify an amount with the command and call the xml it adds that number (if you have space) of that specific fighter (same stats) and xmltype to your hangar. It's quite good. Just note that if you fail to call the xmltype it will break the script and require a galaxy reload.

  6. As of the most recent updates, I'm not sure why but I installed this and the found a mine menu's completely blank. It has no mine options what-so-ever. Mod conflict? Maaaaybe? But I removed this mod and restored the original productionsindex.lua back in it's place and the mines show up again.

×
×
  • Create New...