Is it possible to have a Technology Prerequisites be something besides another tech?
Like a prerequisites Evolution Factor or prerequisites must first kill x aliens or spawners?
Same for entities?
Thanks.
Technology Prerequisites
Re: Technology Prerequisites
There is no direct support for this, because the prerequisites property of a technology is a table of Lua/Technology (so nothing else). But I think it can be easily emulated [untested]:
Define your technology normally, then when the game inits/loads, disable that technology (.enabled = false).
When your prerequisite is met (which you obviously have to detect), then just set enabled = true. If the other technology prerequisites are met, it can then be researched.
Entities can be made to work like this if you use the same trick on the recipies.
Define your technology normally, then when the game inits/loads, disable that technology (.enabled = false).
When your prerequisite is met (which you obviously have to detect), then just set enabled = true. If the other technology prerequisites are met, it can then be researched.
Entities can be made to work like this if you use the same trick on the recipies.
Re: Technology Prerequisites
You'd want to just define the technology so it's not enabled by default: enabled = false in the prototype.SirRichie wrote:There is no direct support for this, because the prerequisites property of a technology is a table of Lua/Technology (so nothing else). But I think it can be easily emulated [untested]:
Define your technology normally, then when the game inits/loads, disable that technology (.enabled = false).
When your prerequisite is met (which you obviously have to detect), then just set enabled = true. If the other technology prerequisites are met, it can then be researched.
Entities can be made to work like this if you use the same trick on the recipies.
If you want to get ahold of me I'm almost always on Discord.
Re: Technology Prerequisites
Hmmm, anyway you guy's could share some code examples showing this?
Thanks for the feedback!
Thanks for the feedback!