Page 1 of 1

Can I disable the technology branch

Posted: Mon Oct 02, 2017 10:55 am
by WIZ4
I want to cancel all technologies to improve the damage, but disabling one technology is very inconvenient, if there is a way to cancel the study of the entire branch using a script?
Is there a way to simplify this code?
Screenshot_15.png
Screenshot_15.png (74.57 KiB) Viewed 840 times
Screenshot_16.png
Screenshot_16.png (748.69 KiB) Viewed 840 times

Re: Can I disable the technology branch

Posted: Thu Oct 05, 2017 7:23 am
by darkfrei

Code: Select all

function tech_iterator (tech_name, level)
local level = level or 1

tech_name = tech_name .. '-' .. level
--If data techs tech_name then tech_iterator (tech_name, level+1)