Genie Editor: Fire Techs Based on Resources?

Hi All,

I am trying to make a custom civ in the Advanced Genie Editor with the following bonus: “Infantry and Ranged Soldiers attack faster as Miners gather resources”. The way it would work is attack speed would be increased by 1% for every 200 resources gathered by miners, to a maximum of +20%.

To make this work, I can have Miners gather a junk resource (eg resource 524) at 1/200 of their stone/gold gather speed, along with a repeatable technology that increases attack speed by 1%. What I’m struggling with is coming up with a way to activate this tech when the resource reaches 1. As far as I know, the only way to make technologies auto-research is setting resource costs and research times to 0, so just setting the tech’s ‘resource 524’ cost to 1 wouldn’t work.

Does anyone know any way to make this possible? Or if it can’t work in this way, can anyone think of an alternative method to replicate the effect?

Thanks very much for your help!