Jump to content

How to make mining less grindy?


douglasg14b

Recommended Posts

Or just build few AI miners ship, that will work too.

 

common\Avorion\data\scripts\lib\turretgenerator.lua

 

This script handles all's turret damage, you can add multiplier to damage for the miner in line to generate more powerful turrets

 

Starting from line 16

function TurretGenerator.generate(x, y, offset_in, rarity_in, type_in, material_in) -- server

    local offset = offset_in or 0
    local seed = rand:createSeed()
    local dps = 0
    local sector = math.floor(length(vec2(x, y))) + offset

    local weaponDPS, weaponTech = Balancing_GetSectorWeaponDPS(sector, 0)
    local miningDPS, miningTech = Balancing_GetSectorMiningDPS(sector, 0)
    local materialProbabilities = Balancing_GetMaterialProbability(sector, 0)
    local material = material_in or Material(getValueFromDistribution(materialProbabilities))
    local weaponType = type_in or getValueFromDistribution(Balancing_GetWeaponProbability(sector, 0))

    local tech = 0
    if weaponType == WeaponType.MiningLaser then
        dps = miningDPS -- * 1.5 -- if you want to make mining laser 50% stronger, remove first comment
        tech = miningTech
    elseif weaponType == WeaponType.ForceGun then
        dps = rand:getFloat(800, 1200); -- force
        tech = weaponTech
    else
        dps = weaponDPS
        tech = weaponTech
    end

    local rarities = {}
    rarities[5] = 0.1 -- legendary
    rarities[4] = 1 -- exotic
    rarities[3] = 8 -- exceptional
    rarities[2] = 16 -- rare
    rarities[1] = 32 -- uncommon
    rarities[0] = 128 -- common

    local rarity = rarity_in or Rarity(getValueFromDistribution(rarities))

    return GenerateTurretTemplate(seed, weaponType, dps, tech, rarity, material)
end

 

I've added a comment inside

Link to comment
Share on other sites

I also think the mining is grindy i think give all the mininlasers the " aoutomatic Targeting" ability and give them a higher range like 5 km or so would be better.

 

I also think sometimes the ai ships (not your own created if you keep them small there is no problem) will less stuck between the roids if the Ai will make use of the increased range.

 

After i found kanes script changes to the range of the mining systems i looked into the avorion files to found something similar for the mining lasers but sadly not or just not see it . Scripting is not my world.

 

would be nice if somebody can/would help if its possible to mod the range..

 

Thx

Link to comment
Share on other sites

Found a way to make it less grindy. I came up with a way to make all newly generated mining turrets have a 20% bonus in their efficiencies by multiplying each newly generated turret's weapon stoneEfficiency&metalEfficiency that was made through turretgenerator.lua.

 

Simply replace your turretgenerator with this one:

http://puu.sh/tHspC/4d36653970.lua

 

If you want to make 20% to something else, just change the efficiencyFactor variable.

 

It won't make the gamestart generated turrets buffed though, so if you want to fix that, go into the factions.lua file, and where you see

 local turret = GenerateTurretTemplate(stuff) 

add in the line directly after it

turret = TurretGenerator.upgradeTurret(turret)

(this needs the lua file provided for it to work)

 

 

Link to comment
Share on other sites

I saw this and had a play with the settings for the miner and salvager; and encountered an interesting side effect.

 

I had multiplied the generated salvager DPS by 4, and it produced the desired DPS - but it also increased the turret size significantly & the number of miners needed to operate each turret (10 per turret!)

 

I'm going to have a look at the code and see where the scaling is applied. Might be interesting

Link to comment
Share on other sites

 

It won't make the science-station or gamestart generated turrets buffed though, so if you want to fix that, go into the science station lua file, include the turret generator (TurretGenerator = require("turretgenerator") after all the requires and surround

 GenerateTurretTemplate(stuff) 

with

TurretGenerator.upgradeTurret( GenerateTurretTemplate(stuff) )

(this needs the lua file provided for it to work)

 

Could you elaborate this part in detail please for us uninitiated.

Link to comment
Share on other sites

 

stuff

 

Could you elaborate this part in detail please for us uninitiated.

 

Checked the science station code and as it turns out it does indeed use the turretgenerator to create the resulting turret, my bad. It will work but if you still want to change the gamestart turrets, just add:

    turret = TurretGenerator.upgradeTurret(turret)

after

   local turret = InventoryTurret(GenerateTurretTemplate(random:createSeed(), WeaponType.ChainGun, dps, tech, Rarity(RarityType.Uncommon), Material(MaterialType.Iron)))

and after

