[Mod] Tectonic Map Generator 0.3.2 [mg_tectonic]
-
- Member
- Posts: 407
- Joined: Sat Dec 29, 2018 19:21
- GitHub: KaylebJay
- IRC: KaylebJay
- In-game: CalebJ
- Location: Tunnelers' Abyss
Re: [Mod] Tectonic Map Generator 0.2 [mg_tectonic]
Really nice mapgen. Here's a screenshot:
- voxelproof
- Member
- Posts: 1087
- Joined: Sat Aug 05, 2017 08:13
- Location: Europe
Re: [Mod] Tectonic Map Generator 0.2 [mg_tectonic]
My two cents. Really admirable mountain vistas, a nice and quite difficult trekking challenge, although the highest peaks in this world are unreastically sharp and thin.
- Attachments
-
- tectonic2.png (637.07 KiB) Viewed 3349 times
-
- tectonic1.png (493.45 KiB) Viewed 3349 times
To miss the joy is to miss all. Robert Louis Stevenson
Re: [Mod] Tectonic Map Generator 0.2 [mg_tectonic]
I wasn't very happy with how 0.2 turned out (those sharp mountain ridges get game breakingly bad in some places). Turns out how I thought it was working and how it actually worked did not always align! So it's a bit unbalanced.
So... done a rebalance, and a 0.3 version is on it's way. (link in main post.)
Now it is looking how I had originally intended (and hopefully I can stop getting annoyed at it!).
Needs testing though.
~~~
For the curious:
The "guts" of it. This is basically a cross section from the central mountains to the coast. Which ever line is on top is the one at the surface. This plus noise etc gives the landscape. (the highest central mountains are ~1.5km high)
So... done a rebalance, and a 0.3 version is on it's way. (link in main post.)
Now it is looking how I had originally intended (and hopefully I can stop getting annoyed at it!).
Needs testing though.
~~~
For the curious:
The "guts" of it. This is basically a cross section from the central mountains to the coast. Which ever line is on top is the one at the surface. This plus noise etc gives the landscape. (the highest central mountains are ~1.5km high)
- Attachments
-
- Mgtectequation.JPG (37.85 KiB) Viewed 3349 times
Re: [Mod] Tectonic Map Generator 0.2 [mg_tectonic]
Getting better...
This is the kind of thing I was always trying to achieve with this map, a profile that looks like the real thing.
This is the kind of thing I was always trying to achieve with this map, a profile that looks like the real thing.
- Attachments
-
- Mgtectequation2.JPG (48.27 KiB) Viewed 3349 times
Re: [Mod] Tectonic Map Generator 0.3 [mg_tectonic]
0.3 Update:
Big rebalance of landscape shape, plus many fixes and improvements.
Finally mg_tectonic is starting to look like what I had always intended.
Everything seems to be working...however as every location is unique it requires exploring the whole map to be sure! Which is why I've repeatedly thought it was done... only to find something. That said... it looks pretty good so far :-)
Big rebalance of landscape shape, plus many fixes and improvements.
Finally mg_tectonic is starting to look like what I had always intended.
Everything seems to be working...however as every location is unique it requires exploring the whole map to be sure! Which is why I've repeatedly thought it was done... only to find something. That said... it looks pretty good so far :-)
- Attachments
-
- mgt03c.jpg (380.73 KiB) Viewed 3349 times
Re: [Mod] Tectonic Map Generator 0.3 [mg_tectonic]
So I tried this and it took forever to find a spot to spawn me that wasn't in empty air, then finally landed me on some trees high, high up on a mountain.
Message repeated hundreds of times: Please wait. The spawning code is looking for the ground. Spawning at... x: -1166 z: 21789 y: 975 (Finally location where it found something)
Is there something particular I should be setting the map generator to when creating the world?
Message repeated hundreds of times: Please wait. The spawning code is looking for the ground. Spawning at... x: -1166 z: 21789 y: 975 (Finally location where it found something)
Is there something particular I should be setting the map generator to when creating the world?
- voxelproof
- Member
- Posts: 1087
- Joined: Sat Aug 05, 2017 08:13
- Location: Europe
Re: [Mod] Tectonic Map Generator 0.3 [mg_tectonic]
Just epic.Dokimi wrote:
To miss the joy is to miss all. Robert Louis Stevenson
Re: [Mod] Tectonic Map Generator 0.3 [mg_tectonic]
Added an FAQ section in main post :-)
Voxelproof -- Epic you say? Those are merely hills....! (about 5-6km West?... only 1 km high... only)
Voxelproof -- Epic you say? Those are merely hills....! (about 5-6km West?... only 1 km high... only)
Re: [Mod] Tectonic Map Generator 0.3 [mg_tectonic]
Thanks. Got it figured out now. And next time I used a seed beginning in a different number so I'm not in the hugest mountains. 600-700 hundred block from top to bottom.
I still think I'll be searching forever to find water. I must say it would be nice if there was a high chance of finding a river in a valley, or even steams flowing down from snowy mountain tops.I suppose I can add some in manually, but that feels a little like cheating. Not that I don't use cheats. I'm probably opposed because it's messy.
I still think I'll be searching forever to find water. I must say it would be nice if there was a high chance of finding a river in a valley, or even steams flowing down from snowy mountain tops.I suppose I can add some in manually, but that feels a little like cheating. Not that I don't use cheats. I'm probably opposed because it's messy.
Re: [Mod] Tectonic Map Generator [mg_tectonic]
You have to set kelp height in the 4 high bytes of param2 ( param2 = 16*height )Dokimi wrote:A few comments have gone missing here after forum crash:
...
...Main point though... 0.2 is very close to release!!! (I think I've dealt with the worst of the bugs... this map is very hard to test though... so big!)
Only one thing is really stopping me from releasing 0.2 at the moment: a bug with the new kelp blocks.
The kelp is there... but the kelp is not there!
(In contrast the new rooted corals work fine)
Anyone know what could be causing this??
There you have already
Code: Select all
vm:get_param2_data(data2)
Code: Select all
data[vi] = MISCID.c_kelpsand
data2[vi] = math.random(4, 6) * 16
minetest_game\mods\default\mapgen.lua
Code: Select all
register_decoration({name = "default:kelp" ....
minetest_game\mods\default\nodes.lua
Code: Select all
minetest.register_node("default:sand_with_kelp", {
...
paramtype2 = "leveled"
...
on_place =
local height = math.random(4, 6)
...
minetest.set_node(pos, {name = "default:sand_with_kelp", param2 = height * 16})
Silly fishes paradise, ha,ha.
Smart fishes bore to death.
Awesome mapgen.
Still havent explored much, but the landscape is impressive.
Re: [Mod] Tectonic Map Generator 0.3 [mg_tectonic]
You could bundle the mapgen with some helper mods.
The wide ranges and hard to find ore distribution change normal gameplay.
I found a huge copper blob, but still not iron.Would need a copper bucket.
Some kind of travel helper mods would be useful, for example:
- stairpick (carves stairs directly on stone)
- handholds (currently only diamond, steel woul be good)
- Soft paths, am testing with (derived from a ladder)
test_path.png - transparent background with some colored crumbles, brown, grey ...
that fits good on grass, dirt, stone, sand...
WATER - hard to find.Have seeds but no water.
A little snow in the secondary mountains ? (found dirt with snow, but no snow)
Will try to write a dowsing / water-diviner mod.The idea is get water everywhere, but digging.
Humid ? a few nodes deep
Desert ? maybe 30, 40 nodes deep
Using mapgen humidity and some simple concavity calculation to favour realistic places.
The wide ranges and hard to find ore distribution change normal gameplay.
I found a huge copper blob, but still not iron.Would need a copper bucket.
Some kind of travel helper mods would be useful, for example:
- stairpick (carves stairs directly on stone)
- handholds (currently only diamond, steel woul be good)
- Soft paths, am testing with (derived from a ladder)
Code: Select all
minetest.register_node("test:path", {
description = "Sendero",
drawtype = "signlike",
tiles = {"test_path.png"},
inventory_image = "test_path.png",
wield_image = "test_path.png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
climbable = false,
is_ground_content = false,
selection_box = {
type = "wallmounted",
},
groups = {choppy = 1 }, --?
legacy_wallmounted = true, --?
sounds = default.node_sound_dirt_defaults(), --node_sound_gravel_defaults()?
})
that fits good on grass, dirt, stone, sand...
WATER - hard to find.Have seeds but no water.
A little snow in the secondary mountains ? (found dirt with snow, but no snow)
Will try to write a dowsing / water-diviner mod.The idea is get water everywhere, but digging.
Humid ? a few nodes deep
Desert ? maybe 30, 40 nodes deep
Using mapgen humidity and some simple concavity calculation to favour realistic places.
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Small update 0.3.1
Fixed kelp bug (thank you!)
Add snow dusting
~~~
"You could bundle the mapgen with some helper mods...."
I'll leave that for a seperate modpack if someone wants to make that. You are right though, it does benefit from being combined with certain other mods.
"WATER - hard to find.Have seeds but no water."
Yup, that's related to the difficulty of adding good rivers. I experimented with adjusting one of the weather mods to allow rainfed agriculture on this map (i.e. when raining turn dry farm soil into wet) - its a good idea and worked, but also had a horrible mapchunk destroying bug... so oh well.
Fixed kelp bug (thank you!)
Add snow dusting
~~~
"You could bundle the mapgen with some helper mods...."
I'll leave that for a seperate modpack if someone wants to make that. You are right though, it does benefit from being combined with certain other mods.
"WATER - hard to find.Have seeds but no water."
Yup, that's related to the difficulty of adding good rivers. I experimented with adjusting one of the weather mods to allow rainfed agriculture on this map (i.e. when raining turn dry farm soil into wet) - its a good idea and worked, but also had a horrible mapchunk destroying bug... so oh well.
- Attachments
-
- mgtsnow.jpg (177.29 KiB) Viewed 3349 times
-
- mgtkelp.jpg (149.1 KiB) Viewed 3349 times
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Saw this in init.lua
Seems that this fails due to naming changes.
Reading a map_meta.txt, there is
"mg_name" instead of "mgname" ,
"mg_flags" instead of "flags".
And maybe better use it inside of register_on_mapgen_init
This works for me (not tested in tectonic, but standalone, but I believe should work in tectonic too)
------------------------------------------------------------------------------------------------------
And have some ideas to shorten the never-ending 20.000 m parachute insertion , ha,ha.
Will try them soon.
If this works, it could be reused to add some /xteleport X,Z that finds ground Y at X,Z rather fast, to make lazy explorers life easier.
And let newcomers jump around to take a look at different landscapes.
Code: Select all
--SINGLENODE
minetest.set_mapgen_params({mgname = "singlenode", flags = "nolight"})
--Despite being the up to date method this doesn't work
--minetest.set_mapgen_setting("mgname", "singlenode", true)
--minetest.set_mapgen_setting("flags", "nolight", true)
Reading a map_meta.txt, there is
"mg_name" instead of "mgname" ,
"mg_flags" instead of "flags".
And maybe better use it inside of register_on_mapgen_init
This works for me (not tested in tectonic, but standalone, but I believe should work in tectonic too)
Code: Select all
minetest.register_on_mapgen_init(function(mapgen_params)
minetest.set_mapgen_setting("mg_name", "singlenode", true)
minetest.set_mapgen_setting("mg_flags", "nolight", true)
end)
And have some ideas to shorten the never-ending 20.000 m parachute insertion , ha,ha.
Will try them soon.
If this works, it could be reused to add some /xteleport X,Z that finds ground Y at X,Z rather fast, to make lazy explorers life easier.
And let newcomers jump around to take a look at different landscapes.
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Short version
Some enhancements:
- modified tectonic 0.3.1 init.lua
- unpack and place this way
/worlds/<some_tectonic_world>/worldmods/snowdrift
This should override normal snowdrift mod only in this world.
All fresh baked: can contain bugs.
The long version
I know I should do a pull request to GitHub, but dont have git installed, and dont know how it works. (Still Pentium III 32 bit Windows XP )
So at least named the zip "pull_request.zip", ha, ha
Main changes are marked with --*** at end of line.
The main thing, squeeze on_generated speed.
My Pentium III claims for it.
Will try it in medium term (a couple of months)
But its enough for today, ha,ha.
Some enhancements:
- * Bye bye 2600 m parachute insertion - Fast new player spawn.
* Added chat command /xteleport x,z
Needs teleport priv ( /grantme teleport )
Finds ground altitude y, allowing teleport to new locations without arriving hundreds of nodes under or above surface.
Map generation at new location may take some seconds.
If ground at x,z is under water (sea, lakes, rivers):
- In survival lands at y = 0 (no drowning)
- In 'No damage' mode lands at sea bottom.
* Exposed heat and humidity to other mods.
* As an example, a tweaked Paramat's snowdrift : Rain and snow !
PRECTHR changed from default 0.2 to -0.5 , (more precipitations for testing)
- modified tectonic 0.3.1 init.lua
- unpack and place this way
/worlds/<some_tectonic_world>/worldmods/snowdrift
This should override normal snowdrift mod only in this world.
All fresh baked: can contain bugs.
The long version
I know I should do a pull request to GitHub, but dont have git installed, and dont know how it works. (Still Pentium III 32 bit Windows XP )
So at least named the zip "pull_request.zip", ha, ha
Main changes are marked with --*** at end of line.
- * Line 629
set_mapgen_setting("mg_name", "singlenode", true) ,
set_mapgen_setting("mg_flags", "nolight", true)
in register_on_mapgen_init (see previous post)
* Fast new player spawn
- get_far_node and current spawnplayer commented out.
- New functions spawnplayer & find_ground_level_at
* Chat command \xteleport x,z , calculates ground y
Ground could be under water if sea or lake, drowning the player would be unpolite ...
survival = minetest.settings:get_bool("enable_damage")
true -> to sea level
false -> to sea bottom
* Line 388 - OVERRIDE minetest.get_heat(pos) & minetest.get_humidity(pos)
In standard mapgens, based on noises like these... no useful for tectonic
mgv6_np_humidity
mg_biome_np_humidity
mg_biome_np_humidity_blend
mg_biome_np_heat
mg_biome_np_heat_blend
Here based on mgtec.climate and a clima_cache to save CPU
v_th & h_th defined at guess, should be better adjusted.(Higher values, I believe)
* L 380 handy logg function, both to screen and debug.txt
* Paramats snowdrift tweaked to work with tectonic.
Should be placed in worlds/<some_tectonic_world>/worldmods
to override normal snowdrift mod only in tectonic worlds.
If in doubt, you should see this in debug.txt and screen:
****** Loading mod snowdrift for tectonic ******
YMAX = 2600 Enough for highest mountains?
YMIN = -48 default is OK ?
PRECTHR changed from 0.2 to -0.5 , (more precipitations for testing),
remember reverting to 0.2 later.
Would be better ask Paramat to allow choosing between heat & hum based on current method (hard coded mgv7? noise),
or minetest.get_heat(pos) & minetest.get_humidity(pos) , then normal snowdrift would work with tectonic.
YMAX (default too low for tectonic) could be set in tectonic/init.lua with snowdrift.YMAX = 2600
* May be other weather mods could work now too, didnt test.
* Some indentation here and there.
Mix of spaces and tabs is annoying, aligment breaks if reader uses spaces/tab text editor settings different form writer.
* Line 2011 - Commented out a void = false in the second loop
causes
WARNING[Emerge-0]: Assignment to undeclared global "void" inside a function at ...
and seems unused here ?
* Line 2004 in second loop, I dont understand the return nil goal.
It would avoid reaching vm:set_data(data)
if not minetest.registered_nodes[name] then
return nil
Unknown node created by a former mod?
Why return and not simply ignore it? Failure detection?
* In mgtec.climate
Could you explain the problem with noise?'we will ignore noise (thorn0906's solution crashes when actually used'
Only CPU use, or something more, increasing RAM consumption, crash ... ?
What is 'thorn0906's solution' ?
(I am noises noob)
The main thing, squeeze on_generated speed.
My Pentium III claims for it.
Will try it in medium term (a couple of months)
But its enough for today, ha,ha.
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
A little relax ...
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Wow. Exciting stuff.Odracir wrote:
Some enhancements:...
...Have a bunch of enhancements in mind.
This will take me a long time to look at. Thorn was the last person to do a big pull request and it took me months to finally look at it. ;-)
I will tell you the same thing I told Thorn: I am happy to pass on development of mg_tectonic to someone else now. I have reached my limits with it anyway. Do you want to take on the project? Sounds like you have many more ideas.
This is the basic design philosophy of mg_tectonic:
- realism
- a tectonic (mountainous) island (e.g. like Japan, or New Zealand)
- within limits of default Minetest (i.e. only uses default nodes, but ideally should allow customization - see earlier comments)
If you want to keep this design I am happy to let you release your own version of mg_tectonic under the same name. If you want to take mg_tectonic in a new direction, then please release it under a new name. This will be quicker than waiting for me :-)
Otherwise...I might get to this eventually, but no promises!
Hooray!Odracir wrote: * Bye bye 2600 m parachute insertion - Fast new player spawn.
That will be very useful for development.Odracir wrote: * Added chat command /xteleport x,z
Not sure what you've done, but my attempts to do this caused the following bug:Odracir wrote: * Exposed heat and humidity to other mods.
- very rarely entire map chunks will be thrown out of position e.g. a giant cube of stone in the sky. Giant holes in the ground.
I don't know what was causing it. Maybe you fixed this? But it is rare, so ... be aware!
I make no claim to understand it either! It is useful for keeping a record or all changes + back ups of old versions though.Odracir wrote: I know I should do a pull request to GitHub, but dont have git installed, and dont know how it works.
See the graph in the main post to get a feel for heights. (This is based on doing all the calculations (waves etc) in a spreadsheet - essential if you ever feel like changing the landscape shape).Odracir wrote: YMAX = 2600 Enough for highest mountains?
YMIN = -48 default is OK ?
You are probably right.Odracir wrote: * Line 2011 - Commented out a void = false in the second loop
causes
WARNING[Emerge-0]: Assignment to undeclared global "void" inside a function at ...
and seems unused here ?
This will be me copy pasting something from somewhere else! Not sure if it is still needed here.Odracir wrote: ... I dont understand the return nil goal....
if not minetest.registered_nodes[name] then
return nil
...
Thorn done something (I've forgotten what) to save the noise values so the climate function could be called by other mods. When I actually tried using that it failed (not sure why).Odracir wrote: * In mgtec.climateCould you explain the problem with noise?'we will ignore noise (thorn0906's solution crashes when actually used'
Only CPU use, or something more, increasing RAM consumption, crash ... ?
What is 'thorn0906's solution' ?
(I am noises noob)
[/list]
The noise values are required by the climate function to work, but if your mod doesn't already know what the noise value is then it wont work.
In reality it doesn't much matter, hence why I set it to 0 for anything else that calls the climate function. Most climate is decided by map position (altitude, west/east etc). Noise only matters along the East-West border (an extreme climate transition set by noise), or for disturbance (which is almost all set by noise. As an aside - maybe make disturbance accessible as well as temperature and humidity. I don't know what would use it... but might as well! This is what I mean by disturbance if that's an unfamiliar concept: https://www.britannica.com/science/ecol ... isturbance).
The blend needs to be 0. This is a random value, and will give a new value each time the function is called. Mapgen only calls it once, so no problem. Weather mods call it several times a second giving new values each time. It make the weather mod flash rain on and off etc... terrible.
Not sure what your clima_cache does, but that may solve some of these issues.
Much needed!Odracir wrote: The main thing, squeeze on_generated speed..
Slowest things I have noticed:
- rivers, and lakes
- forests (I suspect the big thick trees might be badly coded). I wanted to get schematics to work instead... but failed (don't know if that would be quicker or not though).
No doubt many coding improvements can be made. Interesting work!
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
I'm getting these errors while trying this map generator:
Odracir's version
Dokimi's version
On MT & MTG v5.1.0, singlenode.
I've tried it also on MT & MTG v0.4.17.1, same issue.
Anyway, I've forked Dokimi's repository and I've created a development branch including Odracir's changes, it is available here: link.
Odracir's version
Code: Select all
2019-11-18 13:29:27: WARNING[Main]: Undeclared global variable "lnodes_fr" accessed at ...i/Giochi/minetest/bin/../mods/mg_tectonic/plants.lua:690
2019-11-18 13:29:27: [Main]: on_mapgen_init
2019-11-18 13:29:27: ERROR[Main]: ModError: Failed to load and run script from /home/utente/Programmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:
2019-11-18 13:29:27: ERROR[Main]: ...mmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:648: bad argument #2 to 'random' (interval is empty)
2019-11-18 13:29:27: ERROR[Main]: stack traceback:
2019-11-18 13:29:27: ERROR[Main]: [C]: in function 'random'
2019-11-18 13:29:27: ERROR[Main]: ...mmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:648: in function 'func'
2019-11-18 13:29:27: ERROR[Main]: ...mmi/Giochi/minetest/bin/../builtin/game/register.lua:620: in function 'register_on_mapgen_init'
2019-11-18 13:29:27: ERROR[Main]: ...mmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:623: in main chunk
2019-11-18 13:29:27: ERROR[Main]: Controlla debug.txt per i dettagli.
2019-11-18 13:29:27: ACTION[Main]: Server: Shutting down
Code: Select all
2019-11-18 13:39:07: WARNING[Main]: Undeclared global variable "lnodes_fr" accessed at ...i/Giochi/minetest/bin/../mods/mg_tectonic/plants.lua:690
2019-11-18 13:39:07: ERROR[Main]: ModError: Failed to load and run script from /home/utente/Programmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:
2019-11-18 13:39:07: ERROR[Main]: ...mmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:596: bad argument #2 to 'random' (interval is empty)
2019-11-18 13:39:07: ERROR[Main]: stack traceback:
2019-11-18 13:39:07: ERROR[Main]: [C]: in function 'random'
2019-11-18 13:39:07: ERROR[Main]: ...mmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:596: in function 'func'
2019-11-18 13:39:07: ERROR[Main]: ...mmi/Giochi/minetest/bin/../builtin/game/register.lua:620: in function 'register_on_mapgen_init'
2019-11-18 13:39:07: ERROR[Main]: ...mmi/Giochi/minetest/bin/../mods/mg_tectonic/init.lua:574: in main chunk
2019-11-18 13:39:07: ERROR[Main]: Controlla debug.txt per i dettagli.
2019-11-18 13:39:07: ACTION[Main]: Server: Shutting down
I've tried it also on MT & MTG v0.4.17.1, same issue.
Anyway, I've forked Dokimi's repository and I've created a development branch including Odracir's changes, it is available here: link.
My repositories: Codeberg.org | My ContentDB's page
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Seems that you are using a different Lua implementation than Dokimi's or mine.
Doing a search found this here:
lakes = {x = math.random(13000,5500), z = math.random(-25000,25000), r = math.random(1,4)}
-25000 < 25000 , OK
1 < 4 , OK
13000 > 5500 , BAD
This should work: 13000,5500 -> 5500,13000
lakes = {x = math.random(5500,13000), z = math.random(-25000,25000), r = math.random(1,4)}
Dokimi's line 596
Odracir's line 648
BUT, there could be more math.random calls with same problem ...
Dont know why your Lua complains about this and ours not.
Some different compilation flag? sfan5 knows surely, ha ha
Doing a search found this here:
Looking at the ffending code...bad argument #2 to 'random' (interval is empty):
This means that you're 2nd argument provided is smaller than the first, to fix it, you would have to give it an integer greater than or equal to the first
lakes = {x = math.random(13000,5500), z = math.random(-25000,25000), r = math.random(1,4)}
-25000 < 25000 , OK
1 < 4 , OK
13000 > 5500 , BAD
This should work: 13000,5500 -> 5500,13000
lakes = {x = math.random(5500,13000), z = math.random(-25000,25000), r = math.random(1,4)}
Dokimi's line 596
Odracir's line 648
BUT, there could be more math.random calls with same problem ...
Dont know why your Lua complains about this and ours not.
Some different compilation flag? sfan5 knows surely, ha ha
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
More info here:
Perhaps Dokimi and me use Minetest compiled with LuaJIT and you dont?
But of course better solution is rewriting math.random(a,b) so that a < b to work in all cases
Will take a look...
Search "math.random(" (49 hits in 4 files) ...
Dont find more cases of second arg < first arg in whole tectonic.
Should work now.
Minetest uses Lua 5.1 , no first option.There are a few ways to address this problem:
* Upgrade to Lua 5.2. That one has since fixed this issue by treating the input arguments as lua_Number instead.
* Switch to LuaJIT which does not have this integer overflow issue.
* Patch the Lua 5.1 source yourself with the fix and recompile.
* Modify your random range so it does not overflow
Perhaps Dokimi and me use Minetest compiled with LuaJIT and you dont?
But of course better solution is rewriting math.random(a,b) so that a < b to work in all cases
Will take a look...
Search "math.random(" (49 hits in 4 files) ...
Dont find more cases of second arg < first arg in whole tectonic.
Should work now.
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Thanks :)
I've swapped those values and it fixed it, I've also updated the linked fork.
I'm on Debian10, I've compiled MT with the 'drun in place' flag only, not sure which Lua backend it is using.
Ok, off to explore the map. :)
I've swapped those values and it fixed it, I've also updated the linked fork.
I'm on Debian10, I've compiled MT with the 'drun in place' flag only, not sure which Lua backend it is using.
Ok, off to explore the map. :)
My repositories: Codeberg.org | My ContentDB's page
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Had a very quick look at Hamlet's version on Github
lnodes_fr is asking for fruit for giant trees, which is not given by any of them (or even in the list of variables available). This is probably from copy pasting things. Either it can be removed, or apple trees can be given fruit and all the others nil.
Edit: just delete it. You would have to create a giant-fruit-tree tree-type for this to work.
(There will be many little mistakes like this! The random number error was probably just me being dozy too!)
get_mapgen_params: not sure about this, probably just needs updating.
Cool to see the code side of this finally getting improved. Everything I done so far was focused on the aesthetics and figuring out the basic concept. Hopefully this can be made a lot faster with some better coding. :-)
Code: Select all
WARNING[Main]: Undeclared global variable "lnodes_fr" accessed at ...1.0-win64\bin\..\mods\mg_tectonic-development/plants.lua:690
WARNING[Main]: get_mapgen_params is deprecated; use get_mapgen_setting instead (at ...5.1.0-win64\bin\..\mods\mg_tectonic-development\init.lua:623)
Edit: just delete it. You would have to create a giant-fruit-tree tree-type for this to work.
(There will be many little mistakes like this! The random number error was probably just me being dozy too!)
get_mapgen_params: not sure about this, probably just needs updating.
Cool to see the code side of this finally getting improved. Everything I done so far was focused on the aesthetics and figuring out the basic concept. Hopefully this can be made a lot faster with some better coding. :-)
- Diamond knight
- Member
- Posts: 475
- Joined: Sun Apr 19, 2015 19:50
- GitHub: Diamondknight
- In-game: Ferrumprinceps
- Location: Chilling in Constantinople
- Contact:
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Is this still laggy as all heck like it was back when I stopped using it half a yearish ago?
My modding team: https://github.com/basilea-rhomaion
-
- New member
- Posts: 2
- Joined: Thu Oct 10, 2019 20:09
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
It is.Diamond knight wrote:Is this still laggy as all heck like it was back when I stopped using it half a yearish ago?
Any known attempts to rewrite this wonder as a normal builtin mapgen? I have first little successes on understanding Minetest internals and running custom mapgen, but I'm also not familiar with CPP and at odds with maths.
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
Does this map gen create very deep ocean? Like ocean trench https://en.wikipedia.org/wiki/Mariana_Trench
Blend 3d models https://www.dropbox.com/sh/eocmx6axullc ... aI9sa?dl=0
Corals mod(WIP) viewtopic.php?f=9&t=13425
Corals mod(WIP) viewtopic.php?f=9&t=13425
Re: [Mod] Tectonic Map Generator 0.3.1 [mg_tectonic]
The most up to date development version is the "experimental" branch:
https://github.com/DokimiCU/mg_tectonic ... perimental
This includes above mention changes, plus what will be my last contribution to this map ("wave noise"... to make the map more unpredictable, instead of a series of straight parallel ranges. This possible interferes with some of the above changes because now noise really matters. I wont be doing a release as now multiple people's work is getting muddled together...)
Is it laggy?
Yes! No performance changes have been made.
Deep oceans?
Try map edges and corners. I can't remember how deep it gets (>500m? 1000m?)
Rewrite as builtin?
See FAQ. I don't think anyone has tried. That should wait until performance, code generalisation etc is all worked out.
https://github.com/DokimiCU/mg_tectonic ... perimental
This includes above mention changes, plus what will be my last contribution to this map ("wave noise"... to make the map more unpredictable, instead of a series of straight parallel ranges. This possible interferes with some of the above changes because now noise really matters. I wont be doing a release as now multiple people's work is getting muddled together...)
Is it laggy?
Yes! No performance changes have been made.
Deep oceans?
Try map edges and corners. I can't remember how deep it gets (>500m? 1000m?)
Rewrite as builtin?
See FAQ. I don't think anyone has tried. That should wait until performance, code generalisation etc is all worked out.
Who is online
Users browsing this forum: No registered users and 5 guests