Jump to content

How to: completely static map?


Recommended Posts

I've been reading a lot of tutorials and guides on worldgen, and I've been playing with Tiled and so far I've seen some interesting results. BUT what I would really like to do is make a map that is completely static. I don't want any randomization or to mess about with rooms or anything like that. I'm just looking to make a completely handcrafted map that is always the same.

Would anyone happen to know anything about this?

In other words, would anybody know if it's possible to make an entire world in the program, "Tiled" and load that map instead of doing worldgen?

Thanks in advance.

Edited by mouse
Link to comment
Share on other sites

@mouse, are you wanting to play a "static" seed or a static layout? I'm confused because you don't want any randomization, yet you don't want to mess with rooms. You have to either choose a seed which is randomly generated (see PeterA's mods for PAX East) or set up your own rooms the way you want them.

 

What I believe you're wanting to do is the latter, which requires laying out each individual room then modifying the rooms the way you want them, which is discussed in this tutorial: http://forums.kleientertainment.com/topic/48070-guide-intro-to-worldgen/

Link to comment
Share on other sites

@mouse, are you wanting to play a "static" seed or a static layout? I'm confused because you don't want any randomization, yet you don't want to mess with rooms. You have to either choose a seed which is randomly generated (see PeterA's mods for PAX East) or set up your own rooms the way you want them.

 

What I believe you're wanting to do is the latter, which requires laying out each individual room then modifying the rooms the way you want them, which is discussed in this tutorial: http://forums.kleientertainment.com/topic/48070-guide-intro-to-worldgen/

Thanks for responding.

Yeah I read that but it doesn't seem to have what I'm looking for. (That or I'm just not absorbing the jargon.)

Let me give an example.

Let's say I wanted to make a VERY small, round, blank, grass map, completely surrounded by water, with the multiplayer portal/spawn point, right in the middle(at 0,0,0).

Is there a way to do that?

Link to comment
Share on other sites

Like I said, I already saw that tutorial. Here's why it doesn't work for my situation.

1. In order for it to work, it requires the player to select the custom made preset (in the example it's, "My First Worldgen"). That implies it's optional. I don't want that to be optional. I want to force the preset regardless of what options where selected.

2. From what I can tell, it doesn't work with custom gamemodes, due to the custom gamemode not existing in leveltype. If I missed a way to fix that, please let me know.

And that's just the first couple problems I saw on the surface.

Do you see what I'm saying now? I'm making a custom gamemode and I need a custom map.

Link to comment
Share on other sites

@mouse, I understand what you're saying now, but I think it will be harder than it looks. However, this is where you will need to start looking in order to figure out if it's actually possible.

 

scripts/screens/servercreationscreen.lua

function ServerCreationScreen:OnConfigureButton()    local function onSet(options, dlc)        if options and self.editable_customoptions then            self.customoptions = options        end    end    -- Don't care about RoG for now    -- if self.prevworldcustom ~= self.RoG and IsDLCInstalled(REIGN_OF_GIANTS) then    --     local prev = self.prevcustomoptions    --     self.prevcustomoptions = self.customoptions    --     self.customoptions = prev    --     package.loaded["map/customise"] = nil    -- end    -- self.prevworldcustom = self.RoG    -- Clean up the preset setting since we're going back to customization screen, not to worldgen    if self.customoptions and self.customoptions.actualpreset then        self.customoptions.preset = self.customoptions.actualpreset        self.customoptions.actualpreset = nil    end    -- Clean up the tweak table since we're going back to customization screen, not to worldgen    if self.customoptions then        self.customoptions.presetdata = nil    end    local resume_customoptions = nil    self.editable_customoptions = true    if self.saveslot > 0 and not SaveGameIndex:IsSlotEmpty(self.saveslot) then        resume_customoptions = SaveGameIndex:GetSlotGenOptions(self.saveslot)        self.editable_customoptions = false    end    self:Disable()    TheFrontEnd:Fade(false, screen_fade_time, function()        TheFrontEnd:PushScreen(CustomizationScreen(Profile, onSet, resume_customoptions or self.customoptions, self.RoG,  self.editable_customoptions))        TheFrontEnd:Fade(true, screen_fade_time)    end)end

This is where it is calling the actual customization screen. If you can hook into this particular screen and modify the function ServerCreationScreen:Create() for when you're game mode is selected to automatically set the self.customoptions.preset to your preset then you should have no problems doing what you're wanting to do.

Link to comment
Share on other sites

That's not a bad idea. I found a variable in /scripts/screens/customizationscreen.lua that disables changes to settings(self.allowEdit). But something comes to mind. Will this work with dedicated servers? I don't know about other OS's but the Linux dedicated server has no GUI. So modifying the interface may not be the best strategy.

Another question. Is there a way to check which preset was used after the server has started and the world has been loaded? I could simply flash annoying HUD messages gentle reminders on the screen to notify the users that they need to use the custom preset if a different preset was selected.

Link to comment
Share on other sites

I rephrased my original question, btw.

"In other words, would anybody know if it's possible to make an entire world in the program, "Tiled" and load that map instead of doing worldgen?"

Does that make more sense?

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...