Jump to content

Spawn Points on Custom Map


Xeonyx

Recommended Posts

As you may know, I released a map of New Denver to the Community; http://theindiestone.com/forums/index.php/topic/12110-new-denver-bc-v106/

I spent many a month building the town, but now I've hit a snag; I've been trying to figure out how to add spawn points to New Denver, but I can't figure out how and where to start.  I checked Thuztor's mapping guide and video tutorials, but still can't figure it out.  I open MainCreationMethods.lua from the Zomboid folder.  I bring up:

BaseGameCharacterDetails.DoSpawnPoint = function()end

Its the only one in the list, and does not have any of the additional lines that Thuztor's video tutorial does.  I'm not sure what the problem is, and I'm sure I'm not the only one who wants to spawn in New Denver (The long Haul gets tiresome for me and "me")

Link to comment
Share on other sites

There's a spawn point tool in WorldEd.  It looks like a diamond.  Left-click to place a spawn point or select an existing one.  Right-click to delete a  spawn point.  Use the window that pops up to choose which professions can spawn at each point (or select "all" to allow any profession can spawn there.)

 

Then in the File menu, choose "Write Spawn Points" to create the spawnpoints.lua file in the map directory.

Link to comment
Share on other sites

So I placed spawn points under the profession all so that any profession would spawn the player in any of the spawn points.  I finished placing them and clicked "write spawn points" and selected the folder to write the lua in, but the lua only writes:

function SpawnPoints()return {}end 

What foolish mistake have I made? is the name of the profession supposed to be all, or "all"? I'm kinda rookie at this
 

Link to comment
Share on other sites

sorry to drag this topic out, but I need to ask one more question;  Now that I finished writing out the coordinates for the spawn points, how would I add New Denver to the list of towns to start in? I couldn't find anything on it so I figured I'd extend the topic a little longer. 

Link to comment
Share on other sites

Yea I copied the way its done with the map.info, thumb.png, spawnpoints.lua, and description files; New Denver appears on the list on when I start a new game, but when I try to start, the system runs into an error and I am forced back to the main menu.

 

function SpawnPoints()

return {
all = {
{ worldX = 27, worldY = 37, posX = 238, posY = 204, posZ = 0 },
{ worldX = 27, worldY = 37, posX = 71, posY = 267, posZ = 0 },
{ worldX = 27, worldY = 37, posX = 195, posY = 271, posZ = 0 },
{ worldX = 28, worldY = 37, posX = 200, posY = 67, posZ = 0 },
{ worldX = 28, worldY = 37, posX = 137, posY = 255, posZ = 0 },
{ worldX = 28, worldY = 37, posX = 86, posY = 185, posZ = 0 },
{ worldX = 28, worldY = 37, posX = 2, posY = 175, posZ = 0 },
{ worldX = 28, worldY = 37, posX = 18, posY = 270, posZ = 0 },
{ worldX = 29, worldY = 37, posX = 12, posY = 162, posZ = 0 },
{ worldX = 29, worldY = 37, posX = 53, posY = 256, posZ = 0 },
{ worldX = 29, worldY = 37, posX = 99, posY = 261, posZ = 0 },
{ worldX = 29, worldY = 37, posX = 130, posY = 258, posZ = 0 },
{ worldX = 29, worldY = 37, posX = 159, posY = 291, posZ = 0 },
{ worldX = 29, worldY = 37, posX = 174, posY = 296, posZ = 0 },
{ worldX = 29, worldY = 37, posX = 97, posY = 100, posZ = 0 },
{ worldX = 26, worldY = 38, posX = 226, posY = 139, posZ = 0 },
{ worldX = 26, worldY = 38, posX = 281, posY = 227, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 15, posY = 60, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 69, posY = 114, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 8, posY = 183, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 136, posY = 270, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 161, posY = 183, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 99, posY = 92, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 163, posY = 45, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 247, posY = 122, posZ = 0 },
{ worldX = 27, worldY = 38, posX = 287, posY = 25, posZ = 0 },
{ worldX = 28, worldY = 38, posX = 23, posY = 144, posZ = 0 },
{ worldX = 28, worldY = 38, posX = 40, posY = 274, posZ = 0 },
{ worldX = 28, worldY = 38, posX = 139, posY = 235, posZ = 0 },
{ worldX = 28, worldY = 38, posX = 71, posY = 128, posZ = 0 },
{ worldX = 28, worldY = 38, posX = 77, posY = 35, posZ = 0 },
{ worldX = 26, worldY = 39, posX = 134, posY = 185, posZ = 0 },
{ worldX = 26, worldY = 39, posX = 238, posY = 193, posZ = 0 },
{ worldX = 26, worldY = 39, posX = 234, posY = 99, posZ = 0 },
{ worldX = 27, worldY = 39, posX = 71, posY = 225, posZ = 0 },
{ worldX = 27, worldY = 39, posX = 72, posY = 102, posZ = 0 },
{ worldX = 27, worldY = 39, posX = 141, posY = 223, posZ = 0 },
{ worldX = 27, worldY = 39, posX = 134, posY = 102, posZ = 0 },
{ worldX = 27, worldY = 39, posX = 243, posY = 135, posZ = 0 },
{ worldX = 28, worldY = 39, posX = 27, posY = 57, posZ = 0 },
{ worldX = 28, worldY = 39, posX = 126, posY = 66, posZ = 0 },
{ worldX = 26, worldY = 40, posX = 260, posY = 295, posZ = 0 },
{ worldX = 26, worldY = 40, posX = 282, posY = 192, posZ = 0 },
{ worldX = 27, worldY = 40, posX = 73, posY = 295, posZ = 0 },
{ worldX = 27, worldY = 40, posX = 7, posY = 140, posZ = 0 },
{ worldX = 27, worldY = 40, posX = 16, posY = 73, posZ = 0 },
{ worldX = 27, worldY = 40, posX = 161, posY = 296, posZ = 0 },
{ worldX = 27, worldY = 40, posX = 107, posY = 149, posZ = 0 },
{ worldX = 27, worldY = 40, posX = 140, posY = 96, posZ = 0 },
{ worldX = 27, worldY = 41, posX = 6, posY = 73, posZ = 0 },
{ worldX = 27, worldY = 41, posX = 100, posY = 63, posZ = 0 },
}
}
end
 

This is the spawnpoint.lua file in case the mistake is in there

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