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.
I want to be able to give the player an amount of resources after they have researched (or something like researching including the delay and cost) something, and I want it repeatable, like the market.
How would I do this?