Multiplayer FAQ: Difference between revisions

From PZwiki
No edit summary
Line 1: Line 1:


= This is outdated, and needs updating! It won't work :( =
= This is outdated, and needs updating! It won't work :( =
.
.
.
.
.
.
.
.
.
.
.
.
'''Credits to Connall & nasKo original FAQ thread linked below.'''
'''Credits to Connall & nasKo original FAQ thread linked below.'''
   
   

Revision as of 14:43, 28 April 2016

This is outdated, and needs updating! It won't work :(

. . . . . . . . . . . .

Credits to Connall & nasKo original FAQ thread linked below.

Q: How do I get to play Multiplayer?

A: Multiplayer is currently a separate test build. You can download it by right-clicking Project Zomboid in your Steam library and clicking "Properties". Then, navigate to the "Betas" tab and select "onlinetest" from the drop-down menu. There is no code required so leave the code-field blank. The game will now update to the Multiplayer testbuild and when you start the game, you will see "Join Server" as the only game-mode option.


Q: How do I set up a server in Windows/Mac/Linux?

A:For Windows you can use this tutorial: http://theindiestone.com/forums/index.php/topic/5795-how-to-run-a-server/

People running a Linux server can follow the instructions posted by Connall here: http://theindiestone.com/forums/index.php/topic/5841-buying-running-a-linux-project-zomboid-server/

Windows

To host a server, navigate to your game installation folder (for Steam users, the default location is Steam\SteamApps\common\ProjectZomboid) and find the batch-file called ProjectZomboidServer.bat. Start it by double clicking it. A command prompt window will pop up saying "*** SERVER STARTED****".

If you want to host a server with lots of people, you should make sure your internet connection is fast and you have enough RAM in your rig. See “How do I use more/less RAM” for how to allocate more memory to your server. To allow people to connect to your server you will need to forward the necessary ports. The necessary ports to forward are 16261 (UDP) which serves as a handshake port for communicating with the server. For each possible player slot on your server, you need to forward additional TCP ports, which are used to stream the world to the player clients. If you want a server with 10 slots, you would have to forward 16261 UDP 16262 - 16272 TCP

A quick and easy way to test if your ports are forwarded properly are http://www.canyouseeme.org/ and http://www.yougetsig...ls/open-ports/.

Good guides on how to forward ports are found all over the internet. Portworwarding.com has good guides on hand and covers a lot of routers. Port Forwarding sounds harder in theory that it actually is. It mostly just involves getting into the menu of your router. If you have no access to your router, please consult whoever is in charge of your network (parents, room mates, admins, etc).


Linux

With this we’re making the assumption you understand your way around linux. For a more in depth guide, go visit: http://theindiestone.com/forums/index.php/topic/5841-buying-running-a-linux-project-zomboid-server/

You’ll want to install default-jdk and screen onto the server if you don’t have these already.

Now we need to grab the Steam CMD so we can download the actual Project Zomboid software. It’s recommended that you run SteamCMD on a seperate user.

You should add a new user by doing:

adduser steam

Once that’s sorted we need to switch over to the new user. It should be noted anytime I refer to “steam” in the file directory context, then it means the user folder. If you decide to name the user something else the directories change also. Something to keep note of. “Steam” is not the same as “steam” in the directory context as well.

su - steam

this will switch the user from root, to steam.

Now we need to actually get the SteamCMD. To do this we run this command:

wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz

It should eventually download and once it does we need to actually get the contents out of the folder. To do this we run

tar -xvzf steamcmd_linux.tar.gz

Now we got to run SteamCMD

To do this we can do:

cd /home/steam/steamcmd then

./steamcmd.sh +login steamusername steampassword +force_install_dir directory/you/want/to/install/to +app_update 108600 -beta onlinetest validate +exit

Steamusername being your steam username and password being the steam password.

You should have a projectzomboid-dedi-server.sh file in your ProjectZomboid folder, if not you will need to rerun the command up above.

You will also need to create a Zomboid folder in the users home folder. You will need to create a folder of “db” in that folder as well and download this db file and place it in the “db” folder: https://dl.dropboxusercontent.com/u/28553835/world.db

Whether or not you will whitelist the server it’s best to put the file in. You’ll now need to edit the projectzomboid-dedi-server.sh and set your RAM values. This is dependant on how much RAM your server has, I personally didn't set them to use my complete server capacity, I did about half but the choice is up to you. (Kirrus: Don't set more than 80% of your VM's capacity.) Use WinSCP and double click on the file and it should open it up in an editor, find these two lines:

-Xms1024m \
-Xmx1024m \

