Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

biomemap is nil on generating caverealm (subterrane fork) only with mg #12

Closed
Poikilos opened this issue Feb 23, 2018 · 6 comments
Closed

Comments

@Poikilos
Copy link

Poikilos commented Feb 23, 2018

I am using experimental mapgen (mg). I'm not sure if this is an mg issue, caverealms issue, or subterrane issue--I looked at the line in question, which uses biomemap, a local variable which should contain the result of minetest.get_mapgen_object("biomemap"). I don't know enough to know why get_mapgen_object would ever return nil after looking up its meaning. If I restart the server, it works for a while, but when trying to dig deeper in a certain location the server crashes. Apparently the problem happens when a caverealm generates.

Seed: BagEnd
Location: /teleport 17,-566,98 (then start digging down)
MapGen: v7
minetest version: 0.5.0-dev (~2018-02-21)
mapgen mods:

2018-02-23 19:37:29: ACTION[Main]: [playereffects] Server shuts down. Rescuing data into playereffects.mt
2018-02-23 19:37:29: ACTION[Main]: [playereffects] Wrote playereffects data into /home/owner/.minetest/worlds/FCAWorldB/playereffects.mt.
2018-02-23 19:37:30: ACTION[Main]: [fishing] Server shuts down. saving trophies table
2018-02-23 19:37:31: ERROR[Main]: ServerError: AsyncErr: Lua: finishGenRuntime error from mod 'caverealms' in callback environment_OnGenerated(): ...al/share/minetest/games/ENLIVEN/mods/subterrane/init.lua:181: attempt to index local 'biomemap' (a nil value)
2018-02-23 19:37:31: ERROR[Main]: stack traceback:
2018-02-23 19:37:31: ERROR[Main]: ...al/share/minetest/games/ENLIVEN/mods/subterrane/init.lua:181: in function <...al/share/minetest/games/ENLIVEN/mods/subterrane/init.lua:116>
2018-02-23 19:37:31: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:420: in function </usr/local/share/minetest/builtin/game/register.lua:400>

Without mg installed, at least one caverealm generates without issues (same seed as above, but new world with no mg):
/teleport -25,-971,121
Since it only happens with mg installed, I moved this issue from FaceDeer/minetest-caverealms#2

@Poikilos
Copy link
Author

I closed the issue at caverealms since the remaining issue seems to be with mg (correct me if I'm wrong).

@Ekdohibs
Copy link
Member

I think the issue is with caverealm, since I think biomemap is not defined if the mapgen used does not support it. Since mg uses the "singlenode" mapgen, biomemap is not supported in it.

@Poikilos
Copy link
Author

Thanks, I'll check back in over there.

@Poikilos
Copy link
Author

Poikilos commented Feb 26, 2018

If possible, I could use some more info to help the maintainers fix caverealms or subterrane:
I understand now that mg uses the singlenode mapgen. However:

  • Does mg populate minetest.registered_biomes?
  • Is there some way to get mg's biome name or ground node (such as "default:dirt_with_grass") at given x,y,z location or a location on the x-z ground plane (so subterrane can decorate "native" caves according to mg's ground as opposed to crashing or leaving out biome-specific decorations)?
    I'll check in at the forum if there is not a simple answer.

@Ekdohibs
Copy link
Member

mg does not populate minetest.registered_biomes, and even completely ignores it if you fill it. Getting the ground node at a point is not easy, unfortunately -- I think the best to do is to use mg's get_biome_table and get_nearest_biome functions, as done in the code.

@Poikilos
Copy link
Author

ok thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants