Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [GROWTH_TIMING] enhancements  (Read 650 times)

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
[GROWTH_TIMING] enhancements
« on: July 28, 2015, 12:32:01 pm »

Hey,

I'm working on a mod to make, among other things, plant growth seasons more realistic. (It's super weird how everything ripens at exactly the same time.)

Unfortunately I've run into some limitations with the GROWTH_TIMING tag. So here's my wishlist!

  • I would like to be able to define more than one GROWTH_TIMING per growth. Right now, only one GROWTH_TIMING tag is allowed per growth; additional GROWTH_TIMINGs overwrite earlier ones. This is unfortunate, as a lot of plants (e.g. avocados, most kinds of wheat) can have more than one crop per year. This can be worked around by creating a separate growth for each timing, but this clutters the kitchen menu and, in the case of crops, will change the proportion of harvest products.
  • I would like to be able to define a GROWTH_TIMING that ranges from winter into spring. Right now, GROWTH_TIMING will only function if both arguments are positive, both arguments are less than 403200, and the first argument is less than the second; if any of these isn't true, the growth is just available all the time. While it's mostly reasonable to expect temperate plants to not have any temporary growths present over the winter, it's a little silly for growths on tropical plants to have to work around a winter->spring divide that doesn't exist for them.

    This could be done in a few different ways. One would be to allow growth timings with the first argument larger than the second, up to 403200, with the idea that it starts at time A and continues (across the start of the year) to time B. Another would be to allow negative numbers in the first argument, down to -403200, corresponding to ticks before the start of the year. A third would be to calculate growth timing using mod 403201, which is essentially the same as the first suggestion but would allow you to still require that the second argument be greater than the first.

Links to my other plant-related suggestions, because they're all relevant to the mod I'm working on:
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: [GROWTH_TIMING] enhancements
« Reply #1 on: July 31, 2015, 08:58:51 am »

Rather than building special syntax to handle winter-into-spring growth, I'd rather combine this with the idea of growths replacing growths.  A rough sketch:

[GROWTH:APPLE]
    [GROWTH_START:100800:102800]
A range depicting when the growth germinates.  If omitted, starts when plant is planted.
    [GROWTH_STAGE:APPLE_BUD]
        [GROWTH_DURATION:50000:60000]
Once germinated, the growth is an APPLE_BUD for 50000-60000 ticks.
        Describe the APPLE_BUD growth here.
    [GROWTH_STAGE:APPLE_FLOWER]
        [GROWTH_DURATION:45000:50000]
How long it stays an APPLE_FLOWER.
        Describe the APPLE_FLOWER growth here.
    [GROWTH_STAGE:APPLE_UNRIPE_FRUIT]
        [GROWTH_DURATION:20000:25000]
How long it stays an APPLE_UNRIPE_FRUIT.
        Describe the APPLE_UNRIPE_FRUIT growth here.
    [GROWTH_STAGE:APPLE_FRUIT]
        [GROWTH_DURATION:25000:30000]
How long it stays an APPLE_FRUIT.
        Describe the APPLE_FRUIT growth here.

If the growth doesn't get picked or fall off by itself, it presumably withers away.  There's nothing special about a growth that happens to survive into the following spring.  In fact, a growth could take years to mature.

The main question is whether the stage timings should be cumulative, or all of them relative to the start date to keep multiple plants reasonably bunched together.

The current GROWTH_TIMING syntax can also be used for backward compatibility, but it retains its current limitations.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map