And edit the values to your choosing.

Now we need a certain script:

wget http://kirrus.co.uk/stuff/pz/wheezy-glibc-sid.sh

bash wheezy-glibc-sid.sh This is only required for those who are running a Debian OS, Ubuntu (I am told) should be fine.

We’re almost there. So here’s what we got to do now.

cd /home/steam/Steam/SteamApps/common/ProjectZomboid

then

./projectzomboid-dedi-server.sh It will start the server. You need to run the server in screen, or when you close the terminal program you’re using, the server will shutdown as well.


Q: How do I use more/less RAM?

A: You’ll need to edit the projectzomboid-dedi-server.sh file or the ProjectZomboidServer.bat file and find lines that look like:

-Xms1024m \ -Xmx1024m \

These are your RAM values. It is advised that you don’t use more than 80% of your available RAM. If you’re running the server from a home computer, then the RAM values should be tonned down significantly more.


Q: How do I reset/start a new world?

A: To reset the servers world you will need to navigate to your server’s /Zomboid/Sandbox folder. In there should be a folder called “servertest” deleting this will folder will reset the world. Make sure to do this when the server is off (or the server program is not running) and restart the server.


Q: Are LAN servers possible/how?

A: Yes. LAN servers are completely possible, the usual installation instructions need to be carried out with regards to setting up a server. This info can be found at: http://theindiestone...o-run-a-server/ You should then be able to connect the server.


Q: Can I use mods on my mp server?

A: To use custom maps and/or mods for your server, please read the following thread on the official forums. http://theindiestone.com/forums/index.php/topic/7897-build-26-custom-maps-spawn-locations/?p=103784


Q: How do I change my characters appearance for multiplayer?

A: At the moment there is no easy way to change a characters appearance and is just left to luck. If you really wish you can connect to a server, and if you don’t like the appearance, then you can disconnect the delete the save associated with the server and reconnect. Rinse and repeat if need be, but keep in mind it’s always random.


Q: Can I change the length of days or the amount of Zombies/loot? Is there a way to respawn loot?

A: Sandbox settings of the server are set up via the SandboxVars.lua which should be saved in Zomboid\Server\*servername*_SandboxVars.lua. If the file doesn't exist, it can be created with the PZServerSetting.exe from your PZ installation folder.

If necessary, download this updated PZServerSettings.exe and place it in your PZ installation folder to set it up easily: https://www.dropbox.com/s/rmy8h3xc61s04bt/PZServerSettings.zip Outdated. Use the one located inside game's install directory. On a Linux box with Steam, in the home directory there should be .local/share/Steam/SteamApps/common/ProjectZomboid/projectzomboid/PZServerSettings.exe (execute using wine)

Q: How do zombies spawn?

A: Zombies "respawn" in defined areas where it makes sense (e.g. the highway and other high density areas). In your ServerOptions.ini the server host has two options for zombie respawn:

HoursForZombiesRespawn = 0  //Amount of hours a zone has to be unseen to respawn zombies.
IncreaseZombieRespawnBy = 0 //Ammount of additional zombies you want to have spawned if HoursForZombiesRespawn > 0.

Example: An area spawns by default 10 Zombies. You define IncreaseZombieRespawnBy=20. Now the area will spawn 30 Zombies (10 naturally and 20 additional zombies).

Q: Why can't people connect to my server?

A: There can be a number of factors surrounding why people can’t access your server. For the most part this sort of stuff applies to people who are hosting servers from their homes, if you’re using a VPS or dedicated gameserver provider to host the server you shouldn’t encounter these problems. If you do, first refer to any avaialable guides that may help resolve the issue, then contact your server provider to see if they would be willing to help.

For home computers here’s what you can check:

1. Check your ports. Chances are your ports aren’t accepting connections, and for good reasons as this is generally a security feature for the routers. Routers are so vaired, that we can’t actually give a lot of specifics for you. However visiting a site like: portforward.com and finding your router model should give you an idea on how to set up your port forwarding.

The following ports that should be forwarded is the 16261 as UDP as it’s considered a handshake port for the server. All further ports are configured as TCP and are used to configure map data to each user. So one port should be forwarded for every player you wish to have on the server. So for example 16262 - 16272 would allow ten players.

If you want to test if the port is forwarding then you can use a port checker such as http://www.yougetsig...ols/open-ports/ to test and see if the port is open. Make sure that your server is running before testing the port as some routers, won’t open the port until there’s a connection running.

2. Firewalls and antivirus. The oldest trick in the book, these could be causing problems for the server and may wish to turn these off or add PZ/Java to the exception list.

