Jump to content

[MOD] Random Resources


TKOed

Recommended Posts

So, i did a random resource astroid drop. Ill need to do a little configuration later. But really simple. No download needed.

 

find the file - ..\Avorion\data\scripts\lib\SectorGenerator.lua

find the code as follows;

 

function SectorGenerator:getAsteroidType()
    local probabilities = Balancing_GetMaterialProbability(self.coordX, self.coordY)
    return Material(getValueFromDistribution(probabilities))
end

 

and replace the code with this

 

function SectorGenerator:getAsteroidType()
    local probabilities = Balancing_GetMaterialProbability(math.random(-500,500), math.random(-500,500))
    return Material(getValueFromDistribution(probabilities))
end

 

Dont know if anyone else has done tis but it allows you to have random resources anyplace in the galaxy.

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...