Post your mapgen questions here (modding or engine)

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Sat Oct 12, 2019 22:52

I agree, i am not suggesting the method i described is a practical solution.
 

Extex
Member
 
Posts: 107
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Post your mapgen questions here (modding or engine)

by Extex » Tue Oct 29, 2019 22:09

How would I make a mod that places a duplicate of the terrain really high up.
Except replacing certain nodes with replacement nodes
Player of PK, RIP. Creator of the light_tool mod. Working on another mod which is pretty cool so far
 

User avatar
duane
Member
 
Posts: 1591
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: Post your mapgen questions here (modding or engine)

by duane » Wed Oct 30, 2019 01:40

Extex wrote:How would I make a mod that places a duplicate of the terrain really high up.
Except replacing certain nodes with replacement nodes


You can either get into the C code of the game and make it duplicate terrain, or you can recreate the base mapgen in lua. Needless to say, this is easier if you just start with a lua mapgen. If you use realms, duplicating is as easy as adding a line to your realms.conf file.
Believe in people and you don't need to believe anything else.
 

Extex
Member
 
Posts: 107
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Post your mapgen questions here (modding or engine)

by Extex » Wed Oct 30, 2019 22:30

I don't really want to rely on any mods.
I want it to also duplicate buildings and trees placed on generation.
Is there some way I can use on_generated to place a duplicate with an offseted y pos?
Player of PK, RIP. Creator of the light_tool mod. Working on another mod which is pretty cool so far
 

ShadMOrdre
Member
 
Posts: 534
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

Re: Post your mapgen questions here (modding or engine)

by ShadMOrdre » Thu Oct 31, 2019 23:55

Extex,

Instead of depending on the realms mod, why not simply take the relevant code sections from realms, (the API), and embed that code into your own project? I get not wanting to duplicate code; but there are, more than likely, huge parts of the realms mod that you do not want.

I've made the same mistake with lib_mat / lib_eco. A developing API, that is then buried in a larger project, and thus either not used, or heavily modified. ;p. I'd probably recommend separating the realms mod into a standalone API with the various mapgen "layers" offered as standalone mods, like Sokomines' mg_villages. If kilarin hasn't already done the separation, he might still be willing to consider it. Especially if others are adopting the API to create further functionality, as this duplicate layer idea suggests.

duane should have also suggested his own mapgen mod, although it probably does not contain the functionality that you requested. Still, I'd peek at the code if I were you. :)

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

Red_King_Cyclops
Member
 
Posts: 266
Joined: Sun Jun 16, 2019 20:17
Location: Earth

Re: Post your mapgen questions here (modding or engine)

by Red_King_Cyclops » Sun Nov 03, 2019 16:22

Is it possible for there to be flat biomes in a non-flat world (e.g. a salt flat biome)?
My best mods: space_travel, time_travel, and rocket.
 

User avatar
duane
Member
 
Posts: 1591
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: Post your mapgen questions here (modding or engine)

by duane » Sun Nov 03, 2019 16:54

Red_King_Cyclops wrote:Is it possible for there to be flat biomes in a non-flat world (e.g. a salt flat biome)?


Biomes don't affect the shape of the terrain -- they just control decorations and soil types.
Believe in people and you don't need to believe anything else.
 

Red_King_Cyclops
Member
 
Posts: 266
Joined: Sun Jun 16, 2019 20:17
Location: Earth

Re: Post your mapgen questions here (modding or engine)

by Red_King_Cyclops » Sun Nov 03, 2019 20:21

duane wrote:
Red_King_Cyclops wrote:Is it possible for there to be flat biomes in a non-flat world (e.g. a salt flat biome)?


Biomes don't affect the shape of the terrain -- they just control decorations and soil types.

That makes sense. In that case, does that mean that underground biomes can change the stone node without altering cave generation?

Edit: I just realized that the caves will be the same if the stone node is ground content.
My best mods: space_travel, time_travel, and rocket.
 

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Wed Nov 06, 2019 21:54

> does that mean that underground biomes can change the stone node without altering cave generation?

Yes, and they do in MTGame in 2 of the desert biomes.
 

Previous

Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 8 guests