Game world sky does not light the ground, mapgen fails to create decorations or dirt

Post Reply
dennisjenkins
New member
Posts: 6
Joined: Wed May 13, 2020 03:37
GitHub: dennisjenkins75
IRC: dennisjenkins

Game world sky does not light the ground, mapgen fails to create decorations or dirt

by dennisjenkins » Post

Hello.

For the past few weeks I've been creating a game in minetest. There is no "default" mod. I copy things from default that i want, but I split them into their own mods within my game (like trees, terrain, materials, tools, foods, etc...) I've also added several of my own mods that create unique structures (buildings, castles, etc...). It works for all mapgens except v6 when I run the game in minetest client 5.2.0. All of my Lua unit tests pass. Trees grow, dirt is there, flowers appear, etc...

I started testing my game "as a server", by running "minetest --server ..." in a dedicated Ubuntu VM (actually, an LXC container ontop of Gentoo Linux, but that should not matter). I've done this in the past for MANY games (Wuzzy's hades-revisited, MC2, minetest_game, etc...) and it works fine. Clients running on my LAN can connect and play the games just fine. Even if the minetest server is 5.3.0 and the clients are 5.2.0, minetest_game (+pipeworks, technic, digilines, etc...) works fine.

However, my WIP game does not look right. The server starts up, nothing weird is in the logs (even when running --verbose). My client connects, I register my player, and the world loads in. its all black. They sky is blue, but the ground is solid black. Creative inventory is there. I have all 400+ nodes, including dirt, tree trunks, torches, etc... If I place a torch on the ground, I can see stone and ores, but no dirt or trees. The terrain has shape (Carpathian, flat, v7, etc...). Water is there and blue. But no dirt. I added a chat command to "print(dump(minetest.registered_biomes))" - and they are all there after the game is up and running. (They were copied verbatim from the v7 mapgen in minetest_game/default, except I renamed the nodes from 'default:' to "adv_terrain:', etc...)

I used scripts to nuke and reset the game world on my local client (the one that works). I'm fairly certain I do not have any module contamination from other mods. I have a seperate script that nukes and rebuilds the entire LXC container from scratch.

Examples:
https://imagebin.ca/v/5T0WpZYZMcex - World when hosted on server (buggy) (client local)
https://imagebin.ca/v/5T0XHz5grecO - Exact same game+mods, running locally.

Any suggestions on how to diagnose why the game is behaving this way when its hosted from a headless server?

dennisjenkins
New member
Posts: 6
Joined: Wed May 13, 2020 03:37
GitHub: dennisjenkins75
IRC: dennisjenkins

Re: Game world sky does not light the ground, mapgen fails to create decorations or dirt

by dennisjenkins » Post

I should have added the following:

1. Yes, I checked the game time. i tried "6000", "12000", etc... No light illuminates the ground, but the sky changes brightness with the game time.

2. "default:stone" -> "adv_terrain:stone". "default:wood" -> "adv_trees:wood". I've updated all of the crafting recipes, etc.. The ".mts" files are compressed binary blobs that contain "default:" strings, so I do have some aliases in my mods so that the schematics work. And they do work when the game is hosted locally (see above screen shot).

3. My mods that spawn structures work; just that nothing is lit except for the torches that spawn in the structures.

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Game world sky does not light the ground, mapgen fails to create decorations or dirt

by Krock » Post

Open your world's map_meta.txt file and check whether it contains these two settings (plus values):

Code: Select all

mg_flags = caves, dungeons, light, decorations, biomes
mg_name = v7
According to the images it looks like your server does not have the "light" flag. Also re-generate the map in that particular spot to ensure it's using up-to-date settings (/deleteblocks here <range>, or so).

Also note that mgv6 uses a different API for registering decorations and that biomes cannot be added or removed there.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

dennisjenkins
New member
Posts: 6
Joined: Wed May 13, 2020 03:37
GitHub: dennisjenkins75
IRC: dennisjenkins

Re: Game world sky does not light the ground, mapgen fails to create decorations or dirt

by dennisjenkins » Post

Ah. Ok. Thank you for the hint. However, it is slightly more complicated than that. In my mapgen/biome lua code, I override most settings from the user-surfaced config. In particular, I have these lines:

-- Disable caverns for all mapgens.
minetest.set_mapgen_setting("mg_flags", "nocaves, nodungeons", true)
minetest.set_mapgen_setting("mgv5_spflags", "nocaverns", true)
minetest.set_mapgen_setting("mgv6_spflags", "noflat", true)
minetest.set_mapgen_setting("mgv7_spflags",
"mountains, ridges, nofloatlands, nocaverns", true)
minetest.set_mapgen_setting("mgcapathian_spflags", "nocaverns", true)
minetest.set_mapgen_setting("mgflat_spflags", "lakes, hills", true)



In minetest 5.2.0, the unspecified flags take on a truthy value, so "light". But in minetest 5.3.0, they are now defaulting to false, so "nolight". Editing map_meta directly won't help, it gets clobbered when my Lua init code runs. However, I can fix the Lua code. And that did fix the problem.

Thank you very much for the hint.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests