I need it to be a once per player interaction, and it takes resources every time. What I'm trying to do is make a mod that changes default 0AD to around 1600AD, I have powder (gunpowder) as a resource that you should be able to manufacture by clicking a button in the building GUI, making it act like a research or training troops.