Jump to content

How to?: Zones in existing muldraugh territory + Zombie spawn map


LeoIvanov

Recommended Posts

Basically, I've been stuck trying to figure out a few problems that slow down the development of my update for my TWD prison map, and those are the following :

 

- When I draw the zones and insert them properly into objects.lua file, they just seem to overlap the standard muldraugh's zones and refuse to let me forage/trap on them properly. I've thought of manually getting rid of all the zones in a single cell, but I never could find the option to "input zones" from objects.lua file. Is there any way to do it, or do I have to manually look for the cell's coordinates and remove the zones from file itself? Because that'd be a pain in the ass :(

 

- Zombie spawn map. When I save the cell in world-ed to then integrate it into the PZ's map, I use the edited zombie spawn map image that I've changed in photoshop and I just can't seem to make zombies spawn where they should be. It's all within the muldraugh's existing zoning already, and I can't shake off the feeling that something deliberately blocks me from having a proper way to spawn zombies, but I could never figure out what it is. :(

 

If anyone could help me out with this problem, it'd be greatly appreciated :)

Link to comment
Share on other sites

Dunno about the objects.lua since I'm yet to twiddle with that, but could you maybe upload your PNG and spawnmap files? I could take a look if it's something in there maybe this evening or by some time tomorrow.

 

Also could you explain your process of what you're doing when you're exporting the map.

EDIT: Are you perhaps trying to alter zombie spawn in vanilla muldraugh or have you just replaced cells? Or have you made it separate

Link to comment
Share on other sites

 

EDIT: Are you perhaps trying to alter zombie spawn in vanilla muldraugh or have you just replaced cells? Or have you made it separate

 

Not as much as "alter" as add a new zombie spawn area within the already existing map of muldraugh. 

 

AFLB8n4.png

 

This is the picture that works as the new zombie spawn map.

 

 

 

RwrftmH.png

 

And this is what zone I've added to that picture.

Link to comment
Share on other sites

Does your WorldEd project put TWD prison in the correct world coordinates, or are you renaming the .lotpack/.lotheader files after you export the map?  I'm talking about the "World Origin" x/y in the "Generate Lots" dialog.

 

My world origin is set to 25/25 when I export the lots from world-ed, after that I just find the correct .lotpack/.lotheader files with the fixed coordinates in the folder that I've exported them in. 

Link to comment
Share on other sites

So the problem with the zones not being recognized is that the game's zones override any that your mod is adding.

I've changed things now, so that when adding a zone, any existing zone is cut into pieces to make room for the zone being added.

 

I'm not sure why zombies aren't spawning yet.  It should be working as long as the modified spawn map is actually being used (in the Generate Lots dialog), and you created a new game after changing the spawn map.

Link to comment
Share on other sites

So the problem with the zones not being recognized is that the game's zones override any that your mod is adding.

I've changed things now, so that when adding a zone, any existing zone is cut into pieces to make room for the zone being added.

 

I'm not sure why zombies aren't spawning yet.  It should be working as long as the modified spawn map is actually being used (in the Generate Lots dialog), and you created a new game after changing the spawn map.

 

If your change was rolled out in the public build (I'm using a public 30.16 version to test my prison on vanilla map), I'll give it a try this evening and tell if any of the zombies spawn where I made them.

Link to comment
Share on other sites

If you make a single cell addition wouldn't the spawn map be just 30x30 and only for the cell(s) added? I mean if it's made by offseting the map.

It sounded like LeoIvanov's WorldEd project started at 25,25 (same as Muldraugh), if his new cell was in the correct position relative to that then the full spawn map would be used.

 

 

 

If your change was rolled out in the public build (I'm using a public 30.16 version to test my prison on vanilla map), I'll give it a try this evening and tell if any of the zombies spawn where I made them.

The change isn't in the public build, it'll be in build 31.

Link to comment
Share on other sites

 

The change isn't in the public build, it'll be in build 31.

 

 

It seems like the "zones" that are needed for players to forage/trap properly also has the same problem as zombie spawn map, since it seems like I'm trying to overlap the already existing cell that already have the zones mapped out. Can you take a look if there's a way to properly overlap/change existing zones in world-ed? I'd love it if that thing was looked at as well :)

Link to comment
Share on other sites

  • 2 weeks later...

So... Is this active now since Build 31 is in IWBUMS, also my buildings break the server now (buildings that don't use zones, only internal names for loot spawn)

 

These buildings are also placed within an already made zone in Muldraugh. Zones get an overhaul in the java code? Objects.Lau hasn't changed in this build *Shrugs*

Nobody can join - they get this error if they try
 

java.lang.NullPointerException
    at zombie.iso.IsoMetaGrid.load(IsoMetaGrid.java:595)
    at zombie.iso.IsoWorld.init(IsoWorld.java:1136)
    at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:257)
    at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:195)
    at java.lang.Thread.run(Thread.java:724)
Link to comment
Share on other sites

Messed about with zones on the server. We made some giant strides with our "re-zoning" of high traffic areas.

My questions are now-

Do zones overlap now?

 

What happens when you de-zone an area and leave it without a zone. Does it spawn loot/zombies at all?

Why can I overlap a Nav zone with a Forest zone and be able to forage, but if that same forage zone is inside a building, no forage. But within a custom building, able to forage again.

Are the vanilla buildings built with premade internal zones? (Could explain above question)

If Overlapping is now active, how does it do it? Can I add my X, Y, width, height zones to the Objects.Lua and the game will calculate how to split the zone my custom zone is inside of... or...?

And last but not least, Are Zones tile-based? (Can I make a 1x1 zone for just a container and have that zone work properly?)

Thanks for taking the time to answer these as we would really like to make better maps in general. (Not liking how people can forage logs on the 4th floor of our custom buildings)

Link to comment
Share on other sites

If your map's custom objects.lua file has zones in the same place as one of the game's zones, the game's zones will get cut into pieces to make room for your map's zones.  So the game's zones are removed wherever you put a custom zone.  i.e., there can only be one zone at any given location.

 

You can't "de-zone" an area.  All you can do is put custom zones in to replace the game's zones.  If a container isn't in a TownZone or TrailerPark zone, then no loot will spawn there.  Zombies only respawn in Nav zones.

 

Buildings don't have zones.  Zones are added to the world in WorldEd.  You can only forage where there is a Forest or DeepForest zone, and the square has to be marked as "exterior".   I don't know why you are able to forage inside a custom building.

 

A 1x1 zone should work.

Link to comment
Share on other sites

EasyPickins, you are a legend.

Let me clarify on my de-zone thought. Say I take the zone that covers the entire 'inner' SW street block in West Point. The one that hold the Knox Bank, Police station and anything else on that block.

I take the width and height of that zone and half it. Now it only covers some of the strip stores and NONE of the knox bank and police station. I'm assuming it just make an empty space that a zone could fill but obviously not be able to spawn or forage things within this area.

I have been pondering:

In the past, to fix the loot spawn on our server, we would wipe the larger map files to restore some of the towns main buildings, this allowing them to spawn loot again.

I have pushed myself through the coordinates and found exact x,y of JUST the containers within the police station and such.

 

Now if I make these zones just under the containers, will loot spawn be affected still if someone builds something within a tile distance of this zone. (Like a player build a crate bordering the zone, which will basically be touching the spawn loot container but not actually be in the zone since the zone is only under the spawn loot container) 

 

This would mitigate the issue of people going into the police station and building one small thing and ruining the loot for the entire block/building.

 

While we are on the issue of said loot spawn, is there anyway to get an option for servers to ignore the player objects within a zone and only check the variable of the zone being seen/unseen for the allotted time set by server with (HoursForLootRespawn)

 

PS. That last thing would be a life saver. Re-zoning all the buildings like hardware store and individual mall stores will take me longer than I can approve of. But It needs to be done in order to keep our server from wiping often due to a crate or sheetrope in a building within an essential zone like the police station street block.

Thanks again sorry I type novels  =x

 

EDIT: Custom buildings weren't stopping rain either even with rooms and floors above the ground. Still rained on ground floor. This could have something to do with custom buildings being marked as forage. Thus making that particular issue not suited for this thread :D

Last edit I promise:
What happens when two zones of the same dimensions intersect perfectly. Which zone is chosen to overlap the other? (Imagine a circle diagram, whats the middle part going to turn to)

Link to comment
Share on other sites

I added a server option ConstructionPreventsLootRespawn=true/false.

 

There is a bug in the order objects.lua files are read in.  It is loading the mod's objects.lua before the game's, so the game's zones override the mod's zones. media/lua/server/metazones/metazoneHandler.lua should look like this:

 

function doMapZones()    local dirs = getLotDirectories()    for i=dirs:size(),1,-1 do        local file = 'media/maps/'..dirs:get(i-1)..'/objects.lua'        if fileExists(file) then            reloadLuaFile(file)            for k,v in ipairs(objects) do                getWorld():registerZoneNoOverlap(v.name, v.type, v.x, v.y, v.z, v.width, v.height)            end        else            print('can\'t find map objects file: '..file)        end    endend

 

There can only be one zone covering a map location (1 square).  Whichever zone is loaded last from the objects.lua file will cover the map location.

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
×
×
  • Create New...