[Mod] Farming Redo [1.48] [farming]
Update
- Added some nil checks when placing seed items on nodes with on_rightclick active
Re: [Mod] Farming Redo [1.42] [farming]
Oh, cool.
Looking forward to seeing if nil checks gets rid of the occasional weirdnesses interacting with lib_ecology. One just had to learn which plants not to plant or you would get warning messages popping up all the time. Strawberries for sure. Couple others, too, but I don't recall which.
Looking forward to seeing if nil checks gets rid of the occasional weirdnesses interacting with lib_ecology. One just had to learn which plants not to plant or you would get warning messages popping up all the time. Strawberries for sure. Couple others, too, but I don't recall which.
Re: [Mod] Farming Redo [1.42] [farming]
Trying to figure out whether you had a detectable pattern in mind when assigning groups.
For example, the thing you plant with corn is in group food_corn, beets is food_beetroot, but the juicer is food_juicer. So looks like I can't just strip off anything with group food_* and get plantable things.
Clyde did his cucina_vegana by having anything plantable be seed=1. An improvement, but not quite as useful as it might be. For example, setting seed=2 might mean you plant one of the crop, while seed=1 means it has a seed distinct from the crop.
Makes it easier to adapt things to farming_nextgen, as well as things like the threshing floor and handmill from cottages.
Question is whether that's capability you are interested in including, or if it's something that should be a stand-alone mod. It wouldn't be that hard to do an on-load parsing of registration data, then add the group seed=2 (or whatever), but maybe coming up with some suggested standard across mods, and people either embrace that voluntary standard or not, at penalty of not integrating well with other mods.
What I'm asking, then, is whether there's some standard that would work better with your long-term vision, and also whether you want to add that (PR or on your own) or simply do it through a stand-alone mod.
For example, the thing you plant with corn is in group food_corn, beets is food_beetroot, but the juicer is food_juicer. So looks like I can't just strip off anything with group food_* and get plantable things.
Clyde did his cucina_vegana by having anything plantable be seed=1. An improvement, but not quite as useful as it might be. For example, setting seed=2 might mean you plant one of the crop, while seed=1 means it has a seed distinct from the crop.
Makes it easier to adapt things to farming_nextgen, as well as things like the threshing floor and handmill from cottages.
Question is whether that's capability you are interested in including, or if it's something that should be a stand-alone mod. It wouldn't be that hard to do an on-load parsing of registration data, then add the group seed=2 (or whatever), but maybe coming up with some suggested standard across mods, and people either embrace that voluntary standard or not, at penalty of not integrating well with other mods.
What I'm asking, then, is whether there's some standard that would work better with your long-term vision, and also whether you want to add that (PR or on your own) or simply do it through a stand-alone mod.
Re: [Mod] Farming Redo [1.42] [farming]
The food_* groups were for easy recipes so that the same group name could be used for different items and still make the recipe :) the farming redo mod however has a global table called farming.registered_plants that holds any information on a crop/seed/growth/light you might need though.
https://notabug.org/TenPlus1/farming/sr ... pi.txt#L12
https://notabug.org/TenPlus1/farming/sr ... pi.txt#L12
Re: [Mod] Farming Redo [1.42] [farming]
Right. That was in my post, but it got too long, and that's part of what ended up on the cutting room floor.
The situation is that one student is writing a generalized backpack mod, where there is an easier to craft backpack limited to specific types of items. So there's a cheap seed packet you can make early, way before you have wool, because between cucina vegana and farming redo all the inventory space is filled before you find a place to build. All spaces are filled with stuff you wouldn't or couldn't collect but for the existence of those mods. Why bother with leaves if there's no mod that uses them, for instance. Just toss 'em out. Who needs to hold onto dirt if you have no farming mods?
Hardcoding it is easy, though a bit slow. Iterating through the register_plants table for each and every item as you are trying to move into the container is much, much slower than just checking that it's in an appropriate group. Allowing all items named farming:* works, and is sufficiently fast, but allows pots, pans, cutting boards, juicers, bean poles, etc., plus all the finished products, which kind of defeats the purpose of having an early, cheap bag specifically for seeds.
So the plan is to iterate through the table once at load time, adding groups to items as appropriate. I was just interested in knowing if there was anything on the back burner such that if you decided to add groups for seeds and such, like Clyde did, this would overwrite your group assignments and cause problems. We would code for that now, rather than worry about it being a future compatibility and maintenance issue.
The situation is that one student is writing a generalized backpack mod, where there is an easier to craft backpack limited to specific types of items. So there's a cheap seed packet you can make early, way before you have wool, because between cucina vegana and farming redo all the inventory space is filled before you find a place to build. All spaces are filled with stuff you wouldn't or couldn't collect but for the existence of those mods. Why bother with leaves if there's no mod that uses them, for instance. Just toss 'em out. Who needs to hold onto dirt if you have no farming mods?
Hardcoding it is easy, though a bit slow. Iterating through the register_plants table for each and every item as you are trying to move into the container is much, much slower than just checking that it's in an appropriate group. Allowing all items named farming:* works, and is sufficiently fast, but allows pots, pans, cutting boards, juicers, bean poles, etc., plus all the finished products, which kind of defeats the purpose of having an early, cheap bag specifically for seeds.
So the plan is to iterate through the table once at load time, adding groups to items as appropriate. I was just interested in knowing if there was anything on the back burner such that if you decided to add groups for seeds and such, like Clyde did, this would overwrite your group assignments and cause problems. We would code for that now, rather than worry about it being a future compatibility and maintenance issue.
Updated to version 1.43
- Scythe works on use instead of right-click.
- Added {seed=2} group to plantable food items.
- Added {seed=2} group to plantable food items.
Re: [Mod] Farming Redo [1.42] [farming]
Awesome.
I'll grab it before he shows up to the computer lab this afternoon.
Thanks!
I'll grab it before he shows up to the computer lab this afternoon.
Thanks!
Re: [Mod] Farming Redo [1.42] [farming]
For some reason, I cannot make a fork from notabug onto github. Pretty sure I've done it before. Or maybe I cloned it locally then pushed it to a newly created github. Have to look into it some day when I have a better connection. Upshot is I can't do a PR.
Anyway, ran into an issue with earthbuild where changing the modlist would make either this or earthbuild load last, and consequently overwrite the others' drops. Rewrote grass.lua and earthbuild's farming.lua to use your function to add drops to an existing node.
And for whatever reason I can't attach the grass.lua. What's the typical workaround? Delete the extension, use a different extension, zip?
Anyway, ran into an issue with earthbuild where changing the modlist would make either this or earthbuild load last, and consequently overwrite the others' drops. Rewrote grass.lua and earthbuild's farming.lua to use your function to add drops to an existing node.
And for whatever reason I can't attach the grass.lua. What's the typical workaround? Delete the extension, use a different extension, zip?
Code: Select all
minetest.log(minetest.get_current_modname())
local function add_drop(nodename, drop_table)
-- does node exist?
if not minetest.registered_nodes[nodename] then return end
-- get existing drops
local drops = minetest.registered_nodes[nodename].drop
-- if single item string then apend to end of new drop_table
if type(drops) == "string" then print ("== string")
table.insert(drop_table.items, {items = {drops}})
elseif type(drops) == "table" then print ("== table")
-- apend existing drops to new drop_table
for _, item in ipairs(drops.items) do
table.insert(drop_table.items, item)
end
-- use new max_items or default to current
drop_table.max_items = drop_table.max_items or drops.max_items
end
-- override node with new drops
minetest.override_item(nodename, {drop = drop_table})
end
for i = 4, 5 do
-- Override default grass and have it drop Wheat Seeds
if not minetest.registered_nodes["default:grass_" .. i].drop.items then
add_drop("default:grass_" .. i, {
max_items = 1,
items = {{items = {"farming:seed_wheat"}, rarity = 5}}
})
end
-- add farming redo crop
add_drop("default:grass_" .. i, {
items = {
{items = {"farming:seed_oat"}, rarity = 5}
}})
-- minetest.log("default:grass_"..i)
-- minetest.log(dump(minetest.registered_nodes["default:grass_"..i].drop))
-- Override default dry grass and have it drop Barley Seeds
if not minetest.registered_nodes["default:dry_grass_" .. i].drop.items then
add_drop("default:dry_grass_" .. i, {
max_items = 1,
items = {{items = {"farming:seed_barley"}, rarity = 5}}
})
end
-- add farming redo crop
add_drop("default:dry_grass_" .. i, {
items = {
{items = {"farming:seed_rye"}, rarity = 5},
}
})
-- minetest.log("default:dry_grass_"..i)
-- minetest.log(dump(minetest.registered_nodes["default:dry_grass_"..i].drop))
end
-- Override default Jungle Grass and have it drop Cotton Seeds
if minetest.registered_nodes["default:junglegrass"].drop == nil then
add_drop("default:junglegrass", {
max_items = 1,
items = {
{items = {"farming:seed_cotton"}, rarity = 8},
{items = {"default:junglegrass"}}
}
})
end
-- add farming redo crop
add_drop("default:junglegrass", {
items = {
{items = {"farming:seed_rice"}, rarity = 8},
}
})
-- minetest.log("default:junglegrass")
-- minetest.log(dump(minetest.registered_nodes["default:junglegrass"].drop))
Re: [Mod] Farming Redo [1.42] [farming]
Most of the savannah is now default:dry_dirt_with_dry_grass. Will there be an update so that coffee and pineapple spawns on those too?
-
- Member
- Posts: 21
- Joined: Mon Oct 07, 2019 23:12
Re: [Mod] Farming Redo [1.42] [farming]
After replanting rice several times, it has stopped growing.
Re: [Mod] Farming Redo [1.42] [farming]
@Emerald - I've added initial compatibility for new dry dirt nodes so that the pineapple and coffee grow on those nodes, also so that they can be hoe'd into normal soil.
-
- Member
- Posts: 21
- Joined: Mon Oct 07, 2019 23:12
Re: [Mod] Farming Redo [1.42] [farming]
Never mind, I thought they would grow from torches :-|Segmented Worm wrote:After replanting rice several times, it has stopped growing.
Updated to version 1.44
- Mithril Scythe now works using right-click instead of left to harvest crops.
- Seed group added to plantable items {seed=1} for seeds, {seed=2} for food items.
- Added 'farming_stage_length' setting to adjust speed of crop growth (detault: 160 secs).
- Seed group added to plantable items {seed=1} for seeds, {seed=2} for food items.
- Added 'farming_stage_length' setting to adjust speed of crop growth (detault: 160 secs).
Updated to version 1.45
- Hoes and Soil more inline with default wet/dry/base option
- Added dry_dirt soil it 5.x detected
- Translations updated, French added
- Added dry_dirt soil it 5.x detected
- Translations updated, French added
Update:
- Added Mint and Mint Tea (thanks Darkstalker for textures)
- Added Cactus Juice with 1 in 5 chance of poisoning (thanks OgelGames)
- Added Pasta and Spaghetti
- Added Cactus Juice with 1 in 5 chance of poisoning (thanks OgelGames)
- Added Pasta and Spaghetti
Update:
- Added Cabbage and crop
- Added Korean Bibimbap (skillet, bowl, chicken, carrot, egg, cabbage)
- If mobs_animal not active recipe is (skilled, bowl, carrot, cabbage, 2x mushroom, rice)
- Rhubarb doesn't like it too bright when growing
- Code tweak and tidy
Note: Bonemeal and Ethereal mods updated to use cabbage also :)
- Added Korean Bibimbap (skillet, bowl, chicken, carrot, egg, cabbage)
- If mobs_animal not active recipe is (skilled, bowl, carrot, cabbage, 2x mushroom, rice)
- Rhubarb doesn't like it too bright when growing
- Code tweak and tidy
Note: Bonemeal and Ethereal mods updated to use cabbage also :)
Re: [Mod] Farming Redo [1.45] [farming]
While searching for groups I found this typo in cabbage.lua:
I do not know if that is important, but I guess it should be crop="farming:cabbage" :)
Code: Select all
farming.registered_plants["farming:cabbage"] = {
crop = "farming:cababge",
seed = "farming:cabbage",
minlight = 13,
maxlight = 15,
steps = 6
}
Re: [Mod] Farming Redo [1.45] [farming]
Well spotted Gundul, fixed and git updated :) thanks...
Re: [Mod] Farming Redo [1.45] [farming]
I haven't seen someone ask this yet (granted, there are 19 pages of posts spanning 6 years, and I haven't read them all). Is there some sort of guide for this Farming Redo mod? For example, how many stages does rice grow through before it's "ripe?" What crafting recipes use rice, and how? Stuff like that. I've tried using the Crafting Guide mod, but apparently that isn't compatible with v5.2.0, and that's the latest version on the buster-backports repository.
I really like the Minetest wiki that goes into detail about almost everything you can do with any block. Several mods' info are in there, too, just not Farming Redo.
I really like the Minetest wiki that goes into detail about almost everything you can do with any block. Several mods' info are in there, too, just not Farming Redo.
-
- Member
- Posts: 1482
- Joined: Fri Apr 19, 2013 16:19
- GitHub: twoelk
- IRC: twoelk
- In-game: twoelk
- Location: northern Germany
Re: [Mod] Farming Redo [1.45] [farming]
guess it's somewhat outdated but try https://wiki.minetest.net/Mods/Farming_Redo for some basics.
yep rice is missing.
sigh
yep rice is missing.
sigh
Re: [Mod] Farming Redo [1.45] [farming]
Hello TenPlus1,
I've stumbled upon a minor issue when using digtron as harvester machine. Apparently soil sometimes gets changed to normal one under digtron, so if that machine also replants crops it may fail for some areas. It happens when ABM for soil node fires when digtron moves over it.
My quick fix for this is to exclude all digtron nodes from changing soil back to dirt:
It works for all digtron nodes except crates and replicator (these are not in "digtron" group, but are also not movable machine components anyway).
Cheers
Micu
I've stumbled upon a minor issue when using digtron as harvester machine. Apparently soil sometimes gets changed to normal one under digtron, so if that machine also replants crops it may fail for some areas. It happens when ABM for soil node fires when digtron moves over it.
My quick fix for this is to exclude all digtron nodes from changing soil back to dirt:
Code: Select all
diff --git a/soil.lua b/soil.lua
index ab8be15..6438644 100644
--- a/soil.lua
+++ b/soil.lua
@@ -147,7 +147,8 @@ minetest.register_abm({
-- what's on top of soil, if solid/not plant change soil to dirt
if minetest.registered_nodes[nn]
and minetest.registered_nodes[nn].walkable
- and minetest.get_item_group(nn, "plant") == 0 then
+ and minetest.get_item_group(nn, "plant") == 0
+ and minetest.get_item_group(nn, "digtron") == 0 then
minetest.set_node(pos, {name = "default:dirt"})
return
end
Cheers
Micu
Re: [Mod] Farming Redo [1.45] [farming]
w00t! v5.3.0 was pushed to the Debian repositories! :D I can use the crafting guide now.
This may seem like a stupid question, but I can't for the life of me figure out how to farm cabbage. I have a head of cabbage, but when I plant it, it grows...1 head of cabbage...which I then need to replant... O_o? What am I doing wrong?
This may seem like a stupid question, but I can't for the life of me figure out how to farm cabbage. I have a head of cabbage, but when I plant it, it grows...1 head of cabbage...which I then need to replant... O_o? What am I doing wrong?
Re: [Mod] Farming Redo [1.45] [farming]
@T6C - Cabbages give a 1 in 5 chance of giving out 2x cabbages, and if you use the mithril scythe it will harvest and replant a new cabbage effectively giving you a chance of 3 in total :)
-
- Member
- Posts: 4287
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] Farming Redo [1.45] [farming]
Ah. A use for the mithril scythe. Still...cabbage isn't such an expensive..thing...in RL. Can't be that difficult to grow it?TenPlus1 wrote: @T6C - Cabbages give a 1 in 5 chance of giving out 2x cabbages, and if you use the mithril scythe it will harvest and replant a new cabbage effectively giving you a chance of 3 in total :)
A list of my mods can be found here.
Re: [Mod] Farming Redo [1.45] [farming]
So, what you're telling me is I need to dig a deeper mine to get mithril. XD My y = -270 mine ain't gonna cut it. Until I get mithril, I'll just keep working on that 20% chance of more cabbage.
More cabbage = MOAR BIBIMBAP! ^_^;
Who is online
Users browsing this forum: No registered users and 13 guests