Page 18 of 18

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Fri Feb 01, 2019 19:39
by TenPlus1
Right-click one at a time, but it's fast and will replant and usually save you 1x crop by doing so.

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Tue Feb 12, 2019 18:37
by BuckarooBanzay
I think there is a mistake in the current scythe code:

This should invoke with a node not a name:
Code: Select all
diff --git a/hoes.lua b/hoes.lua
index 6417582..6ffa98f 100644
--- a/hoes.lua
+++ b/hoes.lua
@@ -433,7 +433,7 @@ minetest.register_tool("farming:scythe_mithril", {
 
                -- Run script hook
                for _, callback in pairs(core.registered_on_dignodes) do
-                       callback(pos, node.name)
+                       callback(pos, node)
                end
 
                -- play sound


See: https://github.com/minetest/minetest/bl ... .txt#L3596
Code: Select all
minetest.register_on_dignode(function(pos, oldnode, digger))


I had a few errors in the woodcutting mod... which expects a node={ name="" }

Besides that: cool update :D

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Tue Feb 12, 2019 19:56
by TenPlus1
Thanks for noticing the bug dude :) git updated...

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Fri Mar 01, 2019 02:09
by ThorfinnS
IRL, hemp grows pretty much everywhere and prodigiously.

Is it limited for gamelay reasons? I'm explaining the discrepancy to my special needs kids as this is a game balance issue. Is there a good reason to keep it as limited in the wild as it is?

Thanks

--Steph

P.S. I mean, they have spent a dozen or so hours the last couple days looking for a single hemp plant, to no avail. When they can go out to the nearest ditch and find one.

What do I have to nerf in order to keep finding hemp easily from being overwhelming? Seems to me the slow growth in the farming mod should be enough, but maybe not?


Thanks

--Steph

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Fri Mar 01, 2019 07:13
by TenPlus1
The faring.rarety value defaults to 0.002 which makes most crops rare on a map, but you could easily add a farming.conf file and make this value higher so that crops appear more often e.g.

farming.rarety = 0.01

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Fri Mar 01, 2019 18:31
by ThorfinnS
Thanks.

Most of the rest of the plants are plenty common already. If anything, I think I'd prefer to tweak it down a bit, make it a bit more special. Strangely enough, on my mapgens, the only plants that are hard to find are the ones that have spawnby = "group:tree". They have found only 1 garlic, 1 pepper and 1 chili, yet the rest of the veggies they've foraged are a full stack or more,at least the ones that grow on green. Might tree mods be interfering somehow? I'm using lemon, clementine, cherry and moretrees.

Anyway, if I were to change line 69 in mapgen.lua from:

Code: Select all
      scale = farming.rarety, -- 0.06,

to

Code: Select all
      scale = farming.hemp_rarety, -- 0.06,

and put

Code: Select all
      farming.rarety = 0.001
      farming.hemp_rarety = 0.01

into the farming.conf, off the top of your head, would that cause other issues?


I hate to tweak code like that, particularly when mt 5 is any day now, and if it were just me, I wouldn't do it but there are a few of the students with serious OCD who NEED to have a complete garden.

--Steph

[EDIT]
Incidentally, individual rareties might be an elegant way to define which crops are allowed, and how common each is, rather than just boolean. For example, set farming.chili in the .conf to 0 if you want it disabled, or set it to 0.01 if you want it to be like kudzu.

Looks like there are only 5 conditionals in the mapgen.lua that would change, but I haven't looked at too much of the rest of your code. Maybe not even that. Is LUA like other similar languages where false is the same as 0, any other value is true?
[/EDIT]

[EDIT2]
I should clarify that I am running mt 5, in case it matters.
[/EDIT2]

[EDIT3]
If the only place you use rarity or crop enabled is in mapgen, it might be as easy as changing "enabled" in the parameter list in function register_plant to "scale", change the conditional from "enabled" to "scale", commenting out the line
Code: Select all
scale = farming.rarety, -- 0.006,


Looking now to see where you set all the crops to boolean values. That would need to change, too. Or maybe I'll just set them in the .conf. That should override wherever you've initialized them to true, right?

I'll give it a whirl this afternoon.
[/EDIT3]

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Sun Mar 10, 2019 21:05
by mase
Is this mod for use with minetest 5.0.0?
I am unable to plant strawberries and some other stuff.

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Sun Mar 10, 2019 22:40
by ThorfinnS
Strawberries? Are you talking about farming plus?

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Sun Mar 10, 2019 22:50
by mase
Yes, I have strawberries and other fruits.

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Sun Mar 10, 2019 23:01
by ThorfinnS
Quick answer, yes, it is for MT 5. No, it does not have strawberries, at least as of a week ago when I cloned the master. The berries in redo are blueberries and raspberries. (Oh, and grapes. Maybe coffee and cocoa. I'm not a botanist.)

Check with whatever it is that installed them.

[EDIT]
Just checked. Both farming plus and ethereal implement strawberries, though they are done differently. Check the doc on whichever you are using.
[/EDIT]

[EDIT2]
If you are using ethereal, it calls the exact same function in farming to place the seed. Just like all the rest of farming redo plants, you need to have default dirt within 2 tiles of water, and use a hoe on the dirt. Then you can place it, not before.

Looks to me as if you should be able to plant the strawberry seed from farming plus or the strawberry fruit from ethereal like that.
[/EDIT]

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Mon Mar 11, 2019 13:50
by mase
I wonder where these fruits belong to. When I disable farming redo, there are no more strawberries available.
You are right, I cannot find any strawberries in the code of farming redo.

Re: [Mod] Farming Redo [1.40] [farming]

PostPosted: Mon Mar 11, 2019 16:12
by TenPlus1
Farming Redo has items for strawberries, bananas and oranges for Farming Plus compatibility so you dont lose these items in your inventory, they do not grow... To have growing fruits you need Ethereal mod installed.

Updated to version 1.42

PostPosted: Tue May 14, 2019 08:39
by TenPlus1
- Each crop has it's own spawn rate which can be changed inside farming.conf
- Soil needs water to be present within 3 blocks horizontal and 1 below
- Jack 'o Lanterns now check for protection when a player turns them on/off

soil abm

PostPosted: Wed May 15, 2019 17:11
by Gundul
I think your soil abm is a bit outdated, which makes it difficult to other mods to work with your farming redo.

original code from farming mode is:
Code: Select all

minetest.register_abm({
   label = "Farming soil",
   nodenames = {"group:field"},
   interval = 15,
   chance = 4,
   action = function(pos, node)
      local n_def = minetest.registered_nodes[node.name] or nil
      local wet = n_def.soil.wet or nil
      local base = n_def.soil.base or nil
      local dry = n_def.soil.dry or nil
      if not n_def or not n_def.soil or not wet or not base or not dry then
         return
      end

      pos.y = pos.y + 1
      local nn = minetest.get_node_or_nil(pos)
      if not nn or not nn.name then
         return
      end
      local nn_def = minetest.registered_nodes[nn.name] or nil
      pos.y = pos.y - 1

      if nn_def and nn_def.walkable and minetest.get_item_group(nn.name, "plant") == 0 then
         minetest.set_node(pos, {name = base})
         return
      end
      -- check if there is water nearby
      local wet_lvl = minetest.get_item_group(node.name, "wet")
      if minetest.find_node_near(pos, 3, {"group:water"}) then
         -- if it is dry soil and not base node, turn it into wet soil
         if wet_lvl == 0 then
            minetest.set_node(pos, {name = wet})
         end
      else
         -- only turn back if there are no unloaded blocks (and therefore
         -- possible water sources) nearby
         if not minetest.find_node_near(pos, 3, {"ignore"}) then
            -- turn it back into base if it is already dry
            if wet_lvl == 0 then
               -- only turn it back if there is no plant/seed on top of it
               if minetest.get_item_group(nn.name, "plant") == 0 and minetest.get_item_group(nn.name, "seed") == 0 then
                  minetest.set_node(pos, {name = base})
               end

            -- if its wet turn it back into dry soil
            elseif wet_lvl == 1 then
               minetest.set_node(pos, {name = dry})
            end
         end
      end
   end,
})



the dry, base and wet is missing in your definition and abm.


Also you disable desert_sand_soil, which is not too important, but why ?

It would be pretty cool if you could update your soil abm.

Re: [Mod] Farming Redo [1.42] [farming]

PostPosted: Thu May 23, 2019 12:38
by BuckarooBanzay
Hey tenplus1

I think you messed up all the plants on my server :D (kidding, no big deal...)

The loop in https://notabug.org/TenPlus1/farming/sr ... t.lua#L272 does not really iterate.
It should instead be done with
Code: Select all
pairs()

otherwise the node_timer won't get registered...

Re: [Mod] Farming Redo [1.42] [farming]

PostPosted: Thu May 23, 2019 18:30
by TenPlus1
Thanks for noticing Buckaroo, has been fixed and git updated :)

Re: [Mod] Farming Redo [1.42] [farming]

PostPosted: Wed Aug 14, 2019 11:43
by Merak
If you have a pepper, can you grow more? How? You can not plant them on tilled soil.

Re: [Mod] Farming Redo [1.42] [farming]

PostPosted: Thu Aug 15, 2019 01:37
by ThorfinnS
Merak wrote:If you have a pepper, can you grow more? How? You can not plant them on tilled soil.
Try putting the peppers in your crafting grid..