First commit of the 'simple' branch. Maybe too simple?

This commit is contained in:
Daniel Ceregatti 2024-06-21 18:09:28 -07:00
parent fa8950ccf8
commit 7d8c9f10bd
119 changed files with 109 additions and 8995 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
.idea
*.iml
.env*
node_modules/
dayz

35
Dockerfile Normal file
View file

@ -0,0 +1,35 @@
FROM debian:bookworm-slim
# Set debconf to run non-interactively
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Install _only_ the necessary packages
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
locales \
nano \
procps
# Set the locale
#RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
#ENV LANG en_US.UTF-8
#ENV LANGUAGE en_US:en
#ENV LC_ALL en_US.UTF-8
# Setup a non-privileged user
ARG USER_ID
RUN groupadd -g ${USER_ID} user && \
useradd -l -u ${USER_ID} -m -g user user && \
mkdir -p /home/user && \
chown -R user:user /home/user
ADD --chown=user:user start.sh /usr/bin/start.sh
# Use our non-privileged user
USER user
# The dayzserver script expects a home directory to itself.
WORKDIR /home/user
# Run the container
CMD ["start.sh"]

264
README.md
View file

@ -1,272 +1,112 @@
# DayZDockerServer
A Linux [DayZ](https://dayz.com) server in a [Docker](https://docs.docker.com/) container. The main script's functionality is derived from [this project](https://github.com/thelastnoc/dayz-sa_linuxserver). That functionality is described [here](https://steamcommunity.com/sharedfiles/filedetails/?id=1517338673). The goal is to reproduce some of that functionality but also add more features.
A Linux [DayZ](https://dayz.com) server in a [Docker](https://docs.docker.com/) container.
The main goal is to provide a turnkey DayZ server with mod support that can be spun up with as little as a machine running Linux with Docker and Docker Compose installed.
The goal is to provide a vanilla DayZ server that can be spun up with as little as a machine running Linux with Docker and Docker Compose Plugin installed.
This project started when the Linux DayZ server was released for DayZ experimental version 1.14 on 09/02/2021. As of 02/20/2024, there is now an official Linux DayZ server, but...
## Features
## Caveats
This branch is called `simple`, because that's the intent: To keep things simple:
* Some mods are known to crash the server on startup:
* [DayZ Expansion AI](https://steamcommunity.com/sharedfiles/filedetails/?id=2792982069)
* [Red Falcon Flight System Heliz](https://steamcommunity.com/workshop/filedetails/?id=2692979668) - Bug report [here](https://feedback.bistudio.com/T176564)
* Some mods work, but have bugs:
* [DayZ Expansion Groups](https://steamcommunity.com/sharedfiles/filedetails/?id=2792983364)
* The save file becomes corrupted and when the server restarts so the changes do not persist.
* There are other bugs:
* (Server doesn't stop with SIGTERM)[https://feedback.bistudio.com/T170721]
This project is a work in progress: See the [roadmap](ROADMAP.md).
* One container. The server runs in the same container used to manage it.
* One local bind mount. All files are stored in a directory on the host machine.
* No root requirement. The container and its files are owned by the host user and kept entirely in that user's home directory.
* Everything is left to the user to run by hand using commands similar to the official documentation.
## Configure and Build
Ensure [Docker](https://docs.docker.com/engine/install/) and [Docker compose](https://docs.docker.com/compose/install/) are properly installed. This means setting it up so it runs as your user. Make sure you're running these commands as your user, in your home directory.
Ensure [Docker](https://docs.docker.com/engine/install/) and [Docker compose plugin](https://docs.docker.com/compose/install/) are installed.
Clone the repo, and change into the newly created directory:
Clone the repo, and change into the newly created directory, and check out the `simple` branch:
```shell
git clone https://ceregatti.org/git/daniel/dayzdockerserver.git
cd dayzdockerserver
git checkout simple
```
Create a `.env` file for the web container that contains your user id. Usually the `${UID}` shell variable has this:
Create a `.env` file that contains your user id. The output of `id` has it:
```shell
echo "export USER_ID=${UID}" | tee .env
echo "export USER_ID=$(id)" | tee .env
```
Repeat the above for server1, which uses .env1 (and so on):
Build the Docker image and bring the container up in the background:
```shell
echo "export USER_ID=${UID}" | tee .env1
docker compose up -d --build
```
But each server must also set its own unique ports:
This will bring up a single container where the server will run.
## Usage
Everything is done in a shell inside the running container. All commands are run from this shell. Invoke the shell with:
```shell
echo "export SERVER_PORT=2302" | tee -a .env1
echo "export RCON_PORT=2303" | tee -a .env1
echo "export STEAM_PORT=27016" | tee -a .env1
docker compose exec dayz bash
```
Repeat the above for each server you want to run, making sure the ports are unique across all servers:
```shell
echo "export USER_ID=${UID}" | tee .env2
echo "export SERVER_PORT=2312" | tee -a .env2
echo "export RCON_PORT=2313" | tee -a .env2
echo "export STEAM_PORT=27116" | tee -a .env2
A custom prompt will indicate when you are in the container. The prompt will look like this:
```shell
Build the Docker images:
```shell
docker compose build
```
user@dayzdockerserver:~ $
```
### Steam Integration
[SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD) is used to manage Steam downloads. A vanilla DayZ server can be installed with the `anonymous` Steam user, but most mods cannot. If the goal is to add mods, a real Steam login must be used. Login:
Use [SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD) to login:
```shell
docker compose run --rm web dz login
```docker
steamcmd +login 'MySteamLogin' +quit
```
Follow the prompts. Hit enter to accept the default, which is to use the `anonymous` user, otherwise use your real username and keep following the prompts to add your password and Steam Guard code. This process will wait indefinitely until the code is entered.
The credentials will be managed by [SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD). This will store a session token in the `homedir` docker volume. All subsequent SteamCMD commands will use this. so this process does not need to be repeated unless the session expires or the docker volume is deleted.
To manage the login credentials, simply run the above command again. See [Manage](#manage).
Follow the prompts for the password and Steam Guard code. This process will wait indefinitely until both are entered. Once logged in, this process will not need to be repeated as long as the same username is used for the +login argument and the host directory containing the files is not deleted.
## Install
The base server files must be installed before the server can be run:
```shell
docker compose run --rm web dz install
```docker
steamcmd +login 'MySteamLogin' +force_install_dir /home/user/dayz/serverfiles +app_update 223350 validate +quit
```
This will download about 2.9G of files.
## Run
## Setup
Edit `files/serverDZ.cfg` and set the values of any variables there. See the [documentation](https://forums.dayz.com/topic/239635-dayz-server-files-documentation/) if you want, but most of the default values are fine. At the very least, change the server name:
Edit the server config file. One way is to do it within the container using the `nano` editor, the only one installed in the container:
```
hostname = "Something other than Server Name"; // Server name
```docker
nano /home/user/dayz/serverfiles/serverDZ.cfg
```
Install the server config file:
Another option is to edit it directly on the host, as at this point that file is also available there:
```shell
docker compose run --rm server1 dz c
${EDITOR} ~/dayzdockerserver/serverfiles/serverDZ.cfg
```
The maintenance of the config file is a work in progress. The goal is to create a facility for merging changes into the config file and maintain a paper trail of changes.
Launch the stack into the background:
```shell
docker compose up -d
```
There will be nothing in mpmissions when a server container starts for the first time. A pristine copy of `dayzOffline.chernarusplus` will be copied from the `mpmission` volume to the server container. This will be the default map. To install other maps, see [Maps](#maps).
To see the server log:
```shell
docker compose logs -f server1
```
## Stopping the server
To stop the DayZ server:
```shell
docker compose exec server1 dz stop
```
If it exits cleanly, the container will also stop. Otherwise a crash is presumed and the server will restart. Ideally, the server would always exit cleanly, but... it's DayZ.
To stop the containers:
```shell
docker compose stop
```
To bring the entire stack down:
```shell
docker compose down
```
## Manage
### Maps
Installing another map requires installing its mod and mpmissions files. Some maps maintain github repositories or public web sites for their mpmissions, while others do not. This project aims to support DayZ maps whose mpmissions are easily accessible "Out of the box" by maintaining configuration files for them.
The following management commands presume the server has been brought [up](#run).
### RCON
A terminal-based RCON client is included: https://github.com/indepth666/py3rcon.
The dz script manages what's necessary to configure and run it:
```shell
docker compose exec server1 dz rcon
```
To reset the RCON password in the Battle Eye configuration file, simply delete it, and a random one will be generated on the next server startup:
```shell
docker compose run --rm server1 rm serverfiles/battleye/baserver_x64_active*
```
Don't expect much from this RCON at this time.
### Update the DayZ server files
It's probably not a good idea to update the server files while a server is running. Bring everything down first:
```shell
docker compose down
```
Then run the command:
```shell
docker compose run --rm web dz update
```
This will update the server base files as well as all installed mods.
Don't forget to [bring it back up](#run).
### Stop the DayZ server
To stop the server:
```shell
docker compose exec server1 dz stop
```
The above sends the SIGINT signal to the server process. The server sometimes fails to stop with this signal. It may be necessary to force stop it with the SIGKILL:
```shell
docker compose exec server1 dz force
```
When the server exits cleanly, i.e. exit code 0, the container also stops. Otherwise, a crash is presumed, and the server will be automatically restarted.
To bring the entire stack down:
```shell
docker compose down
```
### Workshop - Add / List / Remove / Update mods
Interactive interface for managing mods.
Set the values of any variables there. See the [documentation](https://forums.dayz.com/topic/239635-dayz-server-files-documentation/) if you want, but most of the default values are fine. At the very least, change the server name:
```
docker compose exec server1 dz activate id | add id1 | deactivate id | list | modupdate | remove id
docker compose exec server1 dz a id | add id1 | d id | l | m | r id
hostname = "My Cool Server"; // Server name
```
Look for mods in the [DayZ Workshop](https://steamcommunity.com/app/221100/workshop/). Browse to one. In its URL will be
an `id` parameter. Here is the URL to SimpleAutoRun: https://steamcommunity.com/sharedfiles/filedetails/?id=2264162971. To
add it:
## Start
```
docker compose exec web dz add 2264162971
Start the server:
```docker
cd /home/user/dayz/serverfiles
./DayZServer_x64 -config=serverDZ.cfg
```
Adding and removing mods will add and remove their names from the `-mod=` parameter.
## Stop
Optionally, to avoid re-downloading large mods, the `activate` and `deactivate` workshop commands will
simply disable the mod but keep its files. Keep in mind that mod updates will also update deactivated
mods.
The above is a bad example, as SimpleAutorun depends on Community Framework, which must also be installed, as well as made to load first.
### Looking under the hood
All the server files persist in a docker volume that represents the container's unprivileged user's home directory. Open a bash shell in
the running container:
```
docker compose exec web bash
```docker
# Hit control c to stop the server in the shell where it's running in the foreground.
```
Or open a shell into a new container if the docker stack is not up:
```
docker compose run --rm web bash
```
Otherwise, open a new shell in the container and kill the process:
All the files used by the server are in a docker volume. Any change made will be reflected upon the next container startup.
Use this shell cautiously.
# Development mode
Add the following to the `.env` file:
```shell
export DEVELOPMENT=1
```
Bring the stack down then back up. Now, instead of the server starting when the server container comes up it will simply block, keeping the container up and accessible.
This allows access to the server container using exec. You can then start and stop the server manually, using `dz`:
```shell
# Go into the server container
docker compose exec server1 bash
# See what the server status is
dz s
# Start it
dz start
```
To stop the server, hit control c.
Caveat: Some times the server doesn't stop with control c. If that's the case, control z, exit, then `dz f`. YMMV.
## TODO
* Create web management tool:
* It shells out to `dz` (for now) for all the heavy lifting.
* Create some way to send messages to players on the server using RCON.
* Implement multiple ids for mod commands. (In progress)
```docker

View file

@ -1,34 +0,0 @@
# Roadmap
## 1.0.0
* Web interface
* Login to Steam
* Install base files
* Search for mods
* Currently using the Steam Web API, which requires a developer key.
* Add / Remove / Update mods
* Create a server
* Server manager
* Activate / Deactivate mods
* Change mod settings
* Change server settings
* Update server files
* Start / Stop / Restart server
* Start / Stop / Restart server
* Server RCON UI
* Send commands
* Server management
* Spin up a server
* Activate / Deactivate mods
* Change server settings via a UI
* RCON
* XML / JSON file manager
* Add / remove / update values.
* Validate XML / JSON
Unsorted:
Server status shows storage age, stats

View file

@ -1,111 +1,22 @@
volumes:
# Only in the web container.
# For steamcmd files and resource files used by the scripts.
homedir_main:
# Shared by all containers.
# Mods.
mods:
# Where the server files will be installed
serverfiles:
# Upstream mission files
servermpmissions:
# Server-specific volumes
# For Steam, for now
homedir_server1:
homedir_server2:
# Server mission files
mpmissions1:
mpmissions2:
# Server profile files
profiles1:
profiles2:
services:
web:
dayz:
build:
context: web
context: .
args:
- USER_ID
user: ${USER_ID}
volumes:
- homedir_main:/home/user
- serverfiles:/serverfiles
- servermpmissions:/serverfiles/mpmissions
- mods:/serverfiles/steamapps/workshop/content
- mods:/mods
- ./files:/files
- ./web:/web
ports:
- "8001:8001/tcp"
- "8000:8000/tcp"
restart: always
env_file:
- .env
server1:
build:
context: server
args:
- USER_ID
user: ${USER_ID}
volumes:
# Common volumes
- ./files:/files
- mods:/mods
- ./server:/server
- serverfiles:/serverfiles
- servermpmissions:/mpmissions:ro
# Server-specific volumes
- homedir_server1:/home/user
- mpmissions1:/serverfiles/mpmissions
- profiles1:/profiles
# To have the server show up in the LAN tab of the DayZ launcher,
# it must run under host mode.
- ./dayz:/home/user
network_mode: host
# The above is mutually exclusive with the below. If you don't need
# the server to show up on the LAN, comment out the network_mode above
# and uncomment the port mappings below.
# ports:
# # Game port
# - 2302:2302/udp
# # RCON port
# - 2303:2303/udp
# # Steam port
# - 27016:27016/udp
# The server script execs itself when the server exits, unless told not to by `dz stop`
restart: no
# Allows attaching a debugger from the host
# cap_add:
# - SYS_PTRACE
# Allows core files to be created within the container. These are VERY LARGE! Enable only for debugging!
# One must also set the sysctl kernel.core_pattern parameter ON THE HOST to a path that is writable within the container. YMMV
# ulimits:
# core:
# soft: -1
# hard: -1
# ports:
# # Game port
# - 2302:2302/udp
# # RCON port
# - 2303:2303/udp
# # Steam port
# - 27016:27016/udp
env_file:
- .env1
# Copy and paste this for every other server you want to run, replacing 2 with 3, and so on.
server2: # <-- here
build:
context: server
args:
- USER_ID
user: ${USER_ID}
volumes:
# Common volumes
- ./files:/files
- mods:/mods
- ./server:/server
- serverfiles:/serverfiles
- servermpmissions:/mpmissions:ro
# Server-specific volumes
- homedir_server2:/home/user # <-- here
- mpmissions2:/serverfiles/mpmissions # <-- here
- profiles2:/profiles # <-- here
network_mode: host
restart: no
env_file:
- .env2 # <-- here
- .env

View file

@ -1,160 +0,0 @@
#!/usr/bin/env bash
set -eEa
# If you want/need the server and rcon ports to be different, set them here.
# The steam query port is set in serverDZ.cfg.
# Server port. Set these in the .env file for the container.
export port=${SERVER_PORT}
export rcon_port=${RCON_PORT}
# Don't change anything else.
# Colors
export default="\e[0m"
export red="\e[31m"
export green="\e[32m"
export yellow="\e[93m"
export lightblue="\e[94m"
export blue="\e[34m"
export magenta="\e[35m"
export cyan="\e[36m"
# DayZ release server Steam app ID.
# Now that the Linux server is released, the binaries will come from this ID.
export release_server_appid=223350
# Leaving the experimental server appid here to allow for the use of the experimental server.
#export release_server_appid=1042420
# DayZ release client SteamID. This is for mods, as only the release client has them.
export release_client_appid=221100
# Server container profile directory
export SERVER_PROFILE="/profiles"
# Common container base directories
export FILES="/files"
export SERVER_FILES="/serverfiles"
# Used to check if dayZ is installed
export SERVER_INSTALL_FILE="${SERVER_FILES}/DayZServer"
# Steam files
export STEAM_LOGIN="${HOME}/steamlogin"
export STEAMCMD=steamcmd
# Other stuff
export YES="${green}yes${default}"
export NO="${red}no${default}"
# Convenience function
prompt_yn(){
echo -n "${1} (y|N) " >&2
read -s -n 1 a
a=$(echo ${a} | tr A-Z a-z)
echo
if [[ "${a}" = "y" ]]
then
return 0
else
return 1
fi
}
# List mods
list(){
X=1
C="${green}"
spaces=" "
FIRST=1
for link in $(ls -d ${SERVER_FILES}/@* 2> /dev/null | sort)
do
if [[ ${FIRST} = 1 ]]
then
echo
echo -e " ID Name URL Size"
echo "------------------------------------------------------------------------------------------------------------------------"
FIRST=0
fi
ID=$(readlink ${link} | awk -F/ '{print $NF}')
MODNAME=$(get_mod_name ${ID})
SIZE=$(du -sh "${WORKSHOP_DIR}/${ID}" | awk '{print $1}')
printf "${C}%.3d %s %.30s %s https://steamcommunity.com/sharedfiles/filedetails/?id=%s %s${default}\n" ${X} ${ID} "${MODNAME}" "${spaces:${#MODNAME}+1}" ${ID} ${SIZE}
X=$((X+1))
done
echo
}
# Get mod name by ID or index
get_mod_name(){
# Check for an ID
if ! [ -d "${WORKSHOP_DIR}/${1}" ]
then
echo "Mod ID ${1} doesn't exist" >&2
exit 1
fi
NAME=$(grep name "${WORKSHOP_DIR}/${1}/meta.cpp" | cut -d '"' -f2 | tr -cd "[:alnum:]")
if [[ ${NAME} = "" ]]
then
echo "Could not get metadata. See above. Exiting..."
exit 1
fi
echo -n ${NAME}
}
get_mod_id(){
# If we were passed a valid mod id, just return it
if [ -d "${WORKSHOP_DIR}/${1}" ]
then
echo -n ${1}
return
fi
# If we have a second argument, we want to iterate over active server mods
DIR=${SERVER_FILES}
ARG="-d"
if [[ ${2} = "0" ]]
then
ARG="-tdr"
DIR=${SERVER_PROFILE}
fi
# echo "DIR: ${DIR}, ARG: ${ARG}" >&2
X=1
# Loop over mods
for link in $(ls ${ARG} ${DIR}/@* 2> /dev/null)
do
ID=$(readlink ${link} | awk -F/ '{print $NF}')
if [[ "${X}" = "${1}" ]]
then
echo -n ${ID}
return
fi
X=$((X+1))
done
}
get_mods(){
workshoplist=""
for link in $(ls -d ${SERVER_FILES}/@* 2> /dev/null | sort)
do
ID=$(readlink ${link} | awk -F/ '{print $NF}')
MODNAME=$(get_mod_name ${ID})
workshoplist+=" +workshop_download_item ${release_client_appid} ${ID}"
done
get_mod_command_line
}
get_mod_command_line(){
mod_command_line=""
for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null)
do
ID=$(readlink ${link} | awk -F/ '{print $NF}')
MODNAME=$(get_mod_name ${ID})
mod_command_line+="@${MODNAME};"
done
if [[ ${mod_command_line} != "" ]]
then
mod_command_line='-mod='${mod_command_line::-1}
fi
}

View file

@ -1,37 +0,0 @@
#!/usr/bin/env bash
set -eE
TERM="map"
if [[ ${1} =~ ^[0-9]+$ ]]
then
TERM="mod id"
fi
if [ -f "/files/mods/${1}/map.env" ]
then
source "/files/mods/${1}/map.env"
else
echo "map.env not found for ${TERM} ${1}..."
exit 1
fi
if [[ ${2} = "uninstall" ]]
then
echo "Backing up, as uninstalling will remove the ${MAP} mpmissions directory"
dz backup
rm -rf "${SERVER_FILES}/mpmissions/${MPDIR}"
elif [[ ${2} = "update" ]] || [[ ${2} = "install" ]]
then
cd /tmp
if [ -d "${DIR}" ]
then
pushd "${DIR}" > /dev/null
git pull
popd > /dev/null
else
git clone "${REPO}"
fi
rm -rf "${SERVER_FILES}/mpmissions/${MPDIR}"
cp -a "${DIR}/${MPDIR}" "${SERVER_FILES}/mpmissions"
fi

View file

@ -1,71 +0,0 @@
#!/usr/bin/env bash
# A generic script that retrieves XML files from mods, either upstream in remote endpoints, or
# locally from the downloaded mod directory, or from project files.
set -eE
ID=${1}
if ! [ -f ${FILES}/mods/${ID}/xml.env ]
then
exit 0
fi
source ${FILES}/mods/${ID}/xml.env
# Iterate over the file names we can handle
for i in cfgeventgroups.xml cfgenvironment.xml cfgeventspawns.xml cfggameplay.json cfgspawnabletypes.xml cfgweather.xml events.xml init.c types.xml
do
FILE=$(echo ${i} | cut -d. -f1)
TYPE=$(echo ${i} | cut -d. -f2)
UP=${FILE^^}
VAL=${!UP}
DIR="${WORKSHOP_DIR}/${ID}"
OUT="${DIR}/${i}"
if echo ${VAL} | grep -qE "^http"
then
echo
echo "${i} is a URL, downloading to ${OUT}"
curl -so ${OUT} ${VAL}
elif echo ${VAL} | grep -qE "^local"
then
echo
echo "${i} comes from mod integration, copying to ${OUT}"
echo -n " "
cp -v "${FILES}/mods/${ID}/${i}" "${OUT}"
elif echo ${VAL} | grep -qE "^\./"
then
echo
echo "${FILE} comes from the mod as ${VAL}, copying to ${OUT}"
echo -n " "
cp -v "${DIR}/${VAL}" "${OUT}"
fi
if [ -f ${OUT} ]
then
if [[ ${TYPE} = "xml" ]]
then
xmllint --noout ${OUT} 2> /dev/null && (
echo -e " ${green}${OUT} passes XML lint test!${default}"
) || (
echo -e " ${yellow}${OUT} does not pass XML lint test!${default}"
)
# TODO - validate against schema - https://github.com/rvost/DayZ-Central-Economy-Schema/tree/master
elif [ "${TYPE}" == "json" ]
then
jq -e . ${OUT} > /dev/null || (
echo -e " ${yellow}${OUT} does not pass JSON lint test!${default}"
) && (
echo -e " ${green}${OUT} passes JSON lint test!${default}"
)
fi
fi
done
if [ -f "${FILES}/mods/${ID}/start.sh" ]
then
echo
echo "Copy ${FILES}/mods/${ID}/start.sh -> ${DIR}/start.sh"
cp "${FILES}/mods/${ID}/start.sh" "${DIR}/start.sh"
echo
fi

View file

@ -1,124 +0,0 @@
# Custom Server Changes
## These are the custom integrations possible with dayzdockerserver
### Lowered login/logout time
To lower the login/logout time from the default 15 seconds.
Go into the server container:
```shell
docker compose exec server bash
```
Make a new directory in /profiles/custom called login and go into it:
```shell
mkdir -p /profiles/custom/login
cd /profiles/custom/login
```
Generate a globals.xml with the changed values:
```shell
cat > globals.xml << EOF
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<variables>
<var name="TimeLogin" type="0" value="1"/>
<var name="TimeLogout" type="0" value="1"/>
</variables>
EOF
```
Restart the server.
### No food
For a more survival-oriented experience, one can prevent food from spawning in the world, forcing players to hunt and fish for food.
Food still spawns on the infected and in containers. Any other mod that adds food will also be unaffected.
Go into the server container:
```shell
docker compose exec server bash
```
Make a new directory in /profiles/custom called no-food and go into it:
```shell
mkdir -p /profiles/custom/no-food
cd /profiles/custom/no-food
```
Generate the types.xml override file from your current mpmissions type.xml (presumes dayzOffline.chernarusplus):
```shell
xmlstarlet ed \
-s / -t elem -n food \
-m "/types/type[category[contains(@name, 'food')]]" "/food" \
-d /types \
-r food -v types \
-u //nominal -v 0 \
/serverfiles/mpmissions/dayzOffline.chernarusplus/db/types.xml \
> types.xml
```
Always lint any XML file that is created/merged (Any output from this command means there is a problem. No output means the XML file is valid):
```shell
xmllint --noout types.xml
```
Restart the server for the changes to take effect.
Explanation:
* Start xmlstarlet in edit mode
* Add a new XML node at the root named "food"
* Move all `<type>` nodes where `<category name="...` has the word "food" in it to the new /food node
* Delete the remaining `<types>` root node
* Rename `<food>` to `<types>`
* Set all remaining nodes to have `<nominal>0</nominal>`
* Do this for every mpmissions types.xml file (dayzOffline.chernarusplus shown here)
* Save it to a new types.xml file in the current directory, the one we made above.
This file will now serve as a types.xml override for all food items when the server starts!
Every directory under /profiles/custom will be added as a new Economy Core entry when the server is started.
### Change starting gear
To change player starting gear, using examples from [the BI DayZ Wiki](https://community.bistudio.com/wiki/DayZ:Spawning_Gear_Configuration):
Go into the server container:
```shell
docker compose exec server bash
```
Copy the custom integration directory:
```shell
mkdir -p /profiles/custom
cp -a /files/custom/starting-gear /profiles/custom/
```
Restart the server.
### No personal light
The personal light is usually configured using the `disablePersonalLight` setting in [serverDZ.cfg](../serverDZ.cfg), but if a cfggameplay.json file is present, which is the default being employed for this project, that setting must be overridden there. To configure the personal light:
```shell
mkdir -p /profiles/custom
cp -a /files/custom/no-personal-light /profiles/custom
```
Restart the server.
### References
[BI DayZ Wiki - Spawning Gear Configuration](https://community.bistudio.com/wiki/DayZ:Spawning_Gear_Configuration)
[BI DayZ Wiki - Central Economy Mission Files Modding](ttps://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding)

View file

@ -1,5 +0,0 @@
{
"PlayerData": {
"disablePersonalLight": true
}
}

View file

@ -1,9 +0,0 @@
{
"PlayerData":{
"spawnGearPresetFiles": [
"custom_starting-gear/medic.json",
"custom_starting-gear/military.json",
"custom_starting-gear/vanilla.json"
]
}
}

View file

@ -1,209 +0,0 @@
{
"spawnWeight": 1,
"name": "medic",
"attachmentSlotItemSets": [
{
"slotName": "shoulderR",
"discreteItemSets": [
{
"itemType": "PipeWrench",
"spawnWeight": 2,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Crowbar",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8
},
"quickBarSlot": 2
}
]
},
{
"slotName": "Vest",
"discreteItemSets": [
{
"itemType": "PressVest_LightBlue",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
},
{
"slotName": "Back",
"discreteItemSets": [
{
"itemType": "TortillaBag",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "CoyoteBag_Green",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
}
]
},
{
"slotName": "Eyewear",
"discreteItemSets": [
{
"itemType": "ThinFramesGlasses",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "",
"spawnWeight": 1
}
]
},
{
"slotName": "Body",
"discreteItemSets": [
{
"itemType": "MedicalScrubsShirt_Blue",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
},
{
"slotName": "Legs",
"discreteItemSets": [
{
"itemType": "MedicalScrubsPants_Blue",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
},
{
"slotName": "Feet",
"discreteItemSets": [
{
"itemType": "WorkingBoots_Yellow",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
}
],
"discreteUnsortedItemSets": [
{
"name": "Medic Cargo 1",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 1.0,
"quantityMin": 0.6,
"quantityMax": 0.8
},
"complexChildrenTypes": [
{
"itemType": "FirstAidKit",
"attributes": {
"healthMin": 0.7,
"healthMax": 0.8,
"quantityMin": 0.05,
"quantityMax": 0.1
},
"quickBarSlot": 3,
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"BloodBagIV",
"BandageDressing"
]
}
],
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"Rag",
"SheepSteakMeat"
]
},
{
"name": "Medic Cargo 2",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 1.0,
"quantityMin": 0.6,
"quantityMax": 0.8
},
"complexChildrenTypes": [
{
"itemType": "FirstAidKit",
"attributes": {
"healthMin": 0.7,
"healthMax": 0.8,
"quantityMin": 0.05,
"quantityMax": 0.1
},
"quickBarSlot": 3,
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"TetracyclineAntibiotics",
"BandageDressing"
]
}
],
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"Canteen",
"Rag",
"Apple"
]
}
]
}

View file

@ -1,337 +0,0 @@
{
"spawnWeight": 1,
"name": "Military - AKM",
"characterTypes": [
"SurvivorF_Judy",
"SurvivorM_Lewis"
],
"attachmentSlotItemSets": [
{
"slotName": "shoulderL",
"discreteItemSets": [
{
"itemType": "AKM",
"spawnWeight": 3,
"attributes": {
"healthMin": 0.5,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1,
"complexChildrenTypes": [
{
"itemType": "AK_PlasticBttstck",
"attributes": {
"healthMin": 0.4,
"healthMax": 0.6,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "PSO1Optic",
"attributes": {
"healthMin": 0.1,
"healthMax": 0.2,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1,
"simpleChildrenUseDefaultAttributes": true,
"simpleChildrenTypes": [
"Battery9V"
]
},
{
"itemType": "Mag_AKM_30Rnd",
"attributes": {
"healthMin": 0.5,
"healthMax": 0.5,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
],
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"AK_PlasticHndgrd",
"AK_Bayonet"
]
},
{
"itemType": "AKM",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1,
"complexChildrenTypes": [
{
"itemType": "AK_WoodBttstck",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "PSO11Optic",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1,
"simpleChildrenUseDefaultAttributes": true,
"simpleChildrenTypes": [
"Battery9V"
]
},
{
"itemType": "Mag_AKM_30Rnd",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
],
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"AK_WoodHndgrd",
"AK_Bayonet"
]
}
]
},
{
"slotName": "shoulderR",
"discreteItemSets": [
{
"itemType": "BaseballBat",
"spawnWeight": 2,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Shovel",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8
},
"quickBarSlot": 2
}
]
},
{
"slotName": "Vest",
"discreteItemSets": [
{
"itemType": "PlateCarrierVest",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1,
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"PlateCarrierHolster"
]
}
]
},
{
"slotName": "Back",
"discreteItemSets": [
{
"itemType": "TaloonBag_Blue",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3,
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"Mag_AKM_Drum75Rnd"
]
},
{
"itemType": "TaloonBag_Orange",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 0.8,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3,
"simpleChildrenUseDefaultAttributes": true,
"simpleChildrenTypes": [
"Mag_AKM_30Rnd",
"Mag_AKM_30Rnd"
]
}
]
},
{
"slotName": "Eyewear",
"discreteItemSets": [
{
"itemType": "AviatorGlasses",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "",
"spawnWeight": 1
}
]
},
{
"slotName": "Body",
"discreteItemSets": [
{
"itemType": "GorkaEJacket_Flat",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
},
{
"slotName": "Legs",
"discreteItemSets": [
{
"itemType": "GorkaPants_Flat",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
},
{
"slotName": "Feet",
"discreteItemSets": [
{
"itemType": "MilitaryBoots_Bluerock",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
}
],
"discreteUnsortedItemSets": [
{
"name": "Obelix",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 1.0,
"quantityMin": 0.6,
"quantityMax": 0.8
},
"complexChildrenTypes": [
{
"itemType": "Pot",
"attributes": {
"healthMin": 0.1,
"healthMax": 0.8,
"quantityMin": 0.1,
"quantityMax": 0.1
},
"quickBarSlot": -1,
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"BoarSteakMeat",
"BoarSteakMeat"
]
},
{
"itemType": "Mag_AKM_30Rnd",
"attributes": {
"healthMin": 0.1,
"healthMax": 0.8,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
],
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"Rag",
"BoarSteakMeat",
"BoarSteakMeat",
"BoarSteakMeat",
"FNX45",
"Mag_FNX45_15Rnd",
"AmmoBox_45ACP_25rnd"
]
},
{
"name": "Asterix",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.5,
"healthMax": 1.0,
"quantityMin": 0.6,
"quantityMax": 0.8
},
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"Canteen",
"Rag",
"Apple",
"AmmoBox_762x39_20Rnd",
"CZ75",
"Mag_CZ75_15Rnd",
"AmmoBox_9x19_25rnd"
]
}
]
}

View file

@ -1,769 +0,0 @@
{
"spawnWeight": 1,
"name": "Player",
"characterTypes": [
"SurvivorM_Mirek",
"SurvivorM_Boris",
"SurvivorM_Cyril",
"SurvivorM_Denis",
"SurvivorM_Elias",
"SurvivorM_Francis",
"SurvivorM_Guo",
"SurvivorM_Hassan",
"SurvivorM_Indar",
"SurvivorM_Jose",
"SurvivorM_Kaito",
"SurvivorM_Lewis",
"SurvivorM_Manua",
"SurvivorM_Niki",
"SurvivorM_Oliver",
"SurvivorM_Peter",
"SurvivorM_Quinn",
"SurvivorM_Rolf",
"SurvivorM_Seth",
"SurvivorM_Taiki",
"SurvivorF_Eva",
"SurvivorF_Frida",
"SurvivorF_Gabi",
"SurvivorF_Helga",
"SurvivorF_Irena",
"SurvivorF_Judy",
"SurvivorF_Keiko",
"SurvivorF_Linda",
"SurvivorF_Maria",
"SurvivorF_Naomi",
"SurvivorF_Baty"
],
"attachmentSlotItemSets": [
{
"slotName": "Body",
"discreteItemSets": [
{
"itemType": "TShirt_Beige",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_Black",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_Blue",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_Green",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_OrangeWhiteStripes",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_Red",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_RedBlackStripes",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_White",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "TShirt_Grey",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
},
{
"slotName": "Legs",
"discreteItemSets": [
{
"itemType": "CanvasPantsMidi_Beige",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "CanvasPantsMidi_Blue",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "CanvasPantsMidi_Grey",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "CanvasPantsMidi_Red",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "CanvasPantsMidi_Violet",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
},
{
"slotName": "Feet",
"discreteItemSets": [
{
"itemType": "AthleticShoes_Black",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "AthleticShoes_Blue",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "AthleticShoes_Brown",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "AthleticShoes_Green",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
},
{
"itemType": "AthleticShoes_Grey",
"spawnWeight": 1,
"attributes": {
"healthMin": 0.45,
"healthMax": 0.65,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": -1
}
]
}
],
"discreteUnsortedItemSets": [
{
"name": "Cargo1",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Red",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Pear",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo2",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Green",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Pear",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo3",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Yellow",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Pear",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo4",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_White",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Pear",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo5",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Red",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Plum",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo6",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Green",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Plum",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo7",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Yellow",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Plum",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo8",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_White",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Plum",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo9",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Red",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Apple",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo10",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Green",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Apple",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo11",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_Yellow",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Apple",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
},
{
"name": "Cargo12",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"complexChildrenTypes": [
{
"itemType": "BandageDressing",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2
},
{
"itemType": "Chemlight_White",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 1
},
{
"itemType": "Apple",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 3
}
]
}
]
}

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<messages>
<message>
<deadline>240</deadline>
<shutdown>1</shutdown>
<text>The server will restart in #tmin minutes...</text>
</message>
<message>
<delay>1</delay>
<repeat>30</repeat>
<onconnect>1</onconnect>
<text>Welcome to #name!</text>
</message>
</messages>

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -eE
MAP="DeerIsle"
DIR="DayZ-Deerisle-Stable"
REPO="https://github.com/johnmclane666/${DIR}.git"
MPDIR="empty.deerisle"

View file

@ -1 +0,0 @@
TYPES=./info/types.xml

View file

@ -1 +0,0 @@
TYPES=./xml/types.xml

View file

@ -1 +0,0 @@
TYPES=./info/BBP_types.xml

View file

@ -1,58 +0,0 @@
--- init.c 2023-11-17 20:59:30.977503823 +0000
+++ init.c.new 2023-11-17 21:01:06.501035495 +0000
@@ -1,46 +1,18 @@
void main()
{
- //INIT WEATHER BEFORE ECONOMY INIT------------------------
- //Weather weather = g_Game.GetWeather();
- //weather.MissionWeather(false); // false = use weather controller from Weather.c
- //weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);
- //weather.GetRain().Set( 0, 0, 1);
- //weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);
-
- //INIT ECONOMY--------------------------------------
- Hive ce = CreateHive();
- if ( ce )
- ce.InitOffline();
-
- //DATE RESET AFTER ECONOMY INIT-------------------------
+ CreateHive();
+ GetHive().InitOffline();
int year, month, day, hour, minute;
- int reset_month = 9, reset_day = 20;
-
- GetGame().GetWorld().GetDate(year, month, day, hour, minute);
+ GetGame().GetWorld().GetDate( year, month, day, hour, minute );
- if ((month == reset_month) && (day < reset_day))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- else
+ //Change here the dates for whatever months you desire
+ if ( month < 12 )
{
- if ((month == reset_month + 1) && (day > reset_day))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- else
- {
- if ((month < reset_month) || (month > reset_month + 1))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- }
+ year = 2011;
+ month = 12;
+ day = 25;
+ GetGame().GetWorld().SetDate( year, month, day, hour, minute );
}
-
- //CEApi TestHive = GetCEApi();
- //TestHive.ExportProxyProto();
- //TestHive.ExportProxyData( "8096 0 8096", 16384 );
- //TestHive.ExportClusterData() ;
}
class CustomMission: MissionServer

View file

@ -1 +0,0 @@
TYPES=./types-v6.xml

View file

@ -1 +0,0 @@
TYPES=./extras/msp_types.xml

View file

@ -1,4 +0,0 @@
CFGSPAWNABLETYPES=https://raw.githubusercontent.com/ExpansionModTeam/DayZ-Expansion-Missions/master/Template/Chernarus/expansion_ce/expansion_spawnabletypes.xml
CFGEVENTSPAWNS=https://raw.githubusercontent.com/ExpansionModTeam/DayZ-Expansion-Missions/master/Template/Chernarus/cfgeventspawns.xml
EVENTS=https://raw.githubusercontent.com/ExpansionModTeam/DayZ-Expansion-Missions/master/Template/Chernarus/expansion_ce/expansion_events.xml
TYPES=https://raw.githubusercontent.com/ExpansionModTeam/DayZ-Expansion-Missions/master/Template/Chernarus/expansion_ce/expansion_types.xml

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -eE
MAP="Banov"
DIR="Banov"
REPO="https://github.com/KubeloLive/${DIR}.git"
MPDIR="empty.banov"

View file

@ -1,2 +0,0 @@
TYPES=./xml_and_clasnames/snafu_types.xml
CFGSPAWNABLETYPES=./xml_and_clasnames/snafuspawnabletypes25percent.xml

View file

@ -1 +0,0 @@
TYPES=./info/types.xml

View file

@ -1,5 +0,0 @@
CFGSPAWNABLETYPES=./files/spawnabletypes/mmg_cfgspawnabletypes.xml
# Merge all the XML files into a single types.xml file:
# cd /mods/221100/2663169692/files/types
# xmlmerge -o types.xml *.xml
TYPES=local

View file

@ -1,5 +0,0 @@
CFGENVIRONMENT=./cfgenvironment.xml
CFGSPAWNABLETYPES=./spawnabletypes.xml
CFGEVENTSPAWNS=./cfgeventspawns.xml
EVENTS=./events.xml
TYPES=./types.xml

View file

@ -1,7 +0,0 @@
CFGSPAWNABLETYPES=https://raw.githubusercontent.com/RedFalconKen/RedFalconFlightSystem-Heliz/main/Config%20Files/Event%20Spawn%20Config/RFFSHelis_cfgspawnabletypes.xml
#CFGEVENTSPAWNS=https://raw.githubusercontent.com/RedFalconKen/RedFalconFlightSystem-Heliz/main/Config%20Files/Event%20Spawn%20Config/Banov/RFFSHelis_cfgeventspawns.xml
CFGEVENTSPAWNS=https://raw.githubusercontent.com/RedFalconKen/RedFalconFlightSystem-Heliz/main/Config%20Files/Event%20Spawn%20Config/Chernarus/RFFSHelis_cfgeventspawns.xml
#CFGEVENTSPAWNS=https://raw.githubusercontent.com/RedFalconKen/RedFalconFlightSystem-Heliz/main/Config%20Files/Event%20Spawn%20Config/DeerIsle/RFFSHelis_cfgeventspawns.xml
#CFGEVENTSPAWNS=https://raw.githubusercontent.com/RedFalconKen/RedFalconFlightSystem-Heliz/main/Config%20Files/Event%20Spawn%20Config/Namalsk/RFFSHelis_cfgeventspawns.xml
EVENTS=https://raw.githubusercontent.com/RedFalconKen/RedFalconFlightSystem-Heliz/main/Config%20Files/Event%20Spawn%20Config/RFFSHelis_events.xml
TYPES=https://raw.githubusercontent.com/RedFalconKen/RedFalconFlightSystem-Heliz/main/Config%20Files/Types.XML/RFFSHelis_Types.xml

View file

@ -1 +0,0 @@
TYPES=./extras/types/rag_baseitems.xml

View file

@ -1,4 +0,0 @@
CFGSPAWNABLETYPES=https://raw.githubusercontent.com/RedFalconKen/RedFalconWatercraft/main/Config%20Files/Event%20Spawn%20Config/cfgspawnabletypes.xml
CFGEVENTSPAWNS=https://github.com/RedFalconKen/RedFalconWatercraft/blob/main/Config%20Files/Event%20Spawn%20Config/DeerIsle/cfgeventspawns.xml
EVENTS=https://raw.githubusercontent.com/RedFalconKen/RedFalconWatercraft/main/Config%20Files/Event%20Spawn%20Config/events.xml
TYPES=https://raw.githubusercontent.com/RedFalconKen/RedFalconWatercraft/main/Config%20Files/Types.XML/RFWC_Types.xml

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
MAP="Pripyat"
DIR="PripyatMissionFiles"
REPO="https://github.com/FrenchiestFry15/${DIR}.git"
MPDIR="serverMission.Pripyat"

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<env>
<territories>
<territory type="Ambient" name="AmbientRat" behavior="DZRatGroupBeh">
<file usable="rat_territories" />
<!-- different agent types - class has to begin with AgentType:w -->
<agent type="Male" chance="1">
<spawn configName="Animal_Rat_Grey" chance="1" />
</agent>
<agent type="Female" chance="3">
<spawn configName="Animal_Rat_White" chance="10" />
</agent>
<item name="globalCountMax" val="50" />
<item name="zoneCountMin" val="1" />
<item name="zoneCountMax" val="1" />
<item name="playerSpawnRadiusNear" val="25" />
<item name="playerSpawnRadiusFar" val="75" />
</territory>
</territories>
</env>

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<events>
<event name="AmbientRat">
<nominal>3</nominal>
<min>0</min>
<max>50</max>
<lifetime>33</lifetime>
<restock>15</restock>
<saferadius>40</saferadius>
<distanceradius>0</distanceradius>
<cleanupradius>0</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="0"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="2" min="1" type="Animal_Rat_Grey"/>
<child lootmax="0" lootmin="0" max="4" min="1" type="Animal_Rat_White"/>
</children>
</event>
</events>

View file

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<types>
<type name="Animal_Rat_Grey">
<nominal>0</nominal>
<lifetime>1800</lifetime>
<restock>0</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="Animal_Rat_White">
<nominal>0</nominal>
<lifetime>1800</lifetime>
<restock>0</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="SkinnedRat">
<nominal>0</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<category name="food"/>
</type>
<type name="DeadRat_Grey">
<nominal>0</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<category name="food"/>
</type>
<type name="DeadRat_White">
<nominal>0</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<category name="food"/>
</type>
</types>

View file

@ -1,5 +0,0 @@
# banov, chernarus, livonia, namalsk, yiprit
TERRITORIES=./rat_territories/chernarus/rat_territories.xml
CFGENVIRONMENT=local
TYPES=local
EVENTS=local

View file

@ -1,84 +0,0 @@
<event name="VehicleHunterz_Old_Bike">
<pos x="6010.080078" z="14701.788086" a="6.096111" />
<pos x="5957.177246" z="14104.126953" a="14254.233398" />
<pos x="5313.379883" z="4.782500" a="12441.051758" />
<pos x="1893.470825" z="9088.951172" a="9.787330" />
<pos x="1704.869873" z="8963.522461" a="9.469731" />
<pos x="5413.193359" z="7585.847168" a="2.604634" />
<pos x="5421.258789" z="7645.694824" a="3.516835" />
<pos x="1411.535889" z="15494.984375" a=" 8.433312" />
<pos x="1071.978027" z="13376.917969" a=" 7.928827" />
<pos x="10048.099609" z="10888.799805" a="21.770000" />
<pos x="10048.099609" z="10888.799805" a="21.770000" />
<pos x="10096.698242" z="11025.446289" a="23.557491" />
<pos x="10240.601563" z="10960.629883" a="21.855894" />
<pos x="9123.113281" z="9522.119141" a="9.893348" />
<pos x="9245.028320" z="9347.706055" a="5.594609" />
<pos x="8325.462891" z="9311.027344" a="355" />
<pos x="8933.545898" z="8878.902344" a="5.075371" />
<pos x="10171.611328" z="12097.455078" a="6.925732" />
<pos x="10233.688477" z="5457.805176" a="25.305025" />
<pos x="10129.852539" z="5128.518555" a="53.144997" />
<pos x="10235.055664" z="4919.823730" a="38.464787" />
<pos x="10187.030273" z="4926.292480" a="42.316437" />
<pos x="10358.420898" z="4408.810059" a="8.754035" />
<pos x="9985.471680" z="4305.386230" a="4.153094" />
<pos x="9763.339844" z="4352.179688" a="6.366706" />
<pos x="10264.574219" z="10942.596680" a="21.811928" />
<pos x="10240.601563" z="10960.629883" a="21.855894" />
<pos x="9123.113281" z="9522.119141" a="9.893348" />
<pos x="9245.028320" z="9347.706055" a="5.594609" />
<pos x="8325.462891" z="9311.027344" a="5.142496" />
<pos x="8933.545898" z="8878.902344" a="5.075371" />
<pos x="10171.611328" z="12097.455078" a="6.925732" />
<pos x="10233.688477" z="5457.805176" a="25.305025" />
<pos x="10129.852539" z="5128.518555" a="53.144997" />
<pos x="10235.055664" z="4919.823730" a="38.464787" />
<pos x="10187.030273" z="4926.292480" a="42.316437" />
<pos x="10358.420898" z="4408.810059" a="8.754035" />
<pos x="9985.471680" z="4305.386230" a="4.153094" />
<pos x="9763.339844" z="4352.179688" a="6.366706" />
<pos x="9790.224609" z="4355.215820" a="6.192500" />
<pos x="10332.311523" z="4014.201416" a="3.967608" />
<pos x="10369.708984" z="4003.835449" a="3.121927" />
<pos x="7497.622070" z="3940.302490" a="23.842499" />
<pos x="7521.539551" z="3576.437500" a="32.894035" />
<pos x="7494.642090" z="3278.126221" a="43.374649" />
<pos x="7333.544922" z="2548.608643" a="45.877647" />
<pos x="6054.528809" z="14828.798828" a="3.994229" />
<pos x="6139.636230" z="14684.996094" a="4.753993" />
<pos x="6108.496094" z="14644.705078" a="9.389813" />
<pos x="13866.751953" z="3906.153564" a="9.541591" />
<pos x="13289.928711" z="4750.315918" a="9.222501" />
<pos x="13452.711914" z="4739.151855" a="9.164268" />
<pos x="14002.353516" z="2983.972656" a="92.910805" />
<pos x="15558.864258" z="1169.379150" a="57.551590" />
<pos x="7146.093262" z="1589.995972" a="8.163297" />
<pos x="7482.986816" z="1540.985474" a="3.170174" />
<pos x="6898.913574" z="1824.329224" a="38.923012" />
<pos x="6666.698242" z="1493.407959" a="5.743637" />
<pos x="6395.947754" z="2114.641602" a="31.742464" />
<pos x="6282.848145" z="1383.738037" a="4.692500" />
<pos x="5468.817383" z="960.003052" a="-1.392104" />
<pos x="4746.870605" z="1546.413086" a="8.436662" />
<pos x="4847.833496" z="1548.356445" a="8.282501" />
<pos x="4943.163574" z="2093.076660" a="3.902500" />
<pos x="5040.596191" z="2184.517334" a="4.520437" />
<pos x="4471.860352" z="2760.040527" a="3.704665" />
<pos x="4325.373047" z="2833.375488" a="2.620498" />
<pos x="4126.901855" z="2871.620850" a="22.575489" />
<pos x="1425.494263" z="6763.766113" a="2.338181" />
<pos x="14488.817383" z="6437.840820" a="2.374229" />
<pos x="13791.873047" z="5278.212402" a="2.322220" />
<pos x="5816.545898" z="13905.427734" a="7.799627" />
<pos x="1222.279053" z="10547.170898" a="55.960594" />
<pos x="6014.195801" z="15217.665039" a="5.892501" />
<pos x="6316.229004" z="14577.662109" a="18.519482" />
<pos x="5960.694336" z="8454.970703" a="5.829842" />
<pos x="10147.758789" z="10016.644531" a="23.543917" />
<pos x="11341.680664" z="1724.614502" a="5.339993" />
<pos x="6850.232910" z="1530.607910" a="2.706452" />
<pos x="6764.081055" z="1439.538574" a="3.514446" />
<pos x="6310.994629" z="998.508789" a="14.172501" />
<pos x="7290.669434" z="8477.252930" a="6.650079" />
</event>

View file

@ -1,4 +0,0 @@
CFGSPAWNABLETYPES=./spawnabletypes.xml
CFGEVENTSPAWNS=./cfgeventspawns_chernarus.xml
#EVENTS=events.xml
#TYPES=types.xml

View file

@ -1,6 +0,0 @@
{
"WorldsData":{
"environmentMinTemps": [-7.0, -5.0, -3.0, -2.0, 0.0, 2.0, 5.0, 10.0, 7.0, 5.0, 1.0, -2.0],
"environmentMaxTemps": [-3.0, -1.0, 2.0, 5.0, 7.0, 10.0, 12.0, 16.0, 13.0, 10.0, 7.0, 2.0]
}
}

View file

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<weather reset="0" enable="0">
<overcast>
<current actual="0.10" time="900" duration="1200" />
<limits min="0.6" max="1.0" />
<timelimits min="900" max="1800" />
<changelimits min="0.1" max="0.3" />
</overcast>
<fog>
<current actual="0.0" time="0" duration="0" />
<limits min="0.0" max="0.0" />
<timelimits min="0" max="0" />
<changelimits min="0.0" max="0.0" />
</fog>
<rain>
<current actual="0.2" time="120" duration="240" />
<limits min="0.1" max="1.0" />
<timelimits min="120" max="240" />
<changelimits min="0.0" max="0.1" />
<thresholds min="0.6" max="1.0" end="10" />
</rain>
<wind>
<maxspeed>13</maxspeed>
<params min="0.0" max="0.6" frequency="30" />
</wind>
<storm density="0.0" threshold="1.0" timeout="0"/>
</weather>

View file

@ -1,54 +0,0 @@
--- init.c 2023-12-22 09:06:49.416111938 +0000
+++ init.c.new 2023-12-22 09:08:58.365653156 +0000
@@ -1,34 +1,19 @@
void main()
{
- //INIT ECONOMY--------------------------------------
- Hive ce = CreateHive();
- if ( ce )
- ce.InitOffline();
-
- //DATE RESET AFTER ECONOMY INIT-------------------------
+ CreateHive();
+ GetHive().InitOffline();
int year, month, day, hour, minute;
- int reset_month = 9, reset_day = 20;
- GetGame().GetWorld().GetDate(year, month, day, hour, minute);
+ GetGame().GetWorld().GetDate( year, month, day, hour, minute );
- if ((month == reset_month) && (day < reset_day))
+ //Change here the dates for whatever months you desire
+ if ( month < 12 )
{
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
+ year = 2011;
+ month = 12;
+ day = 25;
+ GetGame().GetWorld().SetDate( year, month, day, hour, minute );
}
- else
- {
- if ((month == reset_month + 1) && (day > reset_day))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- else
- {
- if ((month < reset_month) || (month > reset_month + 1))
- {
- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
- }
- }
- }
-}
+}
class CustomMission: MissionServer
{
@@ -95,4 +80,4 @@
Mission CreateCustomMission(string path)
{
return new CustomMission();
-}
\ No newline at end of file
+}

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<types>
<type name="WinterStash">
<nominal>0</nominal>
<lifetime>1209600</lifetime>
<restock>0</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<category name="containers"/>
</type>
</types>

View file

@ -1,4 +0,0 @@
TYPES=local
INIT=local
CFGGAMEPLAY=local
CFGWEATHER=local

View file

@ -1 +0,0 @@
TYPES=./xmls/ugbtypes.xml

View file

@ -1,58 +0,0 @@
# HypeTrain
## Reference
The files used to integrate the [HypeTrain mod](https://steamcommunity.com/sharedfiles/filedetails/?id=3115714092) came from
[here](https://steamcommunity.com/workshop/filedetails/discussion/3115714092/4032475029247848861/).
## Goals
To spawn exactly one large complete train (7-8 cars) somewhere in Chernarus, in one of many possible locations, and having all cars persist
Later, to spwan exactly one smaller train in the same manner as above, but then to spawn in more cars over time, in random places.
## Mod Integration Files
5 files are required to run the mod. Two are map-specific and the rest are common to all maps:
These are map-specific. The ones included in this repository are for Chernarus:
* `cfgeventgroups.xml` - Defines "sets of trains", one for every possible spawn point.
* `cfgeventspawns.xml` - The possible spawn point locations within Chernarus.
These files are commong to all maps:
* `cfgspawnabletypes.xml` -
* `events.xml` - An event that spawns a complete train
* `types.xml` - All types from the mod.
The `start.sh` script is for doing extra stuff, but programatically. See the comments within it for details.
## Generic Mod Installation (Windows)
Using the [Central Economy](https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding) method:
* Create a new folder in your mpmissions map folder. Name it HypeTrain.
* Put the 3 files common to the server in that folder
```
+C:\
+DayZ Server
+mpmissions
+dayzOffline.chernarusplus
+HypeTrain
-cfgspawnabletypes.xml
-events.xml
-types.xml
```
Edit the server's `cfgeconomycore.xml` and add the following under `<economycore>`:
```
<ce folder="HypeTrain">
<file name="cfgspawnabletypes.xml" type="spawnabletypes"/>
<file name="events.xml" type="events"/>
<file name="types.xml" type="types"/>
</ce>
```
The other two files must be manually merged to the mpmissions equivalents:

View file

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventgroupdef>
<!-- HypeTrain -->
<!--pos x="5587.466" z="2063.353" a="0" y="7.591" group="HypeTrain_Cherno"/-->
<group name="HypeTrain_Cherno">
<child type="HypeTrain_742_Locomotive_Red" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="78.123" y="1.9"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="12.085" z="2.740" a="256.739" y="1.789"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="23.106" z="5.477" a="255.579" y="1.781"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="34.546" z="8.424" a="255.837" y="1.32"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="46.285" z="11.341" a="255.321" y="1.398"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="69.472" z="18.594" a="250.938" y="1.450"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="57.966" z="14.737" a="252.227" y="1.411"/>
</group>
<!--pos x="3678.228" z="2328.108" a="0" y="6.546" group="HypeTrain_Kamarovo"/-->
<group name="HypeTrain_Kamarovo">
<child type="HypeTrain_742_Locomotive_Blue" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="198.014" y="1.9"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="60.378" z="80.129" a="67.036" y="0.196"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="45.489" z="71.296" a="52.469" y="0.196"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="32.470" z="59.876" a="45.249" y="0.196"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="21.187" z="46.785" a="35.581" y="0.196"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="8.003" z="23.498" a="20.755" y="1.328"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="13.241" z="34.531" a="28.619" y="1.328"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="3.936" z="12.068" a="18.048" y="1.328"/>
</group>
<!--pos x="11254.230" z="3290.319" a="0" y="6.513" group="HypeTrain_Kamy"/-->
<group name="HypeTrain_Kamy">
<child type="HypeTrain_742_Locomotive_Red" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="232.116" y="1.9"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="10.519" z="7.484" a="56.981" y="1.359"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="63.608" z="36.819" a="65.102" y="1.350"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="42.184" z="25.479" a="61.364" y="1.357"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="31.572" z="19.643" a="61.364" y="1.377"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="20.972" z="13.791" a="60.977" y="1.373"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="52.812" z="31.258" a="61.364" y="1.354"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="74.479" z="41.357" a="249.519" y="1.775"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="85.195" z="45.147" a="71.548" y="1.771"/>
</group>
<!--pos x="1256.313" z="9349.465" a="0" y="211.678" group="HypeTrain_Myshkino"/-->
<group name="HypeTrain_Myshkino">
<child type="HypeTrain_742_Locomotive_Blue" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="29.779" y="1.9"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-6.915" z="-10.795" a="36.096" y="1.265"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-14.550" z="-20.221" a="42.284" y="1.208"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-31.905" z="-37.229" a="47.828" y="1.206"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-23.030" z="-28.951" a="46.538" y="1.211"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="-56.176" z="-58.183" a="49.246" y="0.2"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="-43.109" z="-47.006" a="49.504" y="0.2"/>
</group>
<!--pos x="5428.630" z="12312.974" a="0" y="185.442" group="HypeTrain_Petrovka"/-->
<group name="HypeTrain_Petrovka">
<child type="HypeTrain_742_Locomotive_Red" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="289.612" y="1.9"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="12.042" z="-4.408" a="289.097" y="1.269"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="46.298" z="-16.484" a="289.999" y="1.255"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="34.948" z="-12.386" a="289.354" y="1.242"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="69.121" z="-24.510" a="288.452" y="1.219"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="23.490" z="-8.401" a="289.354" y="1.229"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="57.678" z="-20.632" a="288.323" y="1.2010"/>
</group>
<!--pos x="8802.031" z="2334.222" a="0" y="8.277" group="HypeTrain_Prigorodki"/-->
<group name="HypeTrain_Prigorodki">
<child type="HypeTrain_742_Locomotive_Red" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="319.005" y="1.9"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="16.395" z="-18.849" a="318.876" y="1.405"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="8.245" z="-9.730" a="318.361" y="1.427"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="24.431" z="-28.037" a="318.876" y="1.426"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="34.188" z="-39.164" a="318.618" y="0.247"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="57.286" z="-64.804" a="317.587" y="0.225"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="69.024" z="-77.475" a="316.942" y="0.253"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="45.675" z="-52.051" a="318.103" y="0.242"/>
</group>
<!--pos x="13377.262" z="13919.888" a="0" y="17.197" group="HypeTrain_Svetlo"/-->
<group name="HypeTrain_Svetlo">
<child type="HypeTrain_742_Locomotive_Blue" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="10.700" y="1.9"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="-10.339" z="-33.442" a="17.661" y="1.7"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="-3.268" z="-11.845" a="16.630" y="1.713"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="-6.742" z="-22.613" a="18.951" y="1.722"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-13.526" z="-44.791" a="14.567" y="1.229"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-19.898" z="-80.635" a="6.446" y="1.275"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-18.358" z="-68.715" a="8.766" y="1.257"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-16.193" z="-56.684" a="11.216" y="1.272"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-20.853" z="-92.739" a="3.610" y="1.282"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-21.220" z="-104.845" a="0.644" y="1.276"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-21.077" z="-116.967" a="358.840" y="1.304"/>
</group>
<!--pos x="1309.973" z="4991.340" a="0" y="166.535" group="HypeTrain_Zvir"/-->
<group name="HypeTrain_Zvir">
<child type="HypeTrain_742_Locomotive_Blue" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="288.452" y="1.9"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="49.419" z="-4.295" a="83.666" y="0.390"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="14.937" z="-3.783" a="99.781" y="0.358"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="32.083" z="-5.389" a="90.628" y="0.376"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="64.047" z="-2.551" a="83.408" y="1.625"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="88.204" z="0.338" a="83.537" y="1.572"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="76.187" z="-1.095" a="83.022" y="1.600"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="100.262" z="1.652" a="82.893" y="1.623"/>
</group>
<!--pos x="1321.629" z="2398.199" a="0" y="6.309" group="HypeTrain_Kamenka"/-->
<group name="HypeTrain_Kamenka">
<child type="HypeTrain_742_Locomotive_Blue" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="345.304" y="1.9"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="4.459" z="-14.645" a="341.694" y="0.225"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="10.686" z="-30.795" a="335.635" y="0.226"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="18.944" z="-45.766" a="325.967" y="0.25"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="29.904" z="-58.888" a="313.591" y="0.355"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="79.093" z="-96.478" a="306.113" y="1.787"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="69.927" z="-89.804" a="305.727" y="1.787"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="50.536" z="-75.855" a="305.856" y="1.36"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="40.687" z="-68.627" a="308.047" y="1.36"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="60.385" z="-82.989" a="305.469" y="1.36"/>
</group>
<!--pos x="1443.256" z="6622.697" a="0" y="176.060" group="HypeTrain_Metalurg"/-->
<group name="HypeTrain_Metalurg">
<child type="HypeTrain_742_Locomotive_Red" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="147.737" y="1.9"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="-84.501" z="84.067" a="297.992" y="0.204"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="-54.606" z="67.125" a="303.277" y="0.255"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="-69.328" z="75.889" a="298.507" y="0.224"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="-42.957" z="58.573" a="310.496" y="1.697"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-19.843" z="31.277" a="327.385" y="1.364"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-34.535" z="50.581" a="316.298" y="1.428"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-13.315" z="21.067" a="327.385" y="1.371"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-6.763" z="10.840" a="326.998" y="1.383"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="-26.616" z="41.292" a="324.033" y="1.377"/>
</group>
<!--pos x="673.779" z="8747.024" a="0" y="194.245" group="HypeTrain_Myshkino"/-->
<group name="HypeTrain_Myshkino">
<child type="HypeTrain_742_Locomotive_Blue" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="346.572" y="1.9"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="3.166" z="-11.870" a="343.499" y="1.6"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="6.678" z="-22.639" a="340.147" y="1.6"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="11.717" z="-36.060" a="338.987" y="0.0"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="17.868" z="-52.124" a="338.987" y="0.0"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="30.176" z="-84.236" a="338.729" y="0.0"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="24.014" z="-68.186" a="338.987" y="0.0"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="39.777" z="-109.229" a="338.858" y="1.4"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="35.503" z="-97.932" a="339.245" y="1.4"/>
</group>
<!--pos x="3262.817" z="12430.286" a="0" y="220.335" group="HypeTrain_Petrovka"/-->
<group name="HypeTrain_Petrovka">
<child type="HypeTrain_742_Locomotive_Red" deloot="0" lootmax="0" lootmin="0" x="0" z="0" a="225.283" y="2.9"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="36.443" z="30.719" a="54.016" y="2.2"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="26.840" z="23.290" a="50.664" y="2.208"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="56.311" z="44.548" a="65.489" y="2.202"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="112.567" z="68.760" a="72.708" y="1.102"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="96.211" z="63.229" a="69.485" y="1.102"/>
<child type="HypeTrain_742_Wagon_Flat" deloot="0" lootmax="0" lootmin="0" x="80.282" z="56.654" a="65.747" y="1.102"/>
<child type="HypeTrain_742_Wagon_Box" deloot="0" lootmax="0" lootmin="0" x="67.106" z="50.111" a="62.782" y="2.23"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="17.854" z="15.843" a="49.890" y="2.6"/>
<child type="HypeTrain_742_Wagon_Tank" deloot="0" lootmax="0" lootmin="0" x="9.272" z="8.479" a="48.085" y="2.615"/>
</group>
</eventgroupdef>

View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventposdef>
<!-- HypeTrain -->
<event name="VehicleHypeTrain">
<zone smin="0" smax="0" dmin="0" dmax="0" r="20" />
<pos x="5587.466" z="2063.353" a="0" y="7.75" group="HypeTrain_Cherno"/>
<pos x="3678.228" z="2328.108" a="0" y="6.7" group="HypeTrain_Kamarovo"/>
<pos x="11254.230" z="3290.319" a="0" y="6.65" group="HypeTrain_Kamy"/>
<pos x="1256.313" z="9349.465" a="0" y="211.82" group="HypeTrain_Myshkino"/>
<pos x="5428.630" z="12312.974" a="0" y="185.59" group="HypeTrain_Petrovka"/>
<pos x="8802.031" z="2334.222" a="0" y="8.42" group="HypeTrain_Prigorodki"/>
<pos x="13377.262" z="13919.888" a="0" y="17.247" group="HypeTrain_Svetlo"/>
<pos x="1309.973" z="4991.340" a="0" y="166.685" group="HypeTrain_Zvir"/>
<pos x="1321.629" z="2398.199" a="0" y="6.7" group="HypeTrain_Kamenka"/>
<pos x="1443.256" z="6622.697" a="0" y="176.220" group="HypeTrain_Metalurg"/>
<pos x="673.779" z="8747.024" a="0" y="194.405" group="HypeTrain_Myshkino"/>
<pos x="3262.817" z="12430.286" a="0" y="219.495" group="HypeTrain_Petrovka"/>
</event>
</eventposdef>

View file

@ -1,268 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<spawnabletypes>
<!-- HypeTrain -->
<type name="HypeTrain_742_Locomotive_Blue">
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="TruckBattery" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_EngineBelt" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_ControlUnit" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="GlowPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_CompressedAirHoses" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
</type>
<type name="HypeTrain_742_Locomotive_DarkBlue_Yellow">
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="TruckBattery" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_EngineBelt" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_ControlUnit" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="GlowPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_CompressedAirHoses" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
</type>
<type name="HypeTrain_742_Locomotive_IceBlue">
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="TruckBattery" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_EngineBelt" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_ControlUnit" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="GlowPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_CompressedAirHoses" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
</type>
<type name="HypeTrain_742_Locomotive_Yellow_Blue_White">
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="TruckBattery" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_EngineBelt" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_ControlUnit" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="GlowPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_CompressedAirHoses" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
</type>
<type name="HypeTrain_742_Locomotive_Red">
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="TruckBattery" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_EngineBelt" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_ControlUnit" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="GlowPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_CompressedAirHoses" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
</type>
<type name="HypeTrain_742_Locomotive_Red_Olive">
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="TruckBattery" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_EngineBelt" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_ControlUnit" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="GlowPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_CompressedAirHoses" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Large" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HypeTrain_742_Locomotive_Glass_Small" chance="1.00" />
</attachments>
</type>
</spawnabletypes>

View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<events>
<!-- HypeTrain -->
<event name="VehicleHypeTrain">
<nominal>1</nominal>
<min>0</min>
<max>0</max>
<lifetime>3888000</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="1" init_random="0" remove_damaged="0"/>
<position>fixed</position>
<limit>child</limit>
<active>1</active>
<children/>
</event>
</events>

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
# This is run in the directory with the target files
# Remove static trains
xmlstarlet ed -L -d '//eventposdef/event[@name="StaticTrain"]' cfgeventspawns.xml
# Remove spawn locations of former trains to prevent floating loot on tracks
xmlstarlet ed -L -d '//map/group[starts-with(@name,"Land_Train_")]' mapgrouppos.xml

View file

@ -1,247 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<types>
<!-- HypeTrain -->
<type name="HypeTrain_742_Locomotive_Blue">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Locomotive_DarkBlue_Yellow">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Locomotive_IceBlue">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Locomotive_Yellow_Blue_White">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Locomotive_Red">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Locomotive_Red_Olive">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Wagon_Box">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Wagon_Tank">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Wagon_Flat">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>1800</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="HypeTrain_742_Locomotive_EngineBelt">
<nominal>4</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>2</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<usage name="Industrial"/>
</type>
<type name="HypeTrain_742_Locomotive_ControlUnit">
<nominal>5</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>2</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<usage name="Industrial"/>
</type>
<type name="HypeTrain_742_Locomotive_CompressedAirHoses">
<nominal>15</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>7</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<usage name="Industrial"/>
</type>
<type name="HypeTrain_742_Locomotive_WindscreenBox">
<nominal>15</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>7</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<usage name="Industrial"/>
</type>
<type name="HypeTrain_742_Locomotive_Glass_Large">
<nominal>15</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>7</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<usage name="Industrial"/>
</type>
<type name="HypeTrain_742_Locomotive_Glass_Small">
<nominal>15</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>7</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<usage name="Industrial"/>
</type>
<type name="HypeTrain_RailwayWorkerVest">
<nominal>20</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="clothes"/>
</type>
<type name="HypeTrain_ConductorCap">
<nominal>20</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="clothes"/>
</type>
<type name="HypeTrain_ConductorGloves">
<nominal>20</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="clothes"/>
</type>
<type name="HypeTrain_ConductorSuit">
<nominal>20</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="clothes"/>
</type>
<type name="HypeTrain_ConductorPants">
<nominal>20</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="clothes"/>
</type>
<type name="HypeTrain_ConductorShoes">
<nominal>20</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="clothes"/>
</type>
<type name="HypeTrain_ConductorWhistle">
<nominal>14</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<tag name="floor"/>
<usage name="Firefighter"/>
<usage name="Police"/>
<usage name="Medic"/>
</type>
</types>

View file

@ -1,6 +0,0 @@
# The following two files are specific to chernarus, but livonia, and namalsk are also *currently* supported.
CFGEVENTGROUPS=local
CFGEVENTSPAWNS=local
CFGSPAWNABLETYPES=local
TYPES=local
EVENTS=local

View file

@ -1 +0,0 @@
TYPES=./xml/dieseljerrycan_types.xml

View file

@ -1 +0,0 @@
2415195639

View file

@ -1 +0,0 @@
1710977250

View file

@ -1 +0,0 @@
1646187754

View file

@ -1 +0,0 @@
2971190303

View file

@ -1 +0,0 @@
2291785437

View file

@ -1 +0,0 @@
2950280649

View file

@ -1 +0,0 @@
1602372402

View file

@ -1 +0,0 @@
3118784990

View file

@ -1 +0,0 @@
3115714092

View file

@ -1 +0,0 @@
1964490092

View file

@ -1 +0,0 @@
2663169692

View file

@ -1 +0,0 @@
1991570984

View file

@ -1 +0,0 @@
1617874376

View file

@ -1 +0,0 @@
2929038098

View file

@ -1 +0,0 @@
2878980498

View file

@ -1 +0,0 @@
2692979668

View file

@ -1 +0,0 @@
2906371600

View file

@ -1 +0,0 @@
2443122116

View file

@ -1 +0,0 @@
2489196158

View file

@ -1 +0,0 @@
3029439021

View file

@ -1 +0,0 @@
2981609048

View file

@ -1 +0,0 @@
1891132304

View file

@ -1 +0,0 @@
2684950452

View file

@ -1,21 +0,0 @@
# Mods
## Custom mod integrations
The goal is to provide the ability to quickly and easily integrate a mod's extra files:
* Custom map mods that require mission files to be installed.
* Mods that require extra files to be merged into mission files.
* Mods that require extra integration steps in the profiles directory.
### [Banov](https://steamcommunity.com/sharedfiles/filedetails/?id=2415195639)
A custom map mod. The integration script installs the mission files from their github.
### [Raptors](https://steamcommunity.com/sharedfiles/filedetails/?id=2684950452)
...
### [Red Falcon Flight System Heliz](https://steamcommunity.com/sharedfiles/filedetails/?id=2692979668)
A mod that adds helicopters. The integration merges `types.xml`, `events.xml`, `cfgspawnabletypes.xml`, and `cfgeventspawns.xml` into the mission files. This allows for configuring spawn points on all the [supported maps](https://github.com/RedFalconKen/RedFalconFlightSystem-Heliz/tree/main/Config%20Files/Event%20Spawn%20Config), what helicopters spawn, how many, their parts, etc..

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
MAP="Enoch"
DIR="DayZ-Central-Economy"
REPO="https://github.com/BohemiaInteractive/${DIR}.git"
MPDIR="dayzOffline.enoch"

View file

@ -1,96 +0,0 @@
hostname = "Something other than Server Name"; // Server name
password = ""; // Password to connect to the server
passwordAdmin = ""; // Password to become a server admin
maxPlayers = 60; // Maximum amount of players
verifySignatures = 2; // Verifies .pbos against .bisign files. (only 2 is supported)
forceSameBuild = 0; // 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 = 30; // 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=1; // Toggles the cross-hair (value 0-1)
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=3; // 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 = 4; // 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=1; // 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)
motd[] = {"", ""}; // Message of the day displayed in the in-game chat
respawnTime = 0; // Sets the respawn delay (in seconds) before the player is able to get a new character on the server, when the previous one is dead
motdInterval = 300; // Time interval (in seconds) between each message
maxPing= 200; // Max ping value until server kick the user (value in milliseconds)
timeStampFormat = "Short"; // Format for timestamps in the .rpt file (value Full/Short)
logAverageFps = 3600; // Logs the average server FPS (value in seconds), needs to have -dologs launch parameter active
logMemory = 3600; // Logs the server memory usage (value in seconds), needs to have the -dologs launch parameter active
logPlayers = 3600; // Logs the count of currently connected players (value in seconds), needs to have the -dologs launch parameter active
logFile = "server_console.log"; // Saves the server console log to a file in the folder with the other server logs
adminLogPlayerHitsOnly = 0; // 1 - log player hits only / 0 - log all hits ( animals/infected )
adminLogPlacement = 0; // 1 - log placement action ( traps, tents )
adminLogBuildActions = 0; // 1 - log basebuilding actions ( build, dismantle, destroy )
adminLogPlayerList = 0; // 1 - log periodic player list with position every 5 minutes
enableDebugMonitor = 0; // shows info about the character using a debug window in a corner of the screen (value 0-1)
steamQueryPort = 27016; // defines Steam query port, should fix the issue with server not being visible in client server browser
allowFilePatching = 1; // if set to 1 it will enable connection of clients with "-filePatching" launch parameter enabled
simulatedPlayersBatch = 20; // Set limit of how much players can be simulated per frame (for server performance gain)
multithreadedReplication = 1; // enables multi-threaded processing of server's replication system
// number of worker threads is derived by settings of jobsystem in dayzSettings.xml by "maxcores" and "reservedcores" parameters (value 0-1)
speedhackDetection = 1; // enable speedhack detection, values 1-10 (1 strict, 10 benevolent, can be float)
networkRangeClose = 20; // network bubble distance for spawn of close objects with items in them (f.i. backpacks), set in meters, default value if not set is 20
networkRangeNear = 150; // network bubble distance for spawn (despawn +10%) of near inventory items objects, set in meters, default value if not set is 150
networkRangeFar = 1000; // network bubble distance for spawn (despawn +10%) of far objects (other than inventory items), set in meters, default value if not set is 1000
networkRangeDistantEffect = 4000; // network bubble distance for spawn of effects (currently only sound effects), set in meters, default value if not set is 4000
defaultVisibility=1375; // highest terrain render distance on server (if higher than "viewDistance=" in DayZ client profile, clientside parameter applies)
defaultObjectViewDistance=1375; // highest object render distance on server (if higher than "preferredObjectViewDistance=" in DayZ client profile, clientside parameter applies)
lightingConfig = 1; // 0 for brighter night, 1 for darker night
disablePersonalLight = 1; // disables personal light for all clients connected to server
disableBaseDamage = 0; // set to 1 to disable damage/destruction of fence and watchtower
disableContainerDamage = 0; // set to 1 to disable damage/destruction of tents, barrels, wooden crate and seachest
disableRespawnDialog = 0; // set to 1 to disable the respawn dialog (new characters will be spawning as random)
lootHistory = 1; // How many persistence history files should be kept by instance, number is looped over during save
storeHouseStateDisabled = false; // Disable houses/doors persistence (value true/false), usable in case of problems with persistence
enableCfgGameplayFile = 1;
// Mission to load on server startup. <MissionName>.<TerrainName>
class Missions
{
class DayZ
{
template="dayzOffline.chernarusplus"; // Chernarus
// template="dayzOffline.enoch"; // Livonia
// template="empty.banov"; // Banov
// template="empty.deerisle"; // Deer Isle
// template="serverMission.Pripyat"; // Pripyat
// template="hardcore.namalsk"; // Hardcore Namalsk
// template="regular.namalsk"; // Regular Namalsk
};
};

View file

@ -1,50 +0,0 @@
FROM debian:bookworm-slim
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Set debconf to run non-interactively
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Add backports and contrib
RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Components: main contrib non-free/g'
# Install _only_ the necessary packages
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
binutils \
gwenhywfar-tools \
jq \
libxml2-utils \
locales \
nano \
patch \
procps \
wget \
xmlstarlet
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Add our scripts directory to PATH
ENV PATH /files/bin:/server/bin:${PATH}
# Setup a non-privileged user
ARG USER_ID
RUN groupadd -g ${USER_ID} user && \
useradd -l -u ${USER_ID} -m -g user user && \
mkdir -p /home/user /serverfiles/mpmissions /mods /mpmissions /profiles && \
chown -R user:user /home/user /serverfiles /mods /mpmissions /profiles
# Use our non-privileged user
USER user
# The dayzserver script expects a home directory to itself.
WORKDIR /home/user
# Run the server. The use of both ENTRYPOINT and CMD is to allow for development mode.
ENTRYPOINT ["entrypoint.sh"]
CMD ["start.sh"]

View file

@ -1,699 +0,0 @@
#!/usr/bin/env bash
source dz-common
# Server container base directories
MPMISSIONS="${SERVER_FILES}/mpmissions"
mkdir -p ${SERVER_PROFILE}/battleye
# Server configuration file
SERVER_CFG_FILE="serverDZ.cfg"
SERVER_CFG_DST="${SERVER_PROFILE}/${SERVER_CFG_FILE}"
SERVER_CFG_SRC="${FILES}/${SERVER_CFG_FILE}"
SERVER_CFG_SAVE="${SERVER_PROFILE}/${SERVER_CFG_FILE}.save"
# Command line parameters except mod, as that is handled separately.
parameters="-config=${SERVER_CFG_DST} -port=${port} -freezecheck -BEpath=${SERVER_PROFILE}/battleye -profiles=${SERVER_PROFILE} -nologs"
# Where mods are installed.
WORKSHOP_DIR="/mods/${release_client_appid}"
# Backups
BACKUP_DIR="${HOME}/backup"
if [ ! -d "${BACKUP_DIR}" ]
then
mkdir -p "${BACKUP_DIR}"
fi
mod_command_line=""
# Functions
# Usage
usage(){
echo -e "
${red}Bad option or arguments! ${yellow}${*}${default}
Usage: ${green}$(basename $0)${yellow} option [ arg1 [ arg2 ] ]
Options and arguments:
a|activate id - Activate an installed DayZ Workshop items by id or index
b|backup - Backup the mission storage files in all mission directories
c|config - Update the internal serverDZ.cfg file from files/serverDZ.cfg on the host. Presents a unified diff if the internal file doesn't match the host file
d|deactivate id - Deactivate an installed DayZ Workshop items by id or index - Keeps the mod files but excludes it from the mod parameter
f|force - Forcibly kill the server. Use only as a last resort if the server won't shut down
l|list - List Workshop items and their details
n|rcon - Connect to the server using a python RCON client
r|restart - Restart the server without restarting the container
s|status - Shows the server's status: Running, uptime, mods, parameters, mod parameter, etc.
stop - Stop the server
w|wipe - Wipes the current storage_1
${default}"
exit 1
}
loadconfig(){
if [ ! -f "${SERVER_INSTALL_FILE}" ]
then
echo
echo -e "The DayZ server files are not installed. You need to do this first in the web UI."
echo
exit 1
fi
# Handle the initial server configuration file
if [ ! -f ${SERVER_CFG_SAVE} ]
then
echo "Creating initial server configuration file"
cp "${SERVER_CFG_SRC}" "${SERVER_CFG_SAVE}"
fi
# battleye config and rconpassword setup
# The server creates a new file from this file, which it then uses.
# Let's make sure to delete it first
BE_SERVER_FILE="${SERVER_PROFILE}/battleye/beserver_x64.cfg"
ALT_BE_SERVER_FILE=$(find ${SERVER_PROFILE}/battleye -name "beserver_x64_active*")
if [ ! -f "${BE_SERVER_FILE}" ] && [ ! -f "${ALT_BE_SERVER_FILE}" ]
then
passwd=$(openssl rand -base64 8 | tr -dc 'A-Za-z0-9')
if [ "${passwd}" == "" ]
then
passwd=$(< /dev/urandom tr -dc 'A-Za-z0-9' | head -c10)
fi
if [ "${passwd}" == "" ]
then
printf "[ ${red}FAIL${default} ] Could not generate a passwort for RCON!\n"
exit 1
else
cat > "${BE_SERVER_FILE}" <<EOF
RConPassword ${passwd}
RestrictRCon 0
RConPort ${rcon_port}
EOF
fi
printf "[ ${cyan}INFO${default} ] New RCON password: ${yellow}${passwd}${default}\n"
else
if [ -f "${BE_SERVER_FILE}" ]
then
FILE="${BE_SERVER_FILE}"
elif [ -f "${ALT_BE_SERVER_FILE}" ]
then
FILE="${ALT_BE_SERVER_FILE}"
fi
passwd=$(grep RConPassword ${FILE} | awk '{print $2}')
# printf "[ ${cyan}INFO${default} ] Using existing RCON password: ${yellow}${passwd}${default}\n"
fi
}
# Make sure to clean up and report on exit, as these files remain in the container's volume
report() {
if [[ ${DONT_START} != "" ]]
then
exit 0
fi
rm -f /tmp/mod_command_line /tmp/parameters
echo
echo -e "${yellow}========================================== error.log =========================================="
find "${SERVER_PROFILE}" -name error.log -exec head {} \; -exec tail -n 30 {} \; -exec rm -f {} \;
echo
echo -e "========================================== script*.log ========================================"
find "${SERVER_PROFILE}" -name "script*.log" -exec head {} \; -exec tail -n 30 {} \; -exec rm -f {} \;
echo
echo -e "========================================== *.RPT =============================================="
find "${SERVER_PROFILE}" -name "*.RPT" -exec ls -la {} \; -exec tail -n 30 {} \; -exec rm -f {} \;
echo
echo -e "========================================== End log ======================================${default}"
# Back these files up into a new directory with the current time stamp in the name
DIR="${SERVER_PROFILE}/logs/$(date +%Y-%m-%d-%H-%M-%S)"
mkdir -p ${DIR}
pushd ${SERVER_PROFILE} > /dev/null
mv -v *.log *.RPT *.mdmp ${DIR} 2> /dev/null || true
popd > /dev/null
}
mergexml(){
echo
# Bring all base files into the working directories.
# Copy the pristine files from upstream
echo -e "${green}Copying upstream files into local mpmissions for map ${MAP}${default}":
find /mpmissions/${MAP} \( \
-name "cfgeconomycore.xml" \
-o -name "cfgenvironment.xml" \
-o -name "cfgeventgroups.xml" \
-o -name "cfgeventspawns.xml" \
-o -name "cfggameplay.json" \
-o -name "cfgweather.xml" \
-o -name "init.c" \
\) -exec cp -v {} ${SERVER_FILES}{} \;
# Same for any files in the db subdirectory we may modify
find /mpmissions/${MAP}/db \( \
-name "messages.xml" \
\) -exec cp -v {} ${SERVER_FILES}{} \;
# For now let's just replace the file instead of merging, as the upstream file has nothing in it.
if [ -f ${FILES}/messages.xml ]
then
cp -v ${FILES}/messages.xml ${MPMISSIONS}/${MAP}/db/messages.xml
fi
echo
# Remove previously copied keys and restore the default key
echo -e "${green}Resetting keys${default}"
mv ${SERVER_FILES}/keys/dayz.bikey /tmp
rm -rf ${SERVER_FILES}/keys/*
mv /tmp/dayz.bikey ${SERVER_FILES}/keys
# Copy all active mod keys
for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null)
do
ID=$(readlink ${link} | awk -F/ '{print $NF}')
MODNAME=$(get_mod_name ${ID})
echo -n "Copying key file(s) for mod ${MODNAME}: "
find ${WORKSHOP_DIR}/${ID} -name "*.bikey" -exec cp -v {} "${SERVER_FILES}/keys/" \;
done
# Follow https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding
# Remove any existing files, via the mod_ and custom_ prefixes
rm -rf ${MPMISSIONS}/${MAP}/mod_*
rm -rf ${MPMISSIONS}/${MAP}/custom_*
for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null)
do
ID=$(readlink ${link} | awk -F/ '{print $NF}')
C=""
FOUND=0
# This loop handles Central Economy files
# A matrix of file names -> root node -> child node permutations
for i in "CFGSPAWNABLETYPES:spawnabletypes:type" "EVENTS:events:event" "TYPES:types:type"
do
var=$(echo ${i} | cut -d: -f1)
CHECK=$(echo ${i} | cut -d: -f2)
CHILD=$(echo ${i} | cut -d: -f3)
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.xml" ]
then
if [[ ${FOUND} = 0 ]]
then
MODNAME=$(get_mod_name ${ID})
echo
echo -e "${green}Adding mod integration ${MODNAME}${default}"
FOUND=1
fi
echo -n "Copy "
mkdir -p ${MPMISSIONS}/${MAP}/mod_${ID}
cp -v ${WORKSHOP_DIR}/${ID}/${var,,}.xml ${MPMISSIONS}/${MAP}/mod_${ID}/${var,,}.xml
C+="-s / -t elem -n file -a /file -t attr -n name -v ${var,,}.xml -a /file -t attr -n type -v ${CHECK} -m /file /ce "
fi
done
if [[ ${C} != "" ]]
then
# Merge into the current mpmissions file
echo "Create new XML node <ce folder=\"mod_${ID}\"> -> ${MPMISSIONS}/${MAP}/cfgeconomycore.xml"
find ${MPMISSIONS}/${MAP} -name cfgeconomycore.xml -exec \
xmlstarlet ed -L -s / -t elem -n ce \
-a /ce -t attr -n folder -v "mod_${ID}" ${C} \
-m /ce /economycore {} \;
fi
# These are merged directly into the upstream file
for i in "CFGEVENTGROUPS:eventgroupdef:group" "CFGEVENTSPAWNS:eventposdef:event" "CFGENVIRONMENT:env:territories/territory"
do
var=$(echo ${i} | cut -d: -f1)
CHECK=$(echo ${i} | cut -d: -f2)
CHILD=$(echo ${i} | cut -d: -f3)
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.xml" ]
then
echo "Merge XML ${WORKSHOP_DIR}/${ID}/${var,,}.xml -> ${MPMISSIONS}/${MAP}/${var,,}.xml"
rm -f /tmp/x /tmp/y
xmlmerge -o /tmp/x ${WORKSHOP_DIR}/${ID}/${var,,}.xml ${MPMISSIONS}/${MAP}/${var,,}.xml
xmlstarlet fo /tmp/x > /tmp/y
# Ensure the XML is valid
xmllint --noout /tmp/y || (
echo
echo "Merged XML file ${MPMISSIONS}/${MAP}/${var,,}.xml is not valid! Can't continue!"
echo
exit 1
)
mv /tmp/y ${MPMISSIONS}/${MAP}/${var,,}.xml
fi
done
# These are merged directly into the upstream file, but are JSON
for var in "CFGGAMEPLAY"
do
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.json" ]
then
if [[ ${FOUND} = 0 ]]
then
MODNAME=$(get_mod_name ${ID})
echo
echo -e "${green}Adding mod integration ${MODNAME}${default}"
FOUND=1
fi
echo "Merge JSON '${WORKSHOP_DIR}/${ID}/${var,,}.json' -> '${MPMISSIONS}/${MAP}/${var,,}.json'"
rm -f /tmp/x /tmp/y
jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/${var,,}.json ${WORKSHOP_DIR}/${ID}/${var,,}.json > /tmp/x
mv /tmp/x ${MPMISSIONS}/${MAP}/${var,,}.json
fi
done
# These are merged directly into the upstream file, but are C
for var in "INIT"
do
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.c.${MAP}" ]
then
if [[ ${FOUND} = 0 ]]
then
MODNAME=$(get_mod_name ${ID})
echo
echo -e "${green}Adding mod integration ${MODNAME}${default}"
FOUND=1
fi
echo "Patch '${WORKSHOP_DIR}/${ID}/${var,,}.c(.diff)' -> '${MPMISSIONS}/${MAP}/${var,,}.c'"
patch -s -p0 ${MPMISSIONS}/${MAP}/${var,,}.c.${MAP} < ${WORKSHOP_DIR}/${ID}/${var,,}.c || (
echo "Patch failed!"
exit 1
)
fi
done
# These are copied verbatim
for var in "CFGWEATHER"
do
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.xml" ]
then
if [[ ${FOUND} = 0 ]]
then
MODNAME=$(get_mod_name ${ID})
echo
echo -e "${green}Adding mod integration ${MODNAME}${default}"
FOUND=1
fi
echo "Copy -> '${WORKSHOP_DIR}/${ID}/${var,,}.xml' -> '${MPMISSIONS}/${MAP}/${var,,}.xml'"
cp ${WORKSHOP_DIR}/${ID}/${var,,}.xml ${MPMISSIONS}/${MAP}/${var,,}.xml
fi
done
# Here are where start actions happen
if [ -f "${WORKSHOP_DIR}/${ID}/start.sh" ]
then
echo "Running start script -> ${WORKSHOP_DIR}/${ID}/start.sh"
pushd ${MPMISSIONS}/${MAP} > /dev/null
bash -x "${WORKSHOP_DIR}/${ID}/start.sh"
popd > /dev/null
fi
done
if [ -d ${SERVER_PROFILE}/custom ]
then
for dir in $(ls ${SERVER_PROFILE}/custom 2> /dev/null)
do
FOUND=0
C=""
for i in "CFGEVENTGROUPS:eventgroupdef:group" "CFGSPAWNABLETYPES:spawnabletypes:type" "EVENTS:events:event" "TYPES:types:type" "GLOBALS:globals:var"
do
var=$(echo ${i} | cut -d: -f1)
CHECK=$(echo ${i} | cut -d: -f2)
CHILD=$(echo ${i} | cut -d: -f3)
if [ -f "${SERVER_PROFILE}/custom/${dir}/${var,,}.xml" ]
then
if [[ ${FOUND} = 0 ]]
then
echo
echo -e "${green}Adding custom integration ${dir}${default}"
FOUND=1
fi
mkdir -p ${MPMISSIONS}/${MAP}/custom_${dir}
echo -n "Copy "
cp -v ${SERVER_PROFILE}/custom/${dir}/${var,,}.xml ${MPMISSIONS}/${MAP}/custom_${dir}/${var,,}.xml
C+="-s / -t elem -n file -a /file -t attr -n name -v ${var,,}.xml -a /file -t attr -n type -v ${CHECK} -m /file /ce "
fi
done
if [[ ${C} != "" ]]
then
# Merge into the current mpmissions file
echo "Create new XML node <ce folder=\"custom_${dir}\"> -> ${MPMISSIONS}/${MAP}/cfgeconomycore.xml"
find ${MPMISSIONS}/${MAP} -name cfgeconomycore.xml -exec \
xmlstarlet ed -L -s / -t elem -n ce \
-a /ce -t attr -n folder -v "custom_${dir}" ${C} \
-m /ce /economycore {} \;
fi
# These are merged directly into the upstream file, but are JSON
for var in "CFGGAMEPLAY"
do
if [ -f "${SERVER_PROFILE}/custom/${dir}/${var,,}.json" ]
then
if [[ ${FOUND} = 0 ]]
then
echo
echo -e "${green}Adding custom integration ${dir}${default}"
FOUND=1
fi
echo "Merge JSON '${SERVER_PROFILE}/custom/${dir}/${var,,}.json' -> '${MPMISSIONS}/${MAP}/${var,,}.json'"
rm -f /tmp/x /tmp/y
jq -s '.[0] * .[1]' ${MPMISSIONS}/${MAP}/${var,,}.json ${SERVER_PROFILE}/custom/${dir}/${var,,}.json > /tmp/x
mv /tmp/x ${MPMISSIONS}/${MAP}/${var,,}.json
fi
done
if [[ ${FOUND} = 1 ]]
then
# Copy any other files in the mod directory into a custom directory under mpmissions
mkdir -p ${MPMISSIONS}/${MAP}/custom_${dir}
for file in $(ls ${SERVER_PROFILE}/custom/${dir} 2> /dev/null)
do
if ! [ -f ${MPMISSIONS}/${MAP}/custom_${dir}/${file} ]
then
echo -n "Additional Copy "
cp -av ${SERVER_PROFILE}/custom/${dir}/${file} ${MPMISSIONS}/${MAP}/custom_${dir}
fi
done
fi
done
fi
}
# Start the server in the foreground
start(){
# If we're developing, just block the container
if [[ ${DEVELOPMENT} = "1" ]] && [[ ${DONT_START} = "" ]]
then
echo "DEVELOPMENT mode, blocking. Unset DEVELOPMENT in the current environment to run the server."
trap '
echo "Caught SIGTERM/SIGINT..."
exit 0
' SIGTERM SIGINT
while [ true ]
do
sleep 1
done
exit 0
fi
# Clean up from previous runs
rm -f ${SERVER_FILES}/dont_restart
# Ensure mpmissions has at least one map. If not, copy it from the local read-only volume that stores pristine mpmissons directories
if [ ! -d "${MPMISSIONS}/${MAP}" ] && [ -d "/mpmissions/${MAP}" ]
then
echo
echo "Performing one-time copy of ${MAP} mpmissions..."
echo
cp -av /mpmissions/${MAP} ${MPMISSIONS}
fi
get_mods
mergexml
if [[ ${DONT_START} != "" ]]
then
echo
echo "Not starting server, as DONT_START is set"
echo
exit 0
fi
echo
cd ${SERVER_FILES}
# Run the server. Allow docker to restart the container if the script exits with a code other than 0. This is so we can
# safely shut the container down without killing the server within.
printf "[ ${green}DayZ${default} ] Server starting...\n"
# Save the mod command line and parameters that were used to start the server, so status reflects the running server's
# actual status with those
echo ${mod_command_line} > /tmp/mod_command_line
echo ${parameters} > /tmp/parameters
# Add the steam port from the environment
cp -a "${SERVER_CFG_SAVE}" "${SERVER_CFG_DST}"
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
./DayZServer "${mod_command_line}" ${parameters}
EXIT_CODE=$?
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
report
if [ -f ${SERVER_FILES}/dont_restart ]
then
printf "\n[ ${red}DayZ${default} ] Server script exiting, container shutting down...\n"
else
printf "\n[ ${green}DayZ${default} ] Restarting server\n"
exec dz start
fi
exit 0
}
# Restarts the server by forcing an exit code other than 0, causing docker to restart the container.
restart(){
echo "Restarting DayZ server..."
kill -TERM $(pidof DayZServer)
}
# Stops the server but does not restart it.
stop(){
echo "Stopping DayZ server..."
touch "${SERVER_FILES}/dont_restart"
kill -TERM $(pidof DayZServer)
}
# Forcibly kill the server, should it be necessary.
force(){
echo "Forcibly stopping DayZ server..."
kill -KILL $(pidof DayZServer)
}
# Handle any changes in the server config file by allowing them to be merged after viewing a diff.
config(){
if ! diff -q "${SERVER_CFG_SAVE}" "${SERVER_CFG_SRC}"
then
echo "========================================================================="
diff -Nau --color "${SERVER_CFG_SAVE}" "${SERVER_CFG_SRC}" | more
echo "========================================================================="
if prompt_yn "The new server configuration file differs from what's installed. Use it?"
then
echo "Updating the server configuration file"
cp "${SERVER_CFG_SRC}" "${SERVER_CFG_SAVE}"
else
echo "NOT updating the server configuration file"
fi
else
echo "No differences found between ${SERVER_CFG_SRC} and ${SERVER_CFG_SAVE}"
fi
}
# Activate / Deactivate a mod
activate(){
# W(hich?) a or d
W=${1}
# Pop that off so we can loop over the rest
shift
# Default values are when activating
WW=""
COLOR="${green}"
if [[ ${W} = 0 ]]
then
# Deactivating instead
WW="de"
COLOR="${red}"
fi
# Check if the first argument is the word 'all'
if [[ ${1} = 'all' ]]
then
Q=$(ls -la ${SERVER_PROFILE}/@* | wc -l)
M=$(seq ${Q} | tac)
else
M="${@}"
fi
# Loop over the rest of the argument(s)
for i in ${M}
do
# Get the mod id and name
ID=$(get_mod_id ${i} ${W})
MODNAME=$(get_mod_name ${ID})
# Toggle state or report nothing burger
pushd "${SERVER_PROFILE}" > /dev/null
if [[ ${W} = 0 ]] && [ -L "${SERVER_PROFILE}/@${MODNAME}" ]
then
echo -n "Removing mod symlink: "
rm -vf "${SERVER_PROFILE}/@${MODNAME}"
elif [[ ${W} = 1 ]]
then
echo -n "Creating mod symlink: "
ln -sfv "${WORKSHOP_DIR}/${ID}" "${SERVER_PROFILE}/@${MODNAME}"
else
echo -e "Mod id ${ID} - ${COLOR}${MODNAME}${default} - is already ${WW}active"
fi
echo -e "Mod id ${ID} - ${COLOR}${MODNAME}${default} ${WW}activated"
popd > /dev/null
done
status
}
# List mods
activelist(){
X=1
C="${green}"
spaces=" "
have=no
for link in $(ls -tdr ${SERVER_PROFILE}/@* 2> /dev/null)
do
if [[ ${have} = "no" ]]
then
have="yes"
echo -e "\n ID Name URL Size"
echo "------------------------------------------------------------------------------------------------------------------------"
fi
ID=$(readlink ${link} | awk -F/ '{print $NF}')
MODNAME=$(get_mod_name ${ID})
SIZE=$(du -sh "${WORKSHOP_DIR}/${ID}" | awk '{print $1}')
printf "${C}%.3d %s %.30s %s https://steamcommunity.com/sharedfiles/filedetails/?id=%s %s${default}\n" ${X} ${ID} "${MODNAME}" "${spaces:${#MODNAME}+1}" ${ID} ${SIZE}
X=$((X+1))
done
if [[ ${have} = "no" ]]
then
echo -ne "${red}none${default}"
fi
}
get_map_name(){
MAP="none"
# Map name
if [[ -f ${SERVER_CFG_SAVE} ]]
then
MAP=$(grep -E "template=" ${SERVER_CFG_SAVE} | grep -vE "^//" | cut -d= -f2 | cut -d\; -f1 | tr -d '"')
fi
echo ${MAP}
}
# Display the status of everything
status(){
loadconfig
INSTALLED="${NO}"
RUNNING="${NO}"
# DayZ Server files installation
if [ -f "${SERVER_INSTALL_FILE}" ]
then
INSTALLED="${YES}"
fi
# Running or not
if pidof DayZServer > /dev/null
then
# Uptime
D=$(date +%s)
F=$(date +%s -r /tmp/parameters)
DAYS=$(( (${D} - ${F}) / 86400 ))
UPTIME="${DAYS} days "$(date -d@$(($(date +%s) - $(date +%s -r /tmp/parameters))) -u +"%H hours %M minutes %S seconds")
RUNNING="${YES}\nUptime: ${green}${UPTIME}${default}"
# Current parameters
RUNNING="${RUNNING}\nRunning Parameters: $(cat /tmp/parameters)\nRunning mod parameter: $(cat /tmp/mod_command_line)"
fi
# Release or Experimental
if [[ ${release_client_appid} = "221100" ]]
then
RELEASE="Stable"
else
RELEASE="Experimental"
fi
VERSION="$(strings /serverfiles/DayZServer | grep -P "DayZ \d\.\d+\.\d+" | cut -c6-) - ${RELEASE}"
# Map
MAP=${MAP}
# Number of mods plus the list denoting on or off
echo -ne "
Server files installed: ${INSTALLED}"
if [[ "${INSTALLED}" = "${NO}" ]]
then
echo
echo
exit 0
fi
get_mods
echo -ne "
Active mods: "
activelist
echo -e "${MODS}
Server running: ${RUNNING}
Working parameters: ${parameters}
Working mod parameter: ${mod_command_line}"
if [[ "${INSTALLED}" = "${YES}" ]]
then
echo "Map: ${MAP}"
echo "Version: ${VERSION}"
fi
echo
}
backup(){
cd ${MPMISSIONS}
DATE=$(date +'%Y-%m-%d-%H-%M-%S')
for i in $(ls)
do
B="${BACKUP_DIR}/${DATE}/"
echo "Backing up ${i} to ${B}..."
mkdir -p ${B} 1> /dev/null
cp -a "${i}" "${B}"
done
cp -a /profiles ${B}
}
wipe(){
DIR="${MPMISSIONS}/${MAP}/storage_1"
if ! [ -d "${DIR}" ]
then
echo "Storage directory ${DIR} does not exist"
return
fi
if prompt_yn "Wipe server storage directory '${DIR}'?"
then
rm -rf "${DIR}"
echo "Storage ${DIR} removed"
else
echo "Storage directory ${DIR} NOT removed..."
fi
}
MAP=$(get_map_name)
# Capture the first argument and shift it off so we can pass $@ to every function
C=${1}
shift || {
usage
}
case "${C}" in
a|activate)
activate 1 "${@}"
;;
add)
add "${@}"
;;
b|backup)
backup "${@}"
;;
c|config)
config "${@}"
;;
d|deactivate)
activate 0 "${@}"
;;
f|force)
force
;;
i|install)
install "${@}"
;;
l|list)
list "${@}"
;;
login)
login "${@}"
;;
n|rcon)
rcon "${@}"
;;
r|restart)
restart "${@}"
;;
start)
start "${@}"
;;
s|status)
status "${@}"
;;
stop)
stop "${@}"
;;
w|wipe)
wipe "${@}"
;;
*)
usage "$*"
;;
esac

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
exec "$@"

View file

@ -1,12 +0,0 @@
#!/usr/bin/env bash
# Set PS1 so we know we're in the container, should we exec into it.
cat > .bashrc <<EOF
alias ls='ls --color'
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-server:\w\$ "
unset DEVELOPMENT
EOF
# Start the server.
# If the DEVELOPMENT environment variable is set to 1, the container will just block and not start the server.
exec dz start

10
start.sh Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Set PS1 so we know we're in the container, should we exec into it.
cat > .bashrc <<EOF
alias ls='ls --color'
export PS1='\[\e]0;\u@\h: \w\a\]\${debian_chroot:+(\$debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\]\$(parse_git_branch)\[\033[00m\]\$ '"
EOF
# Block the container from exiting
exec tail -f /dev/null

View file

@ -1,81 +0,0 @@
FROM debian:bookworm-slim
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Set debconf to run non-interactively and agree to the SteamCMD EULA
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& echo steam steam/question select "I AGREE" | debconf-set-selections \
&& echo steam steam/license note '' | debconf-set-selections \
&& dpkg --add-architecture i386
# Add backports and contrib
RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Components: main contrib non-free/g'
# Install _only_ the necessary packages
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
binutils \
curl \
git \
gwenhywfar-tools \
jq \
libxml2-utils \
locales \
nano \
procps \
wget \
rename \
steamcmd \
xmlstarlet
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Steamcmd needs its path added, as it ends up in /usr/games.
# Our server script is bind mounted in /files in docker-compose.
ENV PATH /usr/games:/files/bin:/web/bin:${PATH}
# Install nodejs
RUN mkdir /usr/local/nvm
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 20.12.2
RUN echo $NODE_VERSION
# Install nvm with node and npm
RUN wget -O - https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Setup a non-privileged user
ARG USER_ID
RUN groupadd -g ${USER_ID} user && \
useradd -l -u ${USER_ID} -m -g user user && \
mkdir -p /home/user /serverfiles/mpmissions /serverfiles/steamapps/workshop/content /web && \
chown -R user:user /home/user /serverfiles /web
# Shut steamcmd up
RUN cd /usr/lib/i386-linux-gnu && ln -s /web/bin/steamservice.so
# Add bercon https://github.com/WoozyMasta/bercon
RUN wget https://github.com/WoozyMasta/bercon/releases/download/1.0.0/bercon \
&& chmod +x bercon \
&& mv bercon /usr/bin
# Use our non-privileged user
USER user
# The dayzserver script expects a home directory to itself.
WORKDIR /home/user
# Run the web server
ENTRYPOINT ["entrypoint.sh"]
CMD ["start.sh"]

View file

@ -1,373 +0,0 @@
#!/usr/bin/env bash
source dz-common
# An array to store Workshop items. Each element contains the mod's ID, name, and state (active or not).
WORKSHOP_DIR="/mods/${release_client_appid}"
if [ ! -d ${WORKSHOP_DIR} ]
then
mkdir -p ${WORKSHOP_DIR}
fi
workshoplist=""
# Functions
# Usage
usage(){
echo -e "
${red}Bad option or arguments! ${yellow}${*}${default}
Usage: ${green}$(basename $0)${yellow} option [ arg1 [ arg2 ] ]
Options and arguments:
a|add id - Add a DayZ Workshop item by id. Added items become active by default
i|install - Install the DayZ server files
g|login - Login to Steam.
m|modupdate - Update the mod files
p|map id - Install a mod's mpmissions files by id. (Presumes template exists)
r|remove id - Remove all files and directories of a Workshop item by id
l|s|status - Shows Steam login status, if base files are installed, installed mods
u|update - Update the server files
x|xml id - Get and normalize XML files from a mod's template by id (Presumes template exists)
${default}"
exit 1
}
# Manage the mod symlink
symlink(){
W=${1}
ID=${2}
NAME=${3}
if [ ! -L "${SERVER_FILES}/@${NAME}" ] && [[ ${W} = 1 ]]
then
ln -sv ${WORKSHOP_DIR}/${ID} "${SERVER_FILES}/@${NAME}"
elif [[ "${W}" = "0" ]]
then
rm -vf "${SERVER_FILES}/@${NAME}"
fi
}
installxml(){
ID=${1}
# Going to have to maintain a matrix of file names -> root node -> child node permutations
for i in "CFGEVENTGROUPS:eventgroupdef:group" "CFGEVENTSPAWNS:eventposdef:event" "CFGSPAWNABLETYPES:spawnabletypes:type" "EVENTS:events:event" "TYPES:types:type"
do
var=$(echo ${i} | cut -d: -f1)
CHECK=$(echo ${i} | cut -d: -f2)
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.xml" ]
then
echo "Normalizing ${WORKSHOP_DIR}/${ID}/${var,,}.xml..."
cp ${WORKSHOP_DIR}/${ID}/${var,,}.xml /tmp/x
# Quirks
# Some cfgeventspanws.xml files have <events> instead of <eventposdef>. Let's just try to fix that first.
if [[ ${var} = "CFGEVENTSPAWNS" ]]
then
if grep -q '<events>' /tmp/x
then
echo " - (Quirk) has <events> instead of <eventposdef>. fixing..."
xmlstarlet ed -L -r "events" -v "eventposdef" /tmp/x
fi
fi
if ! grep -q '<'${CHECK}'>' /tmp/x
then
echo " - has no root node <${CHECK}>. fixing..."
echo '<'${CHECK}'>' > /tmp/y
cat /tmp/x >> /tmp/y
echo '</'${CHECK}'>' >> /tmp/y
xmlstarlet fo /tmp/y > /tmp/x
fi
if ! grep -q '<?xml' /tmp/x
then
echo " - has no XML node, fixing..."
xmlstarlet fo /tmp/x > /tmp/y
mv /tmp/y /tmp/x
fi
xmllint --noout /tmp/x && (
# Keep the normalized version in the /mods directory
cp /tmp/x ${WORKSHOP_DIR}/${ID}/${var,,}.xml
echo -e "${green}${WORKSHOP_DIR}/${ID}/${var,,}.xml passes XML lint test!${default}"
) || (
echo -e "${yellow}The final ${WORKSHOP_DIR}/${ID}/${var,,}.xml does not pass XML lint test! IT WAS NOT COPIED!${default}"
)
fi
done
exit 0
}
# Add a mod
add(){
if [ -d "${WORKSHOP_DIR}/${1}" ]
then
echo -e "${yellow}Warning: The mod directory ${WORKSHOP_DIR}/${1} already exists!${default}"
MODNAME=$(get_mod_name ${1})
fi
if [ -L "${SERVER_FILES}/@${MODNAME}" ]
then
echo -e "${yellow}Warning: The mod symlink ${SERVER_FILES}/@${MODNAME} already exists!${default}"
fi
echo "Adding mod id ${1}"
dologin
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +workshop_download_item "${release_client_appid}" "${1}" +quit
# Make sure the install succeeded
if [ ! -d "${WORKSHOP_DIR}/${1}" ]
then
echo -e "${red}Mod installation failed: The mod directory ${WORKSHOP_DIR}/${1} was not created!${default}"
echo "Installation failed! See above (You probably need to use a real Steam login)"
return
fi
# Get the name of the newly added mod
MODNAME=$(get_mod_name ${1})
symlink 1 ${1} "${MODNAME}"
echo -e "Mod id ${1} - ${green}${MODNAME}${default} - added"
xml ${ID}
}
# Remove a mod
remove(){
DIR="${WORKSHOP_DIR}/${1:?}"
if [ -d "${DIR}" ]
then
MODNAME=$(get_mod_name ${1})
echo "Removing directory ${DIR}"
rm -rf "${DIR}"
else
echo "Directory ${DIR} doesn't exist?"
fi
if [ -L "${SERVER_FILES}/@${MODNAME}" ]
then
echo "Removing symlink ${SERVER_FILES}/@${MODNAME}"
rm -f "${SERVER_FILES}/@${MODNAME}"
else
echo "Symlink ${SERVER_FILES}/@${MODNAME} doesn't exist?"
fi
echo -e "Mod id ${1} - ${red}${MODNAME}${default} - removed"
}
# Handle the Steam login information.
login(){
if [ -f "${STEAM_LOGIN}" ]
then
if prompt_yn "The steam login is already set. Reset it?"
then
rm -f "${STEAM_LOGIN}"
else
echo "Not reset."
exit 0
fi
fi
if [ ! -f "${STEAM_LOGIN}" ]
then
echo "Setting up Steam credentials"
echo -n "Steam Username (anonymous): "
read steamlogin
if [[ "${steamlogin}" = "" ]]
then
echo "Steam login set to 'anonymous'"
steamlogin="anonymous"
fi
echo "steamlogin=${steamlogin}" > "${STEAM_LOGIN}"
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +quit
fi
}
# "Perform" the Steam login. This just sources the file with the Steam login name.
dologin(){
if [ -f "${STEAM_LOGIN}" ]
then
source "${STEAM_LOGIN}"
else
echo "No cached Steam credentials. Please configure this now: "
login
fi
}
# Perform the installation of the server files.
install(){
if [ ! -f "${SERVER_INSTALL_FILE}" ] || [[ ${1} = "force" ]]
then
printf "[ ${yellow}DayZ${default} ] Downloading DayZ Server-Files!\n"
dologin
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${release_server_appid}" validate +quit
else
printf "[ ${lightblue}DayZ${default} ] The server is already installed.\n"
fi
}
# Update the server files.
update(){
dologin
appmanifestfile=${SERVER_FILES}/steamapps/appmanifest_"${release_server_appid}".acf
printf "[ ... ] Checking for update:"
# gets currentbuild
currentbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d \ -f3)
# Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD
if [ -f "${HOME}/Steam/appcache/appinfo.vdf" ]
then
rm -f "${HOME}/Steam/appcache/appinfo.vdf"
fi
# check for new build
availablebuild=$(${STEAMCMD} +login "${steamlogin}" +app_info_update 1 +app_info_print "${release_server_appid}" +quit | \
sed -n '/branch/,$p' | grep -m 1 buildid | tr -cd '[:digit:]')
if [ -z "${availablebuild}" ]
then
printf "\r[ ${red}FAIL${default} ] Checking for update:\n"
printf "\r[ ${red}FAIL${default} ] Checking for update:: Not returning version info\n"
exit
else
printf "\r[ ${green}OK${default} ] Checking for update:"
fi
# compare builds
if [ "${currentbuild}" != "${availablebuild}" ] || [[ ${1} = "force" ]]
then
printf "\r[ ${green}OK${default} ] Checking for update:: Update available\n"
printf "Update available:\n"
printf "\tCurrent build: ${red}${currentbuild}${default}\n"
printf "\tAvailable build: ${green}${availablebuild}${default}\n"
printf "\thttps://steamdb.info/app/${release_server_appid}/\n"
printf "\nApplying update"
# run update
dologin
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${release_server_appid}" validate +quit
modupdate
else
printf "\r[ ${green}OK${default} ] Checking for update:: No update available\n"
printf "\nNo update available:\n"
printf "\tCurrent version: ${green}${currentbuild}${default}\n"
printf "\tAvailable version: ${green}${availablebuild}${default}\n"
printf "\thttps://steamdb.info/app/${release_server_appid}/\n\n"
fi
}
# Update mods
modupdate(){
echo "Updating mods..."
dologin
get_mods
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" ${workshoplist} +quit
# Updated files come in with mixed cases. Fix that.
echo "done"
echo
}
# Display the status of everything
status(){
INSTALLED="${NO}"
LOGGED_IN="${NO}"
# DayZ Server files installation
if [ -f "${SERVER_INSTALL_FILE}" ]
then
INSTALLED="${YES}"
if [[ ${release_client_appid} = "221100" ]]
then
RELEASE="Stable"
else
RELEASE="Experimental"
fi
VERSION="$(strings /serverfiles/DayZServer | grep -P "DayZ \d\.\d+\.\d+" | cut -c6-) - ${RELEASE}"
fi
# Logged into Steam
if [ -f "${STEAM_LOGIN}" ]
then
LOGGED_IN="${YES}"
if grep -q anonymous "${STEAM_LOGIN}"
then
ANONYMOUS="${yellow}(as anonymous)${default}"
else
ANONYMOUS="${green}(not anonymous)${default}"
fi
fi
echo -ne "
Logged in to Steam: ${LOGGED_IN} ${ANONYMOUS}
Server files installed: ${INSTALLED}"
if [[ "${INSTALLED}" = "${NO}" ]]
then
echo
echo
exit 0
fi
# Version of DayZ Server files
echo -ne "
Version: ${VERSION}"
# Mods
echo -ne "
Mods: "
MODS=$(list)
if [[ ${MODS} == "" ]]
then
echo -ne "${red}none${default}"
fi
echo -e "${MODS}"
}
map(){
# Install map mpmissions for mods that have them. Presumes a map.env was created for the mod, with the required metadata (git URL, etc.)
TERM="map"
if [[ "${1}" =~ ^[0-9]+$ ]]
then
TERM="mod id"
fi
if [ -f "${FILES}/mods/${1}/map.env" ]
then
echo "Installing mpmissions files for ${TERM} ${1}..."
source ${FILES}/mods/${1}/map.env
${FILES}/bin/map.sh ${1} install
fi
}
mod_install(){
if [ -f ${FILES}/mods/${1}/${2}.sh ]
then
echo "An ${2}.sh was found for mod id ${1}. Running..."
${FILES}/mods/${1}/${2}.sh
fi
# A generic map install script. Presumes a git repo as the source
}
# "Manage" XML files.
xml(){
/files/bin/xml.sh ${1}
installxml ${1}
}
# Capture the first argument and shift it off so we can pass $@ to every function
C=${1}
shift || {
usage
}
case "${C}" in
a|add)
add "${@}"
;;
i|install)
install "${@}"
;;
g|login)
login "${@}"
;;
m|modupdate)
modupdate "${@}"
;;
r|remove)
remove "${@}"
;;
l|s|status)
status "${@}"
;;
p|map)
map "${@}"
;;
u|update)
update "${@}"
;;
x|xml)
xml "${@}"
;;
*)
usage "$*"
;;
esac

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
exec "$@"

View file

@ -1,27 +0,0 @@
#!/usr/bin/env bash
# Set PS1 so we know we're in the container
if ! echo .bashrc | grep -q "dz-web"
then
echo "Adding PS1 to .bashrc..."
cat >> .bashrc <<EOF
alias ls='ls --color'
export PS1="${debian_chroot:+($debian_chroot)}\u@dz-web:\w\$ "
unset DEVELOPMENT
EOF
fi
# Shut steamcmd up
if ! [ -d ${HOME}/.steam ]
then
mkdir -p ${HOME}/.steam
fi
cd /web
npm i
export DEBUG='express:*'
npx nodemon web.js &
cd docroot
npm i
exec npm run dev

Binary file not shown.

View file

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DayZ Docker Server</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="src/main.js"></script>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,22 +0,0 @@
{
"name": "docroot",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite --host",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"@vueuse/core": "^10.1.2",
"bootstrap": "^5.3.0",
"bootstrap-icons": "^1.10.5",
"pinia": "^2.1.3",
"vue": "^3.3.2"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
"vite": "^4.3.5"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

View file

@ -1,17 +0,0 @@
<script setup>
import Body from '@/components/Body.vue'
import Error from '@/components/Error.vue'
import Header from '@/components/Header.vue'
</script>
<template>
<Suspense>
<main>
<Error />
<div class="container-fluid min-vh-100 d-flex flex-column bg-light">
<Header />
<Body />
</div>
</main>
</Suspense>
</template>

View file

@ -1,9 +0,0 @@
<script setup>
import Mods from '@/components/Mods.vue'
import SearchResults from "@/components/SearchResults.vue";
</script>
<template>
<SearchResults />
<Mods />
</template>

View file

@ -1,38 +0,0 @@
<script setup>
import { onMounted } from 'vue'
import { Modal } from 'bootstrap'
import { useAppStore } from '@/stores/app.js'
const store = useAppStore()
let modal = {}
onMounted(() => {
modal = new Modal('#errorModal', {})
// modal.show()
})
</script>
<template>
<div
class="modal"
id="errorModal"
data-bs-backdrop="static"
data-bs-keyboard="false"
tabindex="-1"
aria-labelledby="errorModalLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="errorModalLabel">Error</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{{ store.errorText }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</template>

View file

@ -1,40 +0,0 @@
<script setup>
import Search from '@/components/Search.vue'
import Status from '@/components/Status.vue'
import Servers from '@/components/Servers.vue'
import { useFetch } from '@vueuse/core'
import { useAppStore } from '@/stores/app.js'
const store = useAppStore()
import { config } from '@/config'
const { error, data } = await useFetch(config.baseUrl + '/status').get().json()
const set = (w, e) => {
store.section = w
const active = Array.from(document.getElementsByClassName('active'))
active.forEach((a) => a.classList.remove('active'))
e.target.classList.add('active')
}
</script>
<template>
<div v-if="data" class="row">
<div class="col-3 text-center">
<h1>DayZ Docker Server</h1>
</div>
<div class="col-5">
<button
@click="installbase"
:class="'btn btn-sm ' + (data.installed ? 'btn-danger' : 'btn-success')"
>
Install Server Files
</button>
<button @click="updatebase" class="btn btn-sm btn-outline-success">Update Server Files</button>
<button @click="updatemods" class="btn btn-sm btn-outline-success">Update Mods</button>
<button type="button" @click="set('servers', $event)" class="btn btn-sm btn-outline-primary">Servers</button>
<button type="button" @click="set('mods', $event)" class="btn btn-sm btn-outline-primary active" data-bs-toggle="button">Mods</button>
<button type="button" @click="set('search', $event)" class="btn btn-sm btn-outline-primary">Search</button>
</div>
<Search />
<Status :status="data" />
<Servers />
</div>
</template>

View file

@ -1,47 +0,0 @@
<script setup>
import { useFetch } from "@vueuse/core"
import XmlFile from '@/components/XmlFile.vue'
import { useAppStore } from '@/stores/app.js'
const store = useAppStore()
import { config } from '@/config'
const { data, error } = useFetch(() => config.baseUrl + `/mod/${store.modId}`, {
immediate: false,
refetch: true
}).get().json()
</script>
<template>
<div class="col-md-9 border">
<div v-if="error" class="d-flex">Error: {{ error }}</div>
<div v-else-if="data" class="d-flex">
<div>
<div>
<strong>{{ data.name }}</strong>
</div>
<div>
ID: {{ data.id }}
</div>
<div>
Size: {{ data.size.toLocaleString("en-US") }}
</div>
<div v-if="data.customXML.length > 0">
Custom XML files:
<ul>
<li v-for="info in data.customXML">
<a
:class="'simulink xmlfile ' + (store.modFile === info.name ? 'active' : '')"
@click="store.modFile=info.name"
>
{{ info.name }}
</a>
</li>
</ul>
</div>
</div>
<div class="col-1"></div>
<div>
<XmlFile />
</div>
</div>
</div>
</template>

View file

@ -1,55 +0,0 @@
<script setup>
import { config } from '@/config'
import { useFetch } from '@vueuse/core'
import { useAppStore } from '@/stores/app.js'
import ModInfo from '@/components/Modinfo.vue'
const store = useAppStore()
const { data, error } = useFetch(config.baseUrl + '/mods', {
afterFetch(ctx) {
store.mods = ctx.data.mods
return ctx
}
}).get().json()
</script>
<template>
<div class="row flex-grow-1" v-if="store.section === 'mods'">
<div v-if="error" class="row text-danger">
{{ error }}
</div>
<div class="col-md-3 border" v-if="data">
<div>
<h4 class="text-center">Installed Mods</h4>
<table>
<tr>
<th>Steam Link</th>
<th>Mod Name</th>
</tr>
<template
v-for="mod in data.mods.sort( (a,b) => { return a.name.localeCompare(b.name) } )"
>
<tr>
<td>
<a
target="_blank"
:href="config.steamUrl + mod.id"
>
{{ mod.id }}
</a>
</td>
<td>
<a
:class="'simulink' + (store.modId === parseInt(mod.id) ? ' active' : '')"
@click="store.modFile='';store.modId=parseInt(mod.id)"
>
{{ mod.name }}
</a>
</td>
</tr>
</template>
</table>
</div>
</div>
<ModInfo />
</div>
</template>

View file

@ -1,12 +0,0 @@
<script setup>
import { useAppStore } from '@/stores/app.js'
const store = useAppStore()
</script>
<template>
<div class="col form-control-lg text-center">
<form @submit.prevent="(e) => {store.searchText=e.target.search.value; store.section='search'}">
<input name="search" placeholder="Search mods..." autofocus>
</form>
</div>
</template>

Some files were not shown because too many files have changed in this diff Show more