Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please read the forum rules before posting.



Check if you are posting in the correct category.



The Off Topic section is not meant for discussing Cookie Clicker.

Help with a few different price/resource yield questions

apotheosisapotheosis Posts: 144Member ✭✭
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!

Comments

  • tehkilla515tehkilla515 Posts: 29Member ✭✭
    2. You can just use these two lines:

    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
  • apotheosisapotheosis Posts: 144Member ✭✭
    Thank you.

    Anyone on question #1?
  • apotheosisapotheosis Posts: 144Member ✭✭
    Hmmm my upgrades aren't working. Can someone see if there is a problem with this code?

    *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
  • IronDizasterIronDizaster Posts: 39Member ✭✭
    edited February 2
    is the wooden rakes an upgrade? if so, I think it should be:

    passive:increase food yield of farm by 1

    instead of on earn:increase food yield of farm by 1

    Post edited by IronDizaster on
    delayed update > rushed update
  • apotheosisapotheosis Posts: 144Member ✭✭
    edited February 3
    That seemed to work!

    EDIT: Nevermind, that appears to only increase total food yield by 1, not 1 per farm.
Sign In or Register to comment.