3. Correct IP. There are two types of IP, an internal IP and an external IP. Internal IPs are used for connecting within the computer or network while externals are for people connecting from outside the network. Make sure you are giving people an external IP and not an internal one. To check your IP, you can just google “What’s my IP” or visit http://www.whatismyip.com/

If you’re absolutely certain it’s none of these problems post to the multiplayer help board on the official forums: http://theindiestone.com/forums/index.php/forum/72-help/

Common Errors

Q: I’m trapped in a server! The map won’t load anymore, what’s going on? It looks like a black border.

A:You have either lost connection to the server, or the server has crashed. You’ll need to check your internet connection, or the server owner will need to restart the server. If you’re certain this is not the case, then the server may not have the ports configured correctly to allow map streaming to each player. If you’re the server owner here’s some info on the matter.

The following ports that should be forwarded is the 16261 as UDP as it’s considered a handshake port for the server. All further ports are configured as TCP and are used to configure map data to each user. So one port should be forwarded for every player you wish to have on the server. So for example 16262 - 16272


Q: I’m getting some console messages about… “Delay Packets”

A: This seems to be a common problem affecting a lot of users. There’s no known concrete fixes, just a couple of hot fixes.

One such fix is to try and disable firewalls or anti-virus which might be causing the issue. If you have been able to connect to the server but has now changed and you’re getting these messages you can try removing the save folder associated with the server. If it’s still not working you might be unfortunately stuck. It is possible that it’s a server specific issue, try connecting to a different server and see what happens.

Making sure the username is using a proper file name characters (as the username is saved to a folder, so if you’re using improper characters (like “/” “!” etc) it won’t work. It’s also entirely possible that the server is full, or all the ports opened by the server operator are in use. This means that you won’t be able to connect to the server and will instead, need to connect to a different server.


Q: My server keeps crashing with people on it!

A: Odds are you don’t have enough RAM or you haven’t allocated enough of your RAM to the server. If you’re running a public server on a home computer, this will be more of an issue. If running off a VPS it’s still a possibility. Generally 2GB gets around 10-15 players and 4GB can cover 20-30 possibly.


Q: I get this message of… Client version (956) doesn't match server (958) when I try to connect to a server. What’s going on?

A: This is indicating that there is a Project Zomboid build mismatch between the client and server. Say the message was like this “Client version (x) doesn’t match server (y)” If Client (x) number is less than server (y) then that means that the server is running a newer build and the client is running an older build. So best way to check is to make sure that steam has updated your game to the newest version possible. If server (y) number is less than (x) then that means that the server is outdated from the client and the server still needs to be updated.

It has been known that builds have accidentally been pushed to the onlinetest branch, so make sure to check the forums and see if anybody else is having problems regarding compatibility issues.


Q: I was on a friends server, it was working fine but then we restarted and we started having problems. What do I do?

A: There are a couple of possible solutions to this. The first is try deleting the save associated with the server, in the event that’s causing a conflict. If that doesn’t work, it might mean the server hoster has not quite configured the ports correctly and isn’t allowing map streaming.



Startup Parameters

A List of Startup Parameters

Administrating a server

Server Settings

There are various options for servers. The server options are set up via the ServerOptions.ini file in your Zomboid folder (Windows: C:\Users\<username>\Zomboid\server) (LinuxL /home/<user>/Zomboid/Server)

Just open it with a text editor and change them as you see fit. When done with the changes, save the file and reboot the server. You can also change these settings ingame (when logged in as an admin) via /changeoption optionName=*value* and then /reloadoptions.


List of Server Settings

Name Default Description
PVP true Enable PVP.
PauseEmpty false If true the server won't update if no players are on it (farming won't progress, etc.)
GlobalChat true Enable the Global Chat (/all command in chat).
Open true Open to all (no whitelist)
ServerWelcomeMessage <RGB:1,0,0> Welcome to Project Zomboid MP test ! to chat locally press \"t\", to global chat press \"y\" or add \"/all\" before chatting <LINE> Press /help to have a list of server commands <LINE> <RGB:1,1,1>
Displayed message in the global chat when a client connect.
LogLocalChat false Log the local chat in the chat window (client side).
AutoCreateUserInWhiteList false If you server is open, this option will allow the server to create the user in whitelist if they entered the server with a password, so his username will be protected.
DisplayUserName true False = you won't see another players username on top of their head + their name won't be logged inside the local chat
SpawnPoint 0,0,0 Use this to define a custom spawn point instead of the random one from character creation.
SafetySystem true Allow the user to change their safety (if false and if PVP=true, then the safety will always be off).
ShowSafety true Allow the players to see if someone have his safety off with the skull icon.
SafetyToggleTimer 100 When the player disable safety it take some times before HE enable it (tho the other players see it instantly), define it here
SafetyCooldownTimer 120 Every time you hit someone in safety off, add this timer to the cool down before you can actually toggle safety off
SpawnItems none Add spawning items to new player, ex : Base.Axe,Base.WaterBottleFull... (every item need to be separated by a ",")
DefaultPort 16261 Default port used by the server
Mods BedfordFalls;Etc Used to add mods to your server, like maps or other things, player will NEED to have this mods installed.
DoLuaChecksum true Do the lua checksum. Players with modified Lua files that differ from the server files will not be able to connect
Public false If true send the info of the server to pz.com to be visible in the public server list
PublicName Required for public server
PublicDescription Optionnal, for public server
MaxPlayers 64 Max players who can connect on the server (admin can by pass this)
PingFrequency 10 Time between each client ping, in second
PingLimit 400 Ping limit before being kicked, need to be 5 time over, in millisecond, 0 disbaled it.
HoursForLootRespawn 0 Enable loot respawn if > 0, then the zone need to be unseen for X (this parameter) hours before respawn loot in it.
MaxItemsForLootRespawn 4 For the loot respawn, if a container have more items than this number, it won't respawn loot (use it to limit respawn in safe house for example..)
HoursForZombiesRespawn 0 Enable zombies respawn if > 0, then the zone need to be unseen for X (this parameter) hours before respawn zombies on it, only on road.
IncreaseZombieRespawnBy 0 Ammount of additional zombies you want to have spawned if HoursForZombiesRespawn > 0. Example, an area spawns a default of 10 Zombies. You have IncreaseZombieRespawnBy=20 -> The area will spawn 30 Zombies (10 naturally and 20 additional zombies).
PlayerSafehouse false
AdminSafehouse false
SafehouseAllowTrepass true
SafehouseAllowFire true
SafehouseAllowLoot true
SafehouseAllowRespawn true
SafehouseDaySurvivedToClaim 0
SafeHouseRemovalTime 144
AllowDestructionBySledgehammer true

Administrative commands

There are various commands for admins. There will be more in the future. This list will be updated as it goes:

Name Description
adduser Use this command to add a new user in a whitelisted server, use : /adduser username=pwd
save Save the current world
quit Quit the server (but save it before)
chopper Start the choppers (do noise)
gunshot Start a gunshot (do noise)
startrain Start rain on the server
stoptrain Stop rain on the server
grantadmin Grant the admin rights to a user, use : /grantadmin username
removeadmin Remove the admin rights to a user, use: /removeadmin “username”
reloadoptions Reload the options on the server (ServerOptions.ini) and send them to the clients
banuser Ban a user, reason is not mandatory, use : /banuser username=reason ip=true/false, ex /banuser rj=pvp ip=true
unbanuser Unban a player, use : /unbanuser username
kickuser Kick a user, reason is not mandatory, use : /kickuser username=reason
addalltowhitelist Add all the current users connected with a password in the whitelist, so their account is protected.
addusertowhitelist Add the user connected with a password in the whitelist, so his account is protected, use : /addusertowhitelist username
removeuserfromwhitelist Remove the user from the whitelist, use: /removeuserfromwhitelist username
showoptions Show the list of current Server options with their values.
changeoption Use this to change a server option, use : /changeOption optionName=newValue
godmod Set a player invincible, use : /godmod username=true/false, ex /godmod rj=true
invisible Set a player invisible, use : /invisible username=true/false, ex /invisible rj=true
additem Add an item to a player, the username isn't mandatory, if you don't specify it the item will be added to you, use /additem username module.item, ex : /additem rj Base.Axe.
createhorde Use this to spawn a horde near you, user : /create horde count, ex /createhorde 150
changepwd Use this command to change your password, use : /changepwd previouspwd newpwd.

You can type “/help” to get a full list or “/help *command*” to get the help tooltip for this command.

Nothing helped?

If you haven’t found the answer to your technical issue, you can check in on the following links for additional help

Project Zomboid Forum:


Project Zomboid Wiki (The site you are on now.)


Project Zomboid Subreddit:


Project Zomboid IRC Chat: You may need to be patient here. It’s not monitored as frequently as the Forum. Enter your desired nickname, and click "Start.."

Alternatively, you can hit "Chat" on the top-right of our forums (between "Members" and the “Search”-icon )


For non-web IRCers: irc.dal.net '#'projectzomboid