Jump to content

Separating biomes into islands on world generation


Recommended Posts

The title is self-explanatory. I want to know if there's any way to split most (if not all) biomes into different islands upon world generation, to give more meaning to the seafaring mechanics other than to find the Lunar Island.

  • Like 1
Link to comment
Share on other sites

I don't know if the code actually treats biomes like that in world generation. Based on what the console says when the world is generating, it creates a Voronoi map and creates divisions accordingly. This is what makes me think that the game doesn't even know where biomes are after a world is created. But I wonder if it's possible for you to interfere in the exact moment right between the generation process and the assignment of biomes. If it is, I suppose you might have to do a lot of math telling the game which tiles to remove, and worldgen stuff is really weird and annoyingly mathematical...

That's just my theory... Based on what @NamelessName said, there might be a way to hack into the whole creation process (essentially skipping it) and just create a bunch of islands consisting of different biomes. If you manage to create an island, you probably just have to trial and error your way into making it look right.

PS: A very useful console command when dealing with the world as a whole is the command c_regenerateworld(). Very convenient

Link to comment
Share on other sites

In the singelpayer version of Don't Starve, there are world generation settings that generate the world into islands. But last I heard, the devs were unable to bring that feature into the DST version. That was some years ago though, so maybe there have been changes or ways around it discovered since then, but that is the last I heard on that topic.

Link to comment
Share on other sites

Oh yeah, @--- -.- I remember there was that weird mod where they tried to (and kind of successfully) make a shipwrecked DST. I wonder how they did it... It might even involve changing the system of world generation entirely. You'll definitely find some heavy worldgen stuff there.

Link to comment
Share on other sites

So, from what I read of Myth Worlds' code, as suggested by @NamelessName, they do indeed create a new island, but it's just that, a new island, meaning that the main continent is left intact. If I really wanted to split biomes during world generation using their method, I'd need to somehow make every natural biome not generate at all, and then have a replica of them generate afterwards through the mod as islands.

I also looked onto the code for Tropical Experience before, albeit for totally different reasons, so maybe I could find a hint as to where I could start if I checked their modworldgenmain.lua. Oh, and also, I do know of a mod that replicates the Archipelago chapter from Adventure Mode on DST, although it isn't on the workshop, only on GitHub. Here's the link for it, if anyone wants to give the code a look. I want to mess with it, but I also wanna be 100% sure of what I'm doing with the code before anything else, so I'd be glad if anyone more experienced than I am could instruct me on how exactly the mod manages to create all these islands, so I could replicate the effect on a larger scale (aka, with the extra biomes from DST).

Link to comment
Share on other sites

I took a quick look and it seems like they have a bunch of rooms and map features (in the scripts/map folder) that they simply insert into the world by adding the stuff to a special "task" list. The modworldgenmain looks fairly simple. I haven't made too many modworldgenmains before, but after looking at level.lua and modutil.lua (to see what AddLevelPreInitAny does), it seems like land features/chunks are called "tasks". And what modworldgenmain does is add the mod's special "tasks", potentially along with other stuff, to the game's load sequence.

I could be wrong about that stuff, but either way, something you could try to do is messing around with the mod. Change some numbers or features in the scripts/map folder and see what happens. Same with modworldgenmain. If you manage to change how an island works, you could probably figure out how to make multiple islands with their own biome...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...