Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DayZ] Bug Fixing & Cleanup #46

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions dayz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ ___
<a href="https://github.com/parkervcp/eggs/commits?author=Brophy" title="Codes">💻</a>
<a href="https://github.com/parkervcp/eggs/commits?author=Brophy" title="Contributor">💡</a>
</td>
<td align="center">
<a href="https://github.com/shaynendradika">
<img src="https://avatars.githubusercontent.com/u/19285167" width="50px;" alt=""/><br /><sub><b>shaynendradika</b></sub>
</a>
<br />
<a href="https://github.com/parkervcp/eggs/commits?author=shaynendradika" title="Codes">💻</a>
<a href="https://github.com/parkervcp/eggs/commits?author=shaynendradika" title="Contributor">💡</a>
</td>
</tr>
</table>
<!-- markdownlint-enable -->
Expand All @@ -51,13 +59,13 @@ ___
### Egg Capabilities

- Able to download server updates on startup
- Able to download, update, and load Steam Workshop mods on startup (\*see [Installation/System Requirements](#installationsystem-requirements))
- Able to download, update, and load Steam Workshop mods on startup (\*see [Installation/System Requirements: Game Ownership](#game-ownership))
- Also accepts server-side only mods.
- Checks for mod updates against their Steam Workshop page's last update for quick and efficient update checks.
- Automatically moves mod `.bikey`'s to the `/keys/` directory.
- Note: These features only work with mods in the `@workshopID#` format. Manually uploaded mods are not automatically updated.
- Multiple basic settings found within the `serverDZ.cfg` file can be easily set from the server's Startup tab
- Server name, passwords, disable third person, persistant time, and more...
- Server name, passwords, disable third person, persistent time, and more...
- Max Players is configurable and able to be host enforced (\*see [Recommended Egg Modifications](#recommended-egg-modifications))
- Additional [DayZ startup parameters](https://community.bistudio.com/wiki/DayZ:Server_Configuration#Launch_Parameters) can be added to fine-tune performance
- [WHMCS](https://www.whmcs.com/) compatible (\*see [Recommended Egg Modifications](#recommended-egg-modifications))
Expand All @@ -68,10 +76,11 @@ ___

Default server ports are listed below, but all ports can be changed freely.

| Port | Default (UDP) |
|---------|---------|
| **DayZ Game (Main)** | 2302 |
| Steam Query | 27016 |
| Port | Default | Protocol | Required | Notes |
|---------|---------|---------|---------|---------|
| **Game** | 2302 | UDP | **Yes** | Primary port in Panel |
| Steam Query | 27016 | UDP | Partially | Required for server listing |
| RCON | 2305 | UDP | No | Required to be defined, but not required to be assigned to the server |

___

Expand All @@ -90,7 +99,15 @@ ___
| Storage | 3072 MiB | 7168+ MiB (depends on how many mods are installed) |
| Network | 0.512 Mbit/s/player | 1-5 Mbit/s/player |
| Host OS | Most stable Linux OS branches should work | Using the latest kernel version for your installed OS can prevent some edge-case installation/boot issues. |
| Game Ownership | Not required to install game server. | Required for automatic Steam Workshop mod downloading to work. However, this is optional functionality, and mods can be manually uploaded to the server if desired. Hosts may feel free to change the "Disable Mod Downloads/Updates" variable to `1` if they would not like to offer it's functionality to clients. |

#### Game Ownership:

While not required, it is ***highly recommended*** that the Steam account used to install this server **owns** the DayZ **game** for the following reasons:
- Vanilla mission files will only update automatically with the server if the game is owned.
- They can still be manually updated by deleting the `mpmissions/` directory and reinstalling the server (this will not erase other files).
- Automatic Steam Workshop mod downloading requires ownership.
- This is optional functionality, and mods can be manually uploaded to the server if desired.
- Hosts may feel free to change the "[Host] Disable Mod Downloads/Updates" variable to `1` if they would not like to offer this functionality to clients.

___

Expand All @@ -113,10 +130,10 @@ ___
> [!CAUTION]
> The following is ***highly discouraged*** for production environments or even private use. It should only be used if you *really* don't want to disable Steam Guard and don't plan on updating your server/mods often. Support will not be given to those with Steam Guard enabled. Additionally, using this method, you are at risk of rate limiting your account if something goes wrong.

1. Edit the Egg so the Input Rules of the "Steam Username" and "Steam Password" Variables are `nullable|string`.
2. Create a new server as normal, but set "Steam Username" to be `anonymous` and "Steam Password" to be blank. This will cause the installer to successfully install SteamCMD but fail to install the DayZ server; this is intentional.
3. Once the server is created, go to the Startup tab. Change "Steam Username" and "Steam Password" to be your real Steam account and password. Also, enable "[Repair] Validate Server Files" (this only needs to be enabled for the first boot).
4. Start the server. The console will eventually appear to freeze on the line: `Loading Steam API...OK`. You will likely receive a Steam Guard request for login at this time. Approve this request just to be safe, but this will not log you in. Next, obtain a valid Steam Guard code, enter it into the console, and press Enter to submit it. This should log you in. It is successful if you see: `Two-factor code:OK`. The server will then download for the first time. Note: It may glitch and not display installation progress; be patient while it downloads and verifies.
1. When creating your server, set the variables "[Host] Skip Game Server Install" and "[Repair] Validate Server Files" to `1`.
2. Proceed with installation as normal.
3. If the server has not automatically started after installation, start it.
4. The console will eventually appear to freeze on the line: `Loading Steam API...OK`. You will likely receive a Steam Guard request for login at this time. Approve this request just to be safe, but this will not log you in. Next, obtain a valid Steam Guard code, enter it into the console, and press Enter to submit it. This should log you in. It is successful if you see: `Two-factor code:OK`. The server will then download for the first time. Note: It may glitch and not display installation progress; be patient while it downloads and verifies.
- If you have mods to install, you will have to repeat this process of obtaining and entering in a *new* Steam Guard code for *every* mod.
5. Stop the server after it starts. Open the file `serverDZ.cfg` and add `steamQueryPort = 2305;` to the end of the file. (If the file was empty when you opened it for whatever reason, grab the default contents [here](https://community.bistudio.com/wiki/DayZ:Server_Configuration#Main_Parameters))
6. The server is now ready for a "normal" boot. However, it is recommended you disable the "Automatic Updates" Startup Variable until you need to update again. Otherwise, you will have to go through the process of entering in Steam Guard codes again every boot.
5. The server should properly start at this time.
6. Go to the Startup tab and disable "[Repair] Validate Server Files". Also, it is recommended you disable the "Automatic Updates" Startup Variable until you need to update again. Otherwise, you will have to go through the process of entering in Steam Guard codes again *every boot*.
44 changes: 44 additions & 0 deletions dayz/config/serverDZ.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
hostname = "EXAMPLE NAME"; // Server name
password = ""; // Password to connect to the server
passwordAdmin = ""; // Password to become a server admin

enableWhitelist = 0; // Enable/disable whitelist (value 0-1)

maxPlayers = 60; // Maximum amount of players

verifySignatures = 2; // Verifies .pbos against .bisign files. (only 2 is supported)
forceSameBuild = 1; // When enabled, the server will allow the connection only to clients with same the .exe revision as the server (value 0-1)

disableVoN = 0; // Enable/disable voice over network (value 0-1)
vonCodecQuality = 20; // Voice over network codec quality, the higher the better (values 0-30)

disable3rdPerson=0; // Toggles the 3rd person view for players (value 0-1)
disableCrosshair=0; // Toggles the cross-hair (value 0-1)

disablePersonalLight = 1; // Disables personal light for all clients connected to server
lightingConfig = 0; // 0 for brighter night setup, 1 for darker night setup

serverTime="SystemTime"; // Initial in-game time of the server. "SystemTime" means the local time of the machine. Another possibility is to set the time to some value in "YYYY/MM/DD/HH/MM" format, f.e. "2015/4/8/17/23" .
serverTimeAcceleration=12; // Accelerated Time (value 0-24)// This is a time multiplier for in-game time. In this case, the time would move 24 times faster than normal, so an entire day would pass in one hour.
serverNightTimeAcceleration=1; // Accelerated Nigh Time - The numerical value being a multiplier (0.1-64) and also multiplied by serverTimeAcceleration value. Thus, in case it is set to 4 and serverTimeAcceleration is set to 2, night time would move 8 times faster than normal. An entire night would pass in 3 hours.
serverTimePersistent=0; // Persistent Time (value 0-1)// The actual server time is saved to storage, so when active, the next server start will use the saved time value.

guaranteedUpdates=1; // Communication protocol used with game server (use only number 1)

loginQueueConcurrentPlayers=5; // The number of players concurrently processed during the login process. Should prevent massive performance drop during connection when a lot of people are connecting at the same time.
loginQueueMaxPlayers=500; // The maximum number of players that can wait in login queue

instanceId = 1; // DayZ server instance id, to identify the number of instances per box and their storage folders with persistence files

storageAutoFix = 1; // Checks if the persistence files are corrupted and replaces corrupted ones with empty ones (value 0-1)


class Missions
{
class DayZ
{
template="dayzOffline.chernarusplus"; // Mission to load on server startup. <MissionName>.<TerrainName>
// Vanilla mission: dayzOffline.chernarusplus
// DLC mission: dayzOffline.enoch
};
};
Loading