AgriCraft

AgriCraft

30M Downloads

Allow defining growth modifiers from soils

thephoenixlodge opened this issue ยท 3 comments

commented

As per the title, I'd like to be able to define a growth speed modifier from certain soils to encourage players to use them over basic farmland. Specifically I would likely to be able to make it so Garden soil would cause crops to grow a little bit faster (say 20% faster). Practically I'd prefer it to be definable on a per crop basis so I could make the bonus only apply to some crops so that plants that require that specific soil won't get the growth bonus that crops that be planted on any fertile soil would.

commented

I think this can be done, we would need to adapt/repurpose the growth requirement class a bit to give a growth multiplier instead of giving true/false.

commented

The current implementation doesn't allow different properties on a per crop basis for the default soils (only if a single required soil is explicitly specified).

For most flexibility (and IMHO the easiest to understand) fertile soils should be configurable per crop starting out with the default soils (which ofc can be removed). If we do that, we could easily introduce a new "Soil" class which not only encodes the soil block, but also a growth multiplier (defaulting to 1). This way the same soil block could have different growth multipliers for different crops regardless whether the soil block is in the "default fertile soils" list.

Regardless of what way we choose to implement this, it shouldn't be a problem as we did a good job cleaning up and preparing that part of the code base for future changes. (as long as we dont do hacky stuff now :D)

commented

Another thing we could do is a hard/soft required soil, hard requirement means you have to have that soil period. Soft means you can use any of the default soils, albeit at a slower growthrate and the specific soil at the normal growth rate.
This option has my preference