commit bcc08474be8757a270f610fba3a6e0aad4b8ef00 Author: chacha Date: Tue Jul 12 17:43:38 2022 +0200 add initial files diff --git a/Help/niut.txt b/Help/niut.txt new file mode 100644 index 0000000..fc86acc --- /dev/null +++ b/Help/niut.txt @@ -0,0 +1,318 @@ +------------------------------------------------------------------------------- + NIUT 1.24 Mutator for UT (No Item Unreal Tournament) +------------------------------------------------------------------------------- + +Version: 1.24 +Created: 03/07/00 +Author: Mike Fox (a.k.a. ArtfulDodger) +Contact: mfox@legendent.com +URL: www.planetunreal.com/niu + +------------------------------------------------------------------------------- +Overview +-------- + +Everyone plays with the same weapon(s) and has more or less the same items at +all times. This makes the game play focus on combat skills, rather than item +gathering and controlling. Most matchups are very even and the winner is be the +one who makes the best use of the current weapon / items. If you are killed, it +*won't* be because the other guy has a better weapon or the power armor etc. +. Weapons can be cycled (default) or you can have everyone have all the +specified weapons at all times so you can have a Redeemer + Sniper Rifle + +Minigun game, for example. + +------------------------------------------------------------------------------- +Features +-------- + +New UI for setting almost all NIUT options in-game. + +Everyone plays with the same weapon(s) at all times. + +Weapon changes every X seconds. + +Weapon is chosen from a configurable list of weapons and this *should* work +with any Weapon-derived classes, even non-UT weapons (including the Unreal +weapons, although this hasn't been tested yet). + +Weapons are selected randomly or sequentially. + +If weapons are selected randomly can optionally force all weapons to be used +at least once before restarting the selection process. + +Plays a warning sound just before weapon is changed. + +To have some weapons used more frequently that others, just put these in +ExtraWeaponClassStrings in niut.ini so they are specified more than once. + +Can optionally have the server increment everyone's health automatically. + +Can specify health that everyone starts out with (e.g. 5 or 1999) and maximum +health that server will increment health to (health vials are still limited to +199). + +Can optionally have server give everyone jumpboots, invisibility and/or the +damage amplifier at random times and for random durations. + +Can optionally use NIUT to give everyone all specified weapons (ammo increments +automatically and pickups become health vials). + +Can optionally have server automatically increment ammo for current weapon +(pickups become health vials). + +Replaces all pickup items in the level with ammo for the current weapon. If the +current weapon doesn't require ammo, uses health vials. Flags, runes etc. and +the translocator aren't affected. If weapons aren't being cycled or if ammo is +being given out automatically, pickups are health vials. + +Can control rate at which ammo is given out and the amount of ammo that weapons +start out with (e.g. 99 Redeemer warheads ). + +Should work with most other mutators, including the Fatboy mutator. + +Tested and should work with all UT gametypes (CTF, Domination, Assault, Last +Man Standing). + +Tested and works with the UT bots. + +------------------------------------------------------------------------------- +Installation +------------ + +After installing NIUT, you should end up with the following files in your UT +system folder: + + niut.ini NIUT configuration file + niut.int mutator information + niut.u NIUT mutator code + +and in your UT help folder: + + niut.txt this file + +Fire up UT and start a practice session or multiplayer game. Click on the +mutators button and make sure the NIUT mutator is included (in the right-hand +pane) along with any other mutators that you want to use. To configure NIUT, +access the "NIUT123 Mutator Options" dialog through the "Mods" entry at the top +of the main UT screen. + +NIUT should work with any of the game types available in the full version of +Unreal Tournament, although it has a few problems with Last Man Standing as +noted below. + +------------------------------------------------------------------------------- +Configuration +------------- + +All the main NIUT options can now be set through the in-game UI accessed through +the NIUT123 Mutator Options dialog (under the "Mods" entry at the top of the +main UT screen). Changes to these settings are saved to the file niut.ini and +you can restore the defaults by clicking on the "Defaults" button. There are a +couple of options (mainly sound related) which can be changed by modifying +niut.ini directly. + +The NIUT options screen requires a 640x480 or greater resolution to be entirely +visible. + +How do I specify the weapons to use? + + Just check off the weapons that you want to use on the right. Note that the + Unreal I weapons only work in singleplayer -- they won't fire correctly in + networked games. + +How do I make weapons cycle (switch periodically)? + + Make sure the "Cycle Weapons" checkbox is checked. When this is checked, the + "Random Weapons" and "Use All Weapons" settings are used. + + If "Random Weapons" is set, the next weapon to use is chosen randomly, + otherwise they are cycled in order. + + If "Use All Weapons" is set (and "Random Weapons is set), all weapons will + be used at least once each time through the list of weapons. + +How do I control how often the weapons switch? + + Set the Min and Max "Time Between Weapons Switches Settings". These can be + the same value, otherwise the server will constantly pick a random time + between Min and Max. + + I recommend keeping the weapon switch time at 75.0 seconds or greater, + and/or limiting how long a particular level is played to 30 mins or less. It + seems that Unreal Tournament servers can become unstable (more likely to + crash) if many objects are destroyed/created during a game. Since most of + what NIUT does involves destroying and creating objects every time the + weapon changes, following these guidelines may make NIUT servers less likely + to crash. + +How can I cycle weapons but also have ammo increment automatically? + + Check "Cycle Weapons" and set "Time Between Ammo Increments" to 1.0 or so. + +How do I give everyone multiple weapons at all times? + + Make sure the "Cycle Weapons" checkbox is *not* checked. Everyone will have + all the specified weapons at all times and ammo will increment automatically + for all the weapons. All pickups will be health vials (depending on the game + type). + +How do I control the ammo for weapons? + + You can specify the Initial, Max and Rate for the ammo for all types of + weapons (the Enforcer and Minigun and most UT and Unreal I equivalents share + the same settings). The Initial and Max amounts should be obvious. The Rate + is the amount of ammo per second that is given to the weapon. A value of 10 + means 10 units are given every second, a value of 0.05 means 1/20th of a + unit per second (so you should get a unit every 20 seconds). Most of the + default values are reasonable -- you should have lots of ammo as long as you + don't shoot like a monkey. + + By default, when weapons aren't cycled, the server checks on whether to give + everyone ammo every 1.0 seconds. You can change this through the "Time + Between Ammo Increments" setting but 1.0 should be fine in most cases. + +The Redeemer shows up then goes away as soon as the game starts. What's up? + + By default the initial Redeemer ammo is set to 0. This is so players don't + blow themselves up with it if they hit fire 2x after dying. Also in team + games it can be annoying to take out the other team's base then have + everyone respawn with (armed) Redeemers. + + If you are cycling weapons without automatic ammo, or if you really want + people to be able to fire the Redeemer as soon as they spawn you probably + want to change this to 1 or higher. + +What are the health options? + + By default, NIUT servers will give 5 units of health to all players every + second (so your health will regenerate if you are injured). + + You can control the following: + + "Time Between Health Increments": change this to increase/decrease the rate + at which the server gives out health. + + "Health Increment Amount": controls the amount of health that is given out + each time. + + "Initial Health": the amount of health that players start out with when they + spawn into the game. + + "Maximum Incremented Health": the maximum that the server will increment + health to. + + These settings don't affect health pickups -- these will still increment the + player's health to a max of 199. + + Games where players can have their health get up to 5000 or so with Super + Shock Rifles and/or Redeemers are... different. + + A game with the initial and max health set to 5 can be fun too (hit = kill). + +What are power up options? + + If you want you can have the server give everyone one or more power ups (the + damage amplifier, jumpboots and invisibility) periodically. Set the "Min + Delay" to 0.0 if you don't want the power up to be used. Otherwise, set the + Min and Max Delay (these can be the same value otherwise the server will + constantly pick a random time between Min and Max) to the amount of time + that you want the server to wait before giving out the power up. + + Similarly, the Min and Max Duration controls how long the power up stays + active (when the time is up, the power up is removed from everyone). + + While any power up is active, everyone will have it, even if they die and + respawn. + + Tip: the bots tend to see invisible players pretty well... + +What is the file sloop.bat available on the NIUT site? + + Its a fact of life that most game servers eventually crash. If you use NIUT + with weapon cycling and a low time between weapon switches, the server will + be more likely to crash (see How do I control how often the weapons switch? + above). This "batch" file can be used to run the server so that if it does + crash, the batch file will restart it automatically. If you run an NIUT (or + any) UT server, you might want to check this out. + +What's with Last Man Standing games? + + The Last Man Standing game type doesn't seem to interact very well with some + types of mutators, including NIUT. + + If weapons are being cycled, everything seems to work as expected: + +if auto-incrementing ammo + +pickups are health vials, ammo increments fine + +otherwise pickups are ammo for the current weapon + +only the current weapon is available + + If weapons are not being cycled: + +all non-melee weapons are always available + +NIUT can be used to add + +Super Shock Rifle + +Redeemer + +Chainsaw, Impact Hammer + +but other weapons can't be removed (and I pbly won't look at this) + +no health in the level (can always auto-increment health if desired) + +weapons occasionally get tossed by killed players + +Settings in niut.ini which can be modified directly (not on the options menu). + + WarningSound: controls the switch warning sound + WarningSoundRepeats: controls number of times to play warning sound + HealthIncrementSound: sound to play when incrementing health + +------------------------------------------------------------------------------- +History +------- + +1.24: + ++Made NIUT work better with other mutators (no longer an Arena mutator). + ++Fix for conflict between Low Gravity and NIUT mutators (Low Gravity was + forcing jumpboots to be stripped out even if NIUT was set up to use these). + Solution: have AlwaysKeep() return true for jumpboots. + ++Fix for accessed None warnings in RateSelf (give ammo before putting into + Pawn's inventory etc.). + +1.23: + ++Added UI support for specifying NIUT settings through Mod menu. + ++Changed bAllWeapons to !bCycleWeapons (less confusing?) + ++WeaponClassStrings -> ExtraWeaponClassStrings (support for new weapons not + already in UT -- otherwise weapons controlled by individual flags now). + ++Can specify max ammo that any weapon can carry (e.g. limit Redeemer to only + carrying 1 warhead at a time). + ++Added MaxHealth option for auto-incremented health (199 with Redeemer is fun). + +1.21: + +Better, more flexible way to specify how quickly ammo regenerates. Can also +specify how much ammo weapons should start out with. + +1.20: + +Option to have all specified weapons available at all times (ammo increments +automatically for all weapons). This can be used to have Redeemer only or +Sniper Rifle + Redeemer games for example. + +Additionally, weapons can be cycled as usual with an option to have ammo +increment automatically ("classic" No Item mode like NIQ for Q2). + +Couple of optimizations. + +1.10: + +Fix for translocator being stripped out of games where it is specified. + +1.00: + +Initial version for full release of UT including support for random jumpboots, +invisibility and power amplifiers (to all players at once). + diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..1bcd058 --- /dev/null +++ b/Readme.md @@ -0,0 +1 @@ +# NIUT Release GIT repository (non-official) diff --git a/Run.sh b/Run.sh new file mode 100644 index 0000000..6004fb6 --- /dev/null +++ b/Run.sh @@ -0,0 +1,109 @@ +#!/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 +} +# !!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 +} +# !!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 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() { + NIUTUFile=$(find $OUTPUT_DIR/System -type f -iname "niut*.u" -exec basename {} \;) + NIUTBaseName="${NIUTUFile%.*}" + add_ServerPackage $NIUTBaseName + + echo enable ok +} +function disable() { + NIUTUFile=$(find $OUTPUT_DIR/System -type f -iname "niut*.u" -exec basename {} \;) + NIUTBaseName="${NIUTUFile%.*}" + + del_ServerPackage $NIUTBaseName + + echo disable ok +} +function show_help() { + echo + echo "Usage: $0 { install | enable | disable } []" + echo +} +function check_cfg_file() { + 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 [ ! -d $OUTPUT_DIR ] + then + echo "incorrect " + show_help + exit 9999 # die with error code 9999 + fi +} +case "$1" in + 'install') + check_game_dir + install + ;; + 'enable') + check_game_dir + check_cfg_file + disable + enable + ;; + 'disable') + check_game_dir + check_cfg_file + disable + ;; + *) + show_help + exit 1 + ;; +esac +exit 0 \ No newline at end of file diff --git a/System/NIUT.ini b/System/NIUT.ini new file mode 100644 index 0000000..ea9726d --- /dev/null +++ b/System/NIUT.ini @@ -0,0 +1,115 @@ +[NIUT124.NIUTMutator] +bRandomWeapons=True +bUseAllWeapons=True +bCycleWeapons=False +bUseChainSaw=False +bUseEnforcer=False +bUseImpactHammer=False +bUseMiniGun=True +bUsePulseGun=False +bUseRipper=False +bUseShockRifle=False +bUseSniperRifle=False +bUseSuperShockRifle=False +bUseBioRifle=False +bUseRocketLauncher=True +bUseFlakCannon=False +bUseRedeemer=False +bUseUnrealIFlakCannon=False +bUseUnrealIGESBioRifle=False +bUseUnrealIMinigun=False +bUseUnrealIRazorjack=False +bUseUnrealIRifle=False +bUseUnrealIASMD=False +bUseUnrealIAutoMag=False +bUseUnrealIDispersionPistol=False +bUseUnrealIEightball=False +bUseUnrealIStinger=False +ExtraWeaponClassStrings[0]= +ExtraWeaponClassStrings[1]= +ExtraWeaponClassStrings[2]= +ExtraWeaponClassStrings[3]= +ExtraWeaponClassStrings[4]= +ExtraWeaponClassStrings[5]= +ExtraWeaponClassStrings[6]= +ExtraWeaponClassStrings[7]= +ExtraWeaponClassStrings[8]= +ExtraWeaponClassStrings[9]= +ExtraWeaponClassStrings[10]= +ExtraWeaponClassStrings[11]= +ExtraWeaponClassStrings[12]= +ExtraWeaponClassStrings[13]= +ExtraWeaponClassStrings[14]= +ExtraWeaponClassStrings[15]= +ExtraWeaponClassStrings[16]= +ExtraWeaponClassStrings[17]= +ExtraWeaponClassStrings[18]= +ExtraWeaponClassStrings[19]= +ExtraWeaponClassStrings[20]= +ExtraWeaponClassStrings[21]= +ExtraWeaponClassStrings[22]= +ExtraWeaponClassStrings[23]= +ExtraWeaponClassStrings[24]= +ExtraWeaponClassStrings[25]= +ExtraWeaponClassStrings[26]= +ExtraWeaponClassStrings[27]= +ExtraWeaponClassStrings[28]= +ExtraWeaponClassStrings[29]= +ExtraWeaponClassStrings[30]= +ExtraWeaponClassStrings[31]= +TimeBetweenWeaponSwitchesMin=15.000000 +TimeBetweenWeaponSwitchesMax=15.000000 +TimeBetweenAmmoIncrements=0.000000 +WarningSound=Sound'Botpack.Pickups.UTSuperHeal' +WarningSoundRepeats=3 +HealthIncrementSound=None +HealthIncrementAmount=5 +StartHealth=0 +MaxHealth=0 +TimeBetweenHealthIncrements=1.000000 +InvisibilityDelayMin=0.000000 +InvisibilityDelayMax=0.000000 +InvisibilityDurationMin=10.000000 +InvisibilityDurationMax=10.000000 +DamageAmplifierDelayMin=45.000000 +DamageAmplifierDelayMax=45.000000 +DamageAmplifierDurationMin=45.000000 +DamageAmplifierDurationMax=45.000000 +JumpBootsDelayMin=0.000000 +JumpBootsDelayMax=0.000000 +JumpBootsDurationMin=15.000000 +JumpBootsDurationMax=15.000000 +InitialRedeemerAmmo=0 +InitialRocketAmmo=12 +InitialFlakAmmo=12 +InitialShockAmmo=12 +InitialRifleAmmo=12 +InitialPulseAmmo=50 +InitialRipperAmmo=25 +InitialBioAmmo=50 +InitialGunAmmo=100 +InitialStingerAmmo=50 +RateRedeemerAmmoPerSec=0.050000 +RateRocketAmmoPerSec=0.000000 +RateFlakAmmoPerSec=0.200000 +RateShockAmmoPerSec=0.670000 +RateRifleAmmoPerSec=0.500000 +RatePulseAmmoPerSec=2.000000 +RateRipperAmmoPerSec=1.500000 +RateBioAmmoPerSec=0.250000 +RateGunAmmoPerSec=0.000000 +RateStingerAmmoPerSec=5.000000 +MaxRedeemerAmmo=1 +MaxRocketAmmo=48 +MaxFlakAmmo=50 +MaxShockAmmo=50 +MaxRifleAmmo=50 +MaxPulseAmmo=199 +MaxRipperAmmo=75 +MaxBioAmmo=100 +MaxGunAmmo=199 +MaxStingerAmmo=200 +InitialOtherAmmo=50 +RateOtherAmmoPerSec=5.000000 +MaxOtherAmmo=200 + diff --git a/System/Niut.int b/System/Niut.int new file mode 100644 index 0000000..a0e01b2 --- /dev/null +++ b/System/Niut.int @@ -0,0 +1,8 @@ +[Public] +Object=(Name=NIUT124.NIUTMutator,Class=Class,MetaClass=Engine.Mutator,Description="NIUT124, NIUT V1.24: Server controls weapons, gives out ammo and/or turns pickups into ammo or health vials (www.planetunreal.com/niu).") +Object=(Name=NIUT124.NIUTConfigMenuItem,Class=Class,MetaClass=UMenu.UMenuModMenuItem) +Object=(Name=NIUT124.DummyArenaMutator,Class=Class,MetaClass=Engine.Mutator,Description="DAM, DummyArena: use with some game types (e.g. LastManStanding) to force ammo to stay etc.") + +Preferences=(Caption="Mutators",Parent="Advanced Options") +Preferences=(Caption="NIUT124",Parent="Mutators",Class=NIUT124.NIUTMutator,Immediate=True) + diff --git a/System/niut124.u b/System/niut124.u new file mode 100644 index 0000000..0f9e7db Binary files /dev/null and b/System/niut124.u differ