[Modpack] Plantlife [rolling release] [plantlife_modpack]

User avatar
afflatus
Member
Posts: 344
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by afflatus » Post

I love this mod, thank you so much for all the work you've put into it!

Due to the order things get spawned in different mapgens, I often find things growing where there isn't enough light. So I added this hack to woodsoils/nodes.lua - it is far from perfect, it messes up the subtleties around ferns and results in little growth under oak trees. I may modify it to differentiate between conifers and deciduous trees, but for now it has the right sort of effect. Currently it kills off anything in group:flora, which may leave wild veg from farming* untouched.

Code: Select all

-- Die-off ABM

minetest.register_abm({
	nodenames = {"default:dirt", 
		"woodsoils:dirt_with_leaves_1", 
		"woodsoils:dirt_with_leaves_2", 
		"woodsoils:grass_with_leaves_1", 
		"woodsoils:grass_with_leaves_2", 
		"default:dirt_with_grass"
	},
	interval = 2,
	chance = 200,
	action = function(pos, node)
		local above = vector.add(pos, {x=0, y=1, z=0})
		local name = minetest.get_node(above).name
		local nodedef = minetest.registered_nodes[name]
		if nodedef and (nodedef.sunlight_propagates or nodedef.paramtype == "light")
				and nodedef.liquidtype == "none" then
			if (minetest.get_node_light(above, 0.5) or 0) < 13 then
				if minetest.find_node_near(above, 9, {"group:tree","group:sapling"}) 
						or minetest.find_node_near(above, 3, {"group:leaves"}) then
					if (minetest.get_node_light(above, 0.5) or 0) >= 11 then
						minetest.set_node(pos, {name = "woodsoils:grass_with_leaves_1"})
					elseif (minetest.get_node_light(above, 0.5) or 0) >= 9 then
						minetest.set_node(pos, {name = "woodsoils:grass_with_leaves_2"})
					elseif (minetest.get_node_light(above, 0.5) or 0) >= 7 then
						minetest.set_node(pos, {name = "woodsoils:dirt_with_leaves_1"})
						if minetest.get_node_group(name, "flora") > 0 then
							minetest.remove_node(above)
						end				
					else
						minetest.set_node(pos, {name = "woodsoils:dirt_with_leaves_2"})
						if minetest.get_node_group(name, "flora") > 0 then
							minetest.remove_node(above)
						end				
					end
				end
			elseif minetest.find_node_near(above, 3, 
				{"ferns:fern_04","ferns:fern_03","ferns:fern_02","ferns:fern_01","group:sapling"}
			) == nil then
				if(minetest.get_node_light(above, 0.5) or 0) < 7 then
					minetest.set_node(pos, {name = "default:dirt"})
				elseif (minetest.get_node_light(above, 0.5) or 0) >= 13 then
					minetest.set_node(pos, {name = "default:dirt_with_grass"})
				end
			end
		end
	end
})

User avatar
afflatus
Member
Posts: 344
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by afflatus » Post

Of course if we were going to do this job properly we'd have to map soil acidity as well as temperature and humidity ... :D

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

That's kinda what the generic "can grow here" perlin layer is for. It's sort of a soil "fertility factor". I'm not sure I like the ABM-method of reworking the plants under the trees, but it's a good start though.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
afflatus
Member
Posts: 344
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by afflatus » Post

Sure additional ABMs are not ideal. It's a hack. I just upgraded mods and notice that paragenv7 now plays much better with plantlife and moretrees.

User avatar
Fritigern
Member
Posts: 43
Joined: Mon Sep 29, 2014 11:01
In-game: Fritigern
Location: Spokane, WA

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by Fritigern » Post

VanessaE, the latest Git version of minetest checks for uninitialized globals. Plantlife has a few of these instances, the worst one being the one in plants_lib. see my fixes below. they stopped the warnings.
I hope this helps.
+ Spoiler
+ Spoiler
+ Spoiler
--
This is NOT a sig.

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

Thanks for catching these (my copy of Minetest isn't up-to-date). Fixed all three, in git.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Fritigern
Member
Posts: 43
Joined: Mon Sep 29, 2014 11:01
In-game: Fritigern
Location: Spokane, WA

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by Fritigern » Post

Does the fact that you didn't correct my fixes mean that i did it right? I that's the case then wowsers! I'm sure you remember me telling you that i am a Lua noob, and "noob" is a mild description of it ;-)
--
This is NOT a sig.

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

Yup, pretty much :) I did "correct" one of them by uncommenting one of those lines in bushes though (better to choose a valid default than to go with 0 - paranoia).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Fritigern
Member
Posts: 43
Joined: Mon Sep 29, 2014 11:01
In-game: Fritigern
Location: Spokane, WA

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by Fritigern » Post

