Jump to content

(Question)- which lua to increase tech level cap?


Enzo Matrix

Recommended Posts

So the game seems to have tech level capped at 52, which lua does this fall under? I wish to increase this cap. An awesome goal of mine would be to have tech level based on the spawned difficulty resulting in a range of tech levels in sectors rather than flat numbers.

 

Fighting 40k hull pirate for 30 tech and 200k hull alien for same tech 30 seems silly. But no idea how to do this part. But for now figuring out where the code for this 52 cap is would be nice :)

Link to comment
Share on other sites

Well, turretgenerator.lua has a few lines like:

local weaponDPS, weaponTech = Balancing_GetSectorWeaponDPS(sector, 0)

 

and:

local o = GenerateTurretTemplate(seed, weaponType, dps, tech, rarity, material)

 

You could manually change tech to something silly and see what happens, but it might be internally capped at 52 with no way of going higher...haven't tried.

Link to comment
Share on other sites

In scripts/lib/galaxy.lua, this function:

 

function Balancing_GetTechLevel(x, y)
    -- this is just a number indicating how strong the tech of the object is
    -- ranges from 0 to ... lots
    local coords = vec2(x, y)
    local dist = math.floor(length(coords))

    local tech = lerp(dist, 0, 500, 52, 1)

    return math.floor(tech + 0.5)
end

 

If you only change the 52 to something higher, it will increase the cap, but also increase the tech level of every other sector.  You'll also probably want to mess with Balancing_GetSectorWeaponDPS because tech level doesn't actually seem to have anything to do with weapon damage. That stuff will change all weapons though, I don't know how you'd make specific wrecks drop better items than anything else.

Link to comment
Share on other sites

Awesome thanks! I will try around with that :)

A quick look and I'm pretty sure I can make it so there are 3+ lines of distance and tech level making early game have x levels of tech level, then a second stage that continues the tech level in a different pattern and a late game that can give up to much higher tech level. I will play around and see how this works out

Link to comment
Share on other sites

I managed to finally get it to work! I am no coder, been since grade 11 and I am now 29 so yeah I basically am re-learning as I look at it and try to understand the functions lol.

 

But I managed to get tech levels to go from 1-18 from max distance - 350, then 18-42 from 350-150, and 42-75 from 150-0.

 

While also beefing up aliens and pirates. I am also making new spawn groups for aliens as the current 4 is OK.. but I want more variety and I am giving them names instead of "unknown". I increased the alien spawn timer also because it was just too constant, being larger battles taking longer.

 

This is what I did to split up tech levels into sections and have different progression.

 

function Balancing_GetTechLevel(x, y)
    -- this is just a number indicating how strong the tech of the object is
    -- ranges from 0 to ... lots
    local coords = vec2(x, y)
    local dist = math.floor(length(coords))

    local tech = lerp(dist, 350, 500, 18, 1)

    return math.floor(tech + 0.5)
end

function Balancing_GetTechLevel(x, y)
    local coords = vec2(x, y)
    local dist = math.floor(length(coords))

    local tech = lerp(dist, 150, 350, 42, 18)

    return math.floor(tech + 0.5)
end

function Balancing_GetTechLevel(x, y)
    local coords = vec2(x, y)
    local dist = math.floor(length(coords))

    local tech = lerp(dist, 0, 150, 75, 42)

    return math.floor(tech + 0.5)
end


function Balancing_GetSectorByTechLevel(tech)
    local tech = lerp(dist, 350, 500, 18, 1)
    return math.floor(dist + 0.5), 0
end

function Balancing_GetSectorByTechLevel(tech)
local tech = lerp(dist, 150, 350, 42, 18)
    return math.floor(dist + 0.5), 0
end

function Balancing_GetSectorByTechLevel(tech)
local tech = lerp(dist, 0, 150, 75, 42)
    return math.floor(dist + 0.5), 0
end

 

Some cool finds from the outer ring.

 

35apr2d.jpg

 

 

wkqs01.jpg

 

 

Going to create new spawn groups, and gonna try a new game on insane :)

Link to comment
Share on other sites

Hmm nvm, seems its now tech 42 no matter where I am. Unsure why.

 

I reverted back to this.

 

function Balancing_GetTechLevel(x, y)

    -- this is just a number indicating how strong the tech of the object is

    -- ranges from 0 to ... lots

    local coords = vec2(x, y)

    local dist = math.floor(length(coords))

 

    local tech = lerp(dist, 0, 500, 75, 1)

 

    return math.floor(tech + 0.5)

end

 

So now tech is scaling, current tech 9 but at 449.1 distance to core So I am assuming its just going from 1-75 in a linear fasion again.

 

I assume I need to do create just this function and do "else if" or something like that to split up the tech increases into sections?

 

I am no coder but I do want to learn lol

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