I know that there are already mods that add some kind of fertilizer to grow plants faster. The disadvantage of this way is that these mods have to add support for each single plant in each mod.
The better way would be if plants itself would have some kind of fertilizer API. For example each seed and sapling node has a flag like "can_fertilized". If such a plant is punched (or right clicked?) with e.g. "group:fertilizer" it has a chance to grow. Level could be used to modify the strength of the fertilizer
But I'm not sure if this is a MTG issue or is something for the engine. Both would be possible.
It would also be easy to add fertilizer to MTG, for example a rare chance of dropping fossils when dig stone
My BONEMEAL mod has an api that supports farming, farming redo, saplings, ethereal saplings and moretree saplings and can be used by other mods to support additional plants. https://forum.minetest.net/viewtopic.php?f=11&t=16446
You don't need to praise your mods for any issue that is similar.
This issue is about to add an API to Minetest that solves the problem you have with your mod. You need to support each and every other mod yourself that should be able to use a fertilizer
MarkBu: I'm not praising my mod but simply stating that it exists with an API that can be used instead of adding bloat to minetest_game, also what problem were you referring to ?
The problem is, even if you have an API no not much mods use is. You have to add support yourself
If such an API would be always available most mods would support it.
That's the reason
:+1:
Bones and coral should be default fertilisers too
Bones crafted -> bonemeal (add graves/bones in dungeons, and/or dropped by mobs eventually?)
Dead coral -> fertilizer (add a composter for all plants?)
There should also be a function in the API that will advance the growth of a plant at some position, so custom growth boosters can be implemented, e.g. a growth lamp that periodically advances the growth of some plants below it in a cuboid.
Then you wouldn't need special handling for "fertilizer items". You could just provide a convenience function that will create the punch callback for a fertilizer item.
For example:
-- Provided in farming
function farming.fertilizer_callback(strength)
return function(stack, user, pointed_thing)
local pos -- Get it from pointed thing
farming.grow_at_pos(pos, strength)
end
end
-- Some mod's item definition
{
...
on_use = farming.fertilizer_callback(10)
...
}
raymoo: good idea, the above mod mentioned has this function to do the same:
```
bonemeal:on_use(pos, strength)
Dead coral is the obvious resource, only drawback is all coral will be removed.
Fertiliser is a rather specialist idea if you think about MT in isolation, the reason some feel it should be standard in MTG is because MC has it as standard.
I'm only okay with an API is ok if it can be simple, as this is low priority.
I don't think this is specialist at all, and it adds a good use for coral.
Remember that the poll regarding growing light levels resulted in variable grow speeds winning - adding fertilisation on to this would be pretty trivial
Yes, but we're not implementing variable grow speed which itself may not be trivial, and we wisely don't let polls decide.
Variable light level changing grow speed is not worth doing because by necessity we only allow growth in light levels 13 to 15, and it makes sense that a powerful growlamp providing light level 13 should grow something as fast as direct daylight 15. So for that feature the polls are wrong.
Hmm yeah it isn't particularly specialist, i meant 'specialist for MTG if we consider it a super simple game'.
I'm neutral on this as long as it's done simply and we continue to use node timers.
I'd love to see bonemeal or similar added to MTG. It's one of those things I always want and even expect when playing the game.
We are likely to add limestone underground, which could be used.
If such a plant is punched (or right clicked?) with e.g. "group:fertilizer" it has a chance to grow.
Maybe this was just a random idea, but i can't stand this MC way of instantly growing things when using fertiliser.
Closing due to #2710