diff --git a/.gitignore b/.gitignore index 402e8e4..f79d0c3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ gamedata/ /data wads/ RemoteControlExamples/ - - +.cache/ +tmp/ server_files/ +.cache diff --git a/README.md b/README.md index 90d85d2..d1517d6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# gameservers-docker Putting game servers in Docker containers. Because it makes life easier. @@ -8,8 +9,10 @@ or sourcemod for srcds), making it almost one command to install a server. No binaries are stored in this repo, so make sure you have internet to download them with. -Includes a utility script `start_server.sh` which mounts save data to an -external volume and sorts out networking for you. +Includes utility scripts: + +- `start_server.sh` - mounts save data to an external volume and sorts out networking for you +- `docker_build.sh` - builds the specified list of containers. e.g. `docker_build.sh css,css-metamod,tf2` ## Quick start @@ -17,16 +20,18 @@ Assuming you are on a blank server with Git and docker installed: ``` git clone https://github.com/OpenSourceLAN/gameservers-docker.git . -./build.sh factorio +``` +Check the game directory for existing templates and make your configurations before building. +``` +./docker_build.sh factorio ./start_server.sh factorio # Or docker run -it --net=host -e "SERVER_NAME=Some really cool server"\ -v `pwd`/save:`cat factorio/mounts` --name factorio factorio - ``` -Most servers have environment variables that can be used to configure them. +Most servers have environment variables that can be used to configure them after building them. Read the README.md file in each directory to see what is available. ## Tutorial @@ -146,6 +151,13 @@ Make an easy way to import config files in to the servers (eg mounting cfg direc Add more games +### Useful scripts + +- Remove container data +``` +sudo rm -fr /var/lib/docker/containers && sudo mkdir containers && sudo chmod 700 containers +``` + ### LICENSE This project is licensed under GPL 3.0. See LICENSE for more information. diff --git a/base/Dockerfile b/base/Dockerfile index d50670d..5b235aa 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,10 +1,27 @@ -FROM ubuntu:16.04 +ARG DISTRO="20.04" + +FROM ubuntu:${DISTRO} + ARG TZ="Etc/UTC" -RUN sed -i 's/archive.ubuntu.com/au.archive.ubuntu.com/' /etc/apt/sources.list -RUN apt-get update && apt-get dist-upgrade -y &&\ - apt-get install -y unzip p7zip-full curl wget lib32gcc1 iproute2 vim-tiny bzip2 jq software-properties-common apt-transport-https lib32stdc++6 && \ - apt-get clean -RUN echo "$TZ" > /etc/timezone -RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get dist-upgrade -y \ + && apt-get install -y \ + git \ + unzip \ + p7zip-full\ + curl\ + wget\ + lib32gcc1\ + lib32stdc++6\ + iproute2\ + vim-tiny\ + bzip2\ + jq\ + software-properties-common\ + apt-transport-https\ + rsync \ + && apt-get clean -# add to base install: +RUN echo "$TZ" > /etc/timezone \ + && ln -fs /usr/share/zoneinfo/$TZ /etc/localtime diff --git a/base/build.sh b/base/build.sh deleted file mode 100755 index 282f350..0000000 --- a/base/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -. ../common.sh - -[[ -z $TZ && -f /etc/timezone ]] && TZ=`cat /etc/timezone` -docker_build base Dockerfile "--build-arg TZ=$TZ" diff --git a/build.sh b/build.sh deleted file mode 100755 index eac26ad..0000000 --- a/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -NAME=$1 -[[ -z $NAME ]] && echo "No image name given" && exit 1 - -[[ -f $NAME/build.sh ]] || (echo "Build file doesn't exist for $NAME/build.sh :( " && exit 1) -[[ -f $NAME/build.sh ]] && (cd $NAME && ./build.sh ) diff --git a/common.sh b/common.sh deleted file mode 100644 index e3d5a2c..0000000 --- a/common.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -gettimestamp() { - date +%Y%m%d-%H%M%S -} - -# Builds container with given name, and any dependencies -docker_build() { - local NAME=$1 - local DOCKERFILE=$2 - local OTHERARGS=$3 - local OVERRIDEDIR=$4 - local CACHE="" - - [[ -z $NAME ]] && echo "No name provided for docker build" && exit 1 - [[ -z $DOCKERFILE ]] && DOCKERFILE="-f Dockerfile" || DOCKERFILE="-f ${DOCKERFILE}" - [[ -z $OVERRIDEDIR ]] && DIR="." || DIR=$OVERRIDEDIR - - local PARENT="$(get_docker_parent $NAME)" - [[ -n $PARENT ]] && docker_build_if_needed $PARENT - [[ -n $NOCACHE ]] && CACHE="--no-cache" - (cd $BASE_DIR/$NAME && docker build $DOCKERFILE $CACHE $OTHERARGS -t $NAME -t $NAME:$(gettimestamp) $DIR ) -} - -# Builds a container if it doesn't already have a latest -docker_build_if_needed() { - local NAME=$1 - [[ "$(docker images --quiet $NAME:latest)" == "" ]] && docker_build $NAME -} - -get_docker_parent() { - local CHILD=$1 - [[ $CHILD == "base" ]] && exit 0 - grep -i "^FROM" $BASE_DIR/$CHILD/Dockerfile | head -n 1 | awk '{print $2}' | cut -d: -f1 -} diff --git a/csgo-gg/build.sh b/csgo-gg/build.sh deleted file mode 100755 index 5dfd206..0000000 --- a/csgo-gg/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build csgo-gg diff --git a/csgo/Dockerfile b/csgo/Dockerfile deleted file mode 100644 index f25d8c9..0000000 --- a/csgo/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM steamcmd - -USER root - - -USER steam -WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/csgo - -RUN ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit - -ADD start.sh /steam/csgo/ - -WORKDIR /steam/csgo - -CMD ["./start.sh"] \ No newline at end of file diff --git a/csgo/build.sh b/csgo/build.sh deleted file mode 100755 index dcd0ff3..0000000 --- a/csgo/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build csgo diff --git a/csgo/startcontainer.sh b/csgo/startcontainer.sh deleted file mode 100755 index a9f58db..0000000 --- a/csgo/startcontainer.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - - -docker run -it $2 -e "SERVER_NUM=$1" csgo diff --git a/csgo/update.Dockerfile b/csgo/update.Dockerfile deleted file mode 100644 index 53bf34d..0000000 --- a/csgo/update.Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM csgo - - -USER steam -WORKDIR /steam/steamcmd_linux - -RUN ./steamcmd.sh +login anonymous +force_install_dir ../csgo +app_update 740 +quit - -WORKDIR /steam/csgo - -CMD ["./start.sh"] diff --git a/csgo/update.sh b/csgo/update.sh deleted file mode 100755 index d5cf822..0000000 --- a/csgo/update.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build csgo update.Dockerfile diff --git a/css-deathmatch/.dockerignore b/css-deathmatch/.dockerignore new file mode 100644 index 0000000..8c5f257 --- /dev/null +++ b/css-deathmatch/.dockerignore @@ -0,0 +1,4 @@ +.git +.gitignore +README.md +Dockerfile diff --git a/wreckfest/README.md b/css-deathmatch/.gitignore similarity index 100% rename from wreckfest/README.md rename to css-deathmatch/.gitignore diff --git a/css-deathmatch/Dockerfile b/css-deathmatch/Dockerfile new file mode 100644 index 0000000..51ffe71 --- /dev/null +++ b/css-deathmatch/Dockerfile @@ -0,0 +1,20 @@ +FROM css-metamod + +USER steam + +WORKDIR /steam/css/cstrike + +COPY --chown=steam download.sh . +RUN ./download.sh + +WORKDIR /steam/css + +COPY --chown=steam config/ /steam/css/cstrike/ + +COPY --chown=steam configure.sh \ + configure-deathmatch.sh \ + ./ + +ENV SV_HOSTNAME="Counterstrike Source (Deathmatch)" + +ENTRYPOINT [ "./start.sh" ] diff --git a/css-deathmatch/README.md b/css-deathmatch/README.md new file mode 100644 index 0000000..3347770 --- /dev/null +++ b/css-deathmatch/README.md @@ -0,0 +1,13 @@ +# Counterstrike Source - Death Match + +Counterstrike Source Death Match server based on the css-metamod docker image. + +## Build notes + +1. Build the `css` docker image +2. Build the `css-metamod` docker image +3. Build this one! + +## Plugins + +* [CS:S/CS:GO DeathMatch SM](https://forums.alliedmods.net/showthread.php?t=103242) diff --git a/css-deathmatch/config/cfg/gungame/css/gungame.config.txt b/css-deathmatch/config/cfg/gungame/css/gungame.config.txt new file mode 100644 index 0000000..a53a3bf --- /dev/null +++ b/css-deathmatch/config/cfg/gungame/css/gungame.config.txt @@ -0,0 +1,647 @@ +"GunGame.Config" +{ + "Config" + { + /* ===== [1. GUNGAME MAIN CONFIG] ===== */ + + /* ----- [1.1. main] ----- */ + + /* Enables/Disables GunGame Mod */ + "Enabled" "1" + + /** + * Do not fast switch on level up for this weapons. + * + * Comma-separated list + * of weapon names from gungame.equip.txt. + * + * Options: + * "hegrenade" - Enabled for hegrenade + * "hegrenade,taser" - Enabled for hegrenade and taser + * "taser,hegrenade,molotov,incgrenade" - Default value + * "" - Disabled + */ + "FastSwitchSkipWeapons" "hegrenade" + + /** + * Switch weapon without delays after level up. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnLevelUp" "1" + + /** + * Switch weapon without delays when player changes weapon by himself. + * + * SDK Hooks (sdkhooks) is required to use this option. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnChangeWeapon" "0" + + /** + * Freeze players after win. + * + * Options: + * 1 - Freeze players. + * 0 - Do not freeze players. + */ + "WinnerFreezePlayers" "0" + + /** + * Winner effects. + * + * Options: + * 0 - Freeze players. + * 1 - Make players fly. + */ + "WinnerEffect" "1" + + /** + * Delay before end of multiplayer game after gungame win. + * + * Options: + * 0 - Disabled. + * 1-N - Number of seconds. + */ + "EndGameDelay" "0" + + /** + * Sets how to finish the game after someone has won. + * + * Options: + * 0 - Normal game end with scoreboard, vote next map valve menu and weapon drops. + * 1 - Silent game end. + */ + "EndGameSilent" "0" + + /** + * Multiply sound effects volume. + * + * In CS:GO the volume is too low. + * You can up the volume with this multiplier. + * + * Options: + * 0-1 - Do not multiply + * 2-5 - Multiply by defined number of times + */ + "MultiplySoundVolume" "0" + + /** + * Block weapon switch if killer leveled up with knife + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchIfKnife" "1" + + /** + * Block weapon switch if you get next hegrenade + * after previous hegrenade explode or after getting extra nade. + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchOnNade" "1" + + /** + * Show players level message in hint box instead of chat. + * If enabled then multikill chat messages will be shown + * in hint box too (requres "MultiKillChat" "1"). + */ + "ShowSpawnMsgInHintBox" "0" + + /** + * Show leader level info in hint box + * (requires "ShowSpawnMsgInHintBox" to be "1") + */ + "ShowLeaderInHintBox" "0" + + /* Show leader's weapon name in chat with leading message */ + "ShowLeaderWeapon" "0" + + /** + * Strip dead players weapon + * + * Options: + * 0 - Disabled (default) + * 1 - Enabled for alive and dead players (alive players can not drop guns) + * 2 - Enabled for dead players only (alive players can drop guns) + */ + "StripDeadPlayersWeapon" "2" + + /* Show levels in scoreboard */ + "LevelsInScoreboard" "1" + + /** + * When shows levels in scoreboard it will + * clear deaths (requires "LevelsInScoreboard" "1") + */ + "ScoreboardClearDeaths" "0" + + /* Restore level on player reconnect */ + "RestoreLevelOnReconnect" "1" + + /* Allow level up after round end */ + "AllowLevelUpAfterRoundEnd" "1" + + /* Show multikill hints in chat */ + "MultiKillChat" "0" + + /* Set sv_alltalk 1 after player win */ + "AlltalkOnWin" "1" + + /* Start voting if leader level is less maximum level by this value */ + "VoteLevelLessWeaponCount" "0" + + /* Display a join message, popup giving players instructions on how to play */ + "JoinMessage" "1" + + /** + * Level down playr if they kill themself by WorldSpawn Suicide. + * 0 - Disable + * 1..N - Levels to loose + */ + "WorldspawnSuicide" "1" + + /** + * Level down players if they use the "kill" command + * 0 - Disable + * 1..N - Levels to loose + */ + "CommitSuicide" "1" + + /* How many levels they can gain in 1 round (0 - disabled) */ + "MaxLevelPerRound" "0" + + /* Turbo Mode: give next level weapon on level up */ + "TurboMode" "1" + + /* Knife Elite force them to only have a knife after they level up. + They will get a normal weapon again next round */ + "KnifeElite" "0" + + /** + * How many kills they need to with the weapon to get the next level + * Kills will count across all rounds so that you don't have to get them in one round. + */ + "MinKillsPerLevel" "1" + + /** + * Enabled friendly fire automatically when a player reaches hegrenade level. + * + * When nobody on nade level, than switches friendly fire back. + * This does not affect EnableFriendlyFireLevel and EnableFriendlyFireLevel is not requered to be enabled. + * See also FriendlyFireOnOff. + * + * 0 - Disabled + * 1 - Enable friendly fire on nade level. + */ + "AutoFriendlyFire" "0" + + /** + * FFA DM mode. + * + * If you are using CSS:DM with FFA mode enabled, + * then you should set this variable to "1". + * + * 0 - Disabled + * 1 - Enabled + */ + "FFA" "1" + + /** + * Enable friendly fire on defined level. + * + * This does not affect AutoFriendlyFire and AutoFriendlyFire is not requered to be 1. + * See also FriendlyFireOnOff. + * + * 0 - Disabled. + * 1..N - enable friendly fire on defined level. + */ + "EnableFriendlyFireLevel" "0" + + /** + * What to do with friendly fire when EnableFriendlyFireLevel is not 0 and leader reaches EnableFriendlyFireLevel + * or AutoFriendlyFire is 1 and someone reaches nade level. + * + * 1 - Enable friendy fire + * 0 - Disable friendy fire + */ + "FriendlyFireOnOff" "1" + + /** + * Disable rtv on defined level. 0 - disabled. + */ + "DisableRtvLevel" "0" + + /** + * If this option is enabled, than player can level up by killing with prop_physics. + * For example with fuel barrels etc. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysics" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on grenade level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnGrenade" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnKnife" "0" + + /** + * If this option is enabled, than player can level up by killing with nade at any time. + * For example there are maps having grenades on them leaved by the author. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithMapNades" "0" + + /** + * Use "CanLevelUpWithMapNades" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithNadeOnKnife" "0" + + /** + * Prevent players from using kill command. + */ + "SelfKillProtection" "1" + + /** + * Change game description. + * + * Requires SDK Hooks (sdkhooks). + * + * "{version}" will be changed to plugin version. + * + * Options: + * "" = Option disabled. + */ + "GameDesc" "GunGame:SM {version}" + + /* ----- [1.2. knifepro] ----- */ + + /* Turn Knife Pro allow stealing a player level by killing them with a knife */ + "KnifePro" "1" + + /* Enables Knife Pro when a player is on hegrenade level */ + "KnifeProHE" "0" + + /* The minimum level that a player must be at before another player can knife steal from. Requires KnifePro on */ + "KnifeProMinLevel" "0" + + /* If enabled then knife kill will also affect points */ + "KnifeProRecalcPoints" "0" + + /** + * Maximum level difference between players to allow steal level + * 0 - Disabled + * 1..N - Level difference between killer and victim + */ + "KnifeProMaxDiff" "0" + + /** + * Disable level down on knifepro. + * + * 1 - Level down disabled + * 0 - Level down enabled + */ + "DisableLevelDown" "0" + + /* ----- [1.3. objectives] ----- */ + + /* Give x number of level by completing the bomb planting/defusing objectives. + * Amount giving base on the value setting. + */ + "ObjectiveBonus" "1" + + /* Enables objective bonus on last level */ + "ObjectiveBonusWin" "0" + + /** + * Gives objective bonus on exploding the bomb instead of planting + * 0 - bonus on planting + * 1 - bonus on exploding + */ + "ObjectiveBonusExplode" "0" + + /* Remove objectives from map. 0 = Disabled, 1 = BOMB, 2 = HOSTAGE, 3 = BOTH*/ + "RemoveObjectives" "3" + + /* ----- [1.4. handicap] ----- */ + + /** + * Maximum level that handicap can give. + * 0 - Disable restriction + * 1..N - Max level + */ + "MaxHandicapLevel" "0" + + /* Substract handicap level by this value */ + "HandicapLevelSubstract" "1" + + /** + * Gives joining players the avg/min level of all other players when they join late. + * 0 - Disable + * 1 - Avg level + * 2 - Min level + */ + "HandicapMode" "2" + + /** + * Allow players in the top rank to receive a handicap with the rest of the players. + * + * Handicap must also be turned on above for this to work. + * See also "HandicapTopRank" to set rank limit for tp rank. + * + * 0 - Do not give handicap to the top rank players. + * 1 - Give handicap to all players. + */ + "TopRankHandicap" "1" + + /** + * Gives handicap level automaticaly every defined number of seconds. + * This only works for players that is on very minimum level from + * all the players. + * Handicap must also be turned on for this to work. + */ + "HandicapUpdate" "0" + + /** + * Give handicap not more then given number of times per map. + * 0 - disabled + */ + "HandicapTimesPerMap" "0" + + /** + * Do not give handicap to the top rank players. + * + * See also "TopRankHandicap" to allow all players to receive handicap. + * + * 0 - Give handicap to all players. + * N - Do not give handicap for the first N players. + */ + "HandicapTopRank" "10" + + /** + * Use spectator's levels to calculate handicap level. + * + * 0 - Handicap does not count levels of spectators. + * 1 - Handicap counts levels of spectators. + */ + "HandicapUseSpectators" "0" + + /* ----- [1.5. equip] ----- */ + + /* Auto reload current level weapon on kill */ + "ReloadWeapon" "1" + + /* Give player armor on spawn */ + "ArmorKevlar" "1" + "ArmorHelmet" "1" + + /* Remove additional ammo in bonus weapon on the nade level */ + "RemoveBonusWeaponAmmo" "1" + + /** + * If remove additional ammo in bonus weapon on the nade level is enabled, then give that bullets count. + * + * 0 - default clip size + * 1-N - number of bullets + */ + "BonusWeaponAmmo" "50" + + /** + * This gives the player a weapon with 50 bullets on nade level. + * Example: + * "NadeBonus" "glock" - gives glock + * "NadeBonus" "deagle" - gives deagle + * "NadeBonus" "" - feature disabled + */ + "NadeBonus" "" + + /* Gives a smoke grenade on nade level */ + "NadeSmoke" "0" + + /* Gives a Flash grenade on nade level */ + "NadeFlash" "0" + + /* Gives a smoke grenade on knife level */ + "KnifeSmoke" "0" + + /* Gives a Flash grenade on knife level */ + "KnifeFlash" "0" + + /** + * Gives an extra hegrenade to the player if they get a kill + * + * 0 - Disable + * 1 - Enable + * 2 - Enable only for knife kills + */ + "ExtraNade" "0" + + /* Gives unlimited hegrenades to the player if he is on nage level */ + "UnlimitedNades" "0" + + /** + * Enable UnlimitedNades depending on the number of players in team. + * + * If UnlimitedNades is off and the number of players in one team less or + * equal to UnlimitedNadesMinPlayers then enable UnlimitedNades. + * When it will be more players on both teams, turn UnlimitedNades back to off. + * + * 0 - Disable + * 1 and above - Minimum number of players in each team for UnlimitedNames to be on. + */ + "UnlimitedNadesMinPlayers" "1" + + /** + * Number of nades on the nade level. + * + * This option is disabled + * if less then 2. + */ + "NumberOfNades" "0" + + /* ----- [1.6. multi level] ----- */ + + /* Multi Level Bonus */ + "MultiLevelBonus" "0" + + /* Enable God Mode when multi leveled */ + "MultiLevelBonusGodMode" "1" + + /** + * Custom speed and gravity value multiplier for multi level bonus. + * 0 - Disabled + */ + "MultiLevelBonusGravity" "0.5" + "MultiLevelBonusSpeed" "1.5" + + /* Miltilevel visual effect */ + "MultiLevelEffect" "0" + + /* How much levels is needed to get bonus */ + "MultiLevelAmount" "3" + + /** + * Type of the multi level effect. + * + * 1 - Old effect. + * 2 - New effect (default). + */ + "MultilevelEffectType" "2" + + /* ----- [1.7. warmup] ----- */ + + /* Enables Warmup Round*/ + "WarmupEnabled" "1" + + /* Warmup time length */ + "WarmupTimeLength" "60" + + /** + * Give random weapon on warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + * + * 0 - Disable + * 1 - Random weapon every map + * 2 - Random weapon every round + * 3 - Random weapon every spawn + */ + "WarmupRandomWeaponMode" "0" + + /** + * Gives unlimited hegrenades to the player if warmup is enabled. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupNades" "1" + + /** + * Weapon for warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupWeapon" "" + + /* ===== [2. GUNGAME TK CONFIG] ===== */ + + /** + * How much levels to loose after TK + * 0 - Disable + * 1..N - Levels to loose + */ + "TkLooseLevel" "0" + + /* ===== [3. GUNGAME AFK CONFIG] ===== */ + + /* Enables or disables built in Afk management system */ + "AfkManagement" "1" + + /* Kick player on x number of afk deaths. */ + "AfkDeaths" "5" + + /** + * What action to deal with the player when the maximum is reach? + * 0 = Nothing, 1 = Kick, 2 = Move to spectate, + */ + "AfkAction" "2" + + /* Reload current weapon on afk kill. */ + "AfkReload" "0" + + /* ===== [4. GUNGAME STATS CONFIG] ===== */ + + /** + * Prune player from player win database after numbers of days if they + * havn't been in the server in awhile. This occur during map change. + * It it recommended that you set a value to this setting. Over time as + * the player win database get filled up. It can cause long map changes. + * 0 = off otherwise the value is the number of days. + */ + "Prune" "366" + + /* ===== [5. GUNGAME DISPLAY WINNER CONFIG] ===== */ + + /* Display winner in MOTD window. */ + "DisplayWinnerMotd" "0" + + /* URL to display in MOTD window. */ + "DisplayWinnerUrl" "http://otstrel.ru/gg5_win.php" + + /* Show player rank on win in chat */ + "ShowPlayerRankOnWin" "1" + + /** + * If player wins on bot, then dont add win in stats. + * + * 0 - Add win into stats. + * 1 - Don't add win into stats. + */ + "DontAddWinsOnBot" "0" + + /* ===== [6. GUNGAME BOTS CONFIG] ===== */ + + /** + * Dont use bots levels for handicap calculation. + * Dont give handicap level to bots too. + */ + "HandicapSkipBots" "0" + + /* Can bots win the game otherwise when they reach the last weapon and nothing will happen */ + "BotsCanWinGame" "0" + + /* Allow level up by killing a bot with knife */ + "AllowLevelUpByKnifeBot" "0" + + /* Allow level up by killing a bot with hegrenade */ + "AllowLevelUpByExplodeBot" "0" + + /* Allow level up by killing a bot with knife if there is no other human */ + "AllowLevelUpByKnifeBotIfNoHuman" "1" + + /* Allow level up by killing a bot with hegrenade if there is no other human */ + "AllowLevelUpByExplodeBotIfNoHuman" "1" + } + + "Sounds" + { + "IntroSound" "gungame/gungame2.mp3" + "KnifeLevel" "gungame/knife_level.mp3" + "NadeLevel" "gungame/nade_level.mp3" + "LevelSteal" "gungame/smb3_1-up.mp3" + "LevelUp" "gungame/smb3_powerup.mp3" + "LevelDown" "gungame/smb3_powerdown.mp3" + "Triple" "gungame/smb_star.mp3" + "Autoff" "gungame/smb_warning2.mp3" + "MultiKill" "gungame/multikill.mp3" // (�) VALVE + /* Put each song filename in this list seperated by commas */ + "Winner" "gungame/winner.mp3" // (�) VALVE + "WarmupTimerSound" "gungame/timer.mp3" // (�) VALVE + } +} \ No newline at end of file diff --git a/css-deathmatch/config/cfg/gungame/css/gungame.equip.txt b/css-deathmatch/config/cfg/gungame/css/gungame.equip.txt new file mode 100644 index 0000000..a634045 --- /dev/null +++ b/css-deathmatch/config/cfg/gungame/css/gungame.equip.txt @@ -0,0 +1,107 @@ +"GunGame.Weapon" +{ + "WeaponOrder" + { + /** + * Weapon Choices: + * There are a total of 64 levels by default. (To change this value you can edit the gungame_const.inc + * to change the maximum allowed level of the game by changing the define MAX_LEVEL) + * + * There are a total of 25 usable killing weapons for GunGame. + * By default weapon order only 23 levels and uses 23 out of 25 of the usable killing weapons. + * + * WARNING: + * DO NOT SKIP LEVELS in any config for WeaponOrder. + * ie .. Only have level 1 to 3 and skip 4 and use 5 to level 23. + * DO NOT SKIP LEVELS + * + * HandGuns: + * glock, usp, p228, deagle, fiveseven, elite + * + * Shotguns: + * m3, xm1014 + * + * Sub Machine Guns: + * tmp, mac10, mp5navy, ump45, p90 + * + * Rifles: + * galil, famas, ak47, scout, m4a1, sg552, + * aug, m249, awp + * + * Automatic Rifles: + * sg550, g3sg1 + * + * Machine Gun: + * m249 + * + * Other: + * knife, hegrenade + */ + + "1" "glock" + "2" "usp" + "3" "p228" + "4" "deagle" + "5" "fiveseven" + "6" "elite" + "7" "m3" + "8" "xm1014" + "9" "tmp" + "10" "mac10" + "11" "mp5navy" + "12" "ump45" + "13" "p90" + "14" "famas" + "15" "ak47" + "16" "m4a1" + "17" "sg552" + "18" "aug" + "19" "m249" + "20" "scout" + "21" "awp" + "22" "hegrenade" + "23" "knife" + + /** + * If RandomWeaponOrder is enabled, keep this levels unchanged. + * Use comma as a delimiter, do not use whitespace characters - only digits are allowed. + * Please keep this config line after levels list and before RandomWeaponOrder. + * + * "22,23" - keep knife and nade levels on defined levels + * "23" - keep knife level on defined level + * "" - randomize all levels + */ + "RandomWeaponReserveLevels" "" + + /** + * This will take the weapons in the WeaponOrder and randomize all the weapons order. + * Please keep this config line after levels list and after RandomWeaponReserveLevels. + */ + "RandomWeaponOrder" "0" + } + + "MultipleKillsPerLevel" + { + /** + * This is for custom kills per level will override default (MinKillsPerWeapon). + * Leave value at 0 if you do not want to override the default value. + * + * Example: + * + * For level 1 they must get 10 kills before they can level up. + * "1" "10" + * "2" "5" + * and so on. + * + * Or you can set kills per level for a perticular level. + * "1" "10" + * "3" "5" + * "5" "2" + * etc. + * + * Kills will count across all rounds so that you don't have to get them in one round. + * + * + */ + } +} diff --git a/css-deathmatch/configure-deathmatch.sh b/css-deathmatch/configure-deathmatch.sh new file mode 100755 index 0000000..937c76f --- /dev/null +++ b/css-deathmatch/configure-deathmatch.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "mp_ignore_round_win_conditions 1" >> /steam/css/cstrike/cfg/server.cfg diff --git a/css-deathmatch/configure.sh b/css-deathmatch/configure.sh new file mode 100755 index 0000000..241f0dd --- /dev/null +++ b/css-deathmatch/configure.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./configure-base.sh +./configure-metamod.sh +./configure-deathmatch.sh diff --git a/css-deathmatch/download.sh b/css-deathmatch/download.sh new file mode 100755 index 0000000..67fd51d --- /dev/null +++ b/css-deathmatch/download.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +# https://forums.alliedmods.net/showthread.php?t=103242 +curl -o sm_ggdm-1.8.0.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=108943&d=1346584450' +unzip -o sm_ggdm-1.8.0.zip +rm -f sm_ggdm-1.8.0.zip diff --git a/css-gungame/.dockerignore b/css-gungame/.dockerignore new file mode 100644 index 0000000..8c5f257 --- /dev/null +++ b/css-gungame/.dockerignore @@ -0,0 +1,4 @@ +.git +.gitignore +README.md +Dockerfile diff --git a/zdaemon/wads/.gitsavefolder b/css-gungame/.gitignore similarity index 100% rename from zdaemon/wads/.gitsavefolder rename to css-gungame/.gitignore diff --git a/css-gungame/Dockerfile b/css-gungame/Dockerfile new file mode 100644 index 0000000..d92f283 --- /dev/null +++ b/css-gungame/Dockerfile @@ -0,0 +1,18 @@ +FROM css-deathmatch + +USER steam + +WORKDIR /steam/css + +COPY --chown=steam download.sh . +RUN ./download.sh + +COPY --chown=steam \ + config/ \ + configure.sh \ + configure-gungame.sh \ + ./ + +ENV SV_HOSTNAME="Counterstrike Source (GunGame)" + +ENTRYPOINT [ "./start.sh" ] diff --git a/css-gungame/README.md b/css-gungame/README.md new file mode 100644 index 0000000..b364ca5 --- /dev/null +++ b/css-gungame/README.md @@ -0,0 +1,14 @@ +# Counterstrike Source - Gun Game + +Counterstrike Source Gun Game server based on the css-metamod docker image. + +## Build notes + +1. Build the `css` docker image +2. Build the `css-metamod` docker image +3. Build the `css-deathmatch` docker image +4. Build this one! + +## Plugins + +* [CS:S/CS:GO GunGame](https://forums.alliedmods.net/showthread.php?t=93977) diff --git a/css-gungame/config/cstrike/cfg/gungame/css/gungame.config.txt b/css-gungame/config/cstrike/cfg/gungame/css/gungame.config.txt new file mode 100644 index 0000000..a53a3bf --- /dev/null +++ b/css-gungame/config/cstrike/cfg/gungame/css/gungame.config.txt @@ -0,0 +1,647 @@ +"GunGame.Config" +{ + "Config" + { + /* ===== [1. GUNGAME MAIN CONFIG] ===== */ + + /* ----- [1.1. main] ----- */ + + /* Enables/Disables GunGame Mod */ + "Enabled" "1" + + /** + * Do not fast switch on level up for this weapons. + * + * Comma-separated list + * of weapon names from gungame.equip.txt. + * + * Options: + * "hegrenade" - Enabled for hegrenade + * "hegrenade,taser" - Enabled for hegrenade and taser + * "taser,hegrenade,molotov,incgrenade" - Default value + * "" - Disabled + */ + "FastSwitchSkipWeapons" "hegrenade" + + /** + * Switch weapon without delays after level up. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnLevelUp" "1" + + /** + * Switch weapon without delays when player changes weapon by himself. + * + * SDK Hooks (sdkhooks) is required to use this option. + * + * Options: + * 1 - Enabled. + * 0 - Disabled. + */ + "FastSwitchOnChangeWeapon" "0" + + /** + * Freeze players after win. + * + * Options: + * 1 - Freeze players. + * 0 - Do not freeze players. + */ + "WinnerFreezePlayers" "0" + + /** + * Winner effects. + * + * Options: + * 0 - Freeze players. + * 1 - Make players fly. + */ + "WinnerEffect" "1" + + /** + * Delay before end of multiplayer game after gungame win. + * + * Options: + * 0 - Disabled. + * 1-N - Number of seconds. + */ + "EndGameDelay" "0" + + /** + * Sets how to finish the game after someone has won. + * + * Options: + * 0 - Normal game end with scoreboard, vote next map valve menu and weapon drops. + * 1 - Silent game end. + */ + "EndGameSilent" "0" + + /** + * Multiply sound effects volume. + * + * In CS:GO the volume is too low. + * You can up the volume with this multiplier. + * + * Options: + * 0-1 - Do not multiply + * 2-5 - Multiply by defined number of times + */ + "MultiplySoundVolume" "0" + + /** + * Block weapon switch if killer leveled up with knife + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchIfKnife" "1" + + /** + * Block weapon switch if you get next hegrenade + * after previous hegrenade explode or after getting extra nade. + * + * You need SDK Hooks (sdkhooks) if you want to set it to "1" + * + * Options: + * 1 - Block weapon switch + * 0 - Do not block weapon switch + */ + "BlockWeaponSwitchOnNade" "1" + + /** + * Show players level message in hint box instead of chat. + * If enabled then multikill chat messages will be shown + * in hint box too (requres "MultiKillChat" "1"). + */ + "ShowSpawnMsgInHintBox" "0" + + /** + * Show leader level info in hint box + * (requires "ShowSpawnMsgInHintBox" to be "1") + */ + "ShowLeaderInHintBox" "0" + + /* Show leader's weapon name in chat with leading message */ + "ShowLeaderWeapon" "0" + + /** + * Strip dead players weapon + * + * Options: + * 0 - Disabled (default) + * 1 - Enabled for alive and dead players (alive players can not drop guns) + * 2 - Enabled for dead players only (alive players can drop guns) + */ + "StripDeadPlayersWeapon" "2" + + /* Show levels in scoreboard */ + "LevelsInScoreboard" "1" + + /** + * When shows levels in scoreboard it will + * clear deaths (requires "LevelsInScoreboard" "1") + */ + "ScoreboardClearDeaths" "0" + + /* Restore level on player reconnect */ + "RestoreLevelOnReconnect" "1" + + /* Allow level up after round end */ + "AllowLevelUpAfterRoundEnd" "1" + + /* Show multikill hints in chat */ + "MultiKillChat" "0" + + /* Set sv_alltalk 1 after player win */ + "AlltalkOnWin" "1" + + /* Start voting if leader level is less maximum level by this value */ + "VoteLevelLessWeaponCount" "0" + + /* Display a join message, popup giving players instructions on how to play */ + "JoinMessage" "1" + + /** + * Level down playr if they kill themself by WorldSpawn Suicide. + * 0 - Disable + * 1..N - Levels to loose + */ + "WorldspawnSuicide" "1" + + /** + * Level down players if they use the "kill" command + * 0 - Disable + * 1..N - Levels to loose + */ + "CommitSuicide" "1" + + /* How many levels they can gain in 1 round (0 - disabled) */ + "MaxLevelPerRound" "0" + + /* Turbo Mode: give next level weapon on level up */ + "TurboMode" "1" + + /* Knife Elite force them to only have a knife after they level up. + They will get a normal weapon again next round */ + "KnifeElite" "0" + + /** + * How many kills they need to with the weapon to get the next level + * Kills will count across all rounds so that you don't have to get them in one round. + */ + "MinKillsPerLevel" "1" + + /** + * Enabled friendly fire automatically when a player reaches hegrenade level. + * + * When nobody on nade level, than switches friendly fire back. + * This does not affect EnableFriendlyFireLevel and EnableFriendlyFireLevel is not requered to be enabled. + * See also FriendlyFireOnOff. + * + * 0 - Disabled + * 1 - Enable friendly fire on nade level. + */ + "AutoFriendlyFire" "0" + + /** + * FFA DM mode. + * + * If you are using CSS:DM with FFA mode enabled, + * then you should set this variable to "1". + * + * 0 - Disabled + * 1 - Enabled + */ + "FFA" "1" + + /** + * Enable friendly fire on defined level. + * + * This does not affect AutoFriendlyFire and AutoFriendlyFire is not requered to be 1. + * See also FriendlyFireOnOff. + * + * 0 - Disabled. + * 1..N - enable friendly fire on defined level. + */ + "EnableFriendlyFireLevel" "0" + + /** + * What to do with friendly fire when EnableFriendlyFireLevel is not 0 and leader reaches EnableFriendlyFireLevel + * or AutoFriendlyFire is 1 and someone reaches nade level. + * + * 1 - Enable friendy fire + * 0 - Disable friendy fire + */ + "FriendlyFireOnOff" "1" + + /** + * Disable rtv on defined level. 0 - disabled. + */ + "DisableRtvLevel" "0" + + /** + * If this option is enabled, than player can level up by killing with prop_physics. + * For example with fuel barrels etc. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysics" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on grenade level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnGrenade" "0" + + /** + * Use "CanLevelUpWithPhysics" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithPhysicsOnKnife" "0" + + /** + * If this option is enabled, than player can level up by killing with nade at any time. + * For example there are maps having grenades on them leaved by the author. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithMapNades" "0" + + /** + * Use "CanLevelUpWithMapNades" option when player is on knife level. + * + * 1 - Enabled + * 0 - Disabled + */ + "CanLevelUpWithNadeOnKnife" "0" + + /** + * Prevent players from using kill command. + */ + "SelfKillProtection" "1" + + /** + * Change game description. + * + * Requires SDK Hooks (sdkhooks). + * + * "{version}" will be changed to plugin version. + * + * Options: + * "" = Option disabled. + */ + "GameDesc" "GunGame:SM {version}" + + /* ----- [1.2. knifepro] ----- */ + + /* Turn Knife Pro allow stealing a player level by killing them with a knife */ + "KnifePro" "1" + + /* Enables Knife Pro when a player is on hegrenade level */ + "KnifeProHE" "0" + + /* The minimum level that a player must be at before another player can knife steal from. Requires KnifePro on */ + "KnifeProMinLevel" "0" + + /* If enabled then knife kill will also affect points */ + "KnifeProRecalcPoints" "0" + + /** + * Maximum level difference between players to allow steal level + * 0 - Disabled + * 1..N - Level difference between killer and victim + */ + "KnifeProMaxDiff" "0" + + /** + * Disable level down on knifepro. + * + * 1 - Level down disabled + * 0 - Level down enabled + */ + "DisableLevelDown" "0" + + /* ----- [1.3. objectives] ----- */ + + /* Give x number of level by completing the bomb planting/defusing objectives. + * Amount giving base on the value setting. + */ + "ObjectiveBonus" "1" + + /* Enables objective bonus on last level */ + "ObjectiveBonusWin" "0" + + /** + * Gives objective bonus on exploding the bomb instead of planting + * 0 - bonus on planting + * 1 - bonus on exploding + */ + "ObjectiveBonusExplode" "0" + + /* Remove objectives from map. 0 = Disabled, 1 = BOMB, 2 = HOSTAGE, 3 = BOTH*/ + "RemoveObjectives" "3" + + /* ----- [1.4. handicap] ----- */ + + /** + * Maximum level that handicap can give. + * 0 - Disable restriction + * 1..N - Max level + */ + "MaxHandicapLevel" "0" + + /* Substract handicap level by this value */ + "HandicapLevelSubstract" "1" + + /** + * Gives joining players the avg/min level of all other players when they join late. + * 0 - Disable + * 1 - Avg level + * 2 - Min level + */ + "HandicapMode" "2" + + /** + * Allow players in the top rank to receive a handicap with the rest of the players. + * + * Handicap must also be turned on above for this to work. + * See also "HandicapTopRank" to set rank limit for tp rank. + * + * 0 - Do not give handicap to the top rank players. + * 1 - Give handicap to all players. + */ + "TopRankHandicap" "1" + + /** + * Gives handicap level automaticaly every defined number of seconds. + * This only works for players that is on very minimum level from + * all the players. + * Handicap must also be turned on for this to work. + */ + "HandicapUpdate" "0" + + /** + * Give handicap not more then given number of times per map. + * 0 - disabled + */ + "HandicapTimesPerMap" "0" + + /** + * Do not give handicap to the top rank players. + * + * See also "TopRankHandicap" to allow all players to receive handicap. + * + * 0 - Give handicap to all players. + * N - Do not give handicap for the first N players. + */ + "HandicapTopRank" "10" + + /** + * Use spectator's levels to calculate handicap level. + * + * 0 - Handicap does not count levels of spectators. + * 1 - Handicap counts levels of spectators. + */ + "HandicapUseSpectators" "0" + + /* ----- [1.5. equip] ----- */ + + /* Auto reload current level weapon on kill */ + "ReloadWeapon" "1" + + /* Give player armor on spawn */ + "ArmorKevlar" "1" + "ArmorHelmet" "1" + + /* Remove additional ammo in bonus weapon on the nade level */ + "RemoveBonusWeaponAmmo" "1" + + /** + * If remove additional ammo in bonus weapon on the nade level is enabled, then give that bullets count. + * + * 0 - default clip size + * 1-N - number of bullets + */ + "BonusWeaponAmmo" "50" + + /** + * This gives the player a weapon with 50 bullets on nade level. + * Example: + * "NadeBonus" "glock" - gives glock + * "NadeBonus" "deagle" - gives deagle + * "NadeBonus" "" - feature disabled + */ + "NadeBonus" "" + + /* Gives a smoke grenade on nade level */ + "NadeSmoke" "0" + + /* Gives a Flash grenade on nade level */ + "NadeFlash" "0" + + /* Gives a smoke grenade on knife level */ + "KnifeSmoke" "0" + + /* Gives a Flash grenade on knife level */ + "KnifeFlash" "0" + + /** + * Gives an extra hegrenade to the player if they get a kill + * + * 0 - Disable + * 1 - Enable + * 2 - Enable only for knife kills + */ + "ExtraNade" "0" + + /* Gives unlimited hegrenades to the player if he is on nage level */ + "UnlimitedNades" "0" + + /** + * Enable UnlimitedNades depending on the number of players in team. + * + * If UnlimitedNades is off and the number of players in one team less or + * equal to UnlimitedNadesMinPlayers then enable UnlimitedNades. + * When it will be more players on both teams, turn UnlimitedNades back to off. + * + * 0 - Disable + * 1 and above - Minimum number of players in each team for UnlimitedNames to be on. + */ + "UnlimitedNadesMinPlayers" "1" + + /** + * Number of nades on the nade level. + * + * This option is disabled + * if less then 2. + */ + "NumberOfNades" "0" + + /* ----- [1.6. multi level] ----- */ + + /* Multi Level Bonus */ + "MultiLevelBonus" "0" + + /* Enable God Mode when multi leveled */ + "MultiLevelBonusGodMode" "1" + + /** + * Custom speed and gravity value multiplier for multi level bonus. + * 0 - Disabled + */ + "MultiLevelBonusGravity" "0.5" + "MultiLevelBonusSpeed" "1.5" + + /* Miltilevel visual effect */ + "MultiLevelEffect" "0" + + /* How much levels is needed to get bonus */ + "MultiLevelAmount" "3" + + /** + * Type of the multi level effect. + * + * 1 - Old effect. + * 2 - New effect (default). + */ + "MultilevelEffectType" "2" + + /* ----- [1.7. warmup] ----- */ + + /* Enables Warmup Round*/ + "WarmupEnabled" "1" + + /* Warmup time length */ + "WarmupTimeLength" "60" + + /** + * Give random weapon on warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + * + * 0 - Disable + * 1 - Random weapon every map + * 2 - Random weapon every round + * 3 - Random weapon every spawn + */ + "WarmupRandomWeaponMode" "0" + + /** + * Gives unlimited hegrenades to the player if warmup is enabled. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupNades" "1" + + /** + * Weapon for warmup. + * If you are using WarmupRandomWeaponMode, you can nou use WarmupNades or WarmupWeapon. + */ + "WarmupWeapon" "" + + /* ===== [2. GUNGAME TK CONFIG] ===== */ + + /** + * How much levels to loose after TK + * 0 - Disable + * 1..N - Levels to loose + */ + "TkLooseLevel" "0" + + /* ===== [3. GUNGAME AFK CONFIG] ===== */ + + /* Enables or disables built in Afk management system */ + "AfkManagement" "1" + + /* Kick player on x number of afk deaths. */ + "AfkDeaths" "5" + + /** + * What action to deal with the player when the maximum is reach? + * 0 = Nothing, 1 = Kick, 2 = Move to spectate, + */ + "AfkAction" "2" + + /* Reload current weapon on afk kill. */ + "AfkReload" "0" + + /* ===== [4. GUNGAME STATS CONFIG] ===== */ + + /** + * Prune player from player win database after numbers of days if they + * havn't been in the server in awhile. This occur during map change. + * It it recommended that you set a value to this setting. Over time as + * the player win database get filled up. It can cause long map changes. + * 0 = off otherwise the value is the number of days. + */ + "Prune" "366" + + /* ===== [5. GUNGAME DISPLAY WINNER CONFIG] ===== */ + + /* Display winner in MOTD window. */ + "DisplayWinnerMotd" "0" + + /* URL to display in MOTD window. */ + "DisplayWinnerUrl" "http://otstrel.ru/gg5_win.php" + + /* Show player rank on win in chat */ + "ShowPlayerRankOnWin" "1" + + /** + * If player wins on bot, then dont add win in stats. + * + * 0 - Add win into stats. + * 1 - Don't add win into stats. + */ + "DontAddWinsOnBot" "0" + + /* ===== [6. GUNGAME BOTS CONFIG] ===== */ + + /** + * Dont use bots levels for handicap calculation. + * Dont give handicap level to bots too. + */ + "HandicapSkipBots" "0" + + /* Can bots win the game otherwise when they reach the last weapon and nothing will happen */ + "BotsCanWinGame" "0" + + /* Allow level up by killing a bot with knife */ + "AllowLevelUpByKnifeBot" "0" + + /* Allow level up by killing a bot with hegrenade */ + "AllowLevelUpByExplodeBot" "0" + + /* Allow level up by killing a bot with knife if there is no other human */ + "AllowLevelUpByKnifeBotIfNoHuman" "1" + + /* Allow level up by killing a bot with hegrenade if there is no other human */ + "AllowLevelUpByExplodeBotIfNoHuman" "1" + } + + "Sounds" + { + "IntroSound" "gungame/gungame2.mp3" + "KnifeLevel" "gungame/knife_level.mp3" + "NadeLevel" "gungame/nade_level.mp3" + "LevelSteal" "gungame/smb3_1-up.mp3" + "LevelUp" "gungame/smb3_powerup.mp3" + "LevelDown" "gungame/smb3_powerdown.mp3" + "Triple" "gungame/smb_star.mp3" + "Autoff" "gungame/smb_warning2.mp3" + "MultiKill" "gungame/multikill.mp3" // (�) VALVE + /* Put each song filename in this list seperated by commas */ + "Winner" "gungame/winner.mp3" // (�) VALVE + "WarmupTimerSound" "gungame/timer.mp3" // (�) VALVE + } +} \ No newline at end of file diff --git a/css-gungame/config/cstrike/cfg/gungame/css/gungame.equip.txt b/css-gungame/config/cstrike/cfg/gungame/css/gungame.equip.txt new file mode 100644 index 0000000..a634045 --- /dev/null +++ b/css-gungame/config/cstrike/cfg/gungame/css/gungame.equip.txt @@ -0,0 +1,107 @@ +"GunGame.Weapon" +{ + "WeaponOrder" + { + /** + * Weapon Choices: + * There are a total of 64 levels by default. (To change this value you can edit the gungame_const.inc + * to change the maximum allowed level of the game by changing the define MAX_LEVEL) + * + * There are a total of 25 usable killing weapons for GunGame. + * By default weapon order only 23 levels and uses 23 out of 25 of the usable killing weapons. + * + * WARNING: + * DO NOT SKIP LEVELS in any config for WeaponOrder. + * ie .. Only have level 1 to 3 and skip 4 and use 5 to level 23. + * DO NOT SKIP LEVELS + * + * HandGuns: + * glock, usp, p228, deagle, fiveseven, elite + * + * Shotguns: + * m3, xm1014 + * + * Sub Machine Guns: + * tmp, mac10, mp5navy, ump45, p90 + * + * Rifles: + * galil, famas, ak47, scout, m4a1, sg552, + * aug, m249, awp + * + * Automatic Rifles: + * sg550, g3sg1 + * + * Machine Gun: + * m249 + * + * Other: + * knife, hegrenade + */ + + "1" "glock" + "2" "usp" + "3" "p228" + "4" "deagle" + "5" "fiveseven" + "6" "elite" + "7" "m3" + "8" "xm1014" + "9" "tmp" + "10" "mac10" + "11" "mp5navy" + "12" "ump45" + "13" "p90" + "14" "famas" + "15" "ak47" + "16" "m4a1" + "17" "sg552" + "18" "aug" + "19" "m249" + "20" "scout" + "21" "awp" + "22" "hegrenade" + "23" "knife" + + /** + * If RandomWeaponOrder is enabled, keep this levels unchanged. + * Use comma as a delimiter, do not use whitespace characters - only digits are allowed. + * Please keep this config line after levels list and before RandomWeaponOrder. + * + * "22,23" - keep knife and nade levels on defined levels + * "23" - keep knife level on defined level + * "" - randomize all levels + */ + "RandomWeaponReserveLevels" "" + + /** + * This will take the weapons in the WeaponOrder and randomize all the weapons order. + * Please keep this config line after levels list and after RandomWeaponReserveLevels. + */ + "RandomWeaponOrder" "0" + } + + "MultipleKillsPerLevel" + { + /** + * This is for custom kills per level will override default (MinKillsPerWeapon). + * Leave value at 0 if you do not want to override the default value. + * + * Example: + * + * For level 1 they must get 10 kills before they can level up. + * "1" "10" + * "2" "5" + * and so on. + * + * Or you can set kills per level for a perticular level. + * "1" "10" + * "3" "5" + * "5" "2" + * etc. + * + * Kills will count across all rounds so that you don't have to get them in one round. + * + * + */ + } +} diff --git a/css-gungame/configure-gungame.sh b/css-gungame/configure-gungame.sh new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/css-gungame/configure-gungame.sh @@ -0,0 +1 @@ +#!/bin/sh diff --git a/css-gungame/configure.sh b/css-gungame/configure.sh new file mode 100755 index 0000000..c54185a --- /dev/null +++ b/css-gungame/configure.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +./configure-base.sh +./configure-metamod.sh +./configure-deathmatch.sh +./configure-gungame.sh diff --git a/css-gungame/download.sh b/css-gungame/download.sh new file mode 100755 index 0000000..42e0305 --- /dev/null +++ b/css-gungame/download.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +# https://forums.alliedmods.net/showthread.php?t=93977 +curl -o sm_gungame.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=133712&d=1400696532' +unzip -o sm_gungame.zip -d cstrike +rm -f sm_gungame.zip diff --git a/css-hideandseek/.dockerignore b/css-hideandseek/.dockerignore new file mode 100644 index 0000000..53c75f2 --- /dev/null +++ b/css-hideandseek/.dockerignore @@ -0,0 +1,3 @@ +.gitignore +README.md +Dockerfile diff --git a/css-hideandseek/Dockerfile b/css-hideandseek/Dockerfile new file mode 100644 index 0000000..4ad05f1 --- /dev/null +++ b/css-hideandseek/Dockerfile @@ -0,0 +1,16 @@ +FROM css-metamod + +USER steam + +WORKDIR /steam/css/cstrike + +COPY --chown=steam download.sh \ + configure.sh \ + ./ +RUN ./download.sh + +WORKDIR /steam/css + +ENV SV_HOSTNAME="Counterstrike Source (Hide and Seek)" + +ENTRYPOINT [ "./start.sh" ] diff --git a/css-hideandseek/README.md b/css-hideandseek/README.md new file mode 100644 index 0000000..4bc29c4 --- /dev/null +++ b/css-hideandseek/README.md @@ -0,0 +1,13 @@ +# Counterstrike Source - Hide and Seek (PropHunt) + +Counterstrike Source Hide and Seek server based on the css-metamod docker image. + +## Build notes + +1. Build the `css` docker image +2. Build the `css-metamod` docker image +3. Build this one! + +## Plugins + +* [CS:S Hide and seek](https://forums.alliedmods.net/showthread.php?p=1158242) diff --git a/css-hideandseek/configure.sh b/css-hideandseek/configure.sh new file mode 100755 index 0000000..edbf724 --- /dev/null +++ b/css-hideandseek/configure.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./configure-base.sh +./configure-metamod.sh diff --git a/css-hideandseek/download.sh b/css-hideandseek/download.sh new file mode 100755 index 0000000..4862296 --- /dev/null +++ b/css-hideandseek/download.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +# [CS:S] Hide and seek +# https://forums.alliedmods.net/showthread.php?p=1158242 +curl -o sm_hideandseek.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=91862&d=1315059433' +unzip sm_hideandseek.zip +rm -f sm_hideandseek.zip diff --git a/css-metamod/Dockerfile b/css-metamod/Dockerfile index 2183b2d..2d638b4 100644 --- a/css-metamod/Dockerfile +++ b/css-metamod/Dockerfile @@ -1,22 +1,23 @@ FROM css +ENV TEMP_DIR=/tmp/css/ + WORKDIR /steam/css/ USER steam -ADD download.sh . + +COPY --chown=steam download.sh ./ RUN ./download.sh -RUN tar -xf mm*.tar.gz -C cstrike/ && \ - tar -xf sourcemod*.tar.gz -C cstrike/ && \ - mv cstrike/addons/sourcemod/plugins/disabled/mapchooser.smx cstrike/addons/sourcemod/plugins/mapchooser.smx && \ - mv cstrike/addons/sourcemod/plugins/disabled/nominations.smx cstrike/addons/sourcemod/plugins/nominations.smx && \ - mv cstrike/addons/sourcemod/plugins/disabled/randomcycle.smx cstrike/addons/sourcemod/plugins/randomcycle.smx && \ - mv cstrike/addons/sourcemod/plugins/disabled/rockthevote.smx cstrike/addons/sourcemod/plugins/rockthevote.smx +COPY --chown=steam \ + metamod.vdf \ + ./cstrike/ -ADD metamod.vdf cstrike/ +COPY --chown=steam \ + config/ \ + configure.sh \ + configure-metamod.sh \ + ./ -ADD start-css.sh . -USER root -# I guess if you want to put config stuff in now is the time? -#ADD cfg csgo/cfg -RUN chown -R steam:steam cstrike/cfg/ -USER steam +ENV SV_HOSTNAME="Counterstrike Source (MetaMod)" + +ENTRYPOINT [ "./start.sh" ] diff --git a/css-metamod/build.sh b/css-metamod/build.sh deleted file mode 100755 index 36ef64e..0000000 --- a/css-metamod/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build css-metamod diff --git a/css-metamod/config/cstrike/addons/sourcemod/configs/admin_overrides.cfg b/css-metamod/config/cstrike/addons/sourcemod/configs/admin_overrides.cfg new file mode 100644 index 0000000..a45b23b --- /dev/null +++ b/css-metamod/config/cstrike/addons/sourcemod/configs/admin_overrides.cfg @@ -0,0 +1,10 @@ +Overrides +{ + "sm_mapvote" "z" + "sm_votemaps" "z" + "sm_extend" "z" + "sm_nextmap" "z" + "sm_rtv" "z" + "sm_nominate" "z" + "sm_listmaps" "z" +} diff --git a/css-metamod/config/cstrike/addons/sourcemod/configs/mapchooser_extended/maps/cstrike.txt b/css-metamod/config/cstrike/addons/sourcemod/configs/mapchooser_extended/maps/cstrike.txt new file mode 100644 index 0000000..1c3b671 --- /dev/null +++ b/css-metamod/config/cstrike/addons/sourcemod/configs/mapchooser_extended/maps/cstrike.txt @@ -0,0 +1,18 @@ +cs_assault +cs_compound +cs_estate +cs_havana +cs_italy +cs_militia +cs_office +de_aztec +de_cbble +de_chateau +de_dust2 +de_dust +de_inferno +de_nuke +de_piranesi +de_port +de_prodigy +de_train diff --git a/css-metamod/configure-metamod.sh b/css-metamod/configure-metamod.sh new file mode 100755 index 0000000..97b0da9 --- /dev/null +++ b/css-metamod/configure-metamod.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./configure-base.sh + +echo '"$FULL_ADMINS" "@Full Admins"' > cstrike/addons/sourcemod/configs/admins_simple.ini diff --git a/css-metamod/configure.sh b/css-metamod/configure.sh new file mode 100755 index 0000000..edbf724 --- /dev/null +++ b/css-metamod/configure.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./configure-base.sh +./configure-metamod.sh diff --git a/css-metamod/download.sh b/css-metamod/download.sh index 89bcc7e..2b4ff8f 100755 --- a/css-metamod/download.sh +++ b/css-metamod/download.sh @@ -1,17 +1,31 @@ #!/bin/bash -MMVERSION=$( curl http://www.metamodsource.net/downloads.php | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +set -e -MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) +source /steam/scripts/zip-utils.sh -curl -o $MMVERSION https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) -SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" +tar -xf mm*.tar.gz -C cstrike/ +rm -f mm*.tar.gz +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") -echo $SMVERSION -echo $SMMAJORVERSION +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" +tar -xf sourcemod*.tar.gz -C cstrike/ +mv cstrike/addons/sourcemod/plugins/disabled/randomcycle.smx cstrike/addons/sourcemod/plugins/randomcycle.smx +rm -f sourcemod*.tar.gz -SMURL="http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" -curl -o $SMVERSION $SMURL +# MapChooser Extended +# https://forums.alliedmods.net/showthread.php?t=156974?t=156974 +curl -o mapchooser_extended_1.10.2.zip "https://forums.alliedmods.net/attachment.php?attachmentid=130293&d=1391630113" +unzipAndMoveToDir mapchooser_extended_1.10.2.zip /steam/css/cstrike/ +mv cstrike/addons/sourcemod/plugins/disabled/rockthevote_extended.smx cstrike/addons/sourcemod/plugins/rockthevote_extended.smx +mv cstrike/addons/sourcemod/plugins/disabled/mapchooser_extended_sounds.smx cstrike/addons/sourcemod/plugins/mapchooser_extended_sounds.smx +mv cstrike/addons/sourcemod/plugins/disabled/nominations_extended.smx cstrike/addons/sourcemod/plugins/nominations_extended.smx +rm -f mapchooser_extended_1.10.2.zip diff --git a/css/.dockerignore b/css/.dockerignore new file mode 100644 index 0000000..7457660 --- /dev/null +++ b/css/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.dockerignore +.env +.gitignore +.git diff --git a/css/Dockerfile b/css/Dockerfile index 0884f08..93c6278 100644 --- a/css/Dockerfile +++ b/css/Dockerfile @@ -1,21 +1,28 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. -USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 +ENV GAME=css +ENV APP_ID=232330 -USER steam -RUN mkdir -p /steam/css +WORKDIR /steam/${GAME}/ -WORKDIR /steam/steamcmd_linux -RUN ./steamcmd.sh +login anonymous +force_install_dir ../css +app_update 232330 +quit +USER root +RUN chown -R steam /steam/${GAME}/ +USER steam +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit ARG CACHE_DATE -# do another update to catch updates since the original image was built -# need to run docker build --build-arg CACHE_DATE="$(date)" -RUN ./steamcmd.sh +login anonymous +force_install_dir ../css +app_update 232330 +quit +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit \ + && rm -f /steam/css/cstrike/maps/test_hardware.bsp \ + && rm -f /steam/css/cstrike/maps/test_speakers.bsp + +COPY --chown=steam \ + config/ \ + configure.sh \ + configure-base.sh \ + generate-mapcycle.sh \ + start.sh \ + ./ -WORKDIR /steam/css/ -ADD start*.sh . +ENV SV_HOSTNAME="Counterstrike Source (Base)" -CMD ["./start-css.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/css/README.md b/css/README.md index 7baeb1b..70d112c 100644 --- a/css/README.md +++ b/css/README.md @@ -1,6 +1,19 @@ # Counterstrike Source -The following configuration is available via setting environment variables +Counterstrike Source server without plugins. + +## Build notes +To catch updates since the original image was built, run: + + ``` +docker build --build-arg CACHE_DATE="$(date)" +``` + +This will re-use the previously built image as a base instead of re-downloading everything again. + +## Environment variables + +The following configuration is available via setting environment variables: ``` hostname $SV_HOSTNAME @@ -28,3 +41,7 @@ bot_allow_snipers $BOT_ALLOW_SNIPERS bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS ``` +## Troubleshooting + +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter diff --git a/css/build.sh b/css/build.sh deleted file mode 100755 index f521d62..0000000 --- a/css/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build css diff --git a/css/config/cstrike/cfg/motd.txt b/css/config/cstrike/cfg/motd.txt new file mode 100644 index 0000000..76a3ad6 --- /dev/null +++ b/css/config/cstrike/cfg/motd.txt @@ -0,0 +1,40 @@ + + + +Cstrike MOTD + + + +
+You are playing Counter-Strike: Source
+Visit the official CS web site @
+www.counter-strike.net
+Visit Counter-Strike.net
+
+ \ No newline at end of file diff --git a/css/config/cstrike/cfg/motd_text.txt b/css/config/cstrike/cfg/motd_text.txt new file mode 100644 index 0000000..4bfe4c2 --- /dev/null +++ b/css/config/cstrike/cfg/motd_text.txt @@ -0,0 +1,3 @@ +You are playing Counter-Strike: Source +Visit the official CS web site @ +www.counter-strike.net \ No newline at end of file diff --git a/css/config/cstrike/maps/copy-maps-here b/css/config/cstrike/maps/copy-maps-here new file mode 100644 index 0000000..e69de29 diff --git a/css-metamod/start-css.sh b/css/configure-base.sh similarity index 82% rename from css-metamod/start-css.sh rename to css/configure-base.sh index 09c60a6..a456114 100755 --- a/css-metamod/start-css.sh +++ b/css/configure-base.sh @@ -1,15 +1,9 @@ #!/bin/bash -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ -z "$MAP" ]] && MAP="de_dust" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" -[[ -z $SERVER_NUM ]] && SERVER_NUM="1" - # Config file [[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" [[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Metamod)" +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Base)" # mp config [[ -z $MP_FRIENDLYFIRE ]] && MP_FRIENDLYFIRE=0 @@ -23,7 +17,7 @@ # fill = If a player joins, the Bot will be kicked # normal = If a player joins, the Bot won´t be kicked -[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=normal +[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=fill # bots populate after a player joins the server # 0 = bots always present @@ -40,7 +34,7 @@ # Bots defuse the bombs etc... # 0 = Bots allowed -# 1 = Humans only) +# 1 = Humans only [[ -z $BOT_DEFER_TO_HUMAN ]] && BOT_DEFER_TO_HUMAN=0 # kick bot when slots fill @@ -89,6 +83,4 @@ bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS EOF -echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini - -exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ +./generate-mapcycle.sh diff --git a/css/configure.sh b/css/configure.sh new file mode 100755 index 0000000..3658d33 --- /dev/null +++ b/css/configure.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./configure-base.sh diff --git a/css/generate-mapcycle.sh b/css/generate-mapcycle.sh new file mode 100755 index 0000000..cc65633 --- /dev/null +++ b/css/generate-mapcycle.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Define the directory containing the maps +MAP_DIR="cstrike/maps" + +# Define the output file +OUTPUT_FILE="cstrike/cfg/mapcycle.txt" + +if [ -f "$OUTPUT_FILE" ]; then + echo "mapcycle.txt detected, no generation required." + exit 0 +fi + +# Initialize the randomize flag to false +RANDOMIZE=${RANDOMIZE_MAP_ORDER:-false} + +# Create or clear the mapcycle.txt file +> "$OUTPUT_FILE" + +# Collect all map names into an array +map_list=() +for map in "$MAP_DIR"/*.bsp; do + map_name=$(basename "$map" .bsp) + map_list+=("$map_name") +done + +# Randomize the map list if the -r flag is set +if [ "$RANDOMIZE" = true ]; then + map_list=($(shuf -e "${map_list[@]}")) +fi + +# Write the map names to the mapcycle.txt file +for map_name in "${map_list[@]}"; do + echo "$map_name" >> "$OUTPUT_FILE" +done + +# Output success message +echo "mapcycle.txt has been generated with $(wc -l < "$OUTPUT_FILE") maps." diff --git a/css/start-css.sh b/css/start-css.sh deleted file mode 100755 index 09c60a6..0000000 --- a/css/start-css.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ -z "$MAP" ]] && MAP="de_dust" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" -[[ -z $SERVER_NUM ]] && SERVER_NUM="1" - -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="$RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="$SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Counterstrike Source (Metamod)" - -# mp config -[[ -z $MP_FRIENDLYFIRE ]] && MP_FRIENDLYFIRE=0 -[[ -z $MP_MAXROUNDS ]] && MP_MAXROUNDS=15 -[[ -z $MP_ROUNDTIME ]] && MP_ROUNDTIME=3.5 -[[ -z $MP_AUTOTEAMBALANCE ]] && MP_AUTOTEAMBALANCE=0 - -# bot config -# how many bots? -[[ -z $BOT_QUOTA ]] && BOT_QUOTA=0 - -# fill = If a player joins, the Bot will be kicked -# normal = If a player joins, the Bot won´t be kicked -[[ -z $BOT_QUOTA_MODE ]] && BOT_QUOTA_MODE=normal - -# bots populate after a player joins the server -# 0 = bots always present -# 1 = bots join after humans -[[ -z $BOT_JOIN_AFTER_PLAYER ]] && BOT_JOIN_AFTER_PLAYER=1 - -# 0 = easy -# 1 = normal -# 2 = hard -# 3 = extreme -[[ -z $BOT_DIFFICULTY ]] && BOT_DIFFICULTY=2 - -[[ -z $BOT_PREFIX ]] && BOT_PREFIX=[BOT] - -# Bots defuse the bombs etc... -# 0 = Bots allowed -# 1 = Humans only) -[[ -z $BOT_DEFER_TO_HUMAN ]] && BOT_DEFER_TO_HUMAN=0 - -# kick bot when slots fill -# 0 = don't kick the bot -# 1 = kick the bot -[[ -z $BOT_AUTO_VACATE ]] && BOT_AUTO_VACATE=1 - -# on, off, radio, minimal, normal -[[ -z $BOT_CHATTER ]] && BOT_CHATTER=minimal - -# bot weapon set -[[ -z $BOT_ALLOW_GRENADES ]] && BOT_ALLOW_GRENADES=1 -[[ -z $BOT_ALLOW_PISTOLS ]] && BOT_ALLOW_PISTOLS=1 -[[ -z $BOT_ALLOW_RIFLES ]] && BOT_ALLOW_RIFLES=1 -[[ -z $BOT_ALLOW_ROGUES ]] && BOT_ALLOW_ROGUES=1 -[[ -z $BOT_ALLOW_SHOTGUNS ]] && BOT_ALLOW_SHOTGUNS=1 -[[ -z $BOT_ALLOW_SNIPERS ]] && BOT_ALLOW_SNIPERS=1 -[[ -z $BOT_ALLOW_MACHINE_GUNS ]] && BOT_ALLOW_MACHINE_GUNS=1 -[[ -z $BOT_ALLOW_SUB_MACHINE_GUNS ]] && BOT_ALLOW_SUB_MACHINE_GUNS=1 - -# Create config file -cat </steam/css/cstrike/cfg/server.cfg -hostname $SV_HOSTNAME -rcon_password $RCON_PASSWORD -sv_password $SV_PASSWORD -mp_friendlyfire $MP_FRIENDLYFIRE -mp_timelimit $MP_TIMELIMIT -mp_maxrounds $MP_MAXROUNDS -mp_roundtime $MP_ROUNDTIME -mp_autoteambalance $MP_AUTOTEAMBALANCE -bot_quota $BOT_QUOTA -bot_quota_mode $BOT_QUOTA_MODE -bot_join_after_player $BOT_JOIN_AFTER_PLAYER -bot_difficulty $BOT_DIFFICULTY -bot_prefix $BOT_PREFIX -bot_defer_to_human $BOT_DEFER_TO_HUMAN -bot_auto_vacate $BOT_AUTO_VACATE -bot_chatter $BOT_CHATTER -bot_allow_grenades $BOT_ALLOW_GRENADES -bot_allow_pistols $BOT_ALLOW_PISTOLS -bot_allow_rifles $BOT_ALLOW_RIFLES -bot_allow_rogues $BOT_ALLOW_ROGUES -bot_allow_shotguns $BOT_ALLOW_SHOTGUNS -bot_allow_snipers $BOT_ALLOW_SNIPERS -bot_allow_machine_guns $BOT_ALLOW_MACHINE_GUNS -bot_allow_sub_machine_guns $BOT_ALLOW_SUB_MACHINE_GUNS -EOF - -echo '"$FULL_ADMINS" "@Full Admins"' > css/addons/sourcemod/configs/admins_simple.ini - -exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/css/start.sh b/css/start.sh new file mode 100755 index 0000000..0adf80e --- /dev/null +++ b/css/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# local vars +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -z "$MAP" ]] && MAP="de_dust" +[[ -z $MAXPLAYERS ]] && MAXPLAYERS="24" + +./configure.sh + +exec ./srcds_run -game cstrike +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/docker_build.sh b/docker_build.sh new file mode 100755 index 0000000..d9e31ff --- /dev/null +++ b/docker_build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +BASE_DIR=$(pwd) +export DOCKER_BUILDKIT=${DOCKER_BUILDKIT:-1} + +mkdir -p .cache + +if [[ -z $1 ]]; then + echo Specify containers to run 'docker build . -t ARG --build-arg CACHE_DATE=$(date)' against/ + echo e.g. 'docker_build.sh base,steamcmd,l4d2,l4d2-metamod' + exit 1 +fi + +for i in $(echo $1 | sed "s/,/ /g") +do + echo "Building ${i}..." + cd ${i} + echo "Using CACHE_DATE in case updates have been made..." + docker build \ + --build-arg CACHE_DATE="$(date)" \ + -t ${i} \ + -t ${i}:latest \ + -t ${i}:$(date +"%Y%m%d-%H%M%S") \ + . + cd ${BASE_DIR} +done + +echo "Done! Bye for now!" diff --git a/dstart.sh b/dstart.sh deleted file mode 100644 index caafffc..0000000 --- a/dstart.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -NET="gameservers" -RESTART="unless-stopped" -DAEMON="-d" -[[ -n $NAME ]] && NAME="--name $NAME" || (echo "set NAME env var" && exit 1) - -docker run $DAEMON --net=$NET --restart=$RESTART $NAME $@ diff --git a/hl2dm/Dockerfile b/hl2dm/Dockerfile deleted file mode 100644 index aa204b5..0000000 --- a/hl2dm/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM steamcmd - -USER steam -WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/hl2dm - -RUN ./steamcmd.sh +login anonymous +force_install_dir ../hl2dm +app_update 232370 +quit - -WORKDIR /steam/hl2dm/ - -ADD start.sh /steam/hl2dm/ - -CMD ["./start.sh"] \ No newline at end of file diff --git a/hl2dm/build.sh b/hl2dm/build.sh deleted file mode 100755 index 7fda5e9..0000000 --- a/hl2dm/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. ../common.sh -docker_build hl2dm diff --git a/insurgency/.dockerignore b/insurgency/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/insurgency/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/insurgency/Dockerfile b/insurgency/Dockerfile new file mode 100644 index 0000000..a9dd7e9 --- /dev/null +++ b/insurgency/Dockerfile @@ -0,0 +1,28 @@ +FROM steamcmd + +USER root + +ENV GAME=insurgency2 +ENV APP_ID=237410 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY . . + +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit + +COPY default_server_cooperative.cfg /steam/insurgency2/insurgency/cfg/default_server_cooperative.cfg + +COPY start.sh \ +./ + +ENTRYPOINT ["./start.sh"] diff --git a/insurgency/README.md b/insurgency/README.md new file mode 100644 index 0000000..b3f74eb --- /dev/null +++ b/insurgency/README.md @@ -0,0 +1,48 @@ +# Insurgency + +Insurgency server with some out-of-the-box configuration. + +## Build notes + +To catch updates since the original image was built, run: + +``` +docker build --build-arg CACHE_DATE="$(date)" +``` + +This will re-use the previously built image as a base instead of re-downloading everything again. + +## Environment variables + +Supports the following default configurations by setting environment variable `GAME_MODE`: + +* ambush +* checkpoint +* conquer +* firefight +* flashpoint +* hunt +* infiltrate +* occupy +* outpost +* push +* skirmish +* strike +* survival + +Other configurable environment variables: + +* `SV_HOSTNAME` +* `SV_PASSWORD` +* `RCON_PASSWORD` +* `LAN` (0 is not, 1 is LAN) +* `MAXPLAYERS` (humans + bots) +* `MAPCYCLEFILE` (look at your local steamapps\common\insurgency2\insurgency) +* `SERVER_CFG` (look at your local steamapps\common\insurgency2\insurgency\cfg) +* `MAP` (map gametype e.g. market skirmish) +* `TICKRATE` + +## Troubleshooting + +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter diff --git a/insurgency/default_server_cooperative.cfg b/insurgency/default_server_cooperative.cfg new file mode 100644 index 0000000..33db0bc --- /dev/null +++ b/insurgency/default_server_cooperative.cfg @@ -0,0 +1,22 @@ +// --------------------------------------------------------------- +// Cooperative Mode Options (server_cooperative.cfg file settings) +// --------------------------------------------------------------- +mapcyclefile "mapcycle_cooperative.txt" // "cooperative" mapcycle - checkpoint only +mp_friendlyfire 1 // friendly fire +mp_tkpunish 0 // How to punish team killing ( 0 = none, 1 = warning, 2 = kill ) +sv_hud_deathmessages 0 // death messages +sv_hud_scoreboard_show_kd 1 // show k:d on scoreboard +sv_hud_targetindicator 1 // show friendly player names when looking at them +mp_timer_pregame 10 // timer for the pre-game (before the game starts, usually after map change or on mp_restartgame 1) +mp_timer_preround 15 // timer for the pre-round (before the round starts, usually after a previous round ends or on mp_restartround 1) +mp_timer_postround 15 // timer for the post-round (after the round starts) +mp_timer_postgame 21 // timer for the post-game (at the end of a game / map rotation) +mp_minteamplayers 1 // min players on each team to start the match +sv_deadvoice 1 // enabling this will allow the dead and living to VOIP each other +sv_deadchat 1 // enabling this will allow the dead and living to chat text each other +sv_deadchat_team 1 // is deadchat limited to just your team? +mp_coop_min_bots 8 // number of bots when there is 1 player on the server +mp_coop_max_bots 26 // number of bots when there are 8 players on the server +mp_coop_min_bot_difficulty 3 // bot difficulty towards the beginning of the mission +mp_coop_max_bot_difficulty 3 // bot difficulty towards the end of the mission +bot_damage 0.6 // the amount of damage bots give off compared to normal players \ No newline at end of file diff --git a/insurgency/start.sh b/insurgency/start.sh new file mode 100755 index 0000000..1144f3b --- /dev/null +++ b/insurgency/start.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -n $MAXPLAYERS ]] && MAXPLAYERS="$MAXPLAYERS" +[[ -n $MP_COOP_LOBBYSIZE ]] && MP_COOP_LOBBYSIZE="$MP_COOP_LOBBYSIZE" + +[[ -z $RCON_PASSWORD ]] && RCON_PASSWORD="changeme" +[[ -n $SV_PASSWORD ]] && SV_PASSWORD=$SV_PASSWORD + +supportedGamemodes=( +ambush +checkpoint +conquer +firefight +flashpoint +hunt +infiltrate +occupy +outpost +push +skirmish +strike +survival +) + +gamemodeSupported="false" +for i in "${supportedGamemodes[@]}" +do + if [ "$i" = "$GAME_MODE" ] ; then + gamemodeSupported="true" + break + fi +done + +[[ -z $GAME_MODE ]] && GAME_MODE=conquer + +if [ "$gamemodeSupported" = "true" ] ; then + printf "Configuring server for $GAME_MODE.\n" +else + printf "Unsupported game mode! Defaulting to conquer. Ignore this message if MAPCYCLEFILE and SERVER_CFG are customized.\n" + GAME_MODE=conquer +fi + +[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="Insurgency - $GAME_MODE" + +[[ -z $MAPCYCLEFILE ]] && MAPCYCLEFILE=mapcycle_"$GAME_MODE".txt +[[ -z $SERVER_CFG ]] && SERVER_CFG=default_server_"$GAME_MODE".cfg + +printf "Using mapcyclefile $MAPCYCLEFILE\n" +printf "Using servercfg $SERVER_CFG\n" + +[[ -z $MAP ]] && MAP="$(head -1 /steam/insurgency2/insurgency/$MAPCYCLEFILE)" +[[ -z $TICKRATE ]] && TICKRATE=64 + +cat </steam/insurgency2/insurgency/cfg/server.cfg +hostname $SV_HOSTNAME +rcon_password $RCON_PASSWORD +sv_password $SV_PASSWORD +mp_coop_lobbysize $MP_COOP_LOBBYSIZE + +"mapcyclefile" "$MAPCYCLEFILE" +EOF + +exec ./srcds_run -game insurgency +maxplayers $MAXPLAYERS +map "$MAP" +sv_lan $LAN -ip 0.0.0.0 -port 27015 -tickrate $TICKRATE -insecure +exec $SERVER_CFG diff --git a/l4d2-metamod/.gitignore b/l4d2-metamod/.gitignore new file mode 100644 index 0000000..6e277c0 --- /dev/null +++ b/l4d2-metamod/.gitignore @@ -0,0 +1 @@ +admins_simple.ini \ No newline at end of file diff --git a/l4d2-metamod/Dockerfile b/l4d2-metamod/Dockerfile new file mode 100644 index 0000000..366e67b --- /dev/null +++ b/l4d2-metamod/Dockerfile @@ -0,0 +1,27 @@ +FROM l4d2 + +USER root + +WORKDIR /steam/l4d2/ +USER steam + +# these can't be set as one block as docker does not set them until the command completes +ENV LEFT4DEAD2_DIR="/steam/l4d2/left4dead2" +ENV ADDONS_DIR="${LEFT4DEAD2_DIR}/addons" +ENV SOURCEMOD_DIR="${ADDONS_DIR}/sourcemod" +ENV SOURCEMOD_EXTENSIONS_DIR="${SOURCEMOD_DIR}/extensions" +ENV SOURCEMOD_PLUGINS_DIR="${SOURCEMOD_DIR}/plugins" +ENV TEMP_DIR="/tmp/download" + +RUN mkdir -p "${SOURCEMOD_EXTENSIONS_DIR}/" \ + && mkdir -p "${SOURCEMOD_PLUGINS_DIR}/" + +COPY download.sh ./ +RUN ./download.sh + +COPY metamod.vdf left4dead2/ +COPY admins_simple.ini "${SOURCEMOD_DIR}/configs/admins_simple.ini" + +RUN rm "${SOURCEMOD_PLUGINS_DIR}/nextmap.smx" + +ENTRYPOINT ["./start.sh"] diff --git a/l4d2-metamod/config-templates/admins_simple.template.ini b/l4d2-metamod/config-templates/admins_simple.template.ini new file mode 100644 index 0000000..9ecdf66 --- /dev/null +++ b/l4d2-metamod/config-templates/admins_simple.template.ini @@ -0,0 +1,45 @@ +// +// READ THIS CAREFULLY! SEE BOTTOM FOR EXAMPLES +// +// For each admin, you need three settings: +// "identity" "permissions" "password" +// +// For the Identity, you can use a SteamID or Name. To use an IP address, prepend a ! character. +// For the Permissions, you can use a flag string and an optional password. +// +// PERMISSIONS: +// Flag definitions are in "admin_levels.cfg" +// You can combine flags into a string like this: +// "abcdefgh" +// +// If you want to specify a group instead of a flag, use an @ symbol. Example: +// "@Full Admins" +// +// You can also specify immunity values. Two examples: +// "83:abcdefgh" //Immunity is 83, flags are abcdefgh +// "6:@Full Admins" //Immunity is 6, group is "Full Admins" +// +// Immunity values can be any number. An admin cannot target an admin with +// a higher access value (see sm_immunity_mode to tweak the rules). Default +// immunity value is 0 (no immunity). +// +// PASSWORDS: +// Passwords are generally not needed unless you have name-based authentication. +// In this case, admins must type this in their console: +// +// setinfo "KEY" "PASSWORD" +// +// Where KEY is the "PassInfoVar" setting in your core.cfg file, and "PASSWORD" +// is their password. With name based authentication, this must be done before +// changing names or connecting. Otherwise, SourceMod will automatically detect +// the password being set. +// +//////////////////////////////// +// Examples: (do not put // in front of real lines, as // means 'comment') +// +// "STEAM_0:1:16" "bce" //generic, kick, unban for this steam ID, no immunity +// "!127.0.0.1" "99:z" //all permissions for this ip, immunity value is 99 +// "BAILOPAN" "abc" "Gab3n" //name BAILOPAN, password "Gab3n": gets reservation, generic, kick +// +//////////////////////////////// + \ No newline at end of file diff --git a/l4d2-metamod/download.sh b/l4d2-metamod/download.sh new file mode 100755 index 0000000..a20cb8a --- /dev/null +++ b/l4d2-metamod/download.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +source /steam/scripts/zip-utils.sh + +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" +tar -xf mm*.tar.gz -C "${LEFT4DEAD2_DIR}/" + +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) +SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" +tar -xf sourcemod*.tar.gz -C "${LEFT4DEAD2_DIR}/" + +# http://www.bailopan.net/stripper/ +curl -o stripper.tar.gz 'http://www.bailopan.net/stripper/files/stripper-1.2.2-linux.tar.gz' +tar -xf stripper.tar.gz -C "${LEFT4DEAD2_DIR}/" + +# Source Scramble (memory patching and allocation natives) +# https://forums.alliedmods.net/showthread.php?p=2657347 +curl -L https://github.com/nosoop/SMExt-SourceScramble/releases/download/0.7.1.4/package.tar.gz > SourceScramble.tar.gz +tar -xf SourceScramble.tar.gz -C "${LEFT4DEAD2_DIR}/" + +# [L4D1&2] Scene Processor +# https://forums.alliedmods.net/showpost.php?p=2766130&postcount=59 +curl -o sceneprocessor.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=192668&d=1639588615' +unzipAndMoveToDir sceneprocessor.zip "${LEFT4DEAD2_DIR}/" diff --git a/l4d2-metamod/metamod.vdf b/l4d2-metamod/metamod.vdf new file mode 100644 index 0000000..9a55ffd --- /dev/null +++ b/l4d2-metamod/metamod.vdf @@ -0,0 +1,5 @@ +"Plugin" +{ + "file" "../left4dead2/addons/metamod/bin/server" +} + diff --git a/l4d2-multislot/.dockerignore b/l4d2-multislot/.dockerignore new file mode 100644 index 0000000..4c60a51 --- /dev/null +++ b/l4d2-multislot/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +Dockerfile +config-templates +README.md diff --git a/l4d2-multislot/.gitignore b/l4d2-multislot/.gitignore new file mode 100644 index 0000000..ee1d511 --- /dev/null +++ b/l4d2-multislot/.gitignore @@ -0,0 +1,3 @@ +l4d_hp_laser.cfg +l4dinfectedbots.cfg +l4dmultislots.cfg \ No newline at end of file diff --git a/l4d2-multislot/Dockerfile b/l4d2-multislot/Dockerfile new file mode 100644 index 0000000..62f0187 --- /dev/null +++ b/l4d2-multislot/Dockerfile @@ -0,0 +1,19 @@ +FROM l4d2-metamod + +WORKDIR /steam/l4d2/ +USER steam + +# <- don't try and refactor this house of cards +COPY download.sh . +RUN ./download.sh + +COPY *.cfg "${LEFT4DEAD2_DIR}/cfg/sourcemod/" + +COPY update_config.sh . +# -/> + +USER root +RUN chown -R steam:steam update_config.sh +USER steam + +ENTRYPOINT ["/bin/bash", "-c", "./update_config.sh && ./start.sh"] diff --git a/l4d2-multislot/README.md b/l4d2-multislot/README.md new file mode 100644 index 0000000..a23bfdf --- /dev/null +++ b/l4d2-multislot/README.md @@ -0,0 +1,7 @@ +# Left 4 Dead 2 - More Slots + +Left 4 Dead 2 server configuration for increasing the default player limits for the various modes (e.g. 8 player campaign, 8v8 versus). + +This also scales the difficulty instead of just allowing more to connect. + +## Plugins diff --git a/l4d2-multislot/config-templates/l4d_hp_laser.template.cfg b/l4d2-multislot/config-templates/l4d_hp_laser.template.cfg new file mode 100644 index 0000000..0552a23 --- /dev/null +++ b/l4d2-multislot/config-templates/l4d_hp_laser.template.cfg @@ -0,0 +1,199 @@ +// 0 = Align the laser left-to-right per client eye angles. (lower performance) +// 1 = Align the laser to center. (better performance) +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_align_center "1" + +// Alpha of the laser beam HP. +// 0 = Invisible, 255 = Fully Visible. +// - +// Default: "240" +// Minimum: "0.000000" +// Maximum: "255.000000" +l4d_hp_laser_alpha "240" + +// Show the laser beam HP to the survivor attacker, by this amount of time in seconds, after hitting a special infected. +// 0 = OFF. +// - +// Default: "0.0" +// Minimum: "0.000000" +l4d_hp_laser_attack_delay "0.0" + +// Show a laser beam HP in white on "black and white" survivors. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_black_and_white "1" + +// Maximum render alpha that a client must be to hide the laser beam HP. +// Useful to hide it on invisible/transparent clients. +// -1 = OFF. +// - +// Default: "0" +// Minimum: "-1.000000" +// Maximum: "255.000000" +l4d_hp_laser_client_alpha_max "0" + +// Allow cookies for storing client preferences. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_cookies "1" + +// Enable/Disable the plugin. +// 0 = Disable, 1 = Enable. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_enable "1" + +// Minimum distance that a client must be from another client to see the laser beam HP. +// 0 = Always visible. +// - +// Default: "0" +// Minimum: "0.000000" +l4d_hp_laser_fade_distance "0" + +// Display a laser beam HP to fill the bar. +// Note: Disable this if you intend to show a lot of laser beams HP. The game limits the number of beams rendered at the same time when limit exceeds it may not draw then all. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_fill "1" + +// Alpha of the laser beam HP that fills the bar. +// 0 = Invisible, 255 = Fully Visible +// - +// Default: "40" +// Minimum: "0.000000" +// Maximum: "255.000000" +l4d_hp_laser_fill_alpha "40" + +// Should the laser beam HP on survivors render in gradient color. +// 0 = OFF. (Game colors: Green 40HP+, Yellow 39HP~25HP, Red 24HP-), 1 = Gradient Mode. +// Note: The Yellow color is defined by the "survivor_limp_health" game cvar. +// - +// Default: "0" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_gradient_color "0" + +// Height of the laser beam HP. +// - +// Default: "2.0" +// Minimum: "0.000000" +l4d_hp_laser_height "2.0" + +// Which teams infected can see a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_infected_team "3" + +// Width of the infected laser beam HP. +// - +// Default: "25.0" +// Minimum: "0.000000" +l4d_hp_laser_infected_width "25.0" + +// Model of the laser beam HP. +// - +// Default: "vgui/white_additive.vmt" +l4d_hp_laser_model "vgui/white_additive.vmt" + +// Which teams should multiply the laser beam HP alpha based on the client render alpha. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "2" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_multiply_alpha_team "2" + +// Render type used to draw the laser beams. +// 0 = Timer (0.1 seconds - less expensive), 1 = OnGameFrame (by frame - more expensive). +// - +// Default: "0" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_render_frame "0" + +// Which special infected should have a laser beam HP. +// 1 = SMOKER, 2 = BOOMER, 4 = HUNTER, 8 = SPITTER, 16 = JOCKEY, 32 = CHARGER, 64 = TANK. +// Add numbers greater than 0 for multiple options. +// Example: "127", enables laser beam HP for all SI. +// - +// Default: "64" +// Minimum: "0.000000" +// Maximum: "127.000000" +l4d_hp_laser_si "64" + +// Show a laser beam HP to the survivor only if the special infected is on sight. +// 0 = OFF, 1 = ON. +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d_hp_laser_sight "1" + +// How many frames should skip while using l4d_hp_laser_render_type = "1" (OnGameFrame). Frames may vary depending on your tickrate. Using a higher value than 2 becomes slower than with the timer on default tick rate (30) +// - +// Default: "1" +// Minimum: "0.000000" +l4d_hp_laser_skip_frame "1" + +// Which teams spectators can see a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_spectator_team "3" + +// Which teams survivors can see a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_survivor_team "3" + +// Width of the survivor laser beam HP. +// - +// Default: "15.0" +// Minimum: "0.000000" +l4d_hp_laser_survivor_width "15.0" + +// Which teams should have a laser beam HP. +// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. +// Add numbers greater than 0 for multiple options. +// Example: "3", enables for SURVIVOR and INFECTED. +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "15.000000" +l4d_hp_laser_team "1" + +// Additional Z axis distance of laser beam HP based on client position. +// - +// Default: "85" +// Minimum: "0.000000" +l4d_hp_laser_z_axis "85" \ No newline at end of file diff --git a/l4d2-multislot/config-templates/l4dinfectedbots.template.cfg b/l4d2-multislot/config-templates/l4dinfectedbots.template.cfg new file mode 100644 index 0000000..eabf908 --- /dev/null +++ b/l4d2-multislot/config-templates/l4dinfectedbots.template.cfg @@ -0,0 +1,164 @@ +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_default_commonlimit' each 'l4d_infectedbots_add_commonlimit_scale' players joins +l4d_infectedbots_add_commonlimit "2" + +// If server has more than 4+ alive players, zombie common limit = 'default_commonlimit' + [(alive players - 4) ÷ 'add_commonlimit_scale' × 'add_commonlimit']. +l4d_infectedbots_add_commonlimit_scale "1" + +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_max_specials' each 'l4d_infectedbots_add_specials_scale' players joins +l4d_infectedbots_add_specials "2" + +// If server has more than 4+ alive players, how many special infected = 'max_specials' + [(alive players - 4) ÷ 'add_specials_scale' × 'add_specials']. +l4d_infectedbots_add_specials_scale "2" + +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_default_tankhealth' each 'l4d_infectedbots_add_tankhealth_scale' players joins +l4d_infectedbots_add_tankhealth "500" + +// If server has more than 4+ alive players, how many Tank Health = 'default_tankhealth' + [(alive players - 4) ÷ 'add_tankhealth_scale' × 'add_tankhealth']. +l4d_infectedbots_add_tankhealth_scale "1" + +// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_tank_limit' each 'l4d_infectedbots_add_tanklimit_scale' players joins +l4d_infectedbots_add_tanklimit "1" + +// If server has more than 4+ alive players, how many tanks on the field = 'tank_limit' + [(alive players - 4) ÷ 'add_tanklimit_scale' × 'add_tanklimit']. +l4d_infectedbots_add_tanklimit_scale "3" + +// If 1, adjust and overrides zombie common limit by this plugin. +l4d_infectedbots_adjust_commonlimit_enable "1" + +// Reduce certain value to maximum spawn timer based per alive player +l4d_infectedbots_adjust_reduced_spawn_times_on_player "1" + +// If 1, The plugin will adjust spawn timers depending on the gamemode +l4d_infectedbots_adjust_spawn_times "1" + +// If 1, adjust and overrides tank health by this plugin. +l4d_infectedbots_adjust_tankhealth_enable "1" + +// 0=Plugin off, 1=Plugin on. +l4d_infectedbots_allow "1" + +// If 1, announce current plugin status when the number of alive survivors changes. +l4d_infectedbots_announcement_enable "1" + +// Sets the limit for boomers spawned by the plugin +l4d_infectedbots_boomer_limit "2" + +// Sets the limit for chargers spawned by the plugin +l4d_infectedbots_charger_limit "2" + +// If 1, players can join the infected team in coop/survival/realism (!ji in chat to join infected, !js to join survivors) +l4d_infectedbots_coop_versus "1" + +// If 1, clients will be announced to on how to join the infected team +l4d_infectedbots_coop_versus_announce "1" + +// If 1, human infected player will spawn as ghost state in coop/survival/realism. +l4d_infectedbots_coop_versus_human_ghost_enable "1" + +// If 1, attaches red flash light to human infected player in coop/survival/realism. (Make it clear which infected bot is controlled by player) +l4d_infectedbots_coop_versus_human_light "1" + +// Sets the limit for the amount of humans that can join the infected team in coop/survival/realism +l4d_infectedbots_coop_versus_human_limit "2" + +// Players with these flags have access to join infected team in coop/survival/realism. (Empty = Everyone, -1: Nobody) +l4d_infectedbots_coop_versus_join_access "z" + +// If 1, tank will always be controlled by human player in coop/survival/realism. +l4d_infectedbots_coop_versus_tank_playable "0" + +// If 1, bots will only spawn when all other bot spawn timers are at zero +l4d_infectedbots_coordination "0" + +// Sets Default zombie common limit. +l4d_infectedbots_default_commonlimit "30" + +// Sets Default Health for Tank, Tank hp is affected by gamemode and difficulty (Example, Set Tank health 4000hp, but in Easy: 3000, Normal: 4000, Versus: 6000, Advanced/Expert: 8000) +l4d_infectedbots_default_tankhealth "4000" + +// Sets the limit for hunters spawned by the plugin +l4d_infectedbots_hunter_limit "2" + +// Toggle whether Infected HUD announces itself to clients. +l4d_infectedbots_infhud_announce "1" + +// Toggle whether Infected HUD is active or not. +l4d_infectedbots_infhud_enable "1" + +// The spawn timer in seconds used when infected bots are spawned for the first time in a map +l4d_infectedbots_initial_spawn_timer "10" + +// Sets the limit for jockeys spawned by the plugin +l4d_infectedbots_jockey_limit "2" + +// Amount of seconds before a special infected bot is kicked +l4d_infectedbots_lifespan "30" + +// Defines how many special infected can be on the map on all gamemodes(does not count witch on all gamemodes, count tank in all gamemode) +l4d_infectedbots_max_specials "2" + +// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all). +l4d_infectedbots_modes "" + +// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none). +l4d_infectedbots_modes_off "" + +// Turn on the plugin in these game modes. 0=All, 1=Coop/Realism, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together. +l4d_infectedbots_modes_tog "5" + +// If 1, spawn special infected before survivors leave starting safe room area. +l4d_infectedbots_safe_spawn "0" + +// Disable sm_zs in these gamemode (0: None, 1: coop/realism, 2: versus/scavenge, 4: survival, add numbers together) +l4d_infectedbots_sm_zs_disable_gamemode "6" + +// Sets the limit for smokers spawned by the plugin +l4d_infectedbots_smoker_limit "2" + +// The minimum of spawn range for infected in final stage rescue. (coop/realism only) +l4d_infectedbots_spawn_range_final "0" + +// The maximum of spawn range for infected. (default: 1500, coop/realism only) +l4d_infectedbots_spawn_range_max "2000" + +// The minimum of spawn range for infected. (default: 550, coop/realism only) +l4d_infectedbots_spawn_range_min "400" + +// Sets the max spawn time for special infected spawned by the plugin in seconds. +l4d_infectedbots_spawn_time_max "60" + +// Sets the minimum spawn time for special infected spawned by the plugin in seconds. +l4d_infectedbots_spawn_time_min "40" + +// If 1, Plugin will disable spawning infected bot when a tank is on the field. +l4d_infectedbots_spawns_disabled_tank "0" + +// Sets the limit for spitters spawned by the plugin +l4d_infectedbots_spitter_limit "2" + +// Sets the limit for tanks spawned by the plugin (does not affect director tanks) +l4d_infectedbots_tank_limit "1" + +// If 1, still spawn tank in final stage rescue (does not affect director tanks) +l4d_infectedbots_tank_spawn_final "1" + +// When each time spawn S.I., how much percent of chance to spawn tank +l4d_infectedbots_tank_spawn_probability "5" + +// If 1, The plugin will force all players to the infected side against the survivor AI for every round and map in versus/scavenge +l4d_infectedbots_versus_coop "0" + +// Amount of seconds before a witch is kicked. (only remove witches spawned by this plugin) +l4d_infectedbots_witch_lifespan "200" + +// Sets the limit for witches spawned by the plugin (does not affect director witches) +l4d_infectedbots_witch_max_limit "6" + +// If 1, still spawn witch in final stage rescue +l4d_infectedbots_witch_spawn_final "0" + +// Sets the max spawn time for witch spawned by the plugin in seconds. +l4d_infectedbots_witch_spawn_time_max "120.0" + +// Sets the mix spawn time for witch spawned by the plugin in seconds. +l4d_infectedbots_witch_spawn_time_min "90.0" \ No newline at end of file diff --git a/l4d2-multislot/config-templates/l4dmultislots.template.cfg b/l4d2-multislot/config-templates/l4dmultislots.template.cfg new file mode 100644 index 0000000..ce72626 --- /dev/null +++ b/l4d2-multislot/config-templates/l4dmultislots.template.cfg @@ -0,0 +1,31 @@ +// When 5+ new player joins the server but no any bot can be taken over, the player will appear as a dead survivor if survivors have left start safe area for at least X seconds. (0=Always spawn alive bot for new player) +l4d_multislots_alive_bot_time "0" + +// Setup time interval the instruction message to spectator.(0=off) +l4d_multislots_spec_message_interval "25" + +// Kick AI Survivor bots if numbers of survivors has exceeded the certain value. (does not kick real player, minimum is 4) +l4d_multislots_max_survivors "4" + +// If 1, Spawn 5+ survivor bots when round starts. (Numbers depends on Convar l4d_multislots_max_survivors) +l4d_multislots_spawn_survivors_roundstart "0" + +// If 1, when same player reconnect the server or rejoin survivor team but no any bot can be taken over, give him a dead bot. (0=Always spawn alive bot for same player) +l4d_multislots_no_second_free_spawn "0" + +// Amount of HP a new 5+ Survivor will spawn with (Def 80) +l4d_multislots_respawnhp "80" + +// Amount of buffer HP a new 5+ Survivor will spawn with (Def 20) +l4d_multislots_respawnbuffhp "20" + +// (L4D2) First slot weapon for new 5+ Survivor (1-Autoshot, 2-SPAS, 3-M16, 4-SCAR, 5-AK47, 6-SG552, 7-Mil Sniper, 8-AWP, 9-Scout, 10=Hunt Rif, 11=M60, 12=GL, 13-SMG, 14-Sil SMG, 15=MP5, 16-Pump Shot, 17=Chrome Shot, 18=Rand T1, 19=Rand T2, 20=Rand T3, 0=off) +// GL = Grenade Launcher +// Rand T3 = M60 or Grenade Launcher +l4d_multislots_firstweapon "19" + +// (L4D2) Second slot weapon for new 5+ Survivor (1- Dual Pistol, 2-Magnum, 3-Chainsaw, 4-Fry Pan, 5-Katana, 6-Shovel, 7-Golfclub, 8-Machete, 9-Cricket, 10=Fireaxe, 11=Knife, 12=Bball Bat, 13=Crowbar, 14=Pitchfork, 15=Guitar, 16=Random, 0=Only Pistol) +l4d_multislots_secondweapon "16" + +// (L4D2) Third slot weapon for new 5+ Survivor (1 - Moltov, 2 - Pipe Bomb, 3 - Bile Jar, 4=Random, 0=off) +l4d_multislots_thirdweapon "4" \ No newline at end of file diff --git a/l4d2-multislot/download.sh b/l4d2-multislot/download.sh new file mode 100755 index 0000000..b863258 --- /dev/null +++ b/l4d2-multislot/download.sh @@ -0,0 +1,126 @@ +#!/bin/bash + +set -e + +source /steam/scripts/zip-utils.sh + +# [L4D(2)] MultiSlots Improved Version 4.0 (2021/8/25) +# https://forums.alliedmods.net/showpost.php?p=2715546&postcount=249 +curl -o l4dmultislots.zip 'https://web.archive.org/web/20220412091610if_/https://forums.alliedmods.net/attachment.php?s=cd319686aceb67ab3b0f13e22acaf327&attachmentid=193689&d=1644757794' +unzipAndMoveToDir l4dmultislots.zip "${SOURCEMOD_DIR}/" "l4dmultislots" + +# Left 4 DHooks Direct +# https://forums.alliedmods.net/showthread.php?t=321696 +curl -o l4dhooks.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=195507&d=1660658623' +unzipAndMoveToDir l4dhooks.zip "${ADDONS_DIR}/" + +# L4DToolZ Metamod plugin (l4d1 & l4d2) +# https://forums.alliedmods.net/showpost.php?p=2761018&postcount=1502 +curl -o l4dtoolz.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=191943&d=1634657491' +unzipAndMoveToDir l4dtoolz.zip "${LEFT4DEAD2_DIR}/" + +# Left 4 Dead 2 - CreateSurvivorBot +# https://forums.alliedmods.net/showthread.php?p=2729883 +curl -o CreateSurvivorBot.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=185769&d=1608745336' +unzipAndMoveToDir CreateSurvivorBot.zip "${SOURCEMOD_DIR}/" + +# [INC] Multi Colors +# https://forums.alliedmods.net/showthread.php?t=247770 +curl -L 'https://github.com/Bara/Multi-Colors/archive/refs/heads/master.zip' > multicolors.zip +unzipAndMoveToDir multicolors.zip "${ADDONS_DIR}/" "Multi-Colors-master/addons" + + +# Various fixes for 8 player Coop +# Following guide at https://forums.alliedmods.net/showpost.php?p=2756041&postcount=220 + +# LEFT 4 FIX + +# [L4D2]Defib_Fix[Left 4 Fix][28/02/2023] +# https://forums.alliedmods.net/showthread.php?p=2647018 +curl -o Defib_Fix.zip 'https://web.archive.org/web/20240609154929if_/https://forums.alliedmods.net/attachment.php?attachmentid=199744&d=1677587553' +unzipLzmaAndMoveToDir Defib_Fix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D2]Charger_Collision_patch[Left 4 Fix][05/03/2024] +# https://forums.alliedmods.net/showthread.php?t=315482 +curl -o Charger_Collision_patch.zip 'https://web.archive.org/web/20240614133204if_/https://forums.alliedmods.net/attachment.php?attachmentid=203585&d=1709629833' +unzipLzmaAndMoveToDir Charger_Collision_patch.zip "${ADDONS_DIR}/" + +# [L4D & L4D2]Witch fixes[Left 4 Fix][29/05/2024] +# https://forums.alliedmods.net/showthread.php?p=2647014 +curl -o witchfixes.zip 'https://web.archive.org/web/20240609232653if_/https://forums.alliedmods.net/attachment.php?attachmentid=204480&d=1717034682' +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_allow_in_safezone" +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/Witch_Double_Startle_Fix" +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_prevent_target_loss" +unzipLzmaAndMoveToDir witchfixes.zip "${SOURCEMOD_DIR}/" "witch/witch_target_patch" + +# [L4D & L4D2]Physics Object Pushfix[Left 4 Fix][28/02/2023] +# https://forums.alliedmods.net/showthread.php?p=2705656#post2705656 +curl -o physics_object_pushfix.zip 'https://web.archive.org/web/20240616022730if_/https://forums.alliedmods.net/attachment.php?attachmentid=183790&d=1600989720' +unzipLzmaAndMoveToDir physics_object_pushfix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D1 & L4D2]Survivor_AFK_Fix[Left 4 Fix][28/02/2023] +# https://forums.alliedmods.net/showthread.php?p=2714236 +curl -o survivor_afk_fix.zip 'https://web.archive.org/web/20240614062222if_/https://forums.alliedmods.net/attachment.php?attachmentid=189803&d=1623834645' +unzipLzmaAndMoveToDir survivor_afk_fix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D2] Proper Changelevel [Left 4 Fix] [02/10/2020] +# https://forums.alliedmods.net/showthread.php?p=2669850 +curl -o l4d2_levelchanging.zip 'https://web.archive.org/web/20240610013641if_/https://forums.alliedmods.net/attachment.php?attachmentid=178784&d=1576565208' +unzipLzmaAndMoveToDir l4d2_levelchanging.zip "${LEFT4DEAD2_DIR}/" + +# OTHER FIXES + +# [L4D1?/2] 5+ Survivor Friendly Fire Quote Fix +# https://forums.alliedmods.net/showthread.php?t=321127 +curl -o SceneAdjustments.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=179550' +mv SceneAdjustments.smx "${SOURCEMOD_PLUGINS_DIR}/" + +# [L4D2] Upgrade Pack Fixes +# https://forums.alliedmods.net/showthread.php?t=322824 +curl -o lfd_both_fixUpgradePack.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=190948' +mv lfd_both_fixUpgradePack.smx "${SOURCEMOD_PLUGINS_DIR}/" +curl -o upgradepackfix.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=180585&d=1586095821' +mv upgradepackfix.txt "${SOURCEMOD_DIR}/gamedata/" + +# Pre-Update Talker +# https://steamcommunity.com/sharedfiles/filedetails/?id=2247536739 +curl -o 'myl4d2addons_original_talker.vpk' https://steamusercontent-a.akamaihd.net/ugc/1713043370483788074/0976B1E654208FA422B6B99A4AD1FA23764071FC/ +mv myl4d2addons_original_talker.vpk "${ADDONS_DIR}/" + +# L4D2-PLUGINS + +# https://github.com/fbef0102/L4D2-Plugins +sparseCloneAndMove 'https://github.com/fbef0102/L4D2-Plugins' "l4d2_ty_saveweapons" "${SOURCEMOD_DIR}" + +# [L4D2]Character_manager (1.4.1 - 22/09/2019 ) +# https://forums.alliedmods.net/showthread.php?t=309601 +curl -o l4d2_character_manager.smx 'https://forums.alliedmods.net/attachment.php?attachmentid=177489&d=1569152696' +mv l4d2_character_manager.smx "${SOURCEMOD_PLUGINS_DIR}/" +curl -o l4d2_character_manager.txt 'https://forums.alliedmods.net/attachment.php?attachmentid=171266&d=1536205521' +mv l4d2_character_manager.txt "${SOURCEMOD_DIR}/gamedata" +curl -o Stripper_passingfix.7z 'https://forums.alliedmods.net/attachment.php?attachmentid=171117&d=1535074649' +un7zipAndMoveToDir Stripper_passingfix.7z "${SOURCEMOD_DIR}/" + +# 8 survivors in the rescue vehicle +# https://forums.alliedmods.net/showpost.php?p=2726779&postcount=38 +curl -o 8_survivors_stripper.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=185247&d=1606736574' +unzipAndMoveToDir 8_survivors_stripper.zip "${ADDONS_DIR}/stripper/maps" + +# [L4D2] Team Kill Reactions Vocalize Fix +# https://forums.alliedmods.net/showthread.php?p=2273230 +curl -o TeamkillReactionsFix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=143150&d=1426251346' +unzipAndMoveToDir TeamkillReactionsFix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D2] Survivor Clones Hunter Pounced Warning Fix +# https://forums.alliedmods.net/showthread.php?p=2202855 +curl -o survivor_hunter_pounced_clones_fix.zip 'https://forums.alliedmods.net/attachment.php?attachmentid=138291&d=1411731048' +unzipAndMoveToDir survivor_hunter_pounced_clones_fix.zip "${LEFT4DEAD2_DIR}/" + +# [L4D1 & L4D2] HP Laser [v1.0.9 | 14-November-2021] +# https://forums.alliedmods.net/showthread.php?p=2736513 +curl -o l4d_hp_laser.smx 'https://www.sourcemod.net/vbcompiler.php?file_id=189361' +mv l4d_hp_laser.smx "${SOURCEMOD_PLUGINS_DIR}/" + +# Infected Bots Control Improved Version 2.7.3 (2024/03/25) +# https://forums.alliedmods.net/showthread.php?p=2699220#post2699220 +sparseCloneAndMove https://github.com/fbef0102/L4D1_2-Plugins.git "l4dinfectedbots" "${SOURCEMOD_DIR}" diff --git a/l4d2-multislot/update_config.sh b/l4d2-multislot/update_config.sh new file mode 100755 index 0000000..e9af2b3 --- /dev/null +++ b/l4d2-multislot/update_config.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +set -e + +export MAX_PLAYERS=${MAX_PLAYERS:-8} + +# update config file +cat <> /steam/l4d2/left4dead2/cfg/server.cfg +upgrade_denied_sound "1" - Play sound when ammo already used +upgrade_block_glauncher "1" - "Block use of special ammo with grenade launcher (0 - Allow | 1 - Block any | 2 - Block incendiary | 3 - Block explosive) +upgrade_incendiary_multi "1.0" - Incendiary ammo multiplier on pickup +upgrade_explosive_multi "1.0" - Explosive ammo multiplier on pickup + +sv_maxplayers "${MAX_PLAYERS}" - max human players that can join your server. -1 to disable and use standart check (range 0 to 32) +sv_removehumanlimit "1" - remove kick for players when they are more than 8 for vs and 4 for coop(0 to disable, 1 to enable) +sv_force_unreserved "0" - if you set it to 1 before connection from lobby your server will stay unreserved and allow players to connect using connect command, this command sets sv_allow_lobby_connect_only 0, so you need to create lobby using ms_force_dedicated_server and then connect to server, your friends may see wrong max players in friend lobby, so give them ip. + +- keep this at the end +sm plugins reload sceneadjustments.smx +EOF + +# create l4d2_character_manager config +cat < /steam/l4d2/left4dead2/cfg/sourcemod/l4d2_character_manager.cfg +l4d2_character_manager_version + +// Should enable identity fix for players(NOT BOTS) 0 = (disable) 1 = (enabled) +// - +// Default: "1" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d2_identity_fix "1" + +// survivor set you wish to use, 0 = (use map default), 1 = (l4d1), 2 = (l4d2), 3 = (use both) +// - +// Default: "3" +// Minimum: "0.000000" +// Maximum: "3.000000" +l4d2_survivor_set "3" + +// Should manage people aswell as bots? 0 = (disable) 1 = (enabled) (Will overwrite identityfix when taking over a bot) +// - +// Default: "0" +// Minimum: "0.000000" +// Maximum: "1.000000" +l4d2_manage_people "0" +EOF diff --git a/l4d2/.dockerignore b/l4d2/.dockerignore new file mode 100644 index 0000000..7d480a6 --- /dev/null +++ b/l4d2/.dockerignore @@ -0,0 +1,8 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore +.git diff --git a/l4d2/.gitignore b/l4d2/.gitignore new file mode 100644 index 0000000..d1edc99 --- /dev/null +++ b/l4d2/.gitignore @@ -0,0 +1 @@ +server.cfg \ No newline at end of file diff --git a/l4d2/Dockerfile b/l4d2/Dockerfile index 0342b6b..e973b56 100644 --- a/l4d2/Dockerfile +++ b/l4d2/Dockerfile @@ -1,16 +1,26 @@ FROM steamcmd -# Dear srcds, plz don't crash. We have brought you these offerings. USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 + +ENV GAME=l4d2 +ENV APP_ID=222860 + +WORKDIR /steam/${GAME}/ + +RUN chown -R steam /steam/${GAME}/ USER steam -RUN mkdir -p /steam/l4d2 -WORKDIR /steam/steamcmd_linux -RUN ./steamcmd.sh +login anonymous +force_install_dir ../l4d2 +app_update 222860 +quit +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit -WORKDIR /steam/l4d2/ -ADD start*.sh . +COPY configure.sh \ + start.sh ./ +COPY server.cfg left4dead2/cfg/ + +USER root +RUN chown steam:steam left4dead2/cfg/server.cfg +USER steam -CMD ["./start-l4d2.sh"] +ENTRYPOINT ["./start.sh"] diff --git a/l4d2/README.md b/l4d2/README.md index 28e1ee3..9870748 100644 --- a/l4d2/README.md +++ b/l4d2/README.md @@ -4,3 +4,6 @@ * Sort of annoying * Default mode is versus * You must have enough people join the server or it boots everyone + +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter diff --git a/l4d2/build.sh b/l4d2/build.sh deleted file mode 100755 index 56c9a62..0000000 --- a/l4d2/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build l4d2 diff --git a/l4d2/config-templates/server.template.cfg b/l4d2/config-templates/server.template.cfg new file mode 100644 index 0000000..01e386e --- /dev/null +++ b/l4d2/config-templates/server.template.cfg @@ -0,0 +1,83 @@ +hostname "Your Server Name Here" +rcon_password yourpass + +// This states how players should contact you +sv_contact your@email.com + +// # of rounds to play (versus) +mp_roundlimit 2 + +// Use a search key to find the server in the lobby +//sv_search_key "" +//sv_tags "" + +// STEAM GROUP +sv_steamgroup GROUPIDHERE + +//FRIENDLY FIRE 1=ON 0=OFF +sm_cvar survivor_friendly_fire_factor_easy 1 +sm_cvar survivor_friendly_fire_factor_expert 1 +sm_cvar survivor_friendly_fire_factor_hard 1 +sm_cvar survivor_friendly_fire_factor_normal 1 + +// CHEAT/CONFIG +sv_lan 0 +sv_cheats 0 +sv_consistency 1 +sv_maxcmdrate 101 +sv_maxrate 30000 + +//MOTD +motd_enabled 1 + +//GAME MODE +sv_gametypes "coop, versus, mutation" +sm_cvar mp_gamemode coop + +//DIFFICULTY +z_difficulty Impossible + +//LOBBY CONNECT +sv_allow_lobby_connect_only 0 + +//Game Settings + +mp_disable_autokick 1 //(command)prevents a userid from being auto-kicked (Usage mp_diable_autokick ) +sv_allow_wait_command 0 //default 1; Allow or disalow the wait command on clients connected to this server. +sv_alternateticks 0 //defulat 0; (singleplayer)If set, server only simulates entities on even numbered ticks. +sv_clearhinthistory 0 //(command)Clear memory of server side hint displayed to the player. +sv_consistency 0 //default 1; Whether the server enforces file consistency for critical files +sv_pausable 0 //default 0; is the server pausable +sv_forcepreload 1 //default 0; Force server side preloading +sv_pure_kick_clients 0 //default 1; If set to 1, the server will kick clients with mismatchng files. Otherwise, it will issue a warning to the client. +sv_pure 0 //If set to 1, server will force all client files execpt whitelisted ones (in pure_server_whitelist.txt) to match server's files. + //If set to 2, the server will force all clietn files to come from steam and not load pure_server_whilelist.txt. Set to 0 for disabled. + +// Communication + +sv_voiceenable 1 //default 1; enable/disable voice comm +sv_alltalk 1 //default 0; Players can hear all other players' voice communication, no team restrictions + +// Logging +log on //Creates a logfile (on | off) +sv_logecho 0 //default 0; Echo log information to the console. +sv_logfile 1 //default 1; Log server information in the log file. +sv_log_onefile 0 //default 0; Log server information to only one file. +sv_logbans 1 //default 0;Log server bans in the server logs. +sv_logflush 0 //default 0; Flush the log files to disk on each write (slow). +sv_logsdir logs //Folder in the game directory where server logs will be stored. + +// Bans +// execute banned.cfgs at server start. Optimally at launch commandline. +exec banned_user.cfg //loads banned users' ids +exec banned_ip.cfg //loads banned users' ips +writeip // Save the ban list to banned_ip.cfg. +writeid // Wrties a list of permanently-banned user IDs to banned_user.cfg. + +//Network Tweaks - Increase network performance + +rate 10000 //default 10000; Max bytes/sec the host can recieve data +sv_minrate 15000 //default "5000"; Min bandwidth rate allowed on server, 0 = unlimited +sv_maxrate 30000 //default "0"; Max bandwidth rate allowed on server, 0 = unlimited +sv_mincmdrate 20 //default 0; This sets the minimum value for cl_cmdrate. 0 = unlimited [cevo=67] +sv_maxcmdrate 33 //default 40; (If sv_mincmdrate is > 0), this sets the maximum value for cl_cmdrate. [cevo=101] diff --git a/l4d2/configure.sh b/l4d2/configure.sh new file mode 100755 index 0000000..1a052dc --- /dev/null +++ b/l4d2/configure.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +export HOSTNAME="${HOSTNAME:-My L4D2 Server}" +export SV_CONTACT="${SV_CONTACT:-your@email.com}" +export LAN="${LAN:-0}" +export MP_GAMEMODE="${MP_GAMEMODE:-coop}" +export DIFFICULTY="${DIFFICULTY:-hard}" +export MAX_PLAYERS="${MAX_PLAYERS:-8}" +export PAUSABLE="${PAUSABLE:-0}" +export SV_VOICE_ENABLE="${SV_VOICE_ENABLE:-1}" + +sed -i "s/hostname.\+/hostname ${HOSTNAME}/g" left4dead2/cfg/server.cfg +sed -i "s/sv_lan.\+/sv_lan ${LAN}/g" left4dead2/cfg/server.cfg +sed -i "s/sm_cvar mp_gamemode .\+/sm_cvar mp_gamemode ${MP_GAMEMODE}/g" left4dead2/cfg/server.cfg +sed -i "s/z_difficulty.\+/z_difficulty ${DIFFICULTY}/g" left4dead2/cfg/server.cfg + +sed -i "s/^l4d_maxplayers.\+/l4d_maxplayers "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg +sed -i "s/sv_maxplayers.\+/sv_maxplayers "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg +sed -i "s/sm_cvar l4d_maxplayers.\+/sm_cvar l4d_maxplayers "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg + +sed -i "s/sm_cvar l4d_survivor_limit.\+/sm_cvar l4d_survivor_limit "${MAX_PLAYERS}"/g" left4dead2/cfg/server.cfg +sed -i "s/sv_pausable.\+/sv_pausable ${PAUSABLE}/g" left4dead2/cfg/server.cfg +sed -i "s/sv_voiceenable.\+/sv_voiceenable ${SV_VOICE_ENABLE}/g" left4dead2/cfg/server.cfg diff --git a/l4d2/start-l4d2.sh b/l4d2/start-l4d2.sh deleted file mode 100755 index 6099af5..0000000 --- a/l4d2/start-l4d2.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# local vars -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" -[[ -z "$MAP" ]] && MAP="c1m4_atrium" -[[ -z "$GAME_MODE" ]] && GAME_MODE="versus" -[[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" - -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="L4D2 Server" - -# Create config file -cat </steam/l4d2/left4dead2/cfg/server.cfg -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -EOF - -# Run dedicated server -exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip 0.0.0.0 +map $MAP -usercon +mp_gamemode $GAME_MODE +sv_gametypes $GAME_MODE -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/l4d2/start.sh b/l4d2/start.sh new file mode 100755 index 0000000..ca4bfdb --- /dev/null +++ b/l4d2/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +# local vars +[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" +[[ -z $SERVER_IP ]] && SERVER_IP=0.0.0.0 +[[ -z "$MAP" ]] && MAP="c1m4_atrium" +[[ -z $MAXPLAYERS ]] && MAXPLAYERS="8" +[[ -z $MP_GAMEMODE ]] && MP_GAMEMODE="versus" + +./configure.sh + +exec ./srcds_run -game left4dead2 +sv_lan $LAN +ip $SERVER_IP +map $MAP +mp_gamemode $MP_GAMEMODE -usercon -port 27015 -maxplayers $MAXPLAYERS -secure $OTHER_ARGS $@ diff --git a/7daystodie/Dockerfile b/legacy/7daystodie/Dockerfile similarity index 100% rename from 7daystodie/Dockerfile rename to legacy/7daystodie/Dockerfile diff --git a/7daystodie/README.md b/legacy/7daystodie/README.md similarity index 100% rename from 7daystodie/README.md rename to legacy/7daystodie/README.md diff --git a/7daystodie/build.sh b/legacy/7daystodie/build.sh similarity index 100% rename from 7daystodie/build.sh rename to legacy/7daystodie/build.sh diff --git a/7daystodie/mounts b/legacy/7daystodie/mounts similarity index 100% rename from 7daystodie/mounts rename to legacy/7daystodie/mounts diff --git a/7daystodie/start.sh b/legacy/7daystodie/start.sh similarity index 100% rename from 7daystodie/start.sh rename to legacy/7daystodie/start.sh diff --git a/armagetron/.dockerignore b/legacy/armagetron/.dockerignore similarity index 100% rename from armagetron/.dockerignore rename to legacy/armagetron/.dockerignore diff --git a/armagetron/Dockerfile b/legacy/armagetron/Dockerfile similarity index 100% rename from armagetron/Dockerfile rename to legacy/armagetron/Dockerfile diff --git a/armagetron/README.md b/legacy/armagetron/README.md similarity index 100% rename from armagetron/README.md rename to legacy/armagetron/README.md diff --git a/armagetron/build.sh b/legacy/armagetron/build.sh similarity index 100% rename from armagetron/build.sh rename to legacy/armagetron/build.sh diff --git a/armagetron/download.sh b/legacy/armagetron/download.sh similarity index 100% rename from armagetron/download.sh rename to legacy/armagetron/download.sh diff --git a/armagetron/install.sh b/legacy/armagetron/install.sh similarity index 100% rename from armagetron/install.sh rename to legacy/armagetron/install.sh diff --git a/armagetron/run b/legacy/armagetron/run similarity index 100% rename from armagetron/run rename to legacy/armagetron/run diff --git a/armagetron/start-ffa.sh b/legacy/armagetron/start-ffa.sh similarity index 100% rename from armagetron/start-ffa.sh rename to legacy/armagetron/start-ffa.sh diff --git a/conan-exile/Dockerfile b/legacy/conan-exile/Dockerfile similarity index 100% rename from conan-exile/Dockerfile rename to legacy/conan-exile/Dockerfile diff --git a/conan-exile/README.md b/legacy/conan-exile/README.md similarity index 100% rename from conan-exile/README.md rename to legacy/conan-exile/README.md diff --git a/conan-exile/build.sh b/legacy/conan-exile/build.sh similarity index 100% rename from conan-exile/build.sh rename to legacy/conan-exile/build.sh diff --git a/conan-exile/start-conan.sh b/legacy/conan-exile/start-conan.sh similarity index 100% rename from conan-exile/start-conan.sh rename to legacy/conan-exile/start-conan.sh diff --git a/csgo-comp/Dockerfile b/legacy/csgo-comp/Dockerfile similarity index 100% rename from csgo-comp/Dockerfile rename to legacy/csgo-comp/Dockerfile diff --git a/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg b/legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg rename to legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_off.cfg diff --git a/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg b/legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg rename to legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sm_warmode_on.cfg diff --git a/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg b/legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg rename to legacy/csgo-comp/PAXAUS2016/first_run/cfg/sourcemod/sourcemod.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/csgo-server.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/gamemode_competitive_server.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/server.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/server.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/server.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/server.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/on_map_load.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_global.cfg diff --git a/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg b/legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg similarity index 100% rename from csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg rename to legacy/csgo-comp/PAXAUS2016/second_run/cfg/warmod/ruleset_overtime.cfg diff --git a/csgo-comp/build.sh b/legacy/csgo-comp/build.sh similarity index 100% rename from csgo-comp/build.sh rename to legacy/csgo-comp/build.sh diff --git a/csgo-comp/start-comp.sh b/legacy/csgo-comp/start-comp.sh similarity index 100% rename from csgo-comp/start-comp.sh rename to legacy/csgo-comp/start-comp.sh diff --git a/csgo-ebot/Dockerfile b/legacy/csgo-ebot/Dockerfile similarity index 100% rename from csgo-ebot/Dockerfile rename to legacy/csgo-ebot/Dockerfile diff --git a/csgo-ebot/build.sh b/legacy/csgo-ebot/build.sh similarity index 100% rename from csgo-ebot/build.sh rename to legacy/csgo-ebot/build.sh diff --git a/csgo-ebot/download.sh b/legacy/csgo-ebot/download.sh similarity index 100% rename from csgo-ebot/download.sh rename to legacy/csgo-ebot/download.sh diff --git a/csgo-ebot/metamod.vdf b/legacy/csgo-ebot/metamod.vdf similarity index 100% rename from csgo-ebot/metamod.vdf rename to legacy/csgo-ebot/metamod.vdf diff --git a/csgo-ebot/start.sh b/legacy/csgo-ebot/start.sh similarity index 100% rename from csgo-ebot/start.sh rename to legacy/csgo-ebot/start.sh diff --git a/csgo-ebot/startcontainer.sh b/legacy/csgo-ebot/startcontainer.sh similarity index 100% rename from csgo-ebot/startcontainer.sh rename to legacy/csgo-ebot/startcontainer.sh diff --git a/csgo-gg/Dockerfile b/legacy/csgo-gg/Dockerfile similarity index 63% rename from csgo-gg/Dockerfile rename to legacy/csgo-gg/Dockerfile index 87c4ba7..bae6781 100644 --- a/csgo-gg/Dockerfile +++ b/legacy/csgo-gg/Dockerfile @@ -1,6 +1,6 @@ FROM csgo:latest WORKDIR /steam/csgo -ADD start-gg.sh /steam/csgo/ +ADD start.sh /steam/csgo/ ADD gamemode_armsrace.cfg /steam/csgo/csgo/cfg/ -CMD ["./start-gg.sh"] \ No newline at end of file +CMD ["./start.sh"] diff --git a/csgo-gg/gamemode_armsrace.cfg b/legacy/csgo-gg/gamemode_armsrace.cfg similarity index 100% rename from csgo-gg/gamemode_armsrace.cfg rename to legacy/csgo-gg/gamemode_armsrace.cfg diff --git a/csgo-gg/start-gg.sh b/legacy/csgo-gg/start.sh similarity index 100% rename from csgo-gg/start-gg.sh rename to legacy/csgo-gg/start.sh diff --git a/legacy/csgo-metamod/Dockerfile b/legacy/csgo-metamod/Dockerfile new file mode 100644 index 0000000..273e180 --- /dev/null +++ b/legacy/csgo-metamod/Dockerfile @@ -0,0 +1,21 @@ +FROM csgo + +USER root + +WORKDIR /steam/csgo/ +USER steam +ADD download.sh . +RUN ./download.sh + +RUN tar -xf mm*.tar.gz -C csgo/ && \ + tar -xf sourcemod*.tar.gz -C csgo/ && \ + mv csgo/addons/sourcemod/plugins/disabled/mapchooser.smx csgo/addons/sourcemod/plugins/mapchooser.smx && \ + mv csgo/addons/sourcemod/plugins/disabled/nominations.smx csgo/addons/sourcemod/plugins/nominations.smx && \ + mv csgo/addons/sourcemod/plugins/disabled/randomcycle.smx csgo/addons/sourcemod/plugins/randomcycle.smx && \ + mv csgo/addons/sourcemod/plugins/disabled/rockthevote.smx csgo/addons/sourcemod/plugins/rockthevote.smx + +ADD metamod.vdf csgo/ + +ADD start.sh . + +ENTRYPOINT [ "./start.sh" ] diff --git a/legacy/csgo-metamod/README.md b/legacy/csgo-metamod/README.md new file mode 100644 index 0000000..ec380d1 --- /dev/null +++ b/legacy/csgo-metamod/README.md @@ -0,0 +1,8 @@ +# CSGO (with MetaMod) + +This has sourcemod and metamod installed, with the following additional plugins enabled by default: + +* mapchooser +* nominations +* randomcycle +* rockthevote diff --git a/legacy/csgo-metamod/download.sh b/legacy/csgo-metamod/download.sh new file mode 100755 index 0000000..5b46b75 --- /dev/null +++ b/legacy/csgo-metamod/download.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) + +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" + +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) +SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") + +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" diff --git a/csgo-warmod/metamod.vdf b/legacy/csgo-metamod/metamod.vdf similarity index 100% rename from csgo-warmod/metamod.vdf rename to legacy/csgo-metamod/metamod.vdf diff --git a/legacy/csgo-metamod/start.sh b/legacy/csgo-metamod/start.sh new file mode 100755 index 0000000..d5e008a --- /dev/null +++ b/legacy/csgo-metamod/start.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "$FULL_ADMINS" "@Full Admins" > csgo/addons/sourcemod/configs/admins_simple.ini + +./configure.sh +./launch.sh diff --git a/csgo-warmod/Dockerfile b/legacy/csgo-warmod/Dockerfile similarity index 100% rename from csgo-warmod/Dockerfile rename to legacy/csgo-warmod/Dockerfile diff --git a/csgo-warmod/build.sh b/legacy/csgo-warmod/build.sh similarity index 100% rename from csgo-warmod/build.sh rename to legacy/csgo-warmod/build.sh diff --git a/csgo-warmod/download.sh b/legacy/csgo-warmod/download.sh similarity index 100% rename from csgo-warmod/download.sh rename to legacy/csgo-warmod/download.sh diff --git a/csgo/metamod.vdf b/legacy/csgo-warmod/metamod.vdf similarity index 100% rename from csgo/metamod.vdf rename to legacy/csgo-warmod/metamod.vdf diff --git a/csgo-warmod/start-warmod.sh b/legacy/csgo-warmod/start-warmod.sh similarity index 100% rename from csgo-warmod/start-warmod.sh rename to legacy/csgo-warmod/start-warmod.sh diff --git a/csgo-warmod/startcontainer.sh b/legacy/csgo-warmod/startcontainer.sh similarity index 100% rename from csgo-warmod/startcontainer.sh rename to legacy/csgo-warmod/startcontainer.sh diff --git a/legacy/csgo/.dockerignore b/legacy/csgo/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/legacy/csgo/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/legacy/csgo/.gitignore b/legacy/csgo/.gitignore new file mode 100644 index 0000000..d1edc99 --- /dev/null +++ b/legacy/csgo/.gitignore @@ -0,0 +1 @@ +server.cfg \ No newline at end of file diff --git a/legacy/csgo/Dockerfile b/legacy/csgo/Dockerfile new file mode 100644 index 0000000..2bd14f0 --- /dev/null +++ b/legacy/csgo/Dockerfile @@ -0,0 +1,27 @@ +FROM steamcmd + +USER root + +ENV GAME=csgo +ENV APP_ID=740 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . + +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache + +COPY server.cfg \ +configure.sh \ +launch.sh \ +start.sh \ +./ + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit + +ENTRYPOINT ["./start.sh"] diff --git a/csgo/README.md b/legacy/csgo/README.md similarity index 68% rename from csgo/README.md rename to legacy/csgo/README.md index d0d8d2e..aa44d59 100644 --- a/csgo/README.md +++ b/legacy/csgo/README.md @@ -1,5 +1,10 @@ +# CSGO -Base CSGO start script which supports these environmetn variables: +Copy and rename server.template.cfg into csgo to set additional config to build. + +# Environment variables + +The following configuration is available via setting environment variables * `SV_HOSTNAME` - sets the `hostname` of the server * `SERVER_TOKEN` - GSLT @@ -11,4 +16,3 @@ Base CSGO start script which supports these environmetn variables: * `RCON_PASSWORD` - rcon password * `OTHER_ARGS` - other arguments to pass to command line * `SOURCETV_ADDR` - make this server be a source TV relay and join the server specified - diff --git a/legacy/csgo/config-templates/server.template.cfg b/legacy/csgo/config-templates/server.template.cfg new file mode 100644 index 0000000..e684613 --- /dev/null +++ b/legacy/csgo/config-templates/server.template.cfg @@ -0,0 +1,126 @@ +log on //This is set to turn on logging! +sv_region "255" //The region of the world to report this server in. +sv_tags "" //Server tags. Used to provide extra information to clients when they're browsing for servers +// +// +// The Bot Convars +bot_difficulty 1 //Defines the skill of bots joining the game. Values are: 0=easy, 1=normal, 2=hard, 3=expert. +bot_chatter "off" //Control how bots talk. Allowed values: 'off', 'radio', 'minimal', or 'normal +bot_join_after_player 1 //If nonzero, bots wait until a player joins before entering the game. +bot_quota 10 //Determines the total number of bots in the game. +bot_quota_mode "fill" //Determines the type of quota. Allowed values: 'normal', 'fill', and 'match +// +// Server Convars +sv_pausable "0" //Is the server pausable. +sv_allow_lobby_connect_only "0" //If set, players may only join this server from matchmaking lobby, may not connect directly. +sv_allow_votes "1" //Allow voting? +sv_allow_wait_command "1" //Allow or disallow the wait command on clients connected to this server. +sv_alltalk "1" //Players can hear all other players' voice communication, no team restrictions +sv_alternateticks "0" //If set, server only simulates entities on even numbered ticks. +sv_cheats "0" //Allow cheats on server +sv_deadtalk "0" //Dead players can speak (voice, text) to the living +sv_downloadurl"0" //Location from which clients can download missing files +sv_forcepreload "0" //Force server side preloading +sv_friction "4" //World friction." +sv_full_alltalk "1" //Any player (including Spectator team) can speak to any other player +sv_infinite_ammo "0" //Player's active weapon will never run out of ammo +// +// Server Logging +sv_log_onefile "0" //Log server information to only one file. +sv_logbans "0" //Log server bans in the server logs. +sv_logecho "1" //Echo log information to the console. +sv_logfile "1" //Log server information in the log file. +sv_logflush "0" //Flush the log file to disk on each write (slow). +sv_logsdir "0" //Folder in the game directory where server logs will be stored. +// +// Server Downloads +//sv_downloadurl "0" //Location from which clients can download missing files +sv_allowdownload 1 +sv_allowupload 1 +net_maxfilesize 100 +// +// Pure Options +//sv_pure_kick_clients "1" //If set to 1, the server will kick clients with mismatching files. +//sv_pure_trace "0" //If set to 1, the server will print a message whenever a client is verifying a CRC for a file. +// +// Round Convars +mp_match_end_restart "0" //Restart the map at the end of round limit +mp_afterroundmoney "0" //Amount of money awarded to every player after each round +mp_playercashawards "1" //Players can earn money by performing in-game actions +mp_teamcashawards "1" //Teams can earn money by performing in-game actions +mp_maxrounds "30" //Maximum amount of rounds per map +mp_timelimit "0" //How many minutes for the whole map +mp_roundtime "2" //How many minutes each round takes. +mp_freezetime"5" //how many seconds to keep players frozen when the round starts +mp_buytime "45" //How many seconds after round start players can buy items for. +mp_forcecamera "1" //Set to 1 for team only spectating. +mp_defuser_allocation "2" //How to allocate defusers to CTs at start or round: 0=none, 1=random, 2=everyone +mp_death_drop_defuser "1" //Drop defuser on player death +mp_death_drop_grenade "2" //Which grenade to drop on player death: 0=none, 1=best, 2=current or best +mp_death_drop_gun "1" //Which gun to drop on player death: 0=none, 1=best, 2=current or best +// +// Friendly Fire +mp_friendlyfire "1" //Enable Friendly Fire 1 =Enable 0 =Disable +//ff_damage_reduction_grenade "0" //How much to reduce damage done to teammates by a thrown grenade. +//ff_damage_reduction_bullets "0" //How much to reduce damage done to teammates when shot. +//ff_damage_reduction_other "0" //How much to reduce damage done to teammates by things other than bullets and grenades. +// +// Game Convars +mp_autokick "1" //Kick idle/team-killing players +mp_autoteambalance "1" //Auto balances teams +mp_buytime "45" //How many seconds after round start players can buy items for. +mp_c4timer "45" //how long from when the C4 is armed until it blows +mp_do_warmup_period "1" //Whether or not to do a warmup period at the start of a match. +mp_force_pick_time "15" //The amount of time a player has on the team screen to make a selection before being auto-teamed +mp_halftime_duration "15" //Number of seconds that halftime lasts +mp_join_grace_time "15 //Number of seconds after round start to allow a player to join a game +mp_limitteams "2" //Max # of players 1 team can have over another (0 disables check) +mp_match_end_restart "1" //At the end of the match, perform a restart instead of loading a new map +mp_maxrounds "30" //Max amount of rounds per map +mp_playercashawards "1" //Players can earn money by performing in-game actions +mp_playerid "0" //Controls what information player see in the status bar: 0 all names; 1 team names; 2 no names +mp_playerid_delay "0" //Number of seconds to delay showing information in the status bar +mp_playerid_hold "0" //Number of seconds to keep showing old information in the status bar +mp_restartgame "0" //If non-zero, game will restart in the specified number of seconds +mp_round_restart_delay "7" //Number of seconds to delay before restarting a round after a win +mp_roundtime "3" //How many minutes each round takes. +mp_tkpunish "0" //Will a TK'er be punished in the next round? {0=no, 1=yes} +mp_warmuptime "25" //If true, there will be a warmup period/round at the start of each match to allow to connect. +mp_win_panel_display_time "5" //The amount of time to show the win panel between matches / halfs +// +// Cash Convars +mp_startmoney "400" //Amount of money each player gets when they reset. +mp_maxmoney "12000" //Maximum amount of money allowed in a player's account. +cash_team_terrorist_win_bomb "2200" //How much the team will win for the bomb. +cash_team_elimination_hostage_map "2200" //How much a player earns when they eliminate all hostages. +cash_team_elimination_bomb_map "2200" //How much the team will win when the bomb is eliminated. +cash_team_win_by_time_running_out "2200" //How much the team will win when the time runs out. +cash_team_win_by_defusing_bomb "2200" //How much the team will win when bomb has been defused. +cash_team_win_by_hostage_rescue "2200" //How much the team will win when all hostages have been rescued. +cash_team_loser_bonus "2000" //How much the team will win when when the team looses. +cash_team_loser_bonus_consecutive_rounds "500" //How much the team will win when the team looses consecutive rounds. +cash_team_rescued_hostage "100" //How much the team will win when team has recued a hostage. +cash_team_hostage_alive "0" //How much the team will win when a hostage is still alive +cash_team_planted_bomb_but_defused "200" //How much the team will win when when a team has planted a bomb and been defused +cash_team_hostage_interaction "50" //How much the team will win when hostages are saved +cash_player_killed_teammate "-3300" //How much the player will loose when a teammate has been team killed +cash_player_killed_enemy_default "200" //How much the player will win when killing an enemy +cash_player_killed_enemy_factor "0.5" //How much the player will win when killing an enemy +cash_player_bomb_planted "200" //How much the player will win when the bomb has been planted. +cash_player_bomb_defused "200" //How much the player will win when the bomb has been defused +cash_player_rescued_hostage "200" //How much the player will win when rescuing hostages +cash_player_interact_with_hostage "0" //How much the player will win when interacting with hostages +cash_player_damage_hostage "-30" //How much the player will loose when damaging a hostage +cash_player_killed_hostage "-1000" //How much the player will loose when a hostage has been killed +// +// Voting Options +sv_vote_allow_spectators "0" //Allow spectators to vote? +sv_vote_command_delay "2" //How long after a vote passes until the action happens +sv_vote_creation_time "120" //How often someone can individually call a vote. +sv_vote_failure_timer "300" //A vote that fails cannot be re-submitted for this long +sv_vote_quorum_ratio "0" //The minimum ratio of players needed to vote on an issue to resolve it. +sv_vote_timer_duration "15" //How long to allow voting on an issue +// +// TV Options +//tv_nochat "0" //Don't receive chat messages from other SourceTV spectators +//tv_port "check" //Host SourceTV port \ No newline at end of file diff --git a/csgo/start.sh b/legacy/csgo/configure.sh similarity index 59% rename from csgo/start.sh rename to legacy/csgo/configure.sh index 598a631..a3805d2 100755 --- a/csgo/start.sh +++ b/legacy/csgo/configure.sh @@ -9,7 +9,6 @@ fi [[ $GAME_TYPE -ge 1 ]] && GAME_TYPE="1" || GAME_TYPE="0" [[ $GAME_MODE -ge 1 ]] && GAME_MODE="1" || GAME_MODE="0" - # Command line [[ -n $GAME_TYPE ]] && GAME_TYPE="+game_type $GAME_TYPE" [[ -n $GAME_MODE ]] && GAME_MODE="+game_mode $GAME_MODE" @@ -27,26 +26,3 @@ hostname "$SV_HOSTNAME" $RCON_PASSWORD $SV_PASSWORD EOF -cat </steam/csgo/csgo/cfg/server2.cfg - -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -EOF - -if [[ -n $SOURCETV_ADDR ]] -then - echo "tv_title $HOSTNAME" > csgo/cfg/hostname.cfg - exec ./srcds_run -game csgo -console -tickrate 128 -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ - -else - - exec ./srcds_run -game csgo +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE -tickrate 128 $MAXPLAYERS $SERVER_TOKEN $OTHER_ARGS $@ - - -fi - - -#echo '"STEAM_0:0:19457778" "@Full Admins"' > csgo/addons/sourcemod/configs/admins_simple.ini - - diff --git a/legacy/csgo/launch.sh b/legacy/csgo/launch.sh new file mode 100755 index 0000000..128d37c --- /dev/null +++ b/legacy/csgo/launch.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cd /steam/${GAME}/ + +if [[ -n $SOURCETV_ADDR ]] +then + echo "tv_title $HOSTNAME" > csgo/cfg/hostname.cfg + exec ./srcds_run -game csgo -console -tickrate 128 -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ +else + exec ./srcds_run -game csgo +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE -tickrate 128 $MAXPLAYERS $SERVER_TOKEN $OTHER_ARGS $@ +fi diff --git a/legacy/csgo/start.sh b/legacy/csgo/start.sh new file mode 100755 index 0000000..30ebc68 --- /dev/null +++ b/legacy/csgo/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +./configure.sh +./launch.sh \ No newline at end of file diff --git a/dont-starve-together/Dockerfile b/legacy/dont-starve-together/Dockerfile similarity index 100% rename from dont-starve-together/Dockerfile rename to legacy/dont-starve-together/Dockerfile diff --git a/dont-starve-together/README.md b/legacy/dont-starve-together/README.md similarity index 100% rename from dont-starve-together/README.md rename to legacy/dont-starve-together/README.md diff --git a/dont-starve-together/build.sh b/legacy/dont-starve-together/build.sh similarity index 100% rename from dont-starve-together/build.sh rename to legacy/dont-starve-together/build.sh diff --git a/dont-starve-together/start-dontstave.sh b/legacy/dont-starve-together/start-dontstave.sh similarity index 100% rename from dont-starve-together/start-dontstave.sh rename to legacy/dont-starve-together/start-dontstave.sh diff --git a/factorio/Dockerfile b/legacy/factorio/Dockerfile similarity index 100% rename from factorio/Dockerfile rename to legacy/factorio/Dockerfile diff --git a/factorio/build.sh b/legacy/factorio/build.sh similarity index 100% rename from factorio/build.sh rename to legacy/factorio/build.sh diff --git a/factorio/mounts b/legacy/factorio/mounts similarity index 100% rename from factorio/mounts rename to legacy/factorio/mounts diff --git a/factorio/server-settings.json b/legacy/factorio/server-settings.json similarity index 100% rename from factorio/server-settings.json rename to legacy/factorio/server-settings.json diff --git a/factorio/start-factorio.sh b/legacy/factorio/start-factorio.sh similarity index 100% rename from factorio/start-factorio.sh rename to legacy/factorio/start-factorio.sh diff --git a/graftorio/Contest-1-Electronic-Circuit/blueprint.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/blueprint.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/blueprint.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/blueprint.dat diff --git a/graftorio/Contest-1-Electronic-Circuit/control.lua b/legacy/graftorio/Contest-1-Electronic-Circuit/control.lua similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/control.lua rename to legacy/graftorio/Contest-1-Electronic-Circuit/control.lua diff --git a/graftorio/Contest-1-Electronic-Circuit/info.json b/legacy/graftorio/Contest-1-Electronic-Circuit/info.json similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/info.json rename to legacy/graftorio/Contest-1-Electronic-Circuit/info.json diff --git a/graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg b/legacy/graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg rename to legacy/graftorio/Contest-1-Electronic-Circuit/locale/en/factorio-contest.cfg diff --git a/graftorio/Contest-1-Electronic-Circuit/preview.png b/legacy/graftorio/Contest-1-Electronic-Circuit/preview.png similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/preview.png rename to legacy/graftorio/Contest-1-Electronic-Circuit/preview.png diff --git a/graftorio/Contest-1-Electronic-Circuit/replay.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/replay.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/replay.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/replay.dat diff --git a/graftorio/Contest-1-Electronic-Circuit/script-init.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/script-init.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/script-init.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/script-init.dat diff --git a/graftorio/Contest-1-Electronic-Circuit/script.dat b/legacy/graftorio/Contest-1-Electronic-Circuit/script.dat similarity index 100% rename from graftorio/Contest-1-Electronic-Circuit/script.dat rename to legacy/graftorio/Contest-1-Electronic-Circuit/script.dat diff --git a/graftorio/Dockerfile b/legacy/graftorio/Dockerfile similarity index 100% rename from graftorio/Dockerfile rename to legacy/graftorio/Dockerfile diff --git a/graftorio/build.sh b/legacy/graftorio/build.sh similarity index 100% rename from graftorio/build.sh rename to legacy/graftorio/build.sh diff --git a/graftorio/start-graftorio.sh b/legacy/graftorio/start-graftorio.sh similarity index 100% rename from graftorio/start-graftorio.sh rename to legacy/graftorio/start-graftorio.sh diff --git a/legacy/hl2dm/.dockerignore b/legacy/hl2dm/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/legacy/hl2dm/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/legacy/hl2dm/Dockerfile b/legacy/hl2dm/Dockerfile new file mode 100644 index 0000000..d71c7f3 --- /dev/null +++ b/legacy/hl2dm/Dockerfile @@ -0,0 +1,23 @@ +FROM steamcmd + +USER root + +ENV GAME=hl2dm +ENV APP_ID=232370 + +RUN mkdir -p /steam/${GAME}/.cache/ \ + && touch /steam/${GAME}/.cache/empty +WORKDIR /steam/${GAME}/ +COPY .cache . + +RUN chown -R steam /steam/${GAME}/ \ + && mv .cache/* . \ + && rm -fr .cache + +COPY start.sh . + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit + +ENTRYPOINT ["./start.sh"] diff --git a/hl2dm/start.sh b/legacy/hl2dm/start.sh similarity index 100% rename from hl2dm/start.sh rename to legacy/hl2dm/start.sh diff --git a/mordhau/Dockerfile b/legacy/mordhau/Dockerfile similarity index 100% rename from mordhau/Dockerfile rename to legacy/mordhau/Dockerfile diff --git a/mordhau/README.md b/legacy/mordhau/README.md similarity index 100% rename from mordhau/README.md rename to legacy/mordhau/README.md diff --git a/mordhau/build.sh b/legacy/mordhau/build.sh similarity index 100% rename from mordhau/build.sh rename to legacy/mordhau/build.sh diff --git a/mordhau/start.sh b/legacy/mordhau/start.sh similarity index 100% rename from mordhau/start.sh rename to legacy/mordhau/start.sh diff --git a/mumble/Dockerfile b/legacy/mumble/Dockerfile similarity index 100% rename from mumble/Dockerfile rename to legacy/mumble/Dockerfile diff --git a/mumble/README.md b/legacy/mumble/README.md similarity index 100% rename from mumble/README.md rename to legacy/mumble/README.md diff --git a/mumble/build.sh b/legacy/mumble/build.sh similarity index 100% rename from mumble/build.sh rename to legacy/mumble/build.sh diff --git a/mumble/mounts b/legacy/mumble/mounts similarity index 100% rename from mumble/mounts rename to legacy/mumble/mounts diff --git a/mumble/mumble.ini b/legacy/mumble/mumble.ini similarity index 100% rename from mumble/mumble.ini rename to legacy/mumble/mumble.ini diff --git a/mumble/start-mumble.sh b/legacy/mumble/start-mumble.sh similarity index 100% rename from mumble/start-mumble.sh rename to legacy/mumble/start-mumble.sh diff --git a/quake-live/Dockerfile b/legacy/quake-live/Dockerfile similarity index 100% rename from quake-live/Dockerfile rename to legacy/quake-live/Dockerfile diff --git a/quake-live/README.md b/legacy/quake-live/README.md similarity index 100% rename from quake-live/README.md rename to legacy/quake-live/README.md diff --git a/quake-live/build.sh b/legacy/quake-live/build.sh similarity index 100% rename from quake-live/build.sh rename to legacy/quake-live/build.sh diff --git a/quake-live/start.sh b/legacy/quake-live/start.sh similarity index 100% rename from quake-live/start.sh rename to legacy/quake-live/start.sh diff --git a/quake3/Dockerfile b/legacy/quake3/Dockerfile similarity index 100% rename from quake3/Dockerfile rename to legacy/quake3/Dockerfile diff --git a/quake3/README.md b/legacy/quake3/README.md similarity index 100% rename from quake3/README.md rename to legacy/quake3/README.md diff --git a/quake3/baseq3/README.md b/legacy/quake3/baseq3/README.md similarity index 100% rename from quake3/baseq3/README.md rename to legacy/quake3/baseq3/README.md diff --git a/quake3/baseq3/q3config.cfg b/legacy/quake3/baseq3/q3config.cfg similarity index 100% rename from quake3/baseq3/q3config.cfg rename to legacy/quake3/baseq3/q3config.cfg diff --git a/quake3/build.sh b/legacy/quake3/build.sh similarity index 100% rename from quake3/build.sh rename to legacy/quake3/build.sh diff --git a/quake3/compmaps.txt b/legacy/quake3/compmaps.txt similarity index 100% rename from quake3/compmaps.txt rename to legacy/quake3/compmaps.txt diff --git a/quake3/cpma.cfg b/legacy/quake3/cpma.cfg similarity index 100% rename from quake3/cpma.cfg rename to legacy/quake3/cpma.cfg diff --git a/quake3/start-cpma.sh b/legacy/quake3/start-cpma.sh similarity index 100% rename from quake3/start-cpma.sh rename to legacy/quake3/start-cpma.sh diff --git a/reflex-arena/Dockerfile b/legacy/reflex-arena/Dockerfile similarity index 100% rename from reflex-arena/Dockerfile rename to legacy/reflex-arena/Dockerfile diff --git a/reflex-arena/README.md b/legacy/reflex-arena/README.md similarity index 100% rename from reflex-arena/README.md rename to legacy/reflex-arena/README.md diff --git a/reflex-arena/build.sh b/legacy/reflex-arena/build.sh similarity index 100% rename from reflex-arena/build.sh rename to legacy/reflex-arena/build.sh diff --git a/reflex-arena/start-reflex.sh b/legacy/reflex-arena/start-reflex.sh similarity index 100% rename from reflex-arena/start-reflex.sh rename to legacy/reflex-arena/start-reflex.sh diff --git a/rust/Dockerfile b/legacy/rust/Dockerfile similarity index 100% rename from rust/Dockerfile rename to legacy/rust/Dockerfile diff --git a/rust/README.md b/legacy/rust/README.md similarity index 100% rename from rust/README.md rename to legacy/rust/README.md diff --git a/rust/build.sh b/legacy/rust/build.sh similarity index 100% rename from rust/build.sh rename to legacy/rust/build.sh diff --git a/rust/start-rust.sh b/legacy/rust/start-rust.sh similarity index 100% rename from rust/start-rust.sh rename to legacy/rust/start-rust.sh diff --git a/start_server.sh b/legacy/start_server.sh similarity index 100% rename from start_server.sh rename to legacy/start_server.sh diff --git a/trackmania2/Dockerfile b/legacy/trackmania2/Dockerfile similarity index 100% rename from trackmania2/Dockerfile rename to legacy/trackmania2/Dockerfile diff --git a/trackmania2/README.md b/legacy/trackmania2/README.md similarity index 100% rename from trackmania2/README.md rename to legacy/trackmania2/README.md diff --git a/trackmania2/build.sh b/legacy/trackmania2/build.sh similarity index 100% rename from trackmania2/build.sh rename to legacy/trackmania2/build.sh diff --git a/trackmania2/start_tm2_canyon.sh b/legacy/trackmania2/start_tm2_canyon.sh similarity index 100% rename from trackmania2/start_tm2_canyon.sh rename to legacy/trackmania2/start_tm2_canyon.sh diff --git a/wine-src/Dockerfile b/legacy/wine-src/Dockerfile similarity index 100% rename from wine-src/Dockerfile rename to legacy/wine-src/Dockerfile diff --git a/wine-src/README.md b/legacy/wine-src/README.md similarity index 100% rename from wine-src/README.md rename to legacy/wine-src/README.md diff --git a/wine-src/build.sh b/legacy/wine-src/build.sh similarity index 100% rename from wine-src/build.sh rename to legacy/wine-src/build.sh diff --git a/wine/Dockerfile b/legacy/wine/Dockerfile similarity index 100% rename from wine/Dockerfile rename to legacy/wine/Dockerfile diff --git a/wine/README.md b/legacy/wine/README.md similarity index 100% rename from wine/README.md rename to legacy/wine/README.md diff --git a/wine/build.sh b/legacy/wine/build.sh similarity index 100% rename from wine/build.sh rename to legacy/wine/build.sh diff --git a/wreckfest/Dockerfile b/legacy/wreckfest/Dockerfile similarity index 100% rename from wreckfest/Dockerfile rename to legacy/wreckfest/Dockerfile diff --git a/legacy/wreckfest/README.md b/legacy/wreckfest/README.md new file mode 100644 index 0000000..e69de29 diff --git a/wreckfest/build.sh b/legacy/wreckfest/build.sh similarity index 100% rename from wreckfest/build.sh rename to legacy/wreckfest/build.sh diff --git a/wreckfest/server_config.cfg b/legacy/wreckfest/server_config.cfg similarity index 100% rename from wreckfest/server_config.cfg rename to legacy/wreckfest/server_config.cfg diff --git a/wreckfest/start-wreckfest.sh b/legacy/wreckfest/start-wreckfest.sh similarity index 100% rename from wreckfest/start-wreckfest.sh rename to legacy/wreckfest/start-wreckfest.sh diff --git a/zdaemon/Dockerfile b/legacy/zdaemon/Dockerfile similarity index 100% rename from zdaemon/Dockerfile rename to legacy/zdaemon/Dockerfile diff --git a/zdaemon/README.md b/legacy/zdaemon/README.md similarity index 100% rename from zdaemon/README.md rename to legacy/zdaemon/README.md diff --git a/zdaemon/build.sh b/legacy/zdaemon/build.sh similarity index 100% rename from zdaemon/build.sh rename to legacy/zdaemon/build.sh diff --git a/zdaemon/download.sh b/legacy/zdaemon/download.sh similarity index 100% rename from zdaemon/download.sh rename to legacy/zdaemon/download.sh diff --git a/zdaemon/ffa-template.cfg b/legacy/zdaemon/ffa-template.cfg similarity index 100% rename from zdaemon/ffa-template.cfg rename to legacy/zdaemon/ffa-template.cfg diff --git a/zdaemon/start-ffa.sh b/legacy/zdaemon/start-ffa.sh similarity index 100% rename from zdaemon/start-ffa.sh rename to legacy/zdaemon/start-ffa.sh diff --git a/minecraft/Dockerfile b/minecraft/Dockerfile index 40e0c84..1a69c84 100644 --- a/minecraft/Dockerfile +++ b/minecraft/Dockerfile @@ -8,7 +8,7 @@ RUN echo "yes" | apt-get install -y oracle-java7-installer RUN adduser minecraft && mkdir /minecraft && chown minecraft:minecraft /minecraft WORKDIR /minecraft -ADD minecraft_server*.jar start.sh advertise.py eula.txt server.properties /minecraft/ +COPY minecraft_server*.jar start.sh advertise.py eula.txt server.properties /minecraft/ # This fails, diff --git a/openttd/Dockerfile b/openttd/Dockerfile index 2968005..95660a5 100644 --- a/openttd/Dockerfile +++ b/openttd/Dockerfile @@ -1,19 +1,33 @@ FROM base -RUN apt-get install -y libsdl1.2debian -RUN apt-get install -y libfontconfig1 +RUN apt-get update \ + && apt-get install -y libsdl1.2debian libfontconfig1 liblzo2-2 libfluidsynth2 libsdl2-2.0-0 \ + && adduser openttd \ + && mkdir -p /tmp \ + && chown -R openttd:openttd /tmp \ + && mkdir -p /home/openttd/.openttd/save \ + && chown -R openttd:openttd /home -RUN adduser openttd && mkdir -p /openttd/extract && chown -R openttd:openttd /openttd -WORKDIR /openttd +WORKDIR /tmp -ADD opengfx*.zip openmsx*.zip opensfx*.zip openttd*.tar.gz /openttd/ -RUN mv openttd-*-linux-generic-amd64/* . -RUN unzip openmsx*.zip -d /openttd/extract/ -RUN unzip opensfx*.zip -d /openttd/extract/ -RUN unzip opengfx*.zip -d /openttd/extract/ && tar -xf /openttd/extract/opengfx*.tar -C /openttd/extract/ -RUN mv --no-clobber /openttd/extract/*/* /openttd/baseset/ +ARG DISTRO="focal" +COPY download.sh . +RUN ./download.sh + +USER root +RUN dpkg -i *.deb \ + && mkdir -p /usr/share/games/openttd/baseset/opengfx/ \ + && unzip 'opengfx*.zip' \ + && ls -Chal \ + && tar -C /usr/share/games/openttd/baseset/opengfx/ -xf opengfx*.tar \ + && rm -fr *.zip *.tar *.deb -RUN chown -R openttd:openttd /openttd USER openttd -CMD ["./start-openttd.sh"] \ No newline at end of file +WORKDIR /usr/games + +COPY start.sh . + +VOLUME [ "/home/openttd/.openttd/save" ] + +ENTRYPOINT ["./start.sh"] diff --git a/openttd/README.md b/openttd/README.md new file mode 100644 index 0000000..de20da7 --- /dev/null +++ b/openttd/README.md @@ -0,0 +1,56 @@ +# OpenTTD Server + +## Environment variables + +For more information see https://wiki.openttd.org/Openttd.cfg + +Supported configuration variables: + +### [network] +* `SERVER_NAME` +* `SERVER_PASSWORD` +* `RCON_PASSWORD` +* `ADMIN_PASSWORD` +* `MIN_ACTIVE_CLIENTS` + +### [vehicle] +* `MAX_TRAINS` +* `MAX_ROADVEH` +* `MAX_AIRCRAFT` +* `MAX_SHIPS` +* `ROAD_SIDE` +* `ROADVEH_ACCELERATION_MODEL` +* `TRAIN_ACCELERATION_MODEL` + +### [economy] +* `FOUND_TOWN` +* `LARGER_TOWNS` +* `MULTIPLE_INDUSTRY_PER_TOWN` + +### [linkgraph] +* `DISTRIBUTION_PAX` +* `DISTRIBUTION_MAIL` +* `DISTRIBUTION_ARMOURED` +* `DISTRIBUTION_DEFAULT` + +### [locale] +* `CURRENCY` + +### [difficulty] +* `DISASTERS` +* `TERRAIN_TYPE` +* `INDUSTRY_DENSITY` +* `NUMBER_INDUSTRIES` +* `NUMBER_TOWNS` +* `QUANTITY_SEA_LAKES` +* `MAX_NO_COMPETITORS` + +### [game_creation] +* `MAP_X` +* `MAP_Y` +* `STARTING_YEAR` +* `LANDSCAPE` +* `TOWN_NAME` + +### [gui] +* `AUTOSAVE` diff --git a/openttd/download.sh b/openttd/download.sh index 3abd9fd..ddd3d71 100755 --- a/openttd/download.sh +++ b/openttd/download.sh @@ -1,31 +1,16 @@ #!/bin/bash -ls openttd*-linux-generic-amd64.tar.gz || ( - BINURL=$(curl https://www.openttd.org/en/download-stable | egrep -o "\/\/binaries.openttd.org/releases/.*/openttd-.*-linux-generic-amd64.tar.gz") +ls "openttd*-linux-ubuntu-${DISTRO}-amd64.deb" || ( + BINURL=$(curl https://www.openttd.org/downloads/openttd-releases/latest.html | egrep -o "\/\/cdn.openttd.org/openttd-releases/.*/openttd-.*-linux-ubuntu-${DISTRO}-amd64.deb") [[ -z "$BINURL" ]] && echo "failed to get binary URL" && exit 1 - + wget https:$BINURL ) ls opengfx*-all.zip || ( - BINURL=$(curl https://www.openttd.org/en/download-opengfx | egrep -o "\/\/binaries.openttd.org/extra/opengfx/.*/opengfx-.*-all.zip") + BINURL=$(curl https://www.openttd.org/downloads/opengfx-releases/latest.html | egrep -o "\/\/cdn.openttd.org/opengfx-releases/.*/opengfx-.*-all.zip") [[ -z "$BINURL" ]] && echo "failed to get gfx URL" && exit 2 - - wget https:$BINURL -) - -ls opensfx*-all.zip || ( - BINURL=$(curl http://www.openttd.org/en/download-opensfx | egrep -o "\/\/binaries.openttd.org/extra/opensfx/.*/opensfx-.*-all.zip") - [[ -z "$BINURL" ]] && echo "failed to get sfx URL" && exit 3 - - wget https:$BINURL -) - -ls openmsx*-all.zip || ( - BINURL=$(curl http://www.openttd.org/en/download-openmsx | egrep -o "\/\/binaries.openttd.org/extra/openmsx/.*/openmsx-.*-all.zip") - [[ -z "$BINURL" ]] && echo "failed to get msx URL" && exit 4 - wget https:$BINURL ) diff --git a/openttd/start-openttd.sh b/openttd/start-openttd.sh deleted file mode 100755 index f52c160..0000000 --- a/openttd/start-openttd.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -# TODO: add config options and things here - -exec ./openttd -D \ No newline at end of file diff --git a/openttd/start.sh b/openttd/start.sh new file mode 100755 index 0000000..d75975c --- /dev/null +++ b/openttd/start.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +# for more see https://wiki.openttd.org/Openttd.cfg + +# [network] +[[ -z $SERVER_NAME ]] && SERVER_NAME="OpenTTD Server" +[[ -n $SERVER_PASSWORD ]] && SERVER_PASSWORD="" +[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="changeme" +[[ -n $ADMIN_PASSWORD ]] && ADMIN_PASSWORD="changeme" +[[ -z $MIN_ACTIVE_CLIENTS ]] && MIN_ACTIVE_CLIENTS=1 + +# [vehicle] +[[ -z $MAX_TRAINS ]] && MAX_TRAINS=5000 +[[ -z $MAX_ROADVEH ]] && MAX_ROADVEH=5000 +[[ -z $MAX_AIRCRAFT ]] && MAX_AIRCRAFT=5000 +[[ -z $MAX_SHIPS ]] && MAX_SHIPS=5000 +[[ -z $ROAD_SIDE ]] && ROAD_SIDE=right +[[ -z $ROADVEH_ACCELERATION_MODEL ]] && ROADVEH_ACCELERATION_MODEL=1 +[[ -z $TRAIN_ACCELERATION_MODEL ]] && TRAIN_ACCELERATION_MODEL=1 + +# [economy] +[[ -z $FOUND_TOWN ]] && FOUND_TOWN=1 +[[ -z $LARGER_TOWNS ]] && LARGER_TOWNS=1 +[[ -z $MULTIPLE_INDUSTRY_PER_TOWN ]] && MULTIPLE_INDUSTRY_PER_TOWN=true + +# [linkgraph] +[[ -z $DISTRIBUTION_PAX ]] && DISTRIBUTION_PAX=1 +[[ -z $DISTRIBUTION_MAIL ]] && DISTRIBUTION_MAIL=1 +[[ -z $DISTRIBUTION_ARMOURED ]] && DISTRIBUTION_ARMOURED=1 +[[ -z $DISTRIBUTION_DEFAULT ]] && DISTRIBUTION_DEFAULT=1 + +# [locale] +[[ -z $CURRENCY ]] && CURRENCY=EUR + +# [difficulty] +[[ -z $DISASTERS ]] && DISASTERS=false +[[ -z $INDUSTRY_DENSITY ]] && INDUSTRY_DENSITY=3 +[[ -z $NUMBER_INDUSTRIES ]] && NUMBER_INDUSTRIES=3 +[[ -z $NUMBER_TOWNS ]] && NUMBER_TOWNS=2 +[[ -z $QUANTITY_SEA_LAKES ]] && QUANTITY_SEA_LAKES=2 +[[ -z $TERRAIN_TYPE ]] && TERRAIN_TYPE=2 +[[ -z $MAX_NO_COMPETITORS ]] && MAX_NO_COMPETITORS=0 + +# [game_creation] +[[ -z $MAP_X ]] && MAP_X=9 +[[ -z $MAP_Y ]] && MAP_Y=9 +[[ -z $STARTING_YEAR ]] && STARTING_YEAR=1970 +[[ -z $LANDSCAPE ]] && LANDSCAPE=temperate +[[ -z $TOWN_NAME ]] && TOWN_NAME=german + +# [gui] +[[ -z $AUTOSAVE ]] && AUTOSAVE=yearly + +mkdir -p /home/openttd/.openttd/ +cat </home/openttd/.openttd/openttd.cfg +[network] +server_name = $SERVER_NAME +server_password = $SERVER_PASSWORD +rcon_password = $RCON_PASSWORD +admin_password = $ADMIN_PASSWORD +min_active_clients = $MIN_ACTIVE_CLIENTS + +[vehicle] +max_trains = $MAX_TRAINS +max_roadveh = $MAX_ROADVEH +max_aircraft = $MAX_AIRCRAFT +max_ships = $MAX_SHIPS +road_side = $ROAD_SIDE +roadveh_acceleration_model = $ROADVEH_ACCELERATION_MODEL +train_acceleration_model = $TRAIN_ACCELERATION_MODEL + +[economy] +found_town = $FOUND_TOWN +larger_towns = $LARGER_TOWNS +multiple_industry_per_town = $MULTIPLE_INDUSTRY_PER_TOWN + +[linkgraph] +distribution_pax = $DISTRIBUTION_PAX +distribution_mail = $DISTRIBUTION_MAIL +distribution_armoured = $DISTRIBUTION_ARMOURED +distribution_default = $DISTRIBUTION_DEFAULT + +[locale] +currency = $CURRENCY + +[difficulty] +disasters = $DISASTERS +terrain_type = $TERRAIN_TYPE +industry_density = $INDUSTRY_DENSITY +number_industries = $NUMBER_INDUSTRIES +number_towns = $NUMBER_TOWNS +quantity_sea_lakes = $QUANTITY_SEA_LAKES +max_no_competitors = $MAX_NO_COMPETITORS + +[game_creation] +landscape = $LANDSCAPE +map_x = $MAP_X +map_y = $MAP_Y +starting_year = $STARTING_YEAR +town_name = $TOWN_NAME + +[gui] +autosave = $AUTOSAVE +EOF + +exec ./openttd -D diff --git a/scpsl-exiled/.gitignore b/scpsl-exiled/.gitignore new file mode 100644 index 0000000..e9abc7f --- /dev/null +++ b/scpsl-exiled/.gitignore @@ -0,0 +1 @@ +config.yml \ No newline at end of file diff --git a/scpsl-exiled/Dockerfile b/scpsl-exiled/Dockerfile new file mode 100644 index 0000000..3274cb3 --- /dev/null +++ b/scpsl-exiled/Dockerfile @@ -0,0 +1,17 @@ +FROM scpsl + +ENV CONFIG_DIR '/home/steam/.config/' + +USER root + +COPY download.sh . +RUN ./download.sh + +COPY config.yml "${CONFIG_DIR}/EXILED/Configs/${SERVER_PORT}-config.yml" +RUN chown -R steam:steam "${CONFIG_DIR}" \ + && chmod u+rw "${CONFIG_DIR}" \ + && rm -f *.tar.gz + +USER steam + +ENTRYPOINT ["./start.sh"] diff --git a/scpsl-exiled/README.md b/scpsl-exiled/README.md new file mode 100644 index 0000000..44cf99d --- /dev/null +++ b/scpsl-exiled/README.md @@ -0,0 +1,17 @@ +# SCP Secret Labratory with EXILED mod + + + +## Plugins + +* EXILED +* Common-Utils +* Respawn Timer + +## Environment variables + +* + +## Useful IDs + +ChaosInsurgency ClassD FacilityGuard NtfCadet NtfCommander NtfLieutenant NtfScientist Scientist Scp049 Scp0492 Scp096 Scp106 Scp173 Tutorial Scp93953 Scp93989 \ No newline at end of file diff --git a/scpsl-exiled/config-templates/config.template.yml b/scpsl-exiled/config-templates/config.template.yml new file mode 100644 index 0000000..8e6dc4c --- /dev/null +++ b/scpsl-exiled/config-templates/config.template.yml @@ -0,0 +1,334 @@ +CommonUtilities: +# Whether or not debug messages should be shown. + debug: false + # The SCP Roles able to use V to talk to humans. + scp_speech: + - Scp049 + # Whether or not MTF/CI can 'escape' while disarmed to switch teams. + disarm_switch_teams: true + # Whether or not disarmed people will be prevented from interacting with doors/elevators. + restrictive_disarming: true + # The text displayed at the timed interval specified below. + timed_broadcast: This server is running EXILED Common-Utilities, enjoy your stay! + # The time each timed broadcast will be displayed. + timed_broadcast_duration: 5 + # The delay between each timed broadcast. To disable timed broadcasts, set this to 0 + timed_broadcast_delay: 300 + # The message displayed to the player when they first join the server. Setting this to empty will disable these broadcasts. + join_message: Welcome %player%! Please read our rules! + # The amount of time (in seconds) the join message is displayed. + join_message_duration: 5 + # The amount of time (in seconds) after the round starts, before the facilities auto-nuke will start. + autonuke_time: 1500 + # Wether or not the nuke should be unable to be disabled during the auto-nuke countdown. + autonuke_lock: true + # The message given to all players when the auto-nuke is triggered. A duration of 2 or more will be a text message on-screen. A duration of 1 makes it a cassie announcement. A duration of 0 disables it. + autonuke_broadcast: + # The broadcast content + content: The auto nuke has been activated. + # The broadcast duration + duration: 10 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # Whether or not to show player's health under their name when you look at them. + player_health_info: true + # Whether or not friendly fire should automatically turn on when a round ends (it will turn itself back off before the next round starts). + friendly_fire_on_round_end: false + # The multiplier applied to radio battery usage. Set to 0 to disable radio battery drain. + radio_battery_drain_multiplier: 1 + # The color to use for lights while the warhead is active. + warhead_color: + r: 1 + g: 0.2 + b: 0.2 + a: 1 + # The maximum time, in seconds, that a player can be AFK before being kicked. Set to -1 to disable AFK system. + afk_limit: 120 + # The list of starting items for roles. ItemName is the item to give them, and Chance is the percent chance of them spawning with it, and Group allows you to restrict the item to only players with certain RA groups (Leave this as 'none' to allow all players to get the item). You can specify the same item multiple times. + starting_inventories: + ClassD: + slot1: + - item_name: KeycardJanitor + chance: 10 + group: none + - item_name: Coin + chance: 100 + group: none + slot2: + - item_name: Flashlight + chance: 100 + group: none + slot3: [] + slot4: [] + slot5: [] + slot6: [] + slot7: [] + slot8: [] + ammo: + - type: Ammo556x45 + amount: 200 + group: none + # The list of custom 914 recipies. Original is the item being upgraded, New is the item to upgrade to, and Chance is the percent chance of the upgrade happening. You can specify multiple upgrade choices for the same item. + scp914_item_changes: + Rough: + - original: KeycardO5 + new: MicroHID + chance: 50 + # The list of custom 914 recipies for roles. Original is the role to be changed, New is the new role to assign, Chance is the % chance of the upgrade occuring. + scp914_class_changes: + Rough: + - original: ClassD + new: Spectator + chance: 100 + keep_inventory: true + # The list of 914 teleport settings. Note that if you set "zone" to anything other than Unspecified, it will always select a random room from that zone, instead of the room type defined. + scp914_teleport_chances: + Rough: + - zone: Unspecified + room: LczClassDSpawn + offset: + x: 0 + y: 0 + z: 0 + chance: 100 + damage: 0 + # A dictionary of random effects to apply to players when going through 914 on certain settings. + scp914_effect_chances: + Rough: + - effect: Amnesia + chance: 100 + duration: 0 + # Determines if 914 effects are exclusive, meaning only one can be applied each time a player is processed by 914. + scp914_effects_exclusivity: false + # Whether or not SCPs are immune to effects gained from 914. + scps_immune_to914_effects: false + # The frequency (in seconds) between ragdoll cleanups. Set to 0 to disable. + ragdoll_cleanup_delay: 0 + # If ragdoll cleanup should only happen in the Pocket Dimension or not. + ragdoll_cleanup_only_pocket: false + # The frequency (in seconds) between item cleanups. Set to 0 to disable. + item_cleanup_delay: 0 + # If item cleanup should only happen in the Pocket Dimension or not. + item_cleanup_only_pocket: false + # A list of all roles and their damage modifiers. The number here is a multiplier, not a raw damage amount. Thus, setting it to 1 = normal damage, 1.5 = 50% more damage, and 0.5 = 50% less damage. + role_damage_multipliers: + Scp173: 1 + # A list of all Weapons and their damage modifiers. The number here is a multiplier, not a raw damage amount. Thus, setting it to 1 = normal damage, 1.5 = 50% more damage, and 0.5 = 50% less damage. + damage_multipliers: + E11Sr: 1 + # A list of roles and how much health they should be given when they kill someone. + health_on_kill: + Scp173: 0 + Scp93953: 10 + Scp93989: 20 + # A list of roles and what their default starting health should be. + health_values: + Scp173: 3200 + NtfCaptain: 150 + # If the plugin is enabled or not. + is_enabled: true +RP Names: +# Is the plugin enabled? + is_enabled: true + # Should people lose nick when made into a tutorial? + tutorial_nick: true + # Should Class-D be D-#### (true) or should it follow the other names with Title + Name (false)? + dbois_setting: true + # Should SCPs have their SCP as a name (true) or should they be hidden as a D-Class (false)? + s_c_p_setting: true + # Should nicknames reset on death? + death_reset: false + # Should a player be told their nickname? + show_nick: true + # Should a player have there real name after their nickname? + show_real_name: false + # A dictionary with classes and their title + class_titles: + ClassD: D- + Scientist: Dr. + FacilityGuard: 'Security Officer ' + NtfCaptain: 'Commander ' + NtfPrivate: 'Cadet ' + NtfSergeant: 'Lieutenant ' + NtfSpecialist: 'Field Agent ' + ChaosConscript: 'Agent of Chaos ' + Scp049: 'SCP-049 ' + Scp0492: 'SCP-049-2 ' + Scp079: 'SCP-079 ' + Scp096: 'SCP-096 ' + Scp106: 'SCP-106 ' + Scp173: 'SCP-173 ' + Scp93953: 'SCP-939-53 ' + Scp93989: 'SCP-939-89 ' + # The list of names to be given. (Leave empty for default, if you want to make your own list, look at readme) + human_names: [] +class_broadcast_reborn: +# Is enabled? + is_enabled: true + # Broadcast, Hint or Window (if not the correct type, it will hint) + broadcast_type: Hint + # the time you want bc or hint to be + bc_time: 7 + # Set class bc text + class_bc: + ClassD: Dboiiiiii + Scp049: You are Doctor + Scp173: Haha matthew goes brrrr +exiled_credits: +# Is the plugin enabled? + is_enabled: true + # Info side - Badge, CustomPlayerInfo, FirstAvailable + mode: FirstAvailable + # Overrides badge if exists + badge_override: false + # Overrides Custom Player Info if exists + custom_player_info_override: false + # Whether or not the plugin should ignore a player's DNT flag. By default (false), players with DNT flag will not be checked for credit tags. + ignore_dnt_flag: false +exiled_custom_items: +# Indicates whether this plugin is enabled or not. + is_enabled: true + # The hint that is shown when someone pickups a custom item. + picked_up_hint: + # The broadcast content + content: >- + You have picked up a {0} + + {1} + # The broadcast duration + duration: 10 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # The hint that is shown when someone selects a custom item. + selected_hint: + # The broadcast content + content: >- + You have selected a {0} + + {1} + # The broadcast duration + duration: 5 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # Whether or not debug messages should be displayed in the server console. + debug: false +exiled_custom_roles: +# Whether or not the plugin is enabled. + is_enabled: true + # Whether or not debug messages should be shown. + debug: false + # The hint that is shown when someone gets a custom role. + got_role_hint: + # The broadcast content + content: >- + You have spawned as a {0} + + {1} + # The broadcast duration + duration: 6 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true + # The hint that is shown when someone used a custom ability. + used_ability_hint: + # The broadcast content + content: >- + Ability {0} has been activated. + + {1} + # The broadcast duration + duration: 5 + # The broadcast type + type: Normal + # Indicates whether the broadcast should be shown or not + show: true +exiled_events: +# Indicates whether the plugin is enabled or not + is_enabled: true + # Indicates whether SCP-173 can be blocked or not by the tutorial + can_tutorial_block_scp173: true + # Indicates whether SCP-096 can be triggered or not by the tutorial + can_tutorial_trigger_scp096: true + # Indicates whether the name tracking is enabled or not + is_name_tracking_enabled: true + # Indicates whether the inventory should be dropped before being set as spectator, through commands or plugins + should_drop_inventory: true + # Indicates whether the blood can be spawned or not + can_spawn_blood: true + # Indicates whether configs have to be reloaded every round restart + should_reload_configs_at_round_restart: false + should_reload_translations_at_round_restart: false + # Indicates whether bans should be logged or not + should_log_bans: true + # Whether or not to log RA commands. + log_ra_commands: true +exiled_permissions: +# Indicates whether the debug should be shown or not + should_debug_be_shown: false + # The permissions folder path + folder: /home/steam/.config/EXILED/Configs + # The permissions full path + full_path: /home/steam/.config/EXILED/Configs/permissions.yml + # Indicates whether the plugin is enabled or not + is_enabled: true +exiled_updater: +# Indicates whether the plugin is enabled or not + is_enabled: true + # Indicates whether the debug should be shown or not + should_debug_be_shown: false + # Indicates whether testing releases have to be downloaded or not + should_download_testing_releases: false + # Indicates which assemblies should be excluded from the update + exclude_assemblies: [] +respawn_timer: +# Is the plugin enabled. + is_enabled: true + # Should debug messages be shown in a server console. + show_debug_messages: false + # Should a timer be lower or higher on the screen. (values from 0 to 14, 0 - very high, 14 - very low) + text_lowering: 8 + # Should a timer show an exact number of minutes? + show_minutes: true + # Should a timer show an exact number of seconds? + show_seconds: true + # Should a timer be only shown, when a spawnning sequence has begun? (NTF Helicopter / Chaos Car arrives) + show_timer_only_on_spawn: false + # Should number of spectators be shown? + show_number_of_spectators: true + # Should the NTF and CI respawn tickets be shown? + show_tickets: true +scp008_x: + is_enabled: true + # Only enable this if you're looking for bug sources! + debug_mode: false + # Percent chance to create infection. + infection_chance: 100 + # Percent chance to successfully cure. + cure_chance: 50 + # Allow SCP-049 to instantly revive targets? + buff_doctor: false + # Base zombie health. + zombie_health: 500 + # Max zombie health. + max_zombie_health: 700 + # How much AHP should be given to Zombies? + scp008_buff: 10 + # 008x zombie starting Ahp (Shield). + starting_ahp: 100 + # How much AHP should zombies stop earning at? + max_ahp: 100 + # Whether to have a public cassie announcement. + cassie_announce: true + # Announcement for server. + announcement: SCP 0 0 8 containment breach detected . Allremaining + # How much damage 008 zombie does per hit. + zombie_damage: 24 + # Text displayed to players after they've been infected + infection_alert: You've been infected! Use SCP-500 or a medkit to be cured! diff --git a/scpsl-exiled/download.sh b/scpsl-exiled/download.sh new file mode 100755 index 0000000..df95538 --- /dev/null +++ b/scpsl-exiled/download.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +# https://github.com/Exiled-Team/EXILED/releases + +curl -LO 'https://github.com/Exiled-Team/EXILED/releases/download/8.9.11/Exiled.tar.gz' +tar -xzvf Exiled.tar.gz +cp -r EXILED "${CONFIG_DIR}" +rm -fr EXILED + +# https://github.com/Exiled-Team/Common-Utils + curl -LO 'https://github.com/Exiled-Team/Common-Utils/releases/download/7.1.1/Common.Utilities.dll' + +# https://github.com/Michal78900/RespawnTimer + curl -LO 'https://github.com/Michal78900/RespawnTimer/releases/download/v4.0.4/RespawnTimer.dll' + +# https://github.com/babyboucher/RPNames + curl -LO 'https://github.com/1EnesBaturKaza/RPNames/releases/download/v2.2.0/RPNames.dll' + +# https://github.com/DGvagabond/SCP-008-X +curl -LO 'https://github.com/DGvagabond/SCP-008-X/releases/download/3.1.2/SCP008X.dll' + +mkdir -p "${CONFIG_DIR}/EXILED/Plugins/" +mv *.dll "${CONFIG_DIR}/EXILED/Plugins/" diff --git a/scpsl/.dockerignore b/scpsl/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/scpsl/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/scpsl/.env b/scpsl/.env new file mode 100644 index 0000000..d922a2d --- /dev/null +++ b/scpsl/.env @@ -0,0 +1 @@ +SERVER_PORT=7777 \ No newline at end of file diff --git a/scpsl/.gitignore b/scpsl/.gitignore new file mode 100644 index 0000000..98ab143 --- /dev/null +++ b/scpsl/.gitignore @@ -0,0 +1,2 @@ +config_gameplay.txt +config_remoteadmin.txt \ No newline at end of file diff --git a/scpsl/Dockerfile b/scpsl/Dockerfile new file mode 100644 index 0000000..576ffeb --- /dev/null +++ b/scpsl/Dockerfile @@ -0,0 +1,30 @@ +FROM steamcmd + +ENV GAME=scpsl +ENV APP_ID=996560 + +RUN mkdir -p /steam/${GAME}/ \ + && chown steam /steam/${GAME}/ + +USER steam + +WORKDIR /steam/${GAME}/ + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit + +ENV SERVER_PORT=7777 +ENV GAME_DIR=/home/steam/.config/SCP\ Secret\ Laboratory +ENV INSTANCE_DIR=${GAME_DIR}/config/${SERVER_PORT}/ +COPY *.txt "${INSTANCE_DIR}" + +USER root + +RUN chown -R steam:steam "${GAME_DIR}" \ + && chmod u+rw "${GAME_DIR}" + +USER steam + +COPY start.sh . +ENTRYPOINT ["./start.sh"] diff --git a/scpsl/README.md b/scpsl/README.md new file mode 100644 index 0000000..924eb42 --- /dev/null +++ b/scpsl/README.md @@ -0,0 +1,13 @@ +# SCP Secret Laboratory + +## Build notes +To catch updates since the original image was built, run: + + ``` +docker build --build-arg CACHE_DATE="$(date)" +``` + +This will re-use the previously built image as a base instead of re-downloading everything again. + +## Environment variables + diff --git a/scpsl/config-templates/config_gameplay.template.txt b/scpsl/config-templates/config_gameplay.template.txt new file mode 100644 index 0000000..48d5507 --- /dev/null +++ b/scpsl/config-templates/config_gameplay.template.txt @@ -0,0 +1,445 @@ +#Server main settings +server_name: My Server Name +#default - uses server_name +player_list_title: default +player_list_title_rate: default +serverinfo_pastebin_id: 7wV681fT +server_ip: auto +max_players: 20 +server_tickrate: 60 +use_reserved_slots: true +lobby_waiting_time: default +ipv4_bind_ip: 0.0.0.0 +ipv6_bind_ip: :: +contact_email: default + +#Spawn settings +minimum_MTF_time_to_spawn: 280 +maximum_MTF_time_to_spawn: 350 +maximum_MTF_respawn_amount: 15 +maximum_CI_respawn_amount: 15 +priority_mtf_respawn: true +use_crypto_rng: false +team_respawn_queue: 40143140314414041340 +smart_class_picker: true + +## Player Info Range ## +# This controls the default range that the player information text appears on clients. +player_info_range: 10 # Default is 10. + +## Respawn ticket system settings ## + +# Enables the respawn tickets system. +# Each NTF or CI player spawned in consumes one ticket. +# We recommend keeping this on for game balance! +# +# Warning: Even if you disable the system, the tickets ratio for MTF/CI will still determine their spawn chance. +respawn_tickets_enable: true + +# Ticket counts (initial) +# The ratio of MTF-to-CI tickets directly determines which team has a higher chance of spawning. +# The initial settings (24:14) give around 36.8% chance for the CI to spawn instead of the MTF. +# The CI spawn chance can be calculated by this formula: CI_TICKETS / (MTF_TICKETS + CI_TICKETS) * 100% +respawn_tickets_mtf_initial_count: 24 +respawn_tickets_ci_initial_count: 14 + +# Ticket counts (events) +respawn_tickets_mtf_classd_cuffed_escape_count: 1 +respawn_tickets_mtf_scientist_escape_count: 1 +respawn_tickets_mtf_scp_hurt_escape_count: 1 +respawn_tickets_ci_classd_escape_count: 1 +respawn_tickets_ci_scientist_cuffed_escape_count: 2 +respawn_tickets_ci_scientist_died_count: 1 +respawn_tickets_ci_scp_item_count: 2 + +# Ticket misc settings +# The percentage of health an SCP must lose to trigger the 'scp_hurt' tickets. +respawn_tickets_mtf_scp_hurt_interval: 0.25 + + + +## Stamina system settings ## + +# The percentage of stamina used per second while sprinting. +# 0.05 = 5%, 0.33 = 33%, etc. +# NOTE: Stamina is currently only utilized on humans. +# 0 to disable, but this *will* cause weirdness with status effects +# and other mechanics, so we recommend keeping it on! +stamina_balance_use: 0.05 + +# The time (in seconds) that newly-spawned players can sprint +# without consuming stamina. Used to reduce visual artifacts. +# We recommend to put it at least 2 seconds +stamina_balance_immunity: 3 + +# The seconds that must pass before stamina starts regenerating after +the player stops sprinting. +# Lower values are more liekly to be exploited by players +# Higher higher can be annoying to players. +stamina_balance_regen_cd: 1 + +# How fast the stamina regenerates. +# This is a multiplier for the default setting, +# which is based on a curve - not a specific value. +stamina_balance_regen_speed: 1 + +# Multiplier for human walk speed. +# Default speed before multiplier is 4.5 m/s. +stamina_balance_walk_speed: 1.2 + +# Multiplier for human sprint speed. +# Default speed before multiplier is 7 m/s. +stamina_balance_sprint_speed: 1.05 + + + +#Random-stuff settings (-1: random) +server_forced_class: -1 +map_seed: -1 + +#Misc gameplay settings +intercom_cooldown: 120 +intercom_max_speech_time: 20 +auto_round_restart_time: 10 +friendly_fire: false +friendly_fire_multiplier: 1 +warhead_tminus_start_duration: 90 +human_grenade_multiplier: 0.7 +scp_grenade_multiplier: 1 +lock_gates_on_countdown: true +isolate_zones_on_countdown: false +open_doors_on_countdown: true +keep_items_after_escaping: true +allow_playing_as_tutorial: true +disable_decontamination: false +096_destroy_locked_doors: true +no_holidays: false +allow_disarmed_interaction: false +914_mode: default +sinkhole_slow_amount: 30 +sinkhole_spawn_chance: 0 +disconnect_drop: true +end_round_on_one_player: false + +# Time in seconds till ragdolls are removed. Set below 1 to disable. +ragdoll_cleanup_time: 0 + +#How many seconds someone is AFK sitting in their spawn location before they are kicked. Set to 0 or lower to disable. (Due to the 079 intro screen 079 has 13 extra seconds to be AFK.) +afk_time: 90 +constantly_check_afk: false + + +#Pocket Dimension settings +pd_exit_count: 2 +pd_random_exit_rids: +pd_random_exit_rids_after_decontamination: +pd_refresh_exit: false + +#Disarmer settings +mtf_can_cuff_researchers: true +ci_can_cuff_class_d: true +cuffed_escapee_change_team: true + +#Spawn Protect settings +spawn_protect_disable: true +spawn_protect_time: 30 +spawn_protect_team: [1, 2] +spawn_protect_allow_dmg: true + +#Auto Event Broadcast settings +auto_warhead_broadcast_enabled: false +auto_warhead_broadcast_message: The Alpha Warhead is being detonated +auto_warhead_broadcast_time: 10 +auto_warhead_detonate_broadcast: The Alpha Warhead has been detonated now +auto_warhead_detonate_broadcast_time: 10 +auto_decon_broadcast_enabled: false +auto_decon_broadcast_message: Light Containment Zone is now decontaminated +auto_decon_broadcast_time: 10 + +#Grenades chaining options +#-1 to unlimited, 0 to disable chain reaction + +#max amount of grenades that can be activated by a single grenade +grenade_chain_limit: 10 + +#limit of length of grenades chain +grenade_chain_length_limit: 4 + + + +#Security & Anticheat (default settings are good enough in most cases) +#Please type !private in your server console, if your server is verified, but you want to keep it hidden from the list. Type !public to make it public again. +online_mode: true +ip_banning: true +enable_whitelist: false +forward_ports: true +enable_query: false +query_port_shift: 0 +query_use_IPv6: true +administrator_query_password: none +connections_delay_time: 5 +enable_sync_command_binding: false +ratelimit_kick: true +same_account_joining: false +anticheat_console_output: false +enable_fast_round_restart: true +fast_round_restart_delay: 3.2 + +#Enables challenge during preauthentication +preauth_challenge: true + +#Reply - prevents from flooding server with preauth requests from spoofed IP addresses +#MD5 or SHA1 - prevents from flooding with preauth requests from legitimate IP addresses as well. Requires additional time to join the server. +preauth_challenge_mode: reply +preauth_challenge_base_length: 10 +preauth_challenge_time_window: 12 +preauth_challenge_clean_period: 4 + +#Only for MD5 and SHA1 challenges (higher value = longer time required to join the server) +preauth_challenge_secret_length: 2 + +#This enforces the player to be using same IP address to connect to the game and authenticate. +#Enabling this blocks proxies. Not enforced if player joined from IPv4 and authenticated from IPv6 or viceversa. +#Situations with combinating IPv4 and IPv6 addresses are being checked on central servers after authentication (only for servers on public list). +enforce_same_ip: true +no_enforcement_for_local_ip_addresses: true + +#This enforces that the IP address used to connect to the game and authenticate must be assigned to the same Internet Service Provider (ISP). +#Works only on servers on the public list. This is less restrictive that "enforce_same_ip" and blocks most of the proxies. +enforce_same_asn: true + +#Connections ratelimiting +#Ratelimit time windows define how often user with the same IP/UserID can initialize new connection (once per X seconds). +enable_ip_ratelimit: true +enable_userid_ratelimit: true +ip_ratelimit_window: 3 +userid_ratelimit_window: 5 + + + +## Item limits ## +# Ammo settings in this config are sorted as [X, Y, Z] +# X = 5.56mm (E-11-SR) +# Y = 7.62mm (Logicer, MP7) +# Z = 9mm (P90, COM-15) + +# Default ammo that each class gets on respawn +class_d_personnel_defaultammo: [0, 0, 0] +nine_tailed_fox_scientist_defaultammo: [120, 20, 20] +scientist_defaultammo: [0, 0, 0] +chaos_insurgency_defaultammo: [0, 100, 0] +nine_tailed_fox_lieutenant_defaultammo: [80, 0, 50] +nine_tailed_fox_commander_defaultammo: [120, 0, 100] +nine_tailed_fox_cadet_defaultammo: [40, 0, 100] +tutorial_defaultammo: [0, 0, 0] +facility_guard_defaultammo: [0, 35, 0] + +# Ammo limits, values from 0 to 65.5k, where 0 = unlimited. +class_d_personnel_ammolimit: [80, 70, 50] +nine_tailed_fox_scientist_ammolimit: [160, 100, 200] +scientist_ammolimit: [80, 70, 50] +chaos_insurgency_ammolimit: [80, 200, 100] +nine_tailed_fox_lieutenant_ammolimit: [160, 100, 200] +nine_tailed_fox_commander_ammolimit: [160, 100, 200] +nine_tailed_fox_cadet_ammolimit: [160, 100, 200] +tutorial_ammolimit: [160, 100, 200] +facility_guard_ammolimit: [160, 100, 200] + +# Item limits - values range from 0 to 8. +# Values of 0 are NOT unlimited and will prevent item pickups of that type entirely! +# The inventory can hold a max of 8 items, +# so a limit of 8 is effectively unlimited. +itemlimit_keycard: 3 +itemlimit_medical_item: 3 +itemlimit_weapon: 2 +itemlimit_grenade: 3 +itemlimit_scp_item: 3 + + + +#Friendly fire punishment +#Action is performed if someone either kills enough teammates OR deals enough damage to teammates. +#Set kills or damage to 0 to disable that threshold. +#Detectors priority: Respawn (kill), Window (kill), Life (kill), Round (kill), Respawn (damage), Window (damage), Life (damage), Round (damage) +#Actions: kill, kick, ban, noop (no operation - do nothing, eg. to enable logging) +#Damage dealt AFTER round end is ignored. + +ff_detector_global_broadcast_seconds: 5 +ff_detector_global_adminchat_seconds: 6 + +#If enabled Class D personnel can damage or kill other Class D personnel without being punished for it +ff_detector_classD_can_damage_classD: false + +#If set to "none" then the webhook for cheaters reporting will be used +ff_detector_webhook_url: none + + +#Per round +ff_detector_round_enabled: true +ff_detector_round_kills: 6 +ff_detector_round_damage: 500 + +ff_detector_round_action: ban +ff_detector_round_ban_time: 24h +ff_detector_round_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_round_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_round_adminchat_enable: false +ff_detector_round_adminchat_message: %nick has been banned for teamkilling (round detector). + +ff_detector_round_broadcast_enable: true +ff_detector_round_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_round_webhook_report: true + + +#Per life (resets on respawn) +ff_detector_life_enabled: true +ff_detector_life_kills: 4 +ff_detector_life_damage: 300 + +ff_detector_life_action: ban +ff_detector_life_ban_time: 24h +ff_detector_life_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_life_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_life_adminchat_enable: false +ff_detector_life_adminchat_message: %nick has been banned for teamkilling (life detector). + +ff_detector_life_broadcast_enable: true +ff_detector_life_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_life_webhook_report: true + + +#In a specified time window +ff_detector_window_enabled: true +ff_detector_window_seconds: 180 +ff_detector_window_kills: 3 +ff_detector_window_damage: 250 + +ff_detector_window_action: ban +ff_detector_window_ban_time: 16h +ff_detector_window_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_window_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_window_adminchat_enable: false +ff_detector_window_adminchat_message: %nick has been banned for teamkilling (window detector). + +ff_detector_window_broadcast_enable: true +ff_detector_window_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_window_webhook_report: true + + +#In a specified time window AFTER RESPAWN +ff_detector_spawn_enabled: true +ff_detector_spawn_window_seconds: 120 +ff_detector_spawn_kills: 2 +ff_detector_spawn_damage: 180 + +ff_detector_spawn_action: ban +ff_detector_spawn_ban_time: 48h +ff_detector_spawn_bankick_reason: You have been automatically banned for teamkilling. +ff_detector_spawn_kill_reason: You have been automatically killed for teamkilling. + +ff_detector_spawn_adminchat_enable: false +ff_detector_spawn_adminchat_message: %nick has been banned for teamkilling (spawn detector). + +ff_detector_spawn_broadcast_enable: true +ff_detector_spawn_broadcast_message: %nick has been automatically banned for teamkilling. + +ff_detector_spawn_webhook_report: true + + + +#Enable this if and ONLY if you use plugin or modification that provides custom whitelist. +#This is only to mark the server on the public list as using a whitelist. +#More information can be found in the Verified Server Rules. +#Ignore this config key if your server is not verified. +custom_whitelist: false + +#Enable this if and ONLY if you use plugin or modification that restricts access to the server (other than whitelist, eg. password). +#This is only to mark the server on the public list as using access restriction. +#More information can be found in the Verified Server Rules. +#Ignore this config key if your server is not verified. +server_access_restriction: false + +#Enable this if and ONLY if your server is a Custom Gamemode Server according to the definition that can be found in the Verified Server Rules. +#Ignore this config key if your server is not verified. +custom_gamemode_server: false + +#port_queue is for NONDEDICATED SERVERS ONLY +port_queue: + - 7777 + - 7778 + - 7779 + - 7780 + - 7781 + - 7782 + - 7783 + - 7784 + +#Enabling this will automatically ban IP of players on the server that receives a Global Ban by a Global Moderator. (Defaults to false) +gban_ban_ip: default + +ban_nickname_maxlength: default +ban_nickname_trimunicode: default + +#Nickname filtering, using regex +nickname_filter: default +nickname_filter_replacement: default + +#Administrative actions broadcast options +broadcast_kicks: false +broadcast_kick_text: %nick% has been kicked from this server. +broadcast_kick_duration: 5 +broadcast_bans: true +broadcast_ban_text: %nick% has been banned from this server. +broadcast_ban_duration: 5 + +#Server idle mode +idle_mode_enabled: true +idle_mode_time: 5000 +idle_mode_preauth_time: 30000 +idle_mode_tickrate: 1 + +#Player report +report_send_using_discord_webhook: false +report_discord_webhook_url: PleaseSetWebhookUrlHere +report_username: Cheater Report +report_avatar_url: default +report_color: 14423100 +report_server_name: My SCP:SL Server +report_header: Player Report +report_content: Player has just been reported. + +#Restart options +#Requires LocalAdmin or a fully compatible tool. + +#You can set autorestart of the server after a specified amount of rounds (0 - disabled). +restart_after_rounds: 0 + +#Amount of time after client should rejoin after a full server restart. +#Adjust depending on your server restart time. +full_restart_rejoin_time: 25 + + +#Geoblocking +#If your server is on the public list, please refer to Verified Server Rules for more details. +#Modes: none, whitelist, blacklist +geoblocking_mode: none + +#If enabled, players on the whitelist are able to ignore geoblocking. +geoblocking_ignore_whitelisted: true + +#ISO country codes, eg. PL, US, DE +geoblocking_whitelist: + - AA + - AB + - AC + +geoblocking_blacklist: + - AA + - AB + - AC diff --git a/scpsl/config-templates/config_remoteadmin.template.txt b/scpsl/config-templates/config_remoteadmin.template.txt new file mode 100644 index 0000000..515db72 --- /dev/null +++ b/scpsl/config-templates/config_remoteadmin.template.txt @@ -0,0 +1,100 @@ +#Let's assign roles (you can modify them and create custom roles below) +#UserID format is SteamId64Here@steam, DiscordUserIDHere@discord, etc... +Members: + - SomeSteamId64@steam: owner + - SomeOtherSteamId64@steam: admin + - AnotherSteamId64@steam: admin + - SomeDiscordUserId@discord: moderator + +#Should Secret Lab development staff be able to use the Remote Admin? +enable_staff_access: false + +#Should Secret Lab CEO and managers be able to use Remote Admin? (We do not abuse our powers) +enable_manager_access: true + +#Allow remote admin access for the banning team, to allow them searching and fightung cheaters globally +enable_banteam_access: true + +#Enable reserved slots for the banning team (they are restricted by reserved slots limit set in the gameplay config) +enable_banteam_reserved_slots: true + +#Allow the banning team to bypass georestrictions on the server +enable_banteam_bypass_geoblocking: true + +#Let's define roles +#use color "none" to disable badge +#you can add own roles too +#cover means that this local badge is more important than a global badge and will cover it +#hidden means that this local badge is hiddeny by default (always you can use "hidetag" and "showtag" commands in game console or text-based remote admin) +#kick_power is the power for kicking and banning that the member of this group has (can be from 0 to 255) +#required_kick_power is the required kick power to kick or ban a member of this group (can be from 0 to 255) + +owner_badge: SERVER OWNER +owner_color: red +owner_cover: true +owner_hidden: false +owner_kick_power: 255 +owner_required_kick_power: 255 + +admin_badge: ADMIN +admin_color: red +admin_cover: true +admin_hidden: false +admin_kick_power: 1 +admin_required_kick_power: 2 + +moderator_badge: MODERATOR +moderator_color: silver +moderator_cover: true +moderator_hidden: false +moderator_kick_power: 0 +moderator_required_kick_power: 1 + +#And add them to the roles list +Roles: + - owner + - admin + - moderator + +#Let's setup permissions for roles +#More info can be found on our wiki: https://en.scpslgame.com/index.php/Docs:Permissions +Permissions: + - KickingAndShortTermBanning: [owner, admin, moderator] + - BanningUpToDay: [owner, admin, moderator] + - LongTermBanning: [owner, admin] + - ForceclassSelf: [owner, admin, moderator] + - ForceclassToSpectator: [owner, admin, moderator] + - ForceclassWithoutRestrictions: [owner, admin] + - GivingItems: [owner, admin] + - WarheadEvents: [owner, admin, moderator] + - RespawnEvents: [owner, admin] + - RoundEvents: [owner, admin, moderator] + - SetGroup: [owner] + - GameplayData: [owner, admin] + - Overwatch: [owner, admin, moderator] + - FacilityManagement: [owner, admin, moderator] + - PlayersManagement: [owner, admin] + - PermissionsManagement: [owner] + - ServerConsoleCommands: [] + - ViewHiddenBadges: [owner, admin, moderator] + - ServerConfigs: [owner] + - Broadcasting: [owner, admin, moderator] + - PlayerSensitiveDataAccess: [owner, admin, moderator] + - Noclip: [owner, admin] + - AFKImmunity: [owner, admin] + - AdminChat: [owner, admin, moderator] + - ViewHiddenGlobalBadges: [owner, admin, moderator] + - Announcer: [owner, admin] + - Effects: [owner, admin] + - FriendlyFireDetectorImmunity: [owner, admin, moderator] + - FriendlyFireDetectorTempDisable: [owner, admin] + +#Set to "none" in order to disable password. +#WE DON'T RECOMMEND USING PASSWORD!!! +#SETUP STEAMID AUTHENTICATION INSTEAD (of the top of this config file)! +override_password: none +override_password_role: owner + +#Allows running central server commands (they are prefixed with "!") using "sudo"/"cron" command in RA (requires ServerConsoleCommands permission). +#Don't turn on unless you fully trust all people with this permission, they needs to run that commands from RA and you know what are you doing +allow_central_server_commands_as_ServerConsoleCommands: false diff --git a/scpsl/start.sh b/scpsl/start.sh new file mode 100755 index 0000000..66f5664 --- /dev/null +++ b/scpsl/start.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e +set -u + +export CONFIG_DIR="/SCP Secret Laboratory/config/${SERVER_PORT}" + +mkdir -p "${CONFIG_DIR}" \ + && cp -r config_gameplay.txt "${CONFIG_DIR}/config_gameplay.txt" \ + && cp -r config_remoteadmin.txt "${CONFIG_DIR}/config_remoteadmin.txt" + +DATE_ACCEPTED=$(date -u +"%Y-%m-%dT%H:%M:%S.%NZ") + +cat </home/steam/.config/SCP\ Secret\ Laboratory/config/localadmin_internal_data.json +{"GitHubPersonalAccessToken":null,"EulaAccepted":"${DATE_ACCEPTED}","PluginManagerWarningDismissed":false,"LastPluginAliasesRefresh":null,"PluginVersionCache":{},"PluginAliases":{}} +EOF + +./LocalAdmin ${SERVER_PORT} -d diff --git a/serioussam3-wip/.dockerignore b/serioussam3-wip/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/serioussam3-wip/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/serioussam3-wip/Dockerfile b/serioussam3-wip/Dockerfile new file mode 100644 index 0000000..ba53deb --- /dev/null +++ b/serioussam3-wip/Dockerfile @@ -0,0 +1,12 @@ +FROM steamcmd + +USER root + +ENV GAME=ss3 +ENV APP_ID=41080 + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir ../${GAME} +app_update ${APP_ID} +quit + +ENTRYPOINT ["./start.sh"] diff --git a/serioussam3-wip/README.md b/serioussam3-wip/README.md new file mode 100644 index 0000000..c85f88f --- /dev/null +++ b/serioussam3-wip/README.md @@ -0,0 +1 @@ +# Serious Sam 3 \ No newline at end of file diff --git a/serioussam3-wip/servercfg.cfg b/serioussam3-wip/servercfg.cfg new file mode 100644 index 0000000..a727891 --- /dev/null +++ b/serioussam3-wip/servercfg.cfg @@ -0,0 +1,45 @@ +-- General +rcts_strWelcomeNote = "Server RCON MOTD"; +rcts_strAdminPassword = "changeme"; +prj_strLogFile = ""; +net_strLocalHost = ""; +gam_idGameMode = "Cooperative"; +ser_iMaxClientBPS = 11000; +prj_iDedicatedFPS = 100; +gam_ctMaxPlayers = 20; +prj_uwPort = 27015; +prj_strMultiplayerSessionName = "NoxLAN - Serious Sam 3 BFE Server"; + +-- Options +gam_bAllowJoinInProgress = 1; +gam_bAllowPowerupItems = 1; +gam_bAllowArmorItems = 1; +gam_bWeaponsStay = 1; +gam_bAmmoStays = 1; +gam_bArmorStays = 1; +gam_bHealthStays = 1; +gam_bAllowHealthItems = 1; +gam_bInfiniteAmmo = 0; + +-- Levels +local mapList = ""; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\01_CairoSquare\01_CairoSquare.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\02_CairoMuseum\02_CairoMuseum.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\03_IbnTulun\03_IbnTulun.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\04_IbnTulun\04_Medina.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\05_CairoTown\05_CairoTown.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\06_Pyramids\06_Pyramids.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\07_Karnak1\07_Karnak1.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\08_Karnak2\08_Karnak2.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\09_Luxor\09_Luxor.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\10_LostNubianTemples\10_LostNubianTemples.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\11_Ramesseum\11_Ramesseum.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\01_BFE\12_HatshepsutTemple\12_HatshepsutTemple.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\01_Philae\01_Philae.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\02_AbuSimbel\02_AbuSimbel.wld;"; +mapList = mapList .. "Content\SeriousSam3\Levels\02_DLC\03_TempleOfSethirkopshef\03_TempleOfSethirkopshef.wld;"; +prj_StrMapList = mapList; + +-- Scripts + +-- Custom diff --git a/serioussam3-wip/start.sh b/serioussam3-wip/start.sh new file mode 100755 index 0000000..a9bf588 --- /dev/null +++ b/serioussam3-wip/start.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/settings.sh b/settings.sh deleted file mode 100644 index 9cabf39..0000000 --- a/settings.sh +++ /dev/null @@ -1,13 +0,0 @@ - -# If you have set up a docker network for game servers to use (see advanced -# section of the README) then put its name here -[[ -z $NETWORK ]] && (docker network inspect gameservers 2>/dev/null >/dev/null ) && NETWORK="gameservers" -[[ -z $NETWORK ]] && NETWORK="host" - -# The docker container restart policy. Usually always, unless-stopped, or -# blank for never -[[ -z $RESTART ]] && RESTART="unless-stopped" - -[[ -z $OTHER_DOCKER_OPTS ]] && OTHER_DOCKER_OPTS="--detach" - - diff --git a/steamcmd/.dockerignore b/steamcmd/.dockerignore new file mode 100644 index 0000000..ce2d52c --- /dev/null +++ b/steamcmd/.dockerignore @@ -0,0 +1,3 @@ +.git +.gitignore +Dockerfile diff --git a/steamcmd/Dockerfile b/steamcmd/Dockerfile index bcf5301..4f28f87 100644 --- a/steamcmd/Dockerfile +++ b/steamcmd/Dockerfile @@ -1,18 +1,28 @@ FROM base -RUN useradd -m steam +# Dear srcds, plz don't crash. We have brought you these offerings. +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y \ + libstdc++6:i386 \ + libcurl3-gnutls-dev:i386 \ + libcurl4-gnutls-dev:i386 \ + libstdc++6:i386 \ + libncurses5:i386 \ + libtinfo5:i386 \ + gdb:i386 + +RUN useradd -m steam --create-home \ + && mkdir -p /steam/steamcmd_linux \ + && mkdir -p /steam/scripts \ + && chown -R steam /steam + +COPY zip-utils.sh /steam/scripts/ -RUN mkdir -p /steam/steamcmd_linux - -RUN chown -R steam /steam USER steam - WORKDIR /steam/steamcmd_linux -RUN wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -RUN tar -xf steamcmd_linux.tar.gz - - -RUN ./steamcmd.sh +login anonymous +quit - +RUN wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz \ + && tar -xf steamcmd_linux.tar.gz \ + && ./steamcmd.sh +login anonymous +quit diff --git a/steamcmd/build.sh b/steamcmd/build.sh deleted file mode 100755 index 9b03654..0000000 --- a/steamcmd/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build steamcmd diff --git a/steamcmd/zip-utils.sh b/steamcmd/zip-utils.sh new file mode 100755 index 0000000..e323a15 --- /dev/null +++ b/steamcmd/zip-utils.sh @@ -0,0 +1,87 @@ +#!/bin/bash + +export TEMP_DIR="${TEMP_DIR:-/tmp}" +mkdir -p "${TEMP_DIR}" + +function moveToDir { + local lWorkingDir=$(pwd) + + local lSource="$1" + local lDestination="$2" + + echo "rsync from $lSource to $lDestination" + + cd "${lSource}" + rsync -av --stats --progress . "${lDestination}" + cd "${lWorkingDir}" + + rm -fr "${lSource}" +} + +function sparseCloneAndMove { + local lWorkingDir=$(pwd) + + local lRepo="$1" + local lBasename=$(basename $1 .git) + local lPaths="$2" + local lDestination="$3" + + mkdir -p "${lDestination}" + local lRealPath=$(realpath "${lDestination}") + + git clone --depth=1 "${lRepo}" + cd "${lBasename}" + git sparse-checkout set "${lPaths}" + for p in "${lPaths[@]}"; do mv "$p" "${lRealPath}"; done + cd "${lWorkingDir}" + + rm -fr "${lBasename}" +} + +function unzipAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Unzipping $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + unzip -o "${lArchive}" -d "${TEMP_DIR}" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + unzip -o "${lArchive}" "${lArchiveDir}/*" -d "${TEMP_DIR}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} + +function un7zipAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Un7zipping $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + 7za x "${lArchive}" -o"${TEMP_DIR}/" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + 7za x "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} + +function unzipLzmaAndMoveToDir { + local lArchive="$1" + local lDestination="$2" + local lArchiveDir="$3" + + echo "Unzipping LZMA $lArchive/$lArchiveDir to $lDestination" + + if [[ -z "${lArchiveDir}" ]]; then + 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}/" + moveToDir "${TEMP_DIR}" "${lDestination}" + else + 7za x -tzip -mm=LZMA "${lArchive}" -o"${TEMP_DIR}" "${lArchiveDir}" + moveToDir "${TEMP_DIR}/${lArchiveDir}" "${lDestination}" + fi +} diff --git a/tf2-melkort-mvm-wip/.dockerignore b/tf2-melkort-mvm-wip/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/tf2-melkort-mvm-wip/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/tf2-melkort-mvm-wip/.gitignore b/tf2-melkort-mvm-wip/.gitignore new file mode 100644 index 0000000..7323e9a --- /dev/null +++ b/tf2-melkort-mvm-wip/.gitignore @@ -0,0 +1,2 @@ +tf_mvm_missioncycle.res +server.cfg \ No newline at end of file diff --git a/tf2-melkort-mvm-wip/Dockerfile b/tf2-melkort-mvm-wip/Dockerfile new file mode 100644 index 0000000..1c4ee97 --- /dev/null +++ b/tf2-melkort-mvm-wip/Dockerfile @@ -0,0 +1,9 @@ +FROM ghcr.io/melkortf/tf2-sourcemod + +COPY tf_mvm_missioncycle.res /home/tf2/server/tf/ +COPY server.cfg /home/tf2/server/tf/cfg/ + +ENV MAP=mvm_coaltown + +ENTRYPOINT ["./entrypoint.sh"] +CMD ["+sv_pure", "1", "+map", "mvm_coaltown", "+maxplayers", "40"]tf \ No newline at end of file diff --git a/tf2-melkort-mvm-wip/config-templates/server.template.cfg b/tf2-melkort-mvm-wip/config-templates/server.template.cfg new file mode 100644 index 0000000..c95b4c2 --- /dev/null +++ b/tf2-melkort-mvm-wip/config-templates/server.template.cfg @@ -0,0 +1,191 @@ +// taken from https://steamcommunity.com/discussions/forum/13/612823460277729158/ + +// General MVM Settings // +tf_mm_servermode 1 //puts the server into mvm matchmaking +tf_mm_strict 0 //allows players to join through matchmaking and server browsing +tf_mm_match_size_mvm 6 //minimum players needed in matchmaking before connecting +tf_mvm_min_players_to_start 1 //default 3 +tf_mvm_respec_enabled 1 //allow refunds +tf_mvm_respec_limit 0 //total allowed refunds; 0 - unlimited +tf_mvm_respec_credit_goal 2000 //if respec_limit is not 0, then the total number of credits needed to earn a refund +tf_mvm_skill 3 // 1 - easy; 3 - medium (default); 5 - hard +tf_mvm_disconnect_on_victory 0 //disconnect players on victory +tf_mvm_victory_reset_time 60 //seconds to wait after victory before changing map +tf_mvm_defenders_team_size 16 +tf_mvm_max_connected_players 16 + +// Hostname for server. +hostname //Change the name + +// Set to lock per-frame time elapse +host_framerate 0 +// Set the pause state of the server +setpause 0 +// Control where the client gets content from +// 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only +sv_pure 2 +// Is the server pausable +sv_pausable 0 +// Type of server 0=internet 1=lan +sv_lan 0 +// Whether the server enforces file consistency for critical files +sv_consistency 1 +// Collect CPU usage stats +sv_stats 1 +//Tags +//sv_tags +//Server Player Password +// NOTE: if you have a password, your MvM server will not be allowed in Match Making. +//sv_password + +// Execute Banned Users // +exec banned_user.cfg +exec banned_ip.cfg +writeid +writeip + +// Contact & Region // + +// Contact email for server sysop +//sv_contact @gmail.com +// The region of the world to report this server in. +// -1 is the world, 0 is USA east coast, 1 is USA west coast +// 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa +//sv_region num + +// Rcon Settings // + +// Password for rcon authentication +rcon_password // Fill in the rcon password +// Number of minutes to ban users who fail rcon authentication +sv_rcon_banpenalty 1440 +// Max number of times a user can fail rcon authentication before being banned +sv_rcon_maxfailures 5 + +// Log Settings // + +// Enables logging to file, console, and udp < on | off >. +log on +// Log server information to only one file. +sv_log_onefile 1 +// Log server information in the log file. +sv_logfile 1 +// Log server bans in the server logs. +sv_logbans 1 +// Echo log information to the console. +sv_logecho 1 + +// Rate Settings // + +// Frame rate limiter +fps_max 600 +// Min bandwidth rate allowed on server, 0 == unlimited +sv_minrate 0 +// Max bandwidth rate allowed on server, 0 == unlimited +sv_maxrate 20000 +// Minimum updates per second that the server will allow +sv_minupdaterate 10 +// Maximum updates per second that the server will allow +sv_maxupdaterate 66 + +// Download Settings // + +// Allow clients to upload customizations files +sv_allowupload 1 +// Allow clients to download files +sv_allowdownload 1 +// Maximum allowed file size for uploading in MB +net_maxfilesize 64 + +//VOTING!// + +sv_allow_votes 1 +sv_vote_allow_spectators 0 +sv_vote_failure_timer 120 //(default 300 = 5 minutes) + +// REGULAR GAME VOTES // +//Enable Scramble Vote +sv_vote_issue_scramble_teams_allowed 0 +//Enable Restart Game +sv_vote_issue_restart_game_allowed 1 +//Enable NextLevel Vote +sv_vote_issue_nextlevel_allowed 1 +//Enable Kick vote +sv_vote_issue_kick_allowed 1 +//Kick Duration (0 for no ban time, non-0 for minutes to ban) +sv_vote_kick_ban_duration 10 + +// MVM VOTES // +//Enable Kick vote +sv_vote_issue_kick_allowed_mvm 1 +//Enable changelevel vote +sv_vote_issue_changelevel_allowed_mvm 1 +//Enable restart map vote +sv_vote_issue_restart_game_allowed_mvm 1 +//Enable classlimits vote +sv_vote_issue_classlimits_allowed_mvm 0 +//Enable classlimit max count vote +sv_vote_issue_classlimits_max_mvm 2 //(default 2) +//Enable kick players that havent connected yet but passed certain time threshold +sv_vote_issue_kick_min_connect_time_mvm 0 //(default 0 is enabled) +//Vote timer cooldown +sv_vote_failure_timer_mvm 120 //(default 120 = 2 minutes) +//Allow change difficulty vote +sv_vote_issue_mvm_challenge_allowed 1 + +// Round and Game Times // + +//Wait for Players +mp_waitingforplayers_cancel 1 +// Enable timers to wait between rounds. WARNING: Setting this to 0 has been known to cause a bug with setup times lasting 5:20 (5 minutes 20 seconds) on some servers! +mp_enableroundwaittime 1 +// Time after round win until round restarts +mp_bonusroundtime 10 +// If non-zero, the current round will restart in the specified number of seconds +mp_restartround 0 +//Enable sudden death +mp_stalemate_enable 0 +// Timelimit (in seconds) of the stalemate round. +mp_stalemate_timelimit 300 +// game time per map in minutes +mp_timelimit 60 +//Max Round Wins +mp_winlimit 0 +//Disable Respawn Times +mp_disable_respawn_times 0 //(default 0; 1 allows near instant respawns) +// Overrides the max players reported to prospective clients +sv_visiblemaxplayers 6 +// Maximum number of rounds to play before server changes maps +mp_maxrounds 0 + +// Client CVARS // + +// Restricts spectator modes for dead players +mp_forcecamera 1 +// toggles whether the server allows spectator mode or not +mp_allowspectators 1 +// toggles footstep sounds +mp_footsteps 1 +// toggles game cheats +sv_cheats 0 +// After this many seconds without a message from a client, the client is dropped +sv_timeout 900 +// Maximum time a player is allowed to be idle (in minutes), made this and sv_timeout equal same time? +mp_idlemaxtime 9 +// Deals with idle players 1=send to spectator 2=kick +mp_idledealmethod 1 +// time (seconds) between decal sprays +decalfrequency 10 +//Overtime Nagging +tf_overtime_nag 1 + +// Communications // + +// enable voice communications +sv_voiceenable 1 +// Players can hear all other players, no team restrictions 0=off 1=on +sv_alltalk 0 +// amount of time players can chat after the game is over +mp_chattime 10 +// enable holiday modes: 0none,1birthday,2halloween,3birthday +//tf_forced_holiday 0 \ No newline at end of file diff --git a/tf2-melkort-mvm-wip/config-templates/tf_mvm_missioncycle.template.res b/tf2-melkort-mvm-wip/config-templates/tf_mvm_missioncycle.template.res new file mode 100644 index 0000000..99979b4 --- /dev/null +++ b/tf2-melkort-mvm-wip/config-templates/tf_mvm_missioncycle.template.res @@ -0,0 +1,59 @@ +"tf_mvm_missioncycle.res" +{ + "categories" "2" + "1" + { + "count" "3" + + "1" + { + "map" "mvm_decoy" + "popfile" "mvm_decoy" + } + "2" + { + "map" "mvm_coaltown" + "popfile" "mvm_coaltown" + } + "3" + { + "map" "mvm_mannworks" + "popfile" "mvm_mannworks" + } + } + "2" + { + "count" "6" + + "1" + { + "map" "mvm_decoy" + "popfile" "mvm_decoy_advanced" + } + "2" + { + "map" "mvm_coaltown" + "popfile" "mvm_coaltown_advanced" + } + "3" + { + "map" "mvm_mannworks" + "popfile" "mvm_mannworks_advanced" + } + "4" + { + "map" "mvm_decoy" + "popfile" "mvm_decoy_advanced2" + } + "5" + { + "map" "mvm_coaltown" + "popfile" "mvm_coaltown_advanced2" + } + "6" + { + "map" "mvm_mannworks" + "popfile" "mvm_mannworks_ironman" + } + } +} \ No newline at end of file diff --git a/tf2-metamod-wip/Dockerfile b/tf2-metamod-wip/Dockerfile new file mode 100644 index 0000000..b4a0ac6 --- /dev/null +++ b/tf2-metamod-wip/Dockerfile @@ -0,0 +1,15 @@ +FROM tf2 + +WORKDIR /steam/tf2/ +USER steam + +COPY download.sh ./ + +RUN ./download.sh + +RUN tar -xf mm*.tar.gz -C tf/ +RUN tar -xf sourcemod*.tar.gz -C tf/ + +COPY metamod.vdf tf/ + +ENTRYPOINT [ "./start.sh" ] diff --git a/tf2-metamod-wip/README.md b/tf2-metamod-wip/README.md new file mode 100644 index 0000000..a2cec52 --- /dev/null +++ b/tf2-metamod-wip/README.md @@ -0,0 +1,12 @@ +# TF2 (with MetaMod) + +This has sourcemod and metamod installed, with the following additional plugins enabled by default: + +* mapchooser +* nominations +* randomcycle +* rockthevote + +Optional plugins + +- (Bot Manager)[https://forums.alliedmods.net/showthread.php?p=1983621] - Set PLUGIN_BOT_MANAGER env to non-empty value \ No newline at end of file diff --git a/tf2-metamod-wip/download.sh b/tf2-metamod-wip/download.sh new file mode 100755 index 0000000..26605ac --- /dev/null +++ b/tf2-metamod-wip/download.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +MMVERSION=$( curl https://www.sourcemm.net/downloads.php/?branch=stable | grep -o "mmsource-[0-9\.]*-git[0-9]\+-linux.tar.gz" | head -n 1 ) +MMMAJORVERSION=$(echo $MMVERSION | cut -d '-' -f 2 | cut -d '.' -f 1,2 ) + +echo "Downloading metamod ${MMMAJORVERSION}.${MMVERSION}..." +curl -o $MMVERSION "https://mms.alliedmods.net/mmsdrop/$MMMAJORVERSION/$MMVERSION" + +SMVERSION=$( curl http://www.sourcemod.net/downloads.php?branch=stable | grep -Eo "sourcemod-.*?-linux.tar.gz" | head -n 1 ) +SMMAJORVERSION=$( echo $SMVERSION | grep -Eo "\-[0-9]*\.[0-9]*" | grep -Eo "[0-9]*\.[0-9]*") + +echo "Downloading metamod ${SMMAJORVERSION}.${SMVERSION}..." +curl -o $SMVERSION "http://www.sourcemod.net/smdrop/$SMMAJORVERSION/$SMVERSION" + +if [[ -n $PLUGIN_BOT_MANAGER ]]; then + # https://forums.alliedmods.net/showthread.php?p=1983621 + echo "Downloading https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx.." + curl -o botmanager.smx "https://github.com/DoctorMcKay/sourcemod-plugins/raw/master/plugins/botmanager.smx" + mv botmanager.smx tf/addons/sourcemod/plugins/botmanager.smx + cat </steam/tf2/tf/cfg/autoexec.cfg + +sm_bot_quota 6 +sm_bot_join_after_player 1 +sm_bot_game_logic 0 +sm_bot_supported_map 1 +sm_bot_on_team_only 1 +EOF +fi diff --git a/tf2-prophunt/metamod.vdf b/tf2-metamod-wip/metamod.vdf similarity index 100% rename from tf2-prophunt/metamod.vdf rename to tf2-metamod-wip/metamod.vdf diff --git a/tf2-mvm-wip/.dockerignore b/tf2-mvm-wip/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/tf2-mvm-wip/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/tf2-mvm-wip/.gitignore b/tf2-mvm-wip/.gitignore new file mode 100644 index 0000000..92db432 --- /dev/null +++ b/tf2-mvm-wip/.gitignore @@ -0,0 +1,2 @@ +mapcycle +server.cfg \ No newline at end of file diff --git a/tf2-mvm-wip/Dockerfile b/tf2-mvm-wip/Dockerfile new file mode 100644 index 0000000..5245b4f --- /dev/null +++ b/tf2-mvm-wip/Dockerfile @@ -0,0 +1,4 @@ +FROM tf2-metamod + +COPY mapcycle ./tf/ +COPY server.cfg ./tf/cfg/ diff --git a/tf2-mvm-wip/config-templates/mapcycle.template b/tf2-mvm-wip/config-templates/mapcycle.template new file mode 100644 index 0000000..eeb81e4 --- /dev/null +++ b/tf2-mvm-wip/config-templates/mapcycle.template @@ -0,0 +1,6 @@ +mvm_decoy +mvm_coaltown +mvm_mannworks +mvm_bigrock +mvm_mannhattan +mvm_rottenburg \ No newline at end of file diff --git a/tf2-mvm-wip/config-templates/server.template.cfg b/tf2-mvm-wip/config-templates/server.template.cfg new file mode 100644 index 0000000..f6e0b49 --- /dev/null +++ b/tf2-mvm-wip/config-templates/server.template.cfg @@ -0,0 +1,189 @@ +// taken from https://steamcommunity.com/discussions/forum/13/612823460277729158/ + +// General MVM Settings // +tf_mm_servermode 1 //puts the server into mvm matchmaking +tf_mm_strict 0 //allows players to join through matchmaking and server browsing +tf_mm_match_size_mvm 6 //minimum players needed in matchmaking before connecting +tf_mvm_min_players_to_start 1 //default 3 +tf_mvm_respec_enabled 1 //allow refunds +tf_mvm_respec_limit 0 //total allowed refunds; 0 - unlimited +tf_mvm_respec_credit_goal 2000 //if respec_limit is not 0, then the total number of credits needed to earn a refund +tf_mvm_skill 3 // 1 - easy; 3 - medium (default); 5 - hard +tf_mvm_disconnect_on_victory 0 //disconnect players on victory +tf_mvm_victory_reset_time 60 //seconds to wait after victory before changing map + +// Hostname for server. +hostname //Change the name + +// Set to lock per-frame time elapse +host_framerate 0 +// Set the pause state of the server +setpause 0 +// Control where the client gets content from +// 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only +sv_pure 2 +// Is the server pausable +sv_pausable 0 +// Type of server 0=internet 1=lan +sv_lan 0 +// Whether the server enforces file consistency for critical files +sv_consistency 1 +// Collect CPU usage stats +sv_stats 1 +//Tags +//sv_tags +//Server Player Password +// NOTE: if you have a password, your MvM server will not be allowed in Match Making. +//sv_password + +// Execute Banned Users // +exec banned_user.cfg +exec banned_ip.cfg +writeid +writeip + +// Contact & Region // + +// Contact email for server sysop +//sv_contact @gmail.com +// The region of the world to report this server in. +// -1 is the world, 0 is USA east coast, 1 is USA west coast +// 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa +//sv_region num + +// Rcon Settings // + +// Password for rcon authentication +rcon_password // Fill in the rcon password +// Number of minutes to ban users who fail rcon authentication +sv_rcon_banpenalty 1440 +// Max number of times a user can fail rcon authentication before being banned +sv_rcon_maxfailures 5 + +// Log Settings // + +// Enables logging to file, console, and udp < on | off >. +log on +// Log server information to only one file. +sv_log_onefile 1 +// Log server information in the log file. +sv_logfile 1 +// Log server bans in the server logs. +sv_logbans 1 +// Echo log information to the console. +sv_logecho 1 + +// Rate Settings // + +// Frame rate limiter +fps_max 600 +// Min bandwidth rate allowed on server, 0 == unlimited +sv_minrate 0 +// Max bandwidth rate allowed on server, 0 == unlimited +sv_maxrate 20000 +// Minimum updates per second that the server will allow +sv_minupdaterate 10 +// Maximum updates per second that the server will allow +sv_maxupdaterate 66 + +// Download Settings // + +// Allow clients to upload customizations files +sv_allowupload 1 +// Allow clients to download files +sv_allowdownload 1 +// Maximum allowed file size for uploading in MB +net_maxfilesize 64 + +//VOTING!// + +sv_allow_votes 1 +sv_vote_allow_spectators 0 +sv_vote_failure_timer 120 //(default 300 = 5 minutes) + +// REGULAR GAME VOTES // +//Enable Scramble Vote +sv_vote_issue_scramble_teams_allowed 0 +//Enable Restart Game +sv_vote_issue_restart_game_allowed 1 +//Enable NextLevel Vote +sv_vote_issue_nextlevel_allowed 1 +//Enable Kick vote +sv_vote_issue_kick_allowed 1 +//Kick Duration (0 for no ban time, non-0 for minutes to ban) +sv_vote_kick_ban_duration 10 + +// MVM VOTES // +//Enable Kick vote +sv_vote_issue_kick_allowed_mvm 1 +//Enable changelevel vote +sv_vote_issue_changelevel_allowed_mvm 1 +//Enable restart map vote +sv_vote_issue_restart_game_allowed_mvm 1 +//Enable classlimits vote +sv_vote_issue_classlimits_allowed_mvm 0 +//Enable classlimit max count vote +sv_vote_issue_classlimits_max_mvm 2 //(default 2) +//Enable kick players that havent connected yet but passed certain time threshold +sv_vote_issue_kick_min_connect_time_mvm 0 //(default 0 is enabled) +//Vote timer cooldown +sv_vote_failure_timer_mvm 120 //(default 120 = 2 minutes) +//Allow change difficulty vote +sv_vote_issue_mvm_challenge_allowed 1 + +// Round and Game Times // + +//Wait for Players +mp_waitingforplayers_cancel 1 +// Enable timers to wait between rounds. WARNING: Setting this to 0 has been known to cause a bug with setup times lasting 5:20 (5 minutes 20 seconds) on some servers! +mp_enableroundwaittime 1 +// Time after round win until round restarts +mp_bonusroundtime 10 +// If non-zero, the current round will restart in the specified number of seconds +mp_restartround 0 +//Enable sudden death +mp_stalemate_enable 0 +// Timelimit (in seconds) of the stalemate round. +mp_stalemate_timelimit 300 +// game time per map in minutes +mp_timelimit 60 +//Max Round Wins +mp_winlimit 0 +//Disable Respawn Times +mp_disable_respawn_times 0 //(default 0; 1 allows near instant respawns) +// Overrides the max players reported to prospective clients +sv_visiblemaxplayers 6 +// Maximum number of rounds to play before server changes maps +mp_maxrounds 0 + +// Client CVARS // + +// Restricts spectator modes for dead players +mp_forcecamera 1 +// toggles whether the server allows spectator mode or not +mp_allowspectators 1 +// toggles footstep sounds +mp_footsteps 1 +// toggles game cheats +sv_cheats 0 +// After this many seconds without a message from a client, the client is dropped +sv_timeout 900 +// Maximum time a player is allowed to be idle (in minutes), made this and sv_timeout equal same time? +mp_idlemaxtime 9 +// Deals with idle players 1=send to spectator 2=kick +mp_idledealmethod 1 +// time (seconds) between decal sprays +decalfrequency 10 +//Overtime Nagging +tf_overtime_nag 1 + +// Communications // + +// enable voice communications +sv_voiceenable 1 +// Players can hear all other players, no team restrictions 0=off 1=on +sv_alltalk 0 +// amount of time players can chat after the game is over +mp_chattime 10 +// enable holiday modes: 0none,1birthday,2halloween,3birthday +//tf_forced_holiday 0 \ No newline at end of file diff --git a/tf2-prophunt-web/Dockerfile b/tf2-prophunt-web-wip/Dockerfile similarity index 100% rename from tf2-prophunt-web/Dockerfile rename to tf2-prophunt-web-wip/Dockerfile diff --git a/tf2-prophunt-web/build.sh b/tf2-prophunt-web-wip/build.sh similarity index 100% rename from tf2-prophunt-web/build.sh rename to tf2-prophunt-web-wip/build.sh diff --git a/tf2-prophunt/Dockerfile b/tf2-prophunt-wip/Dockerfile similarity index 100% rename from tf2-prophunt/Dockerfile rename to tf2-prophunt-wip/Dockerfile diff --git a/tf2-prophunt/build.sh b/tf2-prophunt-wip/build.sh similarity index 100% rename from tf2-prophunt/build.sh rename to tf2-prophunt-wip/build.sh diff --git a/tf2-prophunt/download.sh b/tf2-prophunt-wip/download.sh similarity index 100% rename from tf2-prophunt/download.sh rename to tf2-prophunt-wip/download.sh diff --git a/tf2-prophunt-wip/metamod.vdf b/tf2-prophunt-wip/metamod.vdf new file mode 100644 index 0000000..bd6008a --- /dev/null +++ b/tf2-prophunt-wip/metamod.vdf @@ -0,0 +1,5 @@ +"Plugin" +{ + "file" "../tf/addons/metamod/bin/server" +} + diff --git a/tf2-prophunt/ph-maplist.txt b/tf2-prophunt-wip/ph-maplist.txt similarity index 100% rename from tf2-prophunt/ph-maplist.txt rename to tf2-prophunt-wip/ph-maplist.txt diff --git a/tf2-prophunt/start-tf2-prophunt.sh b/tf2-prophunt-wip/start-tf2-prophunt.sh similarity index 100% rename from tf2-prophunt/start-tf2-prophunt.sh rename to tf2-prophunt-wip/start-tf2-prophunt.sh diff --git a/tf2-prophunt/web.Dockerfile b/tf2-prophunt-wip/web.Dockerfile similarity index 100% rename from tf2-prophunt/web.Dockerfile rename to tf2-prophunt-wip/web.Dockerfile diff --git a/tf2-wip/.dockerignore b/tf2-wip/.dockerignore new file mode 100644 index 0000000..eb0ae03 --- /dev/null +++ b/tf2-wip/.dockerignore @@ -0,0 +1,7 @@ +/config-templates +Dockerfile +README.md +.cache-info +.dockerignore +.env +.gitignore \ No newline at end of file diff --git a/tf2-wip/.gitignore b/tf2-wip/.gitignore new file mode 100644 index 0000000..415839d --- /dev/null +++ b/tf2-wip/.gitignore @@ -0,0 +1,3 @@ +server.cfg +mapcycle.txt +motd.txt \ No newline at end of file diff --git a/tf2-wip/Dockerfile b/tf2-wip/Dockerfile new file mode 100644 index 0000000..06a5378 --- /dev/null +++ b/tf2-wip/Dockerfile @@ -0,0 +1,34 @@ +FROM steamcmd + +USER root + +ENV GAME=tf2 +ENV APP_ID=232250 + +WORKDIR /steam/${GAME}/ +RUN chown -R steam /steam/${GAME}/ + +USER steam + +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit +ARG CACHE_DATE +RUN /steam/steamcmd_linux/steamcmd.sh +login anonymous +force_install_dir /steam/${GAME} +app_update ${APP_ID} +quit + +RUN mkdir -p /steam/${GAME}/tf/cfg/ + +COPY configure.sh \ + start.sh \ + ./ +COPY server.cfg \ + mapcycle.txt \ + motd.txt \ + ./tf/cfg/ + +USER root +RUN chown steam:steam tf/cfg/ * \ + && mkdir -p /home/steam/.steam/sdk32/ \ + && ln -s /steam/steamcmd_linux/linux32/steamclient.so /home/steam/.steam/sdk32/ + +USER steam + +ENTRYPOINT ["./start.sh"] diff --git a/tf2-wip/README.md b/tf2-wip/README.md new file mode 100644 index 0000000..403ccb4 --- /dev/null +++ b/tf2-wip/README.md @@ -0,0 +1,8 @@ +# Team Fortress 2 + +## Useful links: +* [tf2 wiki](https://wiki.teamfortress.com/wiki/Linux_dedicated_server) + +## Troubleshooting +### I can't see the LAN Server! +* Try disabling `Automatic Metric` and entering `1` for your LAN/WiFi adapter diff --git a/tf2-wip/config-templates/mapcycle.template.txt b/tf2-wip/config-templates/mapcycle.template.txt new file mode 100644 index 0000000..d79f920 --- /dev/null +++ b/tf2-wip/config-templates/mapcycle.template.txt @@ -0,0 +1,44 @@ +cp_gravelpit +cp_dustbowl +cp_granary +cp_well +ctf_2fort +tc_hydro +ctf_well +cp_badlands +pl_goldrush +cp_fastlane +ctf_turbine +pl_badwater +cp_steel +cp_egypt_final +cp_junction_final +plr_pipeline +pl_hoodoo_final +koth_sawmill +koth_nucleus +koth_viaduct +ctf_sawmill +cp_yukon_final +koth_harvest_final +ctf_doublecross +cp_gorge +cp_freight_final1 +pl_upward +plr_hightower +pl_thundermountain +cp_coldfront +cp_mountainlab +cp_degrootkeep +cp_5gorge +pl_frontier_final +plr_nightfall_final +koth_lakeside_final +koth_badlands +pl_barnblitz +cp_gullywash_final1 +cp_foundry +sd_doomsday +koth_king +cp_process_final +cp_standin_final \ No newline at end of file diff --git a/tf2-wip/config-templates/motd.template.txt b/tf2-wip/config-templates/motd.template.txt new file mode 100644 index 0000000..f9cf6a5 --- /dev/null +++ b/tf2-wip/config-templates/motd.template.txt @@ -0,0 +1 @@ +Welcome to the server! \ No newline at end of file diff --git a/tf2-wip/config-templates/server.template.cfg b/tf2-wip/config-templates/server.template.cfg new file mode 100644 index 0000000..2d62007 --- /dev/null +++ b/tf2-wip/config-templates/server.template.cfg @@ -0,0 +1,197 @@ +// General Settings // + +// Hostname for server. +hostname yourserver.com TF2 Server + +// Overrides the max players reported to prospective clients +sv_visiblemaxplayers 24 + +// Maximum number of rounds to play before server changes maps +mp_maxrounds 5 + +// Set to lock per-frame time elapse +host_framerate 0 + +// Set the pause state of the server +setpause 0 + +// Control where the client gets content from +// 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only +sv_pure 0 + +// Is the server pausable +sv_pausable 0 + +// Type of server 0=internet 1=lan +sv_lan 0 + +// Collect CPU usage stats +sv_stats 1 + + + +// Execute Banned Users // +exec banned_user.cfg +exec banned_ip.cfg +writeid +writeip + + + +// Contact & Region // + +// Contact email for server sysop +sv_contact emailaddy@google.com + +// The region of the world to report this server in. +// -1 is the world, 0 is USA east coast, 1 is USA west coast +// 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa +sv_region -1 + + + +// Rcon Settings // + +// Password for rcon authentication (Remote CONtrol) +rcon_password yourpw + +// Number of minutes to ban users who fail rcon authentication +sv_rcon_banpenalty 1440 + +// Max number of times a user can fail rcon authentication before being banned +sv_rcon_maxfailures 5 + + + +// Log Settings // + +// Enables logging to file, console, and udp < on | off >. +log on + +// Log server information to only one file. +sv_log_onefile 0 + +// Log server information in the log file. +sv_logfile 1 + +// Log server bans in the server logs. +sv_logbans 1 + +// Echo log information to the console. +sv_logecho 1 + + + +// Rate Settings // + +// Frame rate limiter +fps_max 600 + +// Min bandwidth rate allowed on server, 0 == unlimited +sv_minrate 0 + +// Max bandwidth rate allowed on server, 0 == unlimited +sv_maxrate 20000 + +// Minimum updates per second that the server will allow +sv_minupdaterate 10 + +// Maximum updates per second that the server will allow +sv_maxupdaterate 66 + + + +// Download Settings // + +// Allow clients to upload customizations files +sv_allowupload 1 + +// Allow clients to download files +sv_allowdownload 1 + +// Maximum allowed file size for uploading in MB +net_maxfilesize 15 + +sv_downloadurl "http://example.com/tf/maps/" + + + +// Team Balancing // + +// Enable team balancing +mp_autoteambalance 1 + +// Time after the teams become unbalanced to attempt to switch players. +mp_autoteambalance_delay 60 + +// Time after the teams become unbalanced to print a balance warning +mp_autoteambalance_warning_delay 30 + +// Teams are unbalanced when one team has this many more players than the other team. (0 disables check) +mp_teams_unbalance_limit 1 + + + +// Round and Game Times // + +// Enable timers to wait between rounds. WARNING: Setting this to 0 has been known to cause a bug with setup times lasting 5:20 (5 minutes 20 seconds) on some servers! +mp_enableroundwaittime 1 + +// Time after round win until round restarts +mp_bonusroundtime 8 + +// If non-zero, the current round will restart in the specified number of seconds +mp_restartround 0 + +// Enable sudden death +mp_stalemate_enable 1 + +// Timelimit (in seconds) of the stalemate round. +mp_stalemate_timelimit 300 + +// Game time per map in minutes +mp_timelimit 35 + + + +// Client CVars // + +// Restricts spectator modes for dead players +mp_forcecamera 0 + +// Toggles whether the server allows spectator mode or not +mp_allowspectators 1 + +// Toggles footstep sounds +mp_footsteps 1 + +// Toggles game cheats +sv_cheats 0 + +// After this many seconds without a message from a client, the client is dropped +sv_timeout 900 + +// Maximum time a player is allowed to be idle (in minutes), made this and sv_timeout equal same time? +mp_idlemaxtime 15 + +// Deals with idle players 1=send to spectator 2=kick +mp_idledealmethod 2 + +// Time (seconds) between decal sprays +decalfrequency 30 + + + +// Communications // + +// enable voice communications +sv_voiceenable 1 + +// Players can hear all other players, no team restrictions 0=off 1=on +sv_alltalk 0 + +// Amount of time players can chat after the game is over +mp_chattime 10 + +// Enable party mode +tf_birthday 0 \ No newline at end of file diff --git a/tf2-wip/configure.sh b/tf2-wip/configure.sh new file mode 100755 index 0000000..fa93e39 --- /dev/null +++ b/tf2-wip/configure.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +export HOSTNAME="${HOSTNAME:-My TF2 Server}" +export SV_CONTACT="${SV_CONTACT:-your@email.com}" +export SV_DOWNLOADURL="${SV_DOWNLOADURL:-auto}" +export LAN="${LAN:-0}" +export MAX_PLAYERS="${MAX_PLAYERS:-24}" +export PAUSABLE="${PAUSABLE:-0}" +export RCON_PASSWORD="${RCON_PASSWORD:-pass1234}" +export SV_VOICEENABLE="${SV_VOICEENABLE:-1}" +export SV_ALLTALK="${SV_ALLTALK:-0}" +export SV_BIRTHDAY="${SV_BIRTHDAY:-1}" + +if [ -z $SERVER_TOKEN ] +then + echo "Warning: No server token supplied" >&2 +fi + +if [[ $SV_DOWNLOADURL -eq "auto" ]] +then + INTERFACE=$(ip route | grep default | awk '{print $(NF)}') + IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) + SV_DOWNLOADURL="http://$IPADDR/" +fi + +# Config file +[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" + +sed -i "s/hostname.\+/hostname ${HOSTNAME}/g" tf/cfg/server.cfg +sed -i "s/sv_contact.\+/sv_contact ${SV_CONTACT}/g" tf/cfg/server.cfg +sed -i "s/sv_downloadurl.\+/sv_downloadurl ${SV_DOWNLOADURL}/g" tf/cfg/server.cfg +sed -i "s/sv_lan.\+/sv_lan ${LAN}/g" tf/cfg/server.cfg +sed -i "s/sv_maxplayers.\+/sv_maxplayers "${MAX_PLAYERS}"/g" tf/cfg/server.cfg +sed -i "s/sv_pausable.\+/sv_pausable ${PAUSABLE}/g" tf/cfg/server.cfg +sed -i "s/rcon_password.\+/rcon_password ${RCON_PASSWORD}/g" tf/cfg/server.cfg +sed -i "s/sv_voiceenable.\+/sv_voiceenable ${SV_VOICEENABLE}/g" tf/cfg/server.cfg +sed -i "s/sv_alltalk.\+/sv_alltalk ${SV_ALLTALK}/g" tf/cfg/server.cfg +sed -i "s/sv_birthday.\+/sv_birthday ${SV_BIRTHDAY}/g" tf/cfg/server.cfg diff --git a/tf2-wip/start.sh b/tf2-wip/start.sh new file mode 100755 index 0000000..23e5ff1 --- /dev/null +++ b/tf2-wip/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +./configure.sh +exec ./srcds_run -game tf -debug -ip 0.0.0.0 -usercon $MAPCYCLEFILE $OTHER_ARGS $@ diff --git a/tf2-wip/tv.sh b/tf2-wip/tv.sh new file mode 100644 index 0000000..0001697 --- /dev/null +++ b/tf2-wip/tv.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# TODO figure out TV, I don't use it +#if [[ -n $SOURCETV_ADDR ]]; then +# echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg +# exec ./srcds_run -game tf -debug -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ +#else \ No newline at end of file diff --git a/tf2/Dockerfile b/tf2/Dockerfile deleted file mode 100644 index dd08e95..0000000 --- a/tf2/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM steamcmd - -# Dear srcds, plz don't crash. We have brought you these offerings. -USER root -RUN dpkg --add-architecture i386; apt-get update; apt-get install -y libstdc++6:i386 libcurl4-gnutls-dev:i386 - -USER steam -WORKDIR /steam/steamcmd_linux -RUN mkdir -p /steam/tf2 - -RUN ./steamcmd.sh +login anonymous +force_install_dir ../tf2 +app_update 232250 +quit - -WORKDIR /steam/tf2/ - -ADD start*.sh . - -CMD ["./start-tf2.sh"] diff --git a/tf2/README.md b/tf2/README.md deleted file mode 100644 index 148dc7a..0000000 --- a/tf2/README.md +++ /dev/null @@ -1,4 +0,0 @@ - -Useful links: - -* [tf2 wiki](https://wiki.teamfortress.com/wiki/Linux_dedicated_server) diff --git a/tf2/build.sh b/tf2/build.sh deleted file mode 100755 index 4f58207..0000000 --- a/tf2/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build tf2 diff --git a/tf2/start-tf2.sh b/tf2/start-tf2.sh deleted file mode 100755 index 9539c71..0000000 --- a/tf2/start-tf2.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -if [ -z $SERVER_TOKEN ] -then - echo "Warning: No server token supplied" >&2 -fi - -if [[ $SV_DOWNLOADURL -eq "auto" ]] -then - INTERFACE=$(ip route | grep default | awk '{print $(NF)}') - IPADDR=$(ip addr list dev $INTERFACE | grep 'inet ' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) - SV_DOWNLOADURL="http://$IPADDR/" - -fi - -[[ $LAN -ge 1 ]] && LAN="1" || LAN="0" - -[[ -z "$MAP" ]] && MAP="cp_badlands" -MAP="+map $MAP" - -[[ -n $MAXPLAYERS ]] && MAXPLAYERS="-maxplayers $MAXPLAYERS" -[[ -n $MAPCYCLEFILE ]] && MAPCYCLEFILE="+mapcyclefile $MAPCYCLEFILE" -# Config file -[[ -n $RCON_PASSWORD ]] && RCON_PASSWORD="rcon_password $RCON_PASSWORD" -[[ -n $SV_PASSWORD ]] && SV_PASSWORD="sv_password $SV_PASSWORD" -[[ -n $SV_DOWNLOADURL ]] && SV_DOWNLOADURL="sv_downloadurl \"$SV_DOWNLOADURL\"" - -[[ -z $SV_HOSTNAME ]] && SV_HOSTNAME="TF2 Server" - -cat </steam/tf2/tf/cfg/server.cfg - -hostname "$SV_HOSTNAME" -$RCON_PASSWORD -$SV_PASSWORD -$SV_DOWNLOADURL -EOF - -if [[ -n $SOURCETV_ADDR ]] -then - echo "tv_title $HOSTNAME" > tf/cfg/hostname.cfg - exec ./srcds_run -game tf -console -maxplayers 64 +exec hostname.cfg +tv_relay $SOURCETV_ADDRESS $OTHER_ARGS $@ - -else - - exec ./srcds_run -game tf +sv_lan $LAN -ip 0.0.0.0 $MAP -usercon $GAME_MODE $GAME_TYPE $MAXPLAYERS $MAPCYCLEFILE $OTHER_ARGS $@ - - -fi - - -#echo '"STEAM_0:0:19457778" "@Full Admins"' > csgo/addons/sourcemod/configs/admins_simple.ini - - diff --git a/trackmania-forever-rcon/Dockerfile b/trackmania-forever-rcon/Dockerfile index 7d10f0b..b763a69 100644 --- a/trackmania-forever-rcon/Dockerfile +++ b/trackmania-forever-rcon/Dockerfile @@ -1,9 +1,9 @@ FROM base RUN apt-get install -y nginx php7.0-common php7.0-cli php7.0-fpm php-xml-parser -ADD RemoteControlExamples/PhpRemote/* /var/www/html/ -ADD default.conf /etc/nginx/sites-available/default -ADD start.sh /start.sh +COPY RemoteControlExamples/PhpRemote/* /var/www/html/ +COPY default.conf /etc/nginx/sites-available/default +COPY start.sh /start.sh RUN mkdir /run/php # for phpfpm CMD ["/start.sh"] diff --git a/trackmania-forever/Dockerfile b/trackmania-forever/Dockerfile index 5e533d5..4535d9f 100644 --- a/trackmania-forever/Dockerfile +++ b/trackmania-forever/Dockerfile @@ -1,17 +1,18 @@ FROM base -## Put Trackmania Server zip file in this directory -## Download from http://files2.trackmaniaforever.com/TrackmaniaServer_2011-02-21.zip +RUN apt-get install -y unzip && \ + adduser tm && \ + mkdir /tm && \ + chown tm:tm /tm -RUN apt-get install -y unzip -RUN adduser tm && mkdir /tm && chown tm:tm /tm +USER tm WORKDIR /tm -ADD *.zip /tm/ -RUN ls /tm/ -RUN unzip /tm/*.zip +RUN curl -o TrackmaniaServer_2011-02-21.zip http://files2.trackmaniaforever.com/TrackmaniaServer_2011-02-21.zip && \ + unzip *.zip -ADD tracklist*.cfg /tm/GameData/Tracks/ -ADD dedicated_cfg.txt /tm/GameData/Config/ -Add start_server.sh /tm/ +COPY tracklist*.cfg GameData/Tracks/ +COPY dedicated_cfg.txt GameData/Config/ -CMD ["/tm/start_server.sh"] \ No newline at end of file +COPY start.sh . + +ENTRYPOINT ["./start.sh"] diff --git a/trackmania-forever/README.md b/trackmania-forever/README.md index 246a235..f95558a 100644 --- a/trackmania-forever/README.md +++ b/trackmania-forever/README.md @@ -1,10 +1,26 @@ # Trackmania Nations Forever -### Useful links: +## Useful links: * [server admin GUI](http://cyrlaur.free.fr/ServerMania/download.php) -### Environment Variables +## Environment variables + +### Basic server settings * `SERVER_NAME` - Name server appears as in browser +* `SERVER_COMMENT` +* `SERVER_PASSWORD` +* `MAX_PLAYERS` * `TRACKLIST` - file name of the tracklist from this directory to use (eg, `-e "TRACKLIST=tracklist-red.cfg"`) + +### Super Admin and Admin passwords + +* `SUPER_ADMIN_PASSWORD` +* `ADMIN_PASSWORD` + +### Master server environment variables + +* `MASTER_SERVER_LOGIN` +* `MASTER_SERVER_PASSWORD` +* `MASTER_SERVER_KEY` diff --git a/trackmania-forever/build.sh b/trackmania-forever/build.sh deleted file mode 100755 index 95156e2..0000000 --- a/trackmania-forever/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. ../common.sh - -docker_build trackmania-forever diff --git a/trackmania-forever/dedicated_cfg.txt b/trackmania-forever/dedicated_cfg.txt index 3d0dea4..d46ebd4 100644 --- a/trackmania-forever/dedicated_cfg.txt +++ b/trackmania-forever/dedicated_cfg.txt @@ -4,11 +4,11 @@ SuperAdmin - SuperAdminPassword + %%SUPER_ADMIN_PASSWORD%% Admin - AdminPassword + %%ADMIN_PASSWORD%% User @@ -17,18 +17,18 @@ - - - + %%MASTER_SERVER_LOGIN%% + %%MASTER_SERVER_PASSWORD%% + %%MASTER_SERVER_KEY%% %%SERVER_NAME%% - + %%SERVER_COMMENT%% 0 - 1024 - + %%MAX_PLAYERS%% + %%SERVER_PASSWORD%% 1024 @@ -48,7 +48,7 @@ True - False + True False diff --git a/trackmania-forever/start.sh b/trackmania-forever/start.sh new file mode 100755 index 0000000..aab65a3 --- /dev/null +++ b/trackmania-forever/start.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +[[ -n $SERVER_NAME ]] || SERVER_NAME="Trackmania Forever Server" +[[ -n $SERVER_COMMENT ]] || SERVER_COMMENT="Powered by Docker" +[[ -n $MAX_PLAYERS ]] || MAX_PLAYERS=64 +[[ -n $TRACKLIST ]] || TRACKLIST="tracklist-all.cfg" + +[[ -n $SUPER_ADMIN_PASSWORD ]] || SUPER_ADMIN_PASSWORD=SuperAdmin +[[ -n $ADMIN_PASSWORD ]] || ADMIN_PASSWORD=AdminPassword +[[ -n $SERVER_PASSWORD ]] || SERVER_PASSWORD="" + +[[ -n $MASTER_SERVER_LOGIN ]] || MASTER_SERVER_LOGIN="" +[[ -n $MASTER_SERVER_PASSWORD ]] || MASTER_SERVER_PASSWORD="" +[[ -n $MASTER_SERVER_KEY ]] || MASTER_SERVER_KEY="" + +sed -i "s/%%SERVER_NAME%%/$SERVER_NAME/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%SERVER_COMMENT%%/$SERVER_COMMENT/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%SERVER_PASSWORD%%/$SERVER_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%MAX_PLAYERS%%/$MAX_PLAYERS/" /tm/GameData/Config/dedicated_cfg.txt + +sed -i "s/%%SUPER_ADMIN_PASSWORD%%/$SUPER_ADMIN_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%ADMIN_PASSWORD%%/$ADMIN_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt + +sed -i "s/%%MASTER_SERVER_LOGIN%%/$MASTER_SERVER_LOGIN/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%MASTER_SERVER_PASSWORD%%/$MASTER_SERVER_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt +sed -i "s/%%MASTER_SERVER_KEY%%/$MASTER_SERVER_KEY/" /tm/GameData/Config/dedicated_cfg.txt + +exec ./TrackmaniaServer /lan /game_settings=$TRACKLIST /dedicated_cfg=dedicated_cfg.txt /nodaemon diff --git a/trackmania-forever/start_server.sh b/trackmania-forever/start_server.sh deleted file mode 100755 index 99c756e..0000000 --- a/trackmania-forever/start_server.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - - -[[ -n $RCON_PASSWORD ]] || RCON_PASSWORD=$(dd if=/dev/urandom bs=20 count=1 2>/dev/null | base64) - -sed -i "s/%%SERVER_NAME%%/$SERVER_NAME/" /tm/GameData/Config/dedicated_cfg.txt - -sed -i "s/SuperAdminPassword/$RCON_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt -sed -i "s/AdminPassword/$RCON_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt -sed -i "s/UserPassword/$RCON_PASSWORD/" /tm/GameData/Config/dedicated_cfg.txt - -[[ -n $TRACKLIST ]] || TRACKLIST="tracklist-all.cfg" - -exec ./TrackmaniaServer /lan /game_settings=$TRACKLIST /dedicated_cfg=dedicated_cfg.txt /nodaemon - diff --git a/ut2004/Dockerfile b/ut2004/Dockerfile index f0c1c9d..a787685 100644 --- a/ut2004/Dockerfile +++ b/ut2004/Dockerfile @@ -1,12 +1,16 @@ FROM base +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y libstdc++5:i386 \ + && apt-get clean \ + && mkdir ut2004 -RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y libstdc++5:i386 && apt-get clean +WORKDIR ut2004 +COPY download.sh . +RUN ./download.sh +COPY start.sh . -ADD server_files /ut2004 -ADD start-* /ut2004/ - -CMD ["/ut2004/start-ut2004.sh"] -# \ No newline at end of file +ENTRYPOINT ["./start.sh"] diff --git a/ut2004/build.sh b/ut2004/build.sh deleted file mode 100755 index 071c9ad..0000000 --- a/ut2004/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -. ../common.sh - -[[ -d server_files ]] || ( - echo "Download UT2004 server from http://www.fileplanet.com/146417/download/Unreal-Tournament-2004-Server-v3339-+-Bonus-Pack. Then unzip to server_files directory."; exit 1 - ) - -docker_build ut2004 diff --git a/ut2004/download.sh b/ut2004/download.sh new file mode 100755 index 0000000..6e19268 --- /dev/null +++ b/ut2004/download.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl -o https://www.utzone.de/forum/downloads.php?do=file&id=1196&act=down diff --git a/ut2004/start-ut2004.sh b/ut2004/start.sh similarity index 100% rename from ut2004/start-ut2004.sh rename to ut2004/start.sh