Author Topic: [MOD]better mining and salvage turrets with extended range  (Read 1537 times)

weedworm31

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    12
    • View Profile
hello since i haven't seen a mod exactly like this put up before i decided to post my changes for mining and salvage turrets.

what this mod does is up the range and damage of mining and salvage turrets by 4x while also editing the inventoryitemprice.lua so that the cost of mining and salvage turrets doesn't multiply by 8 since the damage and range up the item price a lot. with this setup you will have a 3 range or higher turret that also works 4x faster for roughly the same cost as vanilla turrets.   

an unfortunate side effect of upping salvage laser damage is that they become pretty good early game weapons vs non shielded ships but overall they really arn't much better than a real weapon at titanium level+

to install simply copy the data folder from the file into the avorion directory. you may want to make a backup of the inventoryitemprice.lua and turretgenerator.lua for saftey.

so far ive had no issues with it on version 0.19 and the new 0.20

:edit: forgot to mention these changes dont apply to the drone lasers or the 2 mining lasers you start the game with you have to buy newly generated ones or find them as drops



Amriel

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    5
    • View Profile
on: December 16, 2018, 06:14:52 PM
Really useful change, thanks for this!

One thing I noticed is that extending the range of salvaging lasers can mess with the salvaging AI: it only searches a range of 1.5 km around itself for loot drops because it thinks that should be more than enough with the default short lasers.  That means it sometimes leaves behind loot it salvages when moving on to other wrecks.

You can fix this by editing data/scripts/entity/ai/salvage.lua (in 0.20+), at the lines:

Code: [Select]
for _, loot in pairs(loots) do
        if loot:isCollectable(ship) and distance2(loot.translationf, ship.translationf) < 150 * 150 then
            if stuckLoot[loot.index.string] ~= true then
                minedLoot = loot
                return
            end
        end
    end

and changing the 150 to something more appropriate to the new laser range.



Komb

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    5
    • View Profile
on: January 19, 2019, 07:36:03 PM
Hey there,  I tried this mod but it doenst seem to do anything tho. Tried starting a new game too. Sells same stuff :(