Project Zomboid

Project Zomboid

how to run 10 years later map on my server?
i'm having a hard time finding the directory that they explain in the guide for the mod on workshop, so i'm stuck, i need help, does anybody know how to make it work? i'll buy ya coffee lol
< >
Showing 1-13 of 13 comments
Beard Sep 4, 2024 @ 2:34am 
Which directory are you referring to? Since you do not really need to look into any folders, you just need to write the mod info in the servertest ini file

You just need to load the Map IDs that you see at the bottom of the description in the Maps= line before the Muldraugh map. Then you select with mod IDs you want and add them to the Mods= line
Mickmane Sep 4, 2024 @ 2:54am 
Heya, sorry to budge in here. :)

Some days ago I asked a question about how to use different files than the default servertest.ini for a dedicated server. Like I want one for a server called FriendandI.ini (started with FriendandI.bat) and one for Iplayalone.ini (started with Iplayalone.bat). (For example.)

I can't find that post now. Maybe I put it in the wrong place and it was moved, or did I just dream about posting that?

Anyway. I do dedicated servers this way for Terraria, with port forwarding and starting a .bat that launches a specific world. Doing the same for Don't Starve Together would be a bit too complicated for me.

Looking at the files for Project Zomboid, I couldn't figure out what to change for an alternative .ini and .bat.

Can I do this for Project Zomboid? It would be great if my friend and I could join at the same time, rather than me hosting from in-game and he joining as soon as I can send an invite, with my char already in the world. (But that's not the only reason I'd like this. :) )

Thanks! :)
Beard Sep 4, 2024 @ 5:04am 
You have to add the -servername parameter to the .bat as explained here:
https://pzwiki.net/wiki/Startup_parameters
Mickmane Sep 4, 2024 @ 5:08am 
Originally posted by Beard:
You have to add the -servername parameter to the .bat as explained here:
https://pzwiki.net/wiki/Startup_parameters

Thanks! :)
Mickmane Sep 14, 2024 @ 12:40pm 
Hi, me again. :)

I got round to looking at Startup parameters, and run into problems.

https://pzwiki.net/wiki/Startup_parameters

Create shortcut
Navigate to the game folder
With Microsoft Windows 10, found in Program Files (x86):
C:\Program Files (x86)\Steam\steam\games

I don't have C:\Program Files (x86)\Steam
(Windoze 10 Home.)

So I went to D:\Steam\steam\games


Create a shortcut of the executable file (ProjectZomboid32.exe/ProjectZomboid64.exe)
Add the appropriate JVM arguments in the "Target:" line
Example: C:\ProjectZomboid64.exe -Xmx1024m -Xms1024m -- -nosteam

The executable isn't in that directory. There's just a bunch of letterandnumberlongnames.ico, and some PlatformMenu.vdf

Some game files are in:
c:\Users\(username)\Zomboid\

Others in:
d:\Steam\steamapps\common\ProjectZomboid\
d:\Steam\steamapps\common\Project Zomboid Dedicated Server\

There's a ProjectZomboid64.exe in d:\Steam\steamapps\common\ProjectZomboid\

There's a StartServer64.bat in d:\Steam\steamapps\common\Project Zomboid Dedicated Server\


Steam application
Right-click the game in the Library
Select "Properties..."
Add desired options under "LAUNCH OPTIONS"

My idea is to launch the dedicated server via a .bat file. Why does it have to go through Steam?

Which options am I to add there anyway? The same as in the shortcut that I don't yet know where to put? :)

Why make a shortcut?


StartServer64.bat Parameters
Open the StartServer64.bat file with a text editor
Add any appropriate JVM arguments after the -Xmx line in the .bat contents
Add any appropriate Game Parameters after the %1 %2 text inside the .bat contents, which is at the end of the file before PAUSE.

I want to use a different .bat file, like Iplaywithfriend.bat and Iplayalone.bat and Ohthisgamewithotherfriend.bat (for example, though I'd probably use the server's name as name).

In:
c:\Users\(username)\Zomboid\Server\

I found, for example, Chaosland.ini Chaosland_SandboxVars.lua and Chaosland_spawnregions.lua, and would like to use Chaosland.bat to start the server.

