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.
Thank you!
0
Comments
on earn: increase food yield of farm by 3
on earn: increase labor yield of farm by -2
Not 100% sure about decreased yield.
3. Do this:
on earn: multiply food yield of farm by M
How to find M:
The percent increase (e.g: 25%)
Then, use that percent (25) and add 1. before it. Making M 1.25
Unless it's 100% or higher, then add a 2.before it. At 125%, M is 2.25
For 200-300%, use 3.
300-400%, use 4. etc
Anyone on question #1?
*woodenrakes
name:Wooden Rakes
desc:Better than farming with your bare hands! +1 farm food output
on earn:increase food yield of farm by 1
cost:1000 wood
req:farm>=3
It is not boosting farm output at all. Here is the farm for reference:
*farm
name:Farm
desc:Agriculture is the base of civilization. +12 food, -10 labor"
on tick:if (have labor) yield 12 food
on tick:yield -10 labor
on tick:if (chance(20%)) yield 1 seed
cost:1000 labor
cost:50 seed
cost increase:102%
req:I
passive:increase food yield of farm by 1
instead of on earn:increase food yield of farm by 1
EDIT: Nevermind, that appears to only increase total food yield by 1, not 1 per farm.