Tech web eras

Starrynite120

Prince
Joined
Jul 15, 2015
Messages
472
I'm playing around with the tech tree a bit, moving some things around, and something that really bothers me is it's so easy to beeline techs. So I thought of adding a requirement for moving among the rings. You can't research anything in the second ring until you have so many techs in the first ring, so each ring is like an era. I would actually like to make each ring an era (I'll be moving techs around and making a fourth ring) and make it a requirement that you need so many techs per era. Unfortunately I'm not too skilled in modding (yet, I'm working on it), and I was wondering if anyone could give me advice for how to go about this.
 
You should be able to use PlayerCanResearch(playerID, techType) add additional restrictions to techs. If the techType has a radius of X count the number of less than radius X techs they have. If they don't have enough return false and the player will not be allowed to research that tech.
 
Would you (or anyone) mind giving me an example of code showing me how I could do this? I'm only beginning to code lua, and I'm finding it a bit tricky to get the hang of it.

Would it be something like this?

local Variable = ResearchedTechs where GridRadius = 1
If Variable < 4 then
PlayerCanResearch where GridRadius = 2
Return false
Else
PlayerCanResearch = true

I'm sure there are plenty of problems with this haha I'm just trying to figure it out.
 
Top Bottom