Post your mapgen questions here (modding or engine)
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: Post your mapgen questions here (modding or engine)
I was dealing with this recently. I'm betting the flowers were there first. I think you need to add "force_place" to your lua table with nodes that will be placed no matter what. Without it, if there is something in the way, the tree trunk will be skipped to prevent overwriting existing nodes.
local T = {name = "default:aspen_tree", prob = 255, force_place = true}
This is a example from a aspen tree, see https://github.com/minetest-mods/savesc ... r/init.lua for more.
local T = {name = "default:aspen_tree", prob = 255, force_place = true}
This is a example from a aspen tree, see https://github.com/minetest-mods/savesc ... r/init.lua for more.
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
- taikedz
- Member
- Posts: 698
- Joined: Sun May 15, 2016 11:11
- GitHub: taikedz
- IRC: DuCake
- In-game: DuCake
- Location: Scotland, UK
- Contact:
Re: Post your mapgen questions here (modding or engine)
You're going to have to post the code or a link to a github for us to help you here... not sure how you've defined things, so cannot help at all....the_raven_262 wrote:I really need help with this one :P
I tried registering a new biome (using the biome api), but since i'm making a game without starting from the default minetest_game, i have no biomes defined already.So, when i register this new biome (two of them, one for land and one for ocean), i get two biomes that are covered only in the "node_stone" node.There are traces of the nodes i placed as "node_top" and "node_filler", but only in cave entrances.There is no water, and i get strange void lines that cut the terrain at random heights (45 and 125 i guess). I hope there is a solution here :D
Re: Post your mapgen questions here (modding or engine)
Thanks, that also helps with the sapling issue. And now the trees are dug into the ground one node deep like the default trees.ExeterDad wrote:I was dealing with this recently. I'm betting the flowers were there first. I think you need to add "force_place" to your lua table with nodes that will be placed no matter what. Without it, if there is something in the way, the tree trunk will be skipped to prevent overwriting existing nodes.
local T = {name = "default:aspen_tree", prob = 255, force_place = true}
This is a example from a aspen tree, see https://github.com/minetest-mods/savesc ... r/init.lua for more.
But I have to find a solution to load the tree registration before the other decoration. Maybe I have an idea, but it's a lot of work
- taikedz
- Member
- Posts: 698
- Joined: Sun May 15, 2016 11:11
- GitHub: taikedz
- IRC: DuCake
- In-game: DuCake
- Location: Scotland, UK
- Contact:
Re: Post your mapgen questions here (modding or engine)
Second thought - would it be possible/desirable to split the trees into a "trees" mod within minetest_game, such that tree generation and ABMs could be overridden specifically, without needing to make a new subgme?taikedz wrote:Again this interesting observation is not mapgen-related :-)Sergey wrote: When I saw aspen tree first time, I thought "wow, there are birches in the game!"
This means obviosuly that a tree-placement API spec needs defining, so that any new tree mod would be able to expose a compatible API.... maybe supply a base template in the distribution?
(on that note.... one wonders if the default game's mapgen should itself be a "mapgen" mod that can be overridden simply by defining an alternative "mapgen" mod ...?)
- the_raven_262
- Member
- Posts: 343
- Joined: Mon Sep 22, 2014 09:30
- GitHub: theraven262
- IRC: [Discord unfortunately] corvus262
Re: Post your mapgen questions here (modding or engine)
Well then, here you are :Dtaikedz wrote:You're going to have to post the code or a link to a github for us to help you here... not sure how you've defined things, so cannot help at all....the_raven_262 wrote:I really need help with this one :P
I tried registering a new biome (using the biome api), but since i'm making a game without starting from the default minetest_game, i have no biomes defined already.So, when i register this new biome (two of them, one for land and one for ocean), i get two biomes that are covered only in the "node_stone" node.There are traces of the nodes i placed as "node_top" and "node_filler", but only in cave entrances.There is no water, and i get strange void lines that cut the terrain at random heights (45 and 125 i guess). I hope there is a solution here :D
Code: Select all
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
minetest.register_biome({
name = "grassland",
--node_dust = "",
node_top = "base:dirt_with_grass",
depth_top = 1,
node_filler = "base:dirt",
depth_filler = 3,
node_stone = "base:stone",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
y_min = 5,
y_max = 31000,
heat_point = 50,
humidity_point = 50,
})
minetest.register_biome({
name = "grassland_ocean",
--node_dust = "",
node_top = "base:sand",
depth_top = 2,
node_filler = "base:sand",
depth_filler = 2,
node_stone = "base:stone",
node_water_top = "base:water",
depth_water_top = 1,
node_water = "base:water",
y_min = -31000,
y_max = 4,
heat_point = 50,
humidity_point = 50,
})
Re: Post your mapgen questions here (modding or engine)
Is it normal to generate map with such explicit straight borders of biomes?
- taikedz
- Member
- Posts: 698
- Joined: Sun May 15, 2016 11:11
- GitHub: taikedz
- IRC: DuCake
- In-game: DuCake
- Location: Scotland, UK
- Contact:
Re: Post your mapgen questions here (modding or engine)
Replace all instances of "base:" with "default:"the_raven_262 wrote:
Well then, here you are :DThis is everything that I have in code that is mapgen related, i don't know if I am missing something :PCode: Select all
minetest.clear_registered_biomes() minetest.clear_registered_decorations() minetest.register_biome({ name = "grassland", --node_dust = "", node_top = "base:dirt_with_grass", depth_top = 1, node_filler = "base:dirt", <snip ...>
;-)
- taikedz
- Member
- Posts: 698
- Joined: Sun May 15, 2016 11:11
- GitHub: taikedz
- IRC: DuCake
- In-game: DuCake
- Location: Scotland, UK
- Contact:
Re: Post your mapgen questions here (modding or engine)
I personally would not expect that.... what seed + mapgen are you using?Sergey wrote:Is it normal to generate map with such explicit straight borders of biomes?
(check in the worlds folder, name of your world, the map_meta.txt file for that world
Re: Post your mapgen questions here (modding or engine)
mapgen: valleystaikedz wrote:I personally would not expect that.... what seed + mapgen are you using?Sergey wrote:Is it normal to generate map with such explicit straight borders of biomes?
(check in the worlds folder, name of your world, the map_meta.txt file for that world
seed: 3766931956736304717
- the_raven_262
- Member
- Posts: 343
- Joined: Mon Sep 22, 2014 09:30
- GitHub: theraven262
- IRC: [Discord unfortunately] corvus262
Re: Post your mapgen questions here (modding or engine)
:D That would be the easiest solution ... if i had default mod in my game :/taikedz wrote:Replace all instances of "base:" with "default:"the_raven_262 wrote:
Well then, here you are :DThis is everything that I have in code that is mapgen related, i don't know if I am missing something :PCode: Select all
minetest.clear_registered_biomes() minetest.clear_registered_decorations() minetest.register_biome({ name = "grassland", --node_dust = "", node_top = "base:dirt_with_grass", depth_top = 1, node_filler = "base:dirt", <snip ...>
;-)
And, no it wouldn't do anything.The nodes are registered properly i tested them each one.
any other ideas? Oo
- taikedz
- Member
- Posts: 698
- Joined: Sun May 15, 2016 11:11
- GitHub: taikedz
- IRC: DuCake
- In-game: DuCake
- Location: Scotland, UK
- Contact:
Re: Post your mapgen questions here (modding or engine)
Does the mod with your mapgen depend on the mod called base? That would be prerequisite... aside from that.... zip file/git url? :-p
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Sergey, those straight-edged biomes are likely due to the change to the registered biomes in 0.4.15, see viewtopic.php?f=18&t=15939
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
burli,
> Works fine so far except that the trunk base is often removed by other decoration
See default/mapgen.lua, the taller decorations (trees, cacti, papyrus) are registered before the smaller (grass, flowers) to avoid this happening.
> But I have to find a solution to load the tree registration before the other decoration. Maybe I have an idea, but it's a lot of work
You can 'clear_registered_decorations' then copy-paste all of them into your mod and insert your new decorations at the right places.
> Works fine so far except that the trunk base is often removed by other decoration
See default/mapgen.lua, the taller decorations (trees, cacti, papyrus) are registered before the smaller (grass, flowers) to avoid this happening.
> But I have to find a solution to load the tree registration before the other decoration. Maybe I have an idea, but it's a lot of work
You can 'clear_registered_decorations' then copy-paste all of them into your mod and insert your new decorations at the right places.
- SuperPantsofDoom
- Member
- Posts: 37
- Joined: Sun Dec 20, 2015 00:10
- In-game: aslar
Re: Post your mapgen questions here (modding or engine)
I have a map gen question I'm making a minigame and i need a way to save the map and reference it at any point w/ another mod similar to capture the flag
if you now of a way to make this happen or if this exists and i don't know please respond thx
if you now of a way to make this happen or if this exists and i don't know please respond thx
check out my subgame yentest viewtopic.php?f=50&t=16014
Re: Post your mapgen questions here (modding or engine)
Can this map be fixed? Or it is irreversibly?paramat wrote:Sergey, those straight-edged biomes are likely due to the change to the registered biomes in 0.4.15, see viewtopic.php?f=18&t=15939
- duane
- Member
- Posts: 1715
- Joined: Wed Aug 19, 2015 19:11
- GitHub: duane-r
- Location: Oklahoma City
- Contact:
Re: Post your mapgen questions here (modding or engine)
You can't reverse the process. You could load the old version of minetest to prevent any further changes.Sergey wrote:Can this map be fixed? Or it is irreversibly?paramat wrote:Sergey, those straight-edged biomes are likely due to the change to the registered biomes in 0.4.15, see viewtopic.php?f=18&t=15939
It's possible to make a mod that replaces the nodes and decorations of one biome with another, assuming you want to replace all new chunks with old, or vice versa. That would leave you with everything looking one way or the other, after you revisited all the terrain. Making something that blends the biomes would be a lot harder, since there's no simple way to determine what chunks were generated before and after the biome change.
Believe in people and you don't need to believe anything else.
- the_raven_262
- Member
- Posts: 343
- Joined: Mon Sep 22, 2014 09:30
- GitHub: theraven262
- IRC: [Discord unfortunately] corvus262
Re: Post your mapgen questions here (modding or engine)
I have the "base" mod in the depends.txt it works, tested it and it contains all the needed nodes, which also work.taikedz wrote:Does the mod with your mapgen depend on the mod called base? That would be prerequisite... aside from that.... zip file/git url? :-p
The problem is, that whichever node i set as the "node_top", doesn't get generated at all (except for those at cave entrances). The "node_stone" is generated normally as it should and has no problems, but anything else (like water nodes) doesn't work.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
burli
Tree trunk nodes should be force-placed. Per-node force-place was actually added to schematics to allow tree trunks to replace leaves of other overlapping trees without leaves replacing the trunks of other overlapping trees.
Tree trunk nodes should be force-placed. Per-node force-place was actually added to schematics to allow tree trunks to replace leaves of other overlapping trees without leaves replacing the trunks of other overlapping trees.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
the_raven_262
Have you set the mapgen aliases for the map generators? As here https://github.com/minetest/minetest_ga ... gen.lua#L5 set those to your subgame's nodes.
Have you set the mapgen aliases for the map generators? As here https://github.com/minetest/minetest_ga ... gen.lua#L5 set those to your subgame's nodes.
- the_raven_262
- Member
- Posts: 343
- Joined: Mon Sep 22, 2014 09:30
- GitHub: theraven262
- IRC: [Discord unfortunately] corvus262
Re: Post your mapgen questions here (modding or engine)
I thought those are only for v6 oOparamat wrote:the_raven_262
Have you set the mapgen aliases for the map generators? As here https://github.com/minetest/minetest_ga ... gen.lua#L5 set those to your subgame's nodes.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Sergey
> Can this map be fixed? Or it is irreversibly?
You could revert the mapgen code in MTGame to how it was before (difficult), or, only use that world in MT / MTG 0.4.14. Then do /deleteblocks for the affected volume, that will re-generate the volume of world.
We're sorry for the biomes breakage but the set of biomes was not stable and needed improvement.
> Can this map be fixed? Or it is irreversibly?
You could revert the mapgen code in MTGame to how it was before (difficult), or, only use that world in MT / MTG 0.4.14. Then do /deleteblocks for the affected volume, that will re-generate the volume of world.
We're sorry for the biomes breakage but the set of biomes was not stable and needed improvement.
Last edited by paramat on Wed Feb 08, 2017 18:04, edited 1 time in total.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
All mapgen use nodes like "mapgen_stone" so you need to alias your subgame nodes to those for the mapgen to use them.
- the_raven_262
- Member
- Posts: 343
- Joined: Mon Sep 22, 2014 09:30
- GitHub: theraven262
- IRC: [Discord unfortunately] corvus262
Re: Post your mapgen questions here (modding or engine)
Thanks a lot for your help, paramat :Dparamat wrote:All mapgen use nodes like "mapgen_stone" so you need to alias your subgame nodes to those for the mapgen to use them.
Re: Post your mapgen questions here (modding or engine)
I don't understand what blocks need to be regenerated.paramat wrote:Sergey
> Can this map be fixed? Or it is irreversibly?
You could revert the mapgen code in MTGame to how it was before (difficult), or, only use that world in MT / MTG 0.4.14. Then do /deleteblocks for the affected volume, that will re-generate the volume of world.
We're sorry for the biomes breakage but the set of biomes was not stable and needed improvement.
Who is online
Users browsing this forum: No registered users and 5 guests