Help with a few different price/resource yield questions
I am looking to make a game similar to KeepKraft and Kittens Game but have a few things I need help with:
1- How do I have building cost follow a non exponential path? Specifically, I want building cost to be X Resources x (N + 1)^2 resources where N is the number of that building you currently own.
2- How do I have an upgrade increase the yield of a specific resource from a building, while not effecting others. Like, let's say I have a farm that yields +12 food and -10 labor. I want an upgrade that specifically adds +3 to food yield, or -2 to labor yield.
3- Same as #2, but I want to effect the percentage chance a building has of producing a specific resource.