[Mod] Forest

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Forest

by Inocudom » Post

Gael de Sailly wrote:
Inocudom wrote:Could you let others fork it and continue work on it?
Yes, you can continue my work, I have not really the sense of property, my aim is to improve Minetest and not to get a reputation for some things that I have made myself.

I think Minetest has a big potential but it is still not completely exploited, for example about the mapgen.

In brief, you can continue my work.

This kind of situation will be perhaps more convenient to manage with Github. I have troubles to understand how does it work.
Paramat and Krock can help you out with GitHub.

Humility is the greatest friend of open-source projects. I am glad that you have learned that.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [Mod] Forest

by Gael de Sailly » Post

I've tried to understand for months, to no avail.
But today, I found a good tutorial, and I finally managed to push Forest 1.2 in my repo !

When we really need something, we understand better.

User avatar
balthazariv
Member
Posts: 214
Joined: Mon Apr 07, 2014 15:48
Contact:

Re: [Mod] Forest

by balthazariv » Post

Hello,
This mod work but i have this message appears

Code: Select all

Error[main]: set_mapgen_params():flagmask field is deprecated, see lua_apit.txt
Thanks for your works

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [Mod] Forest

by Gael de Sailly » Post

It is a problem of Minetest versions. I've created this mod on February-March-April, the lastest Minetest was 0.4.9. Now it's 0.4.10, the syntax of this function has changed. It's not a bug, it means "Warning : in the followings versions of Minetest, the support for this syntax will be removed.
Just realize how bored we would be if the world was perfect.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [Mod] Forest

by Gael de Sailly » Post

In fact, it's not a problem.

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] Forest

by Nathan.S » Post

I keep getting an error that, from what I can tell, has something to deal with setting seasons.

Code: Select all

16:56:17: ERROR[main]: ServerError: caught (...)
16:56:17: ERROR[main]: stack traceback:
16:56:17: ERROR[main]: 	[C]: in function 'set_node'
16:56:17: ERROR[main]: 	/home/nathan/.minetest/mods/forest/init.lua:127: in function </home/nathan/.minetest/mods/forest/init.lua:109>
I looked at the init.lua file and the error seems to be happening in the last line here:

Code: Select all

minetest.register_abm({
	nodenames = {"group:season"},
	interval = 60,
	chance = 1,
	action = function(pos, node)
I don't think I have any other mod that controls mapgen, but I could be wrong.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [Mod] Forest

by Gael de Sailly » Post

I already knew this error. I thought I had corrected it. I'll fix it now. Look at the 7th post of the page 3, the problem is exactely the same. I think I've put the wrong version on Github on September 22nd.
Just realize how bored we would be if the world was perfect.

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] Forest

by Nathan.S » Post

Gael de Sailly wrote:I already knew this error. I thought I had corrected it. I'll fix it now. Look at the 7th post of the page 3, the problem is exactely the same. I think I've put the wrong version on Github on September 22nd.

Thanks. :)
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Forest

by paramat » Post

Hi, i saw on IRC you have a problem, see viewtopic.php?p=167081#p167081
Due to a recent change in the noise code, the Z size of 2D perlinmaps must be set to 1, like this:

Code: Select all

	-- perlinmap stuff
	local sidelen = x1 - x0 + 1
	local chulensxyz = {x=sidelen, y=sidelen, z=sidelen}
	local chulensxz = {x=sidelen, y=sidelen, z=1}
	local minposxyz = {x=x0, y=y0, z=z0}
	local minposxz = {x=x0, y=z0}
	-- 3D noises
	local nvals_n1 = minetest.get_perlin_map(np_n1, chulensxyz):get3dMap_flat(minposxyz)
	-- 2D noises
	local nvals_n5 = minetest.get_perlin_map(np_n5, chulensxz):get2dMap_flat(minposxz)

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Forest

by paramat » Post

I'll make sure ores and decorations are registered for singlenode mapgen, so that 'generate ores/decorations' can be used.

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Forest

by voxelproof » Post

