commit db5d495ce7bf0e751fd5e932abc545c91b2e4abe Author: cclecle Date: Sat Jul 23 12:26:06 2022 +0200 first commit diff --git a/Help/TeamBeacon2k4.txt b/Help/TeamBeacon2k4.txt new file mode 100644 index 0000000..e512e0f --- /dev/null +++ b/Help/TeamBeacon2k4.txt @@ -0,0 +1,65 @@ +Team Beacon 2k4 +=============== +by Wormbo (Website: http://www.koehler-homepage.de/Wormbo/) + +Contacting me: +Either via the email address on my website or one of the following ways: + +Forum PM: +http://forums.epicgames.com/ +http://forums.beyondunreal.com/ +http://forums.ingame.de/unreal/ (german forum) + +IRC: +#beyondunreal on irc.enterthegame.com +#unrealadmin on irc.quakenet.org +#inUnreal on irc.quakenet.org (german channel) + + +Description +----------- +Team Beacon 2k4 adds UT2004-style team beacons over players' heads. If players +are close enough, their name and health is drawn next to their team beacon as +well. A player's health is not rendered in resolutions below 640x480 to save +screen space. Unless you are a spectator, team beacons are only rendered for +players on your team. + + +Installing +---------- +Extract the contens of the ZIP file to your UT base directory, maintaining the +directory struction of the archive. This should place all files in the correct +directories: + +Help\ + TeamBeacon2k4.txt (this file) +System\ + TeamBeacon2k4.int + TeamBeacon2k4.u + +To be able to host LAN or online games, add the following lines to the +[Engine.GameEngine] section of your UnrealTournament.ini or whatever INI file +your server will use: + +ServerPackages=TeamBeacon2k4 + + +How to use +---------- +Simply add the Team Beacon 2k4 mutator to enable team beacons. + +Remember to follow installation instructions for editing your INI files if you +want to host a server with the mutator. + + +Known Problems +-------------- +Team beacons are opaque. They'd look to bright if rendered translucently and UT +doesn't support real alpha blending. + +Feel free to contact me if if found another bug. Please tell me which mods +and/or mutators you used and please try to describe in detail how the bug can +be reproduced. + + +Happy Fragging! \ No newline at end of file diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..2beb16c --- /dev/null +++ b/Readme.md @@ -0,0 +1,2 @@ +# TeamBeacon2k4 Release GIT repository + diff --git a/Run.sh b/Run.sh new file mode 100644 index 0000000..efcdf6c --- /dev/null +++ b/Run.sh @@ -0,0 +1,141 @@ +#!/bin/bash +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +OUTPUT_DIR="$2" +CFG_FILE="$3" +DEFAULT_CFG_FILE=UnrealTournament.ini +function add_iniKeyEx() { + crudini --set $OUTPUT_DIR/System/$1 $2 __$3 $4 + # Warning: ugly hack with sed to allow multiple key instances + to remove space around '=' + sed -i "s/[[:space:]]*__$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')[[:space:]]*=[[:space:]]*/$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')=/g" $OUTPUT_DIR/System/$1 +} +function set_iniKeyEx() { + crudini --set $OUTPUT_DIR/System/$1 $2 $3 $4 +} +# !!Warning!! section is not considered +function del_iniKeyEx() { + sed -i "/[[:space:]]*$(echo $3 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')[[:space:]]*=[[:space:]]*$(echo $4 | sed -e 's/\([[\/.*]\|\]\)/\\&/g')/d" $OUTPUT_DIR/System/$1 +} +function add_iniKey() { + add_iniKeyEx $CFG_FILE $1 $2 $3 +} +function set_iniKey() { + set_iniKeyEx $CFG_FILE $1 $2 $3 +} +# !!Warning!! section is not considered +function del_iniKey() { + del_iniKeyEx $CFG_FILE $1 $2 $3 +} +function add_ServerPackage() { + add_iniKey 'Engine.GameEngine' ServerPackages $1 + add_iniKey 'XC_Engine.XC_GameEngine' ServerPackages $1 +} +function del_ServerPackage() { + del_iniKey 'Engine.GameEngine' ServerPackages $1 + del_iniKey 'XC_Engine.XC_GameEngine' ServerPackages $1 +} +function add_ServerActors() { + add_iniKey 'Engine.GameEngine' ServerActors $1 + add_iniKey 'XC_Engine.XC_GameEngine' ServerActors $1 +} +function del_ServerActors() { + del_iniKey 'Engine.GameEngine' ServerActors $1 + del_iniKey 'XC_Engine.XC_GameEngine' ServerActors $1 +} +function getmodprefix() { + UFile=$(find $OUTPUT_DIR/System -type f -iname "TeamBeacon2k4*.u" -exec basename {} \;) + BaseName="${UFile%.*}" + echo "$BaseName" +} +function install() { + rsync -a $SCRIPT_DIR/Help/ $OUTPUT_DIR/Help/ --exclude '.git' + rsync -a $SCRIPT_DIR/System/ $OUTPUT_DIR/System/ --exclude '.git' + + echo install ok +} +function enable() { + BaseName="$(getmodprefix)" + add_ServerPackage $BaseName + + echo enable ok +} +function disable() { + BaseName="$(getmodprefix)" + del_ServerPackage $BaseName + + echo disable ok +} +function show_help() { + echo + echo "Usage: $0 { getmodprefix | install | enable | disable } [] [ ]" + echo +} +function check_cfg_file_config() { + if [ $# -eq 4 ] + then + echo "CFG_FILE is unset, setting it to $DEFAULT_CFG_FILE" + CFG_FILE=$DEFAULT_CFG_FILE + elif [ $# -eq 5 ] + then + echo "CFG_FILE is set to '$CFG_FILE'" + else + echo "Wrong number of arguments" + show_help + exit 9999 # die with error code 9999 + fi + if [ ! -f $OUTPUT_DIR/System/$CFG_FILE ] + then + echo "$OUTPUT_DIR/System/$CFG_FILE does not exist" + show_help + exit 9999 # die with error code 9999 + fi +} +function check_cfg_file_gen() { + if [ -z ${CFG_FILE} ] + then + echo "CFG_FILE is unset, setting it to $DEFAULT_CFG_FILE" + CFG_FILE=$DEFAULT_CFG_FILE + else + echo "CFG_FILE is set to '$CFG_FILE'" + fi + if [ ! -f $OUTPUT_DIR/System/$CFG_FILE ] + then + echo "$OUTPUT_DIR/System/$CFG_FILE does not exist" + show_help + exit 9999 # die with error code 9999 + fi +} +function check_game_dir() { + ### Check if a directory does not exist ### + if [ -z $OUTPUT_DIR ] + then + echo "incorrect " + show_help + exit 9999 # die with error code 9999 + fi +} +case "$1" in + 'getmodprefix') + check_game_dir + getmodprefix + ;; + 'install') + check_game_dir "$@" + install "$@" + ;; + 'enable') + check_game_dir "$@" + check_cfg_file_gen "$@" + disable "$@" + enable "$@" + ;; + 'disable') + check_game_dir "$@" + check_cfg_file_gen "$@" + disable "$@" + ;; + *) + show_help + exit 1 + ;; +esac +exit 0 diff --git a/System/TeamBeacon2k4.int b/System/TeamBeacon2k4.int new file mode 100644 index 0000000..4702196 --- /dev/null +++ b/System/TeamBeacon2k4.int @@ -0,0 +1,3 @@ +[Public] +Object=(Name=TeamBeacon2k4.TeamBeacon2k4,Class=Class,MetaClass=Engine.Mutator,Description="Team Beacon 2k4,Identifies team members like in UT200x.") +Preferences=(Caption="TeamBeacon2k4",Parent="Game Settings",Class=TeamBeacon2k4.TeamBeacon2k4,Immediate=True) diff --git a/System/TeamBeacon2k4.u b/System/TeamBeacon2k4.u new file mode 100644 index 0000000..5125ce0 Binary files /dev/null and b/System/TeamBeacon2k4.u differ