Ah, good to know. I keep learning daily! ;-)
--
This is NOT a sig.

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

A few updates went in today to fix some bugs that happen with the latest -dev builds of Minetest (due mostly to changes in how the plantlike draw type is handled, as well among other things). Mostly focusing on plants that seemed to "float" in mid-air.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by gumangel » Post

do those auto-generate only on a new map? or it can use my already created map aswell?

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

For the most part, plantlife only generates on newly explored areas of a map (regardless of the map's overall age), except for one or two items in the modpack such as mushrooms, which will spring up in old areas also.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by gumangel » Post

VanessaE wrote:For the most part, plantlife only generates on newly explored areas of a map (regardless of the map's overall age), except for one or two items in the modpack such as mushrooms, which will spring up in old areas also.
Thank you really much! God bless u!

Scheiker
New member
Posts: 3
Joined: Fri Jan 09, 2015 17:55

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by Scheiker » Post

Maybe it is just me, but can anyone confirm that the bushes from bushes_classic are being generated? I can't seem to find them unless I spawn them myself.

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

They always seemed to work for me? However I deliberately made them rare.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

Update: the bushes from the bushes_classic mod have been turned into mesh nodes. Better appearance, probably a bit more accurate to the spirit of the original textures, but in 3d ;-)

EDIT: did the baskets (full and empty), too.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

vitaminx
Member
Posts: 49
Joined: Tue Dec 30, 2014 15:08

.

by vitaminx » Post

.
Last edited by vitaminx on Sun Sep 23, 2018 15:53, edited 1 time in total.

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

The half benches and floating meat is a side effect of Home Decor using two nodes for the bench and grill objects. Those and most other two-node objects will be made into single-object mesh nodes soon, which will solve that issue. For now, use worldedit to delete them.

That said, to my knowledge, there is no "hay" in plantlife modpack, and certainly no after-mapgen nodes that would spawn without checking for air/buildable_to. You've got some other mod supplying that.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

vitaminx
Member
Posts: 49
Joined: Tue Dec 30, 2014 15:08

.

by vitaminx » Post

.
Last edited by vitaminx on Sun Sep 23, 2018 15:53, edited 1 time in total.

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

Wow, I'd completely forgotten about that. However, since it is directly overwriting the ABM-triggered node position with a replacement, this can't be the source of the problem.

I don't see anywhere in the code where hay is added by itself (outside of the above drying ABM), and only one place where dryplants:grass is being added to the map, but that is during map generation time (dryplants/meadowvariation.lua), and air-checking is enabled there (this is the default).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
fireglow
Member
Posts: 93
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow
Location: Germany

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by fireglow » Post

Seeing this crash with latest git:

Code: Select all

2015-02-09_12:15:52.49602 ERROR[main]: ERROR: An unhandled exception occurred: ...ods/plantlife_modpack/nature_classic/global_function.lua:47: attempt to compare number with nil
2015-02-09_12:15:52.49607 ERROR[main]: stack traceback:
2015-02-09_12:15:52.49609 ERROR[main]:        ...ods/plantlife_modpack/nature_classic/global_function.lua:47: in function 'grow_node'
2015-02-09_12:15:52.49611 ERROR[main]:        ...ods/plantlife_modpack/nature_classic/global_function.lua:12: in function <...ods/plantlife_modpack/nature_classic/global_function.lua:3>
2015-02-09_12:15:52.49613 ERROR[main]:        /srv/minetest/bin/../builtin/game/register.lua:341: in function </srv/minetest/bin/../builtin/game/register.lua:329>
at commit 581aee0570d2270e58848bfc9d3fd7f0cbe7e501

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

Odd crash. get_node_light() must somehow be returning nil for the grow target. Fix committed.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
fireglow
Member
Posts: 93
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow
Location: Germany

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by fireglow » Post

Yep, crash is gone.
Thank you, VanessaE.

User avatar
VanessaE
Moderator
Posts: 4550
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by VanessaE » Post

Small update: mushrooms now use a nice meshnode instead of plantlike drawtype, model by jp/kilbith (with changes by me).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

Scheiker
New member
Posts: 3
Joined: Fri Jan 09, 2015 17:55

Re: [Modpack] Plantlife [git rolling release][plantlife_modp

by Scheiker » Post

Scheiker wrote:Maybe it is just me, but can anyone confirm that the bushes from bushes_classic are being generated? I can't seem to find them unless I spawn them myself.
Nvm, I don't know what it was but after doing a rebuild of my GNU/LInux installation I can now see the bushes in places where I know I had looked before. Could of been a bad lua version or something, but at least it works now :)

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests