Jump to content
Dmantro

HOW-TO: Optimize Performance, Lock/change Time & Moon, and other mods!

Recommended Posts

Hi guys!

Usually I'm busy running my own server (I've been running Private HIVES since may), but I figured I'd stop by and post a tutorial on how to keep your servers well-maintained and optimized, and show you how to apply some fixes, and how to create your own! I'll keep adding to this (with credits from the people whom make these scripts) as people send me more modifications. Some of the features I'll be going over are:

Tuning & optimizing your server to run 110%

Custom BattEye Extended Control Scripts to reboot a server at any interval (with warnings)

Full moon, locking a server at any specific time, & where to modify each of these settings

How to install server fixes, & how to create new fixes.

Add image to server loading screen

How to add ARMA 2 assets & buildings

Adding additional vehicles or vehicle types to your map.

First off, you need to determine if you have access to the following files from your provider. Admins who host on a dedicated server or elsewhere, you have access so don't worry about it. Just read to know what each file can do for you!

-=What you need access to (and details)=-

You need access to the following files from your host. I have put a description on what features are editable (from my knowledge) from each respective file. I have seen a few people overwrite data that was in dayz_server.pbo in their mission file, and it worked but I'm not positive without testing it.

Access to.....

DayZ_Server.pbo (Located in the addons folder of @hive, @bliss, @dayz_1.chernarus, @saintly, etc.)

This file controls a large amount of the variables that can be edited. The ones we'll be editing (in this post) are the time values.

Your mission file (located in Arma2|arma 2 operation arrowhead/MPMissions/ folder. It should be titled "DayZ_1.Chernarus.pbo, but differs.)

This file controls spawn points, and can be used to implement zombie fixes, loot fixes, and player fixes. We'll be using it to add an image to the start of the server loading. Edits here are public (people can "share" them when they download your map file to their pc), so if you plan on doing a long investment of coding I'd suggest finding a way to do it server-side. You can add fixes by simply "calling" additional .sqf files within the init.sqf file.

Server Startup File (Usually a .bat with the server link+some settings)

database access (you really need this to add vehicles or buildings. It's 100% must. Get access from your host, and if they aren't willing to give you access quit and move to a real host.)

Now that we've explained what each file can do, lets move on to optimization.

NEXT:

You need to know what system HIVE your host/provider is using. Dedicated server owners should know as they installed the software. Some are different than others, so let me know if you have one that is entirely different than mine or others. The current common providers are Conanhun, Pwn's, Bliss (do not want), and guruabdul/antirocket (much older). I'd suggest if starting fresh to use Pwnoz0r (-10 spelling) as he doesn't patch ti unless its worth aptching. Bliss crew is great but they seem to update WAY too often with so many bugs each time. I'd avoid it.

-=Optimization=-

I believe I learned most of these fixes from an older post on here by Vaquxine (http://dayzmod.com/f...um-performance/ Original Thread), and I saved the thread a while back. I'm not going to suggest ALL the fixes he suggested, simply because people really aren't sure on what is "the best" settings for basic.cfg. What I will suggest is you do the following:

Download TCPOptimizer http://www.speedguid.../downloads.php/

Open open up TCPOptimizer on your server machine, and (assuming you have at least 100mbit connection) move the slider at the top all the way over to the right under "100+MBPS". Check the box "Modify All Network Adapters", then choose "Optimal" at the bottom and hit apply changes. Be sure to restart your dedicated machine right after doing this, as some programs revert many of the TCP settings back to their default values which will still be loaded into memory.

http://i.imgur.com/ZGEZ8.png

There are a few other settings that are not enabled by default with the 'optimal' profile that I feel should be for ARMA2 hosting. You can edit these advanced values after restarting on optimal settings by choosing the "custom" box on the lower right, which will allow you to edit all fields. You should change:

General Settings ->

TCP Window Auto-Tuning should be on 'experimental'.

** If you run a MySQL server on your dedicated machine, this can cause confliction and should be left as its default value.

Advanced Settings ->

NetworkThrottlingIndex should be on 'high: 70'

TCPMaxDataRetransmissions should be 9 or 10.

Network Memory Allocation Size should be on 'optimized: 3'

TcpAskFrequency should be 'enabled'.

TCPNoDelay should be 'enabled'.

* Make sure you apply changes once finished and reboot your dedicated machine once again.

After you do this, open up the .bat that you use to start the game with, and check if the following is in it:

@echo off

echo.....Killing task..........

taskkill /FI "WINDOWTITLE eq ArmA 2 OA Console version 1.62 : port numbergoeshere" /F

start /high Expansion\beta\arma2oaserver.exe [all your other settings, etc] -noPause -noSound -cpuCount=2 -exThreads=1 -maxMem=2048

exit

What is really important about the startup file is that running arma 2 on high or realtime can actually make a big difference. I personally think high is fine, but you can set it to realtime if you'd like. At high though if it crashes or has issues it most likely was going to have them on realtime regardless. You can also try -nocb, which turns off multicore drawing , possibly enabling a speed boost. I haven't tried it myself with the latest HIVE builds, though.

-=Custom BEC Scripts=-

I'll explain these files and how to edit them, but for simplicity I've uploaded my full configuration onto Github, and with a few edits to the config files they should work perfectly. you can see ALL the code on github, so no virus scares :) This will allow you to use one .bat click to start BEC and your server, and has multiple restart points. To get this to function, you need to edit the following lines in the described files in the config folder.

To use BEC, download the files here:

http://www.ibattle.o...wnloads/Bec.zip

Take ONLY bec.exe from the above download, and place it within my setting files below:

https://github.com/Rinaun/BEC1

Once you place the exe with the BEC1 folder, just leave them inside their folder and place the folder in any place you'd like. You need to edit inside the config folder the actual config.cfg, and if you'd like to change when the server is restarted or see how scheduling is done, open Scheduler.xml in notepad. You can add administrators by using the admins.xml and copypaste a new entry in. You get the GUID from ingame (logging in) or from server logs. The scheduler is currently set to restart every 6 hours, with warnings starting 10 minutes out from the reboot. The things you need to be careful about are adding more jobs (keep track of the job ID and make sure you don't overlap), and making sure you get BEC started with the server. How I did this was adding the following to the server startup .bat we made earlier:

echo ........Starting BEC.......

echo...........................

echo...........................

start "" "bec.lnk"

exit

(be sure to delete the previous "exit" before you add this!)

after you add that to your .bat file, make sure you include a shortcut to wherever you keep your .bat file of the BEC link. To make the shortcut just put the bec folder where you want it, right click make shortcut, and drag that to the same folder as your server launcher bat. The reason I do it this way (through .bats and shortcuts) is because I use a custom launcher for multiple server instances. It also gets the job done quicker :P

After you complete the above, now we're ready for the real meat and potatoes; modding!

-=modifying files=-

How do you do it?

You can edit the files several ways, but the most common is calling new .sqf files within the mission file (such as the All-In-One fixes you've seen around) or editing the dayz_server.pbo and doing pretty much the same thing. Those two spots control most of the modification of DayZ. You want to avoid editing anything else or users will have issues connecting to your server. to unpack the files, you'll need to download PBOview so you can unpack and repack the files. You CANNOT edit .pbos packed with a text editor! You MUST undo them with Viewpbo or another application. Here is PBOview: http://www.google.co...vUm2L3x0jHSEKrQ

What can I edit from these?

almost everything to do with zombies, loot control, anti hax (yes, you can build anti hacks within a map file.), vehicle spawning, pretty much anything. you can make buy menus, team menus, etc.

What will cause server issues if I edit it? How do I fix them?

What will cause server issues is making changes that require new signature files or editing any of the base dayz files. If it's in DayZ folder, don't touch it. Period. Another thing that MIGHT cause issues is if you edit things that were or are banned. DayZ doesn't like that because it thinks you are a hacker. Most of the time it can be solved by editing your battleye scripts.txt and such, but sometimes modding in tanks and etc won't be possible without a mod (such as RMod). To test this, just simply unload all scripts.txt when doing heavy modifications. I just keep the beserver.dll and .cfg in there and nothing else when testing.

How do I tell if I broke my server?

You can tell if you broke the server from the map file if it hangs on loading or wait to respond. I typically get everything running, then slowly modify things as modding always breaks more than it fixes initially.

Quick Explanation/tutorial on simple edits

So what the typical edit/fix looks like is someone add a new .sqf files (lets call this one vehicflip) and places it within the mission file. So how does he use this file? Simple. you add a one-line call to the file within the init.sqf, right as the loading bar is happening to the user. the line looks like this:

call compile preprocessFileLineNumbers "vehicflip.sqf";

and now his script is ran.

time locking/adjusting & full-moon nights

Time has as of 1.7.3 been added in to certain HIVE systems. I know bliss now has the ability to adjust time without editing the

actual files anymore. I'll be adding a link here soon with a tool that allows you to run custom day-night scripts.

image on loading

This edit is located within the Description.ext in the mission file. To add an image, simply place the image inside the mission folder within another folder to keep things organized :) In this demo, I'll be using the folder img and the image name of img.jpg. Be VERY careful on size of the image! I'd use this loading picture to show rules at a low res, so as to not affect load times too much. You could also intentionally make it large so new people have to read the rules.

To make the picture show up, you still need to edit description.ext. Add this line somewhere inside description.ext:

loadScreen = "img\img.jpg";

replace the folder and image name with whatever you'd like to use.

LAST BUT NOT LEAST

-=Adding new vehicles and buildings=-

This section is super tricky because now bliss and other private HIVE systems are completely different now. I'll suggest that the poor souls still using bliss either move onto a more stable system or follow their building instructions. They have a great building system, but they patch so much that anything they add doesn't help with what bugs it brings >.> If you are using anything else, you are in luck!

To add a vehicle, you need database access. It's pretty simple. You go here:

http://www.armatechs...5165f/index.php

pick any assets within those two catalogues, and understand that a lot of the military items/buildings/stuff is banned. If it doesn't spawn, then it's banned.

With an asset in mind (I'm going to use Land_A_BuildingWIP for this example), go find a spot with your character, then log out to lobby. Open your database, copy your position. Log in, move ten-100 feet, depending on item size. Log into database, go to your ACTIVE vehicle table (usually 2-3 tables, one has the list of vehicles, the other has the list of spawns, and the third has all the vehicles active on the map spawned). You can tell which one is the active table by looking at the inventory column. Active vehicles will have randomized gas, items, etc because people are using them. Once in this table, create a new row and input in the data much like you would adding a vehicle. Give it 0 gas, 0 damage, put your copy pasted position in, and when asked for the type/model, put in your model (for me, Land_A_BuildingWIP). After you are all done, save the database, log onto your server and restart it. Log in and tada! You should have WHATEVER asset you wanted from that webpage on the map. If I was a bit vague on the tabling its because there are SEVERAL different builds, all with different structures. you can post below if you are having issues and if I have time I'll be more than glad to help :)

I'm going to clean this up and format it once I eat dinner and my hands get uncramped! I'll add more fixes as people send me them. If you are looking for a place to play or a community to help build, check out my site. I'm trying to find some like-minded individuals who want to keep making dayZ better! Our servers have over 300+ objects/scenery and vehicles added (no, we didn't spawn a ton hueys cars and barracks, only some bikes :P)

Edited by Dmantro
  • Like 4

Share this post


Link to post
Share on other sites

Its my first time to post on this forum,just wannat make some friends here.if its not allowed to post on this board,please delete this thread.Nice to see you guys here.:)

Share this post


Link to post
Share on other sites

I thought I give you a heads up. But #restart does not restart the server. It just restarts the mission. If you want to use BEC to do an actual restart, you will need to have a custom batch file, firedaemon or appmonitor . You will have BEC issue #shutdown to kill the server and then one of the programs will catch it and start it again.

Share this post


Link to post
Share on other sites

Why would you need to restart the server fully? I've never had any issues prior with just restarting the mission, and that's running two mission files with 30+ people for 2-4 days. I used to restart until I actually looked at performance and aside from ram usage (2gb is nothing), the server FPS doesn't seem to take a drastic hit at all. I will agree however firedaemon is a good choice if you are planning on 110% automation. It just simplifies everything and when I get time I'll write a quick guide on how to set it up for dummies. for now, if you'd like to use Firedaemon go ahead and download it, set up BEC (pretty sure you still need it to warn people) and you can install firedaemon similar to how these two users did: http://dayzmod.com/forum/index.php?/topic/35540-firedaemon-restarter-need-help/

Edited by Dmantro

Share this post


Link to post
Share on other sites

I have FD setup with bec to do full server restart. Bec gives the warnings and then it restarts. Its a pretty good system.

Share this post


Link to post
Share on other sites
Time has as of 1.7.3 been added in to certain HIVE systems

how do you set the time in the new hive system i want it to be full daytime on my server

Share this post


Link to post
Share on other sites

To set the time in the new hive system using BLISS's system, simply go to your Arma2 OA folder, and look for a folder named: cfgdayz, Bliss, dayz_1.chernarus, or something similar. Open that folder up and you should see a file called HiveExt.ini. Within the file, there will be instructions on how to do certain time changes. To lock the time to 8AM (bright day), find the line ";Type = local". Remove the ; before the start of type if it has one, and change local to "static". Below will be a line like this: ;Hour = 8. Just remove the ;, so the files read that line.

Overall, it should look like this:

Type = Static

;If using Custom type, offset from UTC in hours (can be negative as well)

;Offset = 0

;If using Static type (Hour value always the same on every server start), the value (0-24) to set the Hour to

Hour = 12

Remember, this is for the BLISS hive system (and now the Pwnoz0r system too)

Share this post


Link to post
Share on other sites

full moon nights dont work

first restart after changing everything to

05 July 2012

21:00

the server shows the fullmoon as it should be

after disconnect and rejoin ... it is as fucking moonless at it was before, how can that be?

Share this post


Link to post
Share on other sites

I'm currently working on a custom time script for BLISS hive system. Stay tuned. This feature will allow server admins to set custom night-time lengths.

Share this post


Link to post
Share on other sites

Thanks Dmantro, this helped a lot! Only if you could tell us the easiest way to add vehicles with bliss?

Share this post


Link to post
Share on other sites

Easiest way to add vehicles to bliss as far as I know is to access your database, go to the "world_vehicle" table, and add a full entry in with a world position you've recovered from yourself by logging in to the desired position, then logging out, copying the POS from your character and placing it in the world_vehicle table entries. The vehicles table is a list of all vehicles that bliss can use, with corresponding number to enter into the world_vehicle table. You can add vehicles (I have) to vehicles table, and not all the vehicles listed on there work on chernarus. Some actually cause major problems calling in (such as the lada4's and 5's).

In the following days, I'm just going to release my current database build along with the custom time setup and other functions. What I've done is added 200-300 vehicles in well-placed spots, and added around 100-150 well placed buildings, bodies, and fire barrels/broken crates/doodads. You don't need to spawn all the vehicles, obviously. I've added the new unbanned planes and helicopters too. The custom time function allows you to set "day" and "night" times according to whatever you prefer. It DOES require a server restart but I usually use it while refreshing the server anyways. For example, you can set it (like mine is currently) to run 20 hours of daytime (12:01AM-7:59PM), then I restart the server like I do every 4 hours, and upon restart my server is becoming dark, then full-night by midnight. At 11:59, the server warns users day is coming and restarts (as per 4 hour reboot) . When the server restarts, the time will now be daytime. Other fixes/features that can be DIRECTLY added to vanilla dayz include making loot and zombies spawn while users are inside vehicles.

With this build, you'll also need to set up BEC and firedaemon to make this all work. My build will also include a PHPBB forum whitelisting system (GUID based). If the guy that made BEC wasn't such a crybaby he'd allow me to bundle it with the future release, instead he whined about me not giving him credit and now you guys will have to take extra steps and download it from a completely separate link :/ How hard is it to code a credits window/line?

Edited by Dmantro

Share this post


Link to post
Share on other sites

" I'll be adding a link here soon with a tool that allows you to run custom day-night scripts."

You almost done with that?

  • Like 1

Share this post


Link to post
Share on other sites

Hey i saw that building thing, anyway you can help me a little bit more on installing that on my server? It would be awesome of you!

Share this post


Link to post
Share on other sites

Deleted post, issue fixed.

Edited by Lightstylez

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×