local turret = InventoryTurret(GenerateTurretTemplate(random:createSeed(), WeaponType.MiningLaser, dps, tech, Rarity(RarityType.Uncommon), Material(MaterialType.Iron)))

Link to comment
Share on other sites

  • 9 months later...

Or just build few AI miners ship, that will work too.

 

common\Avorion\data\scripts\lib\turretgenerator.lua

 

This script handles all's turret damage, you can add multiplier to damage for the miner in line to generate more powerful turrets

 

Starting from line 16

function TurretGenerator.generate(x, y, offset_in, rarity_in, type_in, material_in) -- server

    local offset = offset_in or 0
    local seed = rand:createSeed()
    local dps = 0
    local sector = math.floor(length(vec2(x, y))) + offset

    local weaponDPS, weaponTech = Balancing_GetSectorWeaponDPS(sector, 0)
    local miningDPS, miningTech = Balancing_GetSectorMiningDPS(sector, 0)
    local materialProbabilities = Balancing_GetMaterialProbability(sector, 0)
    local material = material_in or Material(getValueFromDistribution(materialProbabilities))
    local weaponType = type_in or getValueFromDistribution(Balancing_GetWeaponProbability(sector, 0))

    local tech = 0
    if weaponType == WeaponType.MiningLaser then
        dps = miningDPS -- * 1.5 -- if you want to make mining laser 50% stronger, remove first comment
        tech = miningTech
    elseif weaponType == WeaponType.ForceGun then
        dps = rand:getFloat(800, 1200); -- force
        tech = weaponTech
    else
        dps = weaponDPS
        tech = weaponTech
    end

    local rarities = {}
    rarities[5] = 0.1 -- legendary
    rarities[4] = 1 -- exotic
    rarities[3] = 8 -- exceptional
    rarities[2] = 16 -- rare
    rarities[1] = 32 -- uncommon
    rarities[0] = 128 -- common

    local rarity = rarity_in or Rarity(getValueFromDistribution(rarities))

    return GenerateTurretTemplate(seed, weaponType, dps, tech, rarity, material)
end

 

I've added a comment inside

 

So this does not work grrrr  -- * 1.5 --  I put this part in for the DPS and it does not increase anything I also made it 1000 nothing am I missing something??

Link to comment
Share on other sites

So this does not work grrrr  -- * 1.5 --  I put this part in for the DPS and it does not increase anything I also made it 1000 nothing am I missing something??

I did a slightly different approach here:

turretgenerator

 

line 51 to 69.

There you might also want to do something like this:

 

  weapon.damage = weapon.damage * 1.5  --increase damage by 50%

Edit: You might also want to modify fightergenerator.lua

Link to comment
Share on other sites

  • 2 weeks later...

See this thread for more info on turretfactory.lua parameters: http://www.avorion.net/forum/index.php/topic,2335.0.html

 

Quick and dirty edit below just for the OP.

 

In turretfactory.lua, for the mining laser, change this line:

{name = "Laser Compressor",     amount = 5,    investable = 6,  minimum = 1,    weaponStat = "damage", }

to this:

{name = "Laser Compressor",     amount = 5,    investable = 6,  minimum = 1,    weaponStat = "damage",  investFactor = 100.0, }

 

and change this line:

{name = "Laser Modulator",      amount = 2,    investable = 4,  minimum = 0,    weaponStat = "stoneEfficiency", investFactor = 0.075, changeType = StatChanges.Flat }

to this:

{name = "Laser Modulator",      amount = 2,    investable = 4,  minimum = 0,    weaponStat = "stoneEfficiency", investFactor = 100.0, changeType = StatChanges.Flat }

 

I just tested the above and it works fine. See where it says "investFactor"? You could try higher than 100.0 but that's up to you.

 

You may have to hunt a bit for a good turret factory but when you got one, you can make mining lasers with uber dps and efficiency. For even easier mining, see this thread to get independent targeting on all turrets: http://www.avorion.net/forum/index.php/topic,1120.0.html Also see this thread to be able to change the seed to get different turrets from the same factory: http://www.avorion.net/forum/index.php/topic,1776.0.html Finally, see this thread to get the commands package so you can spawn the goods required to make turrets, without having to go all over the map to get the stuff: http://www.avorion.net/forum/index.php/topic,830.0.html

Link to comment
Share on other sites

I just wanted to leave a comment about the mining aspect in the game. I find if you just mine your self then yeah your gonna feel like its grindy. However there is a couple ways to make it feel not even grindy. Make mining ships controlled by AI. is one way. Another way is to not even mine , just sell goods and buy resources. Or there is a mine Mod that also helps with this system.

 

But its just how you play the game that makes it feel grindy.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...