[Mod] Farming Redo [1.48] [farming]

Post Reply
MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

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

by MoNTE48 » Post

When I added this mod, hunger bar by BlockMen began to appear always empty.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

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

by burli » Post

Martin_Devil wrote:When I added this mod, hunger bar by BlockMen began to appear always empty.
I guess you need biome_lib mod

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

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

by benrob0329 » Post

You wouldn't need biome_lib.

The hunger mod replaces Minetest's eating function with its own, so it should work with any food/farming mod.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Ethereal foods work with Blockmen's Hud & Hunger mods (also everamzah's fork: https://github.com/everamzah/hud_hunger) as well as Wuzzy's hudbard and hbhunger.

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

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

by MoNTE48 » Post

TenPlus1 wrote:Ethereal foods work with Blockmen's Hud & Hunger mods (also everamzah's fork: https://github.com/everamzah/hud_hunger) as well as Wuzzy's hudbard and hbhunger.
i use Blockmen's Hud & Hunger with old minetest_game

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Updated so work with 3rd party mods like https://github.com/MT-Modder/hydroponics , crops grow on any node with soil=3 group set.

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

TenPlus1 wrote:Updated to version 1.22, added Grapes and Trellis to grow them on (craft trellis with 9 sticks). Wild grape bushels are found at higher climates.
Where in your code is the bolded comment defined? I'd like to replicate this feature, but can't find a reference to y position.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

KCoombes: check the mapgen.lua for crop spawning.

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

Found it! Thanks

Gerald
Member
Posts: 93
Joined: Sun Dec 28, 2014 10:35
In-game: gerald7
Location: Germany

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

by Gerald » Post

I tried to use farming.register_plant and got a strange problem:
It works (seed becomes plant_1, plant_1 becomes plant_2, plant_3 becomes plant_4), but plant_2 does not grow.
I can not understand what the problem is. It does not matter if the plant_2 nodes are placed manually or are grown.

Code: Select all

minetest.register_node("mymod:seed_plant", {})
minetest.register_node("mymod:plant_1", {})
minetest.register_node("mymod:plant_2", {})
minetest.register_node("mymod:plant_3", {})
minetest.register_node("mymod:plant_4", {})
minetest.register_craftitem("mymod:plant", {})

farming.register_plant("mymod:plant", {
	description = "Plant Seed",
	inventory_image = "plant_seed.png",
	steps = 4,	
	minlight = 13,
	maxlight = default.LIGHT_MAX
})

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Gerald, you do not need to register each step beforehand as register plant does all of that for you...

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

How would I go about reducing the frequency of plants spawned?

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

KCoombes: change the noise_params inside mapgen.lua

Gerald
Member
Posts: 93
Joined: Sun Dec 28, 2014 10:35
In-game: gerald7
Location: Germany

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

by Gerald » Post

TenPlus1 wrote:Gerald, you do not need to register each step beforehand as register plant does all of that for you...
If i do not define the nodes, they are defined but nothing grows anymore. As i sead the problem is strange:

Code: Select all

--P
minetest.register_node("mymod:seed_plant", {})
minetest.register_node("mymod:plant_1", {})
minetest.register_node("mymod:plant_2", {})
minetest.register_node("mymod:plant_3", {})
minetest.register_node("mymod:plant_4", {})
minetest.register_craftitem("mymod:plant", {})

farming.register_plant("mymod:plant", {
description = "Plant Seed",
inventory_image = "plant_seed.png",
steps = 4, 
minlight = 5,
maxlight = default.LIGHT_MAX
})

--PX
farming.register_plant("mymod:plantX", {
description = "Plant Seed X",
inventory_image = "plant_seed_x.png",
steps = 4, 
minlight = 5,
maxlight = default.LIGHT_MAX
})
Image
P1 is grown because i planted it first.

Gerald
Member
Posts: 93
Joined: Sun Dec 28, 2014 10:35
In-game: gerald7
Location: Germany

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

by Gerald » Post

I updated to Minetest 0.4.14. and got the exact same result.
I used farming 1.23, the code mentioned and minetest_game.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

You either register all parts of the plant using register plant function which creates 8 growing nodes and 1 seed node using texture specific filenames e.g.

Code: Select all

-- Cotton
farming.register_plant("farming:cotton", {
	description = "Cotton Seed",
	inventory_image = "farming_cotton_seed.png",
	steps = 8,
})
... or you register each step seperately like so:

https://github.com/tenplus1/farming/blo ... cotton.lua

Gerald
Member
Posts: 93
Joined: Sun Dec 28, 2014 10:35
In-game: gerald7
Location: Germany

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

by Gerald » Post

TenPlus1 wrote:You either register all parts of the plant using register plant function which creates 8 growing nodes and 1 seed node using texture specific filenames e.g.
So 8 is the only allowed value of "steps"?

If i uncomment << farming.register_plant("farming:cotton", ... >> and comment <<dofile( ..."cotton.lua")>> cotton does not grow.

If I register the nodes, every odd number grows and every even number does not:
Image

Code: Select all

farming.register_plant("mymod:plantZ", {
description = "Plant Seed Z",
inventory_image = "plant_seed_z.png",
steps = 8, 
})
minetest.register_node("mymod:seed_plantY", {})
minetest.register_node("mymod:plantY_1", {})
minetest.register_node("mymod:plantY_2", {})
minetest.register_node("mymod:plantY_3", {})
minetest.register_node("mymod:plantY_4", {})
minetest.register_node("mymod:plantY_5", {})
minetest.register_node("mymod:plantY_6", {})
minetest.register_node("mymod:plantY_7", {})
minetest.register_node("mymod:plantY_8", {})
minetest.register_craftitem("mymod:plantY", {})

farming.register_plant("mymod:plantY", {
description = "Plant Seed Y",
inventory_image = "plant_seed_y.png",
steps = 8, 
})

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Gerald: Please make sure you are using the latest version of this mod from github.com/tenplus1/farming

You can register a plant with as many steps as you like, but if you are using the register_plant function you do not need to use register_node as this following code:

Code: Select all

farming.register_plant("mymod:plantz", {
    description = "Plant Seed Z",
    inventory_image = "plant_seed_z.png",
    steps = 8, 
})
... will register mymod:seed_plantz as a craftitem to be placed and mymod:plantz_1 to mymod:plantz_8 as nodes for growing the plant itself.

Gerald
Member
Posts: 93
Joined: Sun Dec 28, 2014 10:35
In-game: gerald7
Location: Germany

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

by Gerald » Post

TenPlus1 wrote:Gerald: Please make sure you are using the latest version of this mod from github.com/tenplus1/farming
I used the [stable?] version from the forum. The latest commit works.
Thanks!

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Update:

- Now using on_generate to place cocoa pods in jungle areas, less laggy :)

User avatar
Milan*
Member
Posts: 255
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant
Location: Germany
Contact:

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

by Milan* » Post

Hi there, i am currently failing at making the hemp mod compatible with the farming redo mod.

My last try was like this:

Code: Select all

local crop_def = {
    drawtype = nodebox,
    node_box = {
        type = "fixed",
        fixed = {
            {-0.0625, -0.5, -0.0625, 0.0625, -0.25, 0.0625},
            {-0.125, -0.25, -0.125, 0.125, -0.25, 0.125},
        },
    },
    tiles = {"hemp_hemp_leaves.png", "hemp_hemp_leaves.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png"},
	groups = { growing = 1 },
    sunlight_propagates = true,
    selection_box = {
        type = "fixed",
        fixed = {-0.375, -0.5, -0.375, 0.375, -0.25, 0.375}
    }
}
minetest.register_node("farming:hemp_1", table.copy(crop_def))

minetest.register_node("farming:hemp_2", table.copy(crop_def))
    crop_def.node_box = {
        fixed = {
            {-0.0625, -0.5, -0.0625, 0.0625, 0, 0.0625},
            {-0.125, 0, -0.125, 0.125, 0, 0.125},
        },
    }
    crop_def.selection_box = {
        fixed = {-0.375, -0.5, -0.375, 0.375, 0, 0.375}
    }
[...]
minetest.register_node("farming:hemp_8", table.copy(crop_def))
    crop_def.node_box = {
        fixed = {
			{-0.0625, -0.5, -0.0625, 0.0625, 1.5, 0.0625},
			{-0.5, 0, -0.5, 0.5, 0, 0.5},
			{-0.5, 0.5, -0.5, 0.5, 0.5, 0.5},
			{-0.5, 1, -0.5, 0.5, 1, 0.5},
			{-0.125, 1.5, -0.125, 0.125, 1.5, 0.125},
        },
    }
    crop_def.selection_box = {
		fixed = {-0.375, -0.5, -0.375, 0.375, 1.5, 0.375}
    }
	crop_def.groups.growing = 0
In this case, after it didn't want to grow, i copied it to the bottom of the farming init.lua.
I don't know what to do anymore since this kind of plant isn't anywhere to see and it just won't work. :(

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Milan: It may be easier for you to register each node seperately and add the growing=1 group to each (apart from the last)... that way it'll work with farmin api :)

User avatar
Milan*
Member
Posts: 255
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant
Location: Germany
Contact:

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

by Milan* » Post

Thanks for your answer, so i tried it from the external hemp mod again like this:

Code: Select all

minetest.register_node("hemp:hemp_1", {
	drawtype = "nodebox",
	node_box = {
		type = "fixed",
		fixed = {
			{-0.0625, -0.5, -0.0625, 0.0625, -0.25, 0.0625},
			{-0.125, -0.25, -0.125, 0.125, -0.25, 0.125},
		},
	},
	tiles = {"hemp_hemp_leaves.png", "hemp_hemp_leaves.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png"},
	sunlight_propagates = true,
    groups = { growing = 1 },
	minlight = 13,
	maxlight = default.LIGHT_MAX,
	selection_box = {
		type = "fixed",
		fixed = {-0.375, -0.5, -0.375, 0.375, -0.25, 0.375}
	}
})
For some reason the nodes are completly black now. o.O
And it still won't grow. (maybe because the black nodes?)

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Milan: If you are using this hemp mod: https://github.com/pithydon/hemp then it already works with Farming Redo and will grow using it's api, just enable the hemp mod itself and all actions go through farming redo instead of the default mod.
Last edited by TenPlus1 on Fri Sep 30, 2016 15:36, edited 1 time in total.

User avatar
Milan*
Member
Posts: 255
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant
Location: Germany
Contact:

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

by Milan* » Post


Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 15 guests