This mod should be moved into "Old Mods" section. It crashes in newly created worlds in 0.4.16 (at least in mg v5 and valleys), it's due to some fault in get_instant_temeperature function according to the debug message:

Code: Select all

ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'forest' in callback LuaABM::trigger(): C:\Minetest\bin\..\mods\forest\init.lua:14: attempt to call field 'mod' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: 	C:\Minetest\bin\..\mods\forest\init.lua:14: in function 'get_instant_temperature'
ERROR[Main]: 	C:\Minetest\bin\..\mods\forest\init.lua:170: in function <C:\Minetest\bin\..\mods\forest\init.lua:169>
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
Mantar
Member
Posts: 584
Joined: Thu Oct 05, 2017 18:46
Contact:

Re: [Mod] Forest

by Mantar » Post

It's using math.mod, which was removed in Lua 5.2. Replace it with math.fmod and you're good.
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Forest

by voxelproof » Post

Mantar wrote:It's using math.mod, which was removed in Lua 5.2. Replace it with math.fmod and you're good.
Thanks for the hint. The mod as I had managed to figure out in an eye's blink before it crashed provides pretty rich forests, much more robust than the default ones.
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [Mod] Forest

by Gael de Sailly » Post

This mod is very old and badly coded (it was my very first coding experience), I don't recommend using it, now. I'm OK to move it in Old Mods.
If some people are interested, I could make a new, cleaner version of it.
Just realize how bored we would be if the world was perfect.

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Forest

by voxelproof » Post

Gael de Sailly wrote:This mod is very old and badly coded (it was my very first coding experience), I don't recommend using it, now. I'm OK to move it in Old Mods.
If some people are interested, I could make a new, cleaner version of it.
As you probably noticed, I'm doing some preparations for a future mountain game and looking around for already existing useful for this purpose mods. The flora of the default MT game is just enough for testing terrain features in particular tweakings, but certainly lacks refinement and diversity necessary for serving as a nice "dressing" for the montainous vistas (and as a matter of fact also "moretrees" mod doesn't focus on forests as such). As I managed to spot your "Forest" looks very good, the trees are much higher and larger and their shapes are much more interesting and 'natural'. I'd be greatly thankful if you 'revived' this mod (for now it seems to overwrite existing map_meta, so it's essentially more a mapgen than a standalone woods mod). Thanks for your response and engagement :)
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [Mod] Forest

by Gael de Sailly » Post

voxelproof wrote:for now it seems to overwrite existing map_meta, so it's essentially more a mapgen than a standalone woods mod
It is totally a mapgen since it has its own terrain shape and overwrites map_meta. It was my main project until I switched to Valleys Mapgen in February 2015.
But separating the terrain and biome parts would be a good idea if it's revived.
Just realize how bored we would be if the world was perfect.

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Forest

by TumeniNodes » Post

Gael de Sailly wrote:If some people are interested, I could make a new, cleaner version of it.
I toyed with it some time ago, I know I'd be interested in an updated version... but no rush. It would make a nice alt to the heavy moretrees mod
A Wonderful World

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [Mod] Forest

by Gael de Sailly » Post

Oh, forgot to say that the terrain part already exist as a stub: https://github.com/Gael-de-Sailly/forest_new
Just realize how bored we would be if the world was perfect.

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Forest

by TumeniNodes » Post

oh, nice :)
git clone
A Wonderful World

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Forest

by voxelproof » Post

Since I suggested before that the mod isn't openable anymore, now I post a few screenies of this nice forest mapgen. Although its perlin noise - based map generator can't match that of Valleys, it's still very pleasant and the forest areas create nice, walkable environment. Certainly worth further maintenance.

Image

Image

Image
Attachments
forest3.png
forest3.png (369.91 KiB) Viewed 788 times
forest2.png
forest2.png (368.08 KiB) Viewed 788 times
forest1.png
forest1.png (393.97 KiB) Viewed 788 times
To miss the joy is to miss all. Robert Louis Stevenson

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests