Jump to content

Tiny world generation


Recommended Posts

Hey everyone! I'm trying to make a mod, that'll make an empty world 4x4 ith a portal. Is it even possiblel? If so, anyone knows how to make it? 

Thanks everyone for your replies! If you'll help me, I'll give you some cool skins! :) 

  • Like 1
Link to comment
Share on other sites

I'm sorry i don't know enough about mod generation to help. There is a post about someone who created a mod to make the world only one desert biome, maybe you could look at his code and see how he did it, it could be a first step ?

 

If you replace desert rooms by empty rooms you could have something like you want i guess.

Link to comment
Share on other sites

Actual, it is hard to find a elegant way to change the size of the world, as all the size variables are totally local in generation function. What's worse, trying to control the exact size and shape of land is even more difficult, which is dynamically generated by the C++ part. The only feasible solution might be change the map data directly after the generation or replace the generation function with your own one.

Link to comment
Share on other sites

In my unfinished adventure mod, the first world you start is only swamp (start location is small forest).

The code is in modworldgenmain (I edited the code from my mod, so it could be that there are few mistakes, I did not test it):
 

AddTaskSetPreInitAny(function(tasksetdata)
        tasksetdata.tasks = {"Tentacle-Blocked Spider Swamp"} -- world only contains this task and the start location
        tasksetdata.numoptionaltasks = 0
        tasksetdata.optionaltasks = {}
        tasksetdata.set_pieces = {}
        tasksetdata.required_prefabs = {"spawnpoint_master"} -- if these miss, the world will reload. By default it contains pigking, so you have to make it at least empty, to remove pigking
        tasksetdata.overrides={
            world_size  =  "small",
            wormhole_prefab = "wormhole",
            layout_mode = "LinkNodesByKeys",
            season_start  =  "autumn",
            autumn = "veryshortseason",
            winter = "veryshortseason",
            spring = "veryshortseason",
            summer = "veryshortseason",
        }
end)

I'm not sure anymore what will happen,  if you make tasks emtpy...
The way it is above it should spawn default start location and the swamp around it.

This would be the best way I know of, to make a small world.

Edited by Serpens
Link to comment
Share on other sites

On 24.06.2017 at 0:15 AM, Serpens said:

In my unfinished adventure mod, the first world you start is only swamp (start location is small forest).

The code is in modworldgenmain (I edited the code from my mod, so it could be that there are few mistakes, I did not test it):
 


AddTaskSetPreInitAny(function(tasksetdata)
        tasksetdata.tasks = {"Tentacle-Blocked Spider Swamp"} -- world only contains this task and the start location
        tasksetdata.numoptionaltasks = 0
        tasksetdata.optionaltasks = {}
        tasksetdata.set_pieces = {}
        tasksetdata.required_prefabs = {"spawnpoint_master"} -- if these miss, the world will reload. By default it contains pigking, so you have to make it at least empty, to remove pigking
        tasksetdata.overrides={
            world_size  =  "small",
            wormhole_prefab = "wormhole",
            layout_mode = "LinkNodesByKeys",
            season_start  =  "autumn",
            autumn = "veryshortseason",
            winter = "veryshortseason",
            spring = "veryshortseason",
            summer = "veryshortseason",
        }
end)

I'm not sure anymore what will happen,  if you make tasks emtpy...
The way it is above it should spawn default start location and the swamp around it.

This would be the best way I know of, to make a small world.

Yeah, I already made mod with modworldgenmain and changed everything I wanted. Thanks for trying to help!

  • Like 1
Link to comment
Share on other sites

7 minutes ago, makar5000 said:

Yeah, I already made mod with modworldgenmain and changed everything I wanted. Thanks for trying to help!

so your question is solved?
Could you share your solution?

Edited by Serpens
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...