Let's assume I want to use that server as dedicated server, with all the mods and settings I set in the Host menu in the game itself.

What do I have to do? :) (By now I'm so confused, I don't even know where to start.)

What does that -Xmx1024m -Xms1024m -Xmx16g and stuff mean, anyway? :)

Thanks!
Beard Sep 14, 2024 @ 1:21pm 
"Why does it have to go through Steam?"
Because that part explains the parameters for the client, you can ignore that part and follow the server explanation right below it.

You really just need to follow this for a server:

Open the StartServer64.bat file with a text editor
Add any appropriate JVM arguments after the -Xmx line in the .bat contents
Add any appropriate Game Parameters after the %1 %2 text inside the .bat contents, which is at the end of the file before PAUSE.

You can create as many .bat files with different names as you want, as long as they contain the appropriate launch parameters in the .bat to start the server and any custom parameters you add to it.

So just create a copy of the StartServer64.bat, then add the "-servername ChaosLand" parameter before the PAUSE.. and you are basically done.

"What does that -Xmx1024m -Xms1024m -Xmx16g and stuff mean, anyway? :)"

Xms - Starting server RAM
Xmx - Maximum server RAM

Generally best to leave them both the same, you can assign as much RAM as you can while leaving at least 3-4GB for the system itself.
Mickmane Sep 14, 2024 @ 2:00pm 
Originally posted by Beard:
You really just need to follow this for a server:

Open the StartServer64.bat file with a text editor
Add any appropriate JVM arguments after the -Xmx line in the .bat contents
Add any appropriate Game Parameters after the %1 %2 text inside the .bat contents, which is at the end of the file before PAUSE.

You can create as many .bat files with different names as you want, as long as they contain the appropriate launch parameters in the .bat to start the server and any custom parameters you add to it.

So just create a copy of the StartServer64.bat, then add the "-servername ChaosLand" parameter before the PAUSE.. and you are basically done.

"What does that -Xmx1024m -Xms1024m -Xmx16g and stuff mean, anyway? :)"

Xms - Starting server RAM
Xmx - Maximum server RAM

Generally best to leave them both the same, you can assign as much RAM as you can while leaving at least 3-4GB for the system itself.

Thanks! So far so well.

Based on what you said there, I changed -Xms16g and Xmx16g to -Xms6g -Xmx6g, my computer only has 16G RAM. :) Maybe I should try 8G for better performance?

I could join with my local IP, friend should be able to join once he got a new computer (the reason I got round to trying this is that he can't play right now), ports are forwarded already.

No mods though. What exactly do I add? And is it to the line with the -servername Chaosland parameter. "-modfolders" ...?

I don't understand "Add any appropriate JVM arguments after the -Xmx line in the .bat contents". What's JVM?

Thanks again! :)

I much appreciate you being so active here and answering questions.
Beard Sep 15, 2024 @ 1:08am 
Higher RAM does not give better performance, it just protects against performance degradation if your game lacks it. You should be able to run 8GB just fine.

Mods are loaded in the server settings, here is a good guide for the server settings. Read the Mods= And WorkshopItems= lines on how to add mods properly.
https://steamcommunity.com/sharedfiles/filedetails/?id=2682570605

JVM = Java virtual machine, its just the Java application basically. JVM parameters are -Xmx for example since you set the RAM that the Java app will use
Mickmane Sep 15, 2024 @ 1:11am 
Originally posted by Beard:
Higher RAM does not give better performance, it just protects against performance degradation if your game lacks it. You should be able to run 8GB just fine.

Mods are loaded in the server settings, here is a good guide for the server settings. Read the Mods= And WorkshopItems= lines on how to add mods properly.
https://steamcommunity.com/sharedfiles/filedetails/?id=2682570605

JVM = Java virtual machine, its just the Java application basically. JVM parameters are -Xmx for example since you set the RAM that the Java app will use

Thanks!

Will look at that guide now. :)
Mickmane Sep 15, 2024 @ 1:37am 
Looked at it, but am confused again. Sorry. :)

The guide says:
1. Start game
2. Main menu > Host > manage settings
3. Choose servertest and click Edit Selected settings
4. Set settings as you want
5. Save
6. If you have dedicated on same PC - then dedicated server will use settings that you changed.
If dedicated server in other place:
- Open C:\Users\%USERNAME%\Zomboid\Server folder
- Copy files: servertest.ini, servertest_SandboxVars.lua, servertest_spawnregions.lua
- Open C:\Users\%USERNAME%\Zomboid\Server folder on PC/server where dedicated server
- Delete files from here and paste new files

My server is called (as example) Chaosland, so it's not servertest.ini but Chaosland.ini (and the other files).

Chaosland.* files are in the folder: C:\Users\%USERNAME%\Zomboid\Server right next to the servertest.* files.

Chaosland.ini already contains the mods= line, as configured in game:

"Mods=modoptions;ModManager;ModManagerServer;tsarslib;BB_Utils;TargetSquareOnLoad;errorMagnifier;EQUIPMENT_UI;PlayersOnMap;BLTAnnotations;MoreCLR_desc4mood;MoreDescriptionForTraits4166;DescriptiveSkillTooltips;TheStar;KnownAndCollected;TMC_TrueActions;BB_Bicycles;MapLegendUI;ProximityInventory;FastForward;ISA_41;SkillRecoveryJournal;CraftHelperContinued;Named Literature"

But starting the server, with -servername Chaosland, does not use this file, it seems.
Chaosland.bat:
--------------------------------
@setlocal enableextensions
@cd /d "%~dp0"
SET PZ_CLASSPATH=java/istack-commons-runtime.jar;java/jassimp.jar;java/javacord-2.0.17-shaded.jar;java/javax.activation-api.jar;java/jaxb-api.jar;java/jaxb-runtime.jar;java/lwjgl.jar;java/lwjgl-natives-windows.jar;java/lwjgl-glfw.jar;java/lwjgl-glfw-natives-windows.jar;java/lwjgl-jemalloc.jar;java/lwjgl-jemalloc-natives-windows.jar;java/lwjgl-opengl.jar;java/lwjgl-opengl-natives-windows.jar;java/lwjgl_util.jar;java/sqlite-jdbc-3.27.2.1.jar;java/trove-3.0.3.jar;java/uncommons-maths-1.2.3.jar;java/commons-compress-1.18.jar;java/
".\jre64\bin\java.exe" -Djava.awt.headless=true -Dzomboid.steam=1 -Dzomboid.znetlog=1 -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Xms6g -Xmx6g -Djava.library.path=natives/;natives/win64/;. -cp %PZ_CLASSPATH% zombie.network.GameServer -statistic 0 %1 %2

-servername ChaosLand
PAUSE
--------------------------------

Where did I go wrong?

Thanks! :)
Mickmane Sep 15, 2024 @ 1:48am 
Just in case I just tested whether it's case-sensitive, and fixed -servername ChaosLand to -servername Chaosland, but no luck.

On the character creation, it should already list more descriptive traits, and show the 100 extra points available from the Chaosland_SandboxVars.lua setting.
Beard Sep 15, 2024 @ 7:29am 
Do it like this:

zombie.network.GameServer -statistic 0 %1 %2 -servername ChaosLand
PAUSE

If that does not help, how are you testing whether the settings are applied exactly?
Mickmane Sep 15, 2024 @ 12:12pm 
Originally posted by Beard:
Do it like this:

zombie.network.GameServer -statistic 0 %1 %2 -servername ChaosLand
PAUSE

If that does not help, how are you testing whether the settings are applied exactly?

Oh, I'm stupid, thanks! :) It even loaded the character that I had started on that world, so that works too!? :)

One last question: How do I know that the server has finished loading, and I can join?

Btw, I tested by starting the server, then when it looked like it has finished loading, joined, was asked where to spawn, and then sent to character creation. There I could see that the 100 free points are missing, and the trait description wasn't as detailed as with the mod. So I hit back, and closed the game, then "quit" in the server window.

Thanks much! :))
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Sep 3, 2024 @ 8:45pm
Posts: 13