[Setup] Product=NIUT Version=99 Archive=NIUT.umod SrcPath=. MasterPath=.. Requires=Unreal Tournament Demo348Requirement Group=SetupGroup Group=NIUTGroup [Unreal Tournament Demo348Requirement] Product=Unreal Tournament Demo Version=348 [SetupGroup] Copy=(Src=System\Manifest.ini,Master=System\Manifest.ini,Size=434,Flags=3) Copy=(Src=System\Manifest.int,Master=System\Manifest.int,Size=431,Flags=3) [NIUTGroup] File=(Src=Help\niut.txt,Size=1721) File=(Src=System\NIUT.u,Size=13251) File=(Src=System\Niut.int,Size=347) File=(Src=System\Niut.ini,Size=407) [Setup] LocalProduct=NIUT ReadMe=Help\niut.txt SetupWindowTitle=NIUT AutoplayWindowTitle=NIUT Options ProductURL=www.planetunreal.com/niq VersionURL=www.planetunreal.com/niq Developer=ArtfulDodger DeveloperURL=www.planetunreal.com/niq [Unreal Tournament Demo348Requirement] LocalProduct=Unreal Tournament Demo ProductURL=www.epicgames.com VersionURL=www.epicgames.com Developer=Epic DeveloperURL=www.epicgames.com NIUT Mutator for the UT demo (No Item Unreal Tournament). Overview -------- Everyone plays with the same weapon at all times. Current weapon is chosen from a configurable list of weapons and should support any Weapon-derived classes, even non-UT weapons. Current weapon changes every TimeBetweenWeaponSwitches secs. Weapons are selected randomly/sequentially (bRandomWeapons=true/false). If weapons are selected randomly can force all weapons to be used at least once before restarting the selection process (bUseAllWeapons=true). 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. Plays a warning sound just before weapon is changed (WarningSound). To have some weapons used more frequently that others, just put them in WeaponClassStrings more than once. Should work with most other mutators, including the Fatboy mutator. Should work with most gametypes (CTF, Domination). Works with 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.txt this file niut.u NIUT mutator code Fire up UT and start a practice session or multiplayer game. Click on the mutators button and make sure the NIUT mutator is included (right-hand pane) along with any other mutators that you want to use. History ------- Version: 0.99 Created: 10/28/99 Author: Mike Fox (a.k.a. ArtfulDodger) Contact: mfox@legendent.com URL: www.planetunreal.com/niu Įƒ*žDS@&™1.B0€Z„}Ó†Z‘™&SNone NIUTMutatorWeaponClassStringsResetUsedWeapons SetWeaponTo ModifyPlayer ChooseWeaponNIUT ReplaceWithEngineCore GiveAmmo TranslocatorDeleteInventory HealthVialTickMyDefaultWeapon PreBeginPlay AddInventory WarningSoundTimeBetweenWeaponSwitchesCheckReplacementBotpackChooseWeaponWarningTime BecomeItem WeaponSetBringUpSetSwitchPriorityiWeapon ReturnValueMutatorDynamicLoadObject LevelInfoAmmo InventoryLevel TextBufferActorClassPawnSoundPackage bCanThrowName DeltaTimeOther InstigatorP NewWeapon TimeSeconds WeaponNameDefaultWeapon NextMutatorbSuperRelevant AmmoNameOwnerInvSuperShockRifle NameProperty SpreeSoundObjectPropertyArena ChatSound StrPropertyFloatProperty BoolProperty IntProperty BytePropertyClassPropertyObject FunctionGetSoundDurationbRandomWeaponsbUseAllWeapons NumWeaponsCurrentWeaponIndex bAllowSpawnNextChooseWeaponTime bDidWarning UsedWeaponsNumUsedWeaponsCurrentWeaponClass ƒ…ƒ„€ˆ„@Ø @@ ˆ  @€ˆ@ €@&€$ 4m™& š†-§q-q›:%„n™%?„$ƒ– …Łr*čpV: CurrentDefaultWeapon is None!-„™%=čpV: WeaponsClassStrings contain no valid weapon(s)!/a0 „ONr”*- 'õ„„r“*ž“•! r Ŗņa/!Botpack.HealthVialaNN’¢•“•V“a10®’” ›%h*Ķ›m‚-³’”Æew */a0 ˆ d a 10-'˳’”/a0 ˆ § 10-(®’”   7 %.–  $„ % ©)!- $'' „,w™*™  €†!"’’’’’’’’’’’’’’’’’’)›ĪÅŌ±‰1¹ņpˆoœ„ōÆōū„ōÆōūˆoœ„ōÆōū„ōÆōūƒ÷Ā2Ÿƒ÷Ā2Ÿˆoœƒ÷Ā2Ÿƒ÷Ā2Ÿƒ÷Ā2Ÿƒ÷Ā2Ÿƒ÷Ā2Ÿ„ōÆōū…ƒ÷Ā2Ÿ…ƒ÷Ā2Ÿ…š_ä°T„ōÆōū„ōÆōū„ōÆōū…„ōÆōū…ƒ÷Ā2Ÿ…š_ä°T…ƒ÷Ā2Ÿ„ōÆōū‹ Ǣʋ Ǣʈoœ‹ Ǣʋ Ē¢Ź Œ]Botpack.UT_EightballŻBotpack.PulseGunŻBotpack.ImpactHammerŻBotpack.MiniGun2ŻBotpack.ShockRifleŻBotpack.SuperShockRifle$šA®$€@õ"5- 'œtw*]a/!   aœ+w*a+w*Ÿ     -ž(- ( „¤H‰//============================================================================= // NIUTMutator. //============================================================================= /*============================================================================= Mutator for NIUT (No Item Unreal Tournament). +Everyone plays with the same weapon at all times. +Current weapon is chosen from a configurable list of weapons and should support any Weapon-derived classes, even non-UT weapons. +Current weapon changes every TimeBetweenWeaponSwitches secs. +Weapons are selected randomly/sequentially (bRandomWeapons=true/false). +If weapons are selected randomly can force all weapons to be used at least once before restarting the selection process (bUseAllWeapons=true). +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. +Plays a warning sound just before weapon is changed (WarningSound). +To have some weapons used more frequently that others, just put them in WeaponClassStrings more than once. History Version: 0.99 Created: 10/28/99 Author: Mike Fox (a.k.a. ArtfulDodger) Contact: mfox@legendent.com URL: www.planetunreal.com/niu =============================================================================*/ class NIUTMutator expands Arena config(NIUT); var() config string WeaponClassStrings[32]; // list of weapons to use var() config bool bRandomWeapons; // (true): true ==> weapons selected randomly, false ==> weapons cycled sequentially var() config bool bUseAllWeapons; // (true): true ==> if bWeaponsRandom is true, all weapons used once per cycle var() config float TimeBetweenWeaponSwitches; // (60): secs between weapon switches var() config Sound WarningSound; // (AmpOut): sound to use for "about to switch" warning var int NumUsedWeapons; // number of weapons used so far (used with bUseAllWeapons) var byte UsedWeapons[32]; // list of weapons used so far (used with bUseAllWeapons) var int NumWeapons; // number of weapons in WeaponClassStrings list var Class CurrentWeaponClass; // current weapon class var int CurrentWeaponIndex; // index int WeaponClassStrings for current weapon var bool bAllowSpawn; // set to force CheckReplacement to return true var bool bDidWarning; // did "about to switch" warning var float NextChooseWeaponTime; // when to switch again var float ChooseWeaponWarningTime; // secs before weapon switch to warn clients //============================================================================= // Prepare list of weapon classes to use, initialize stuff. The first tick that // this mutator receives will select the first weapon to use and give it to // all players. function PreBeginPlay() { Super.PreBeginPlay(); // determine how many weapons we have NumWeapons=0; while( WeaponClassStrings[NumWeapons] != "" ) { if( DynamicLoadObject( WeaponClassStrings[NumWeapons], class'Class' ) != None ) { NumWeapons++; } else { warn( Self $ ": WeaponsClassStrings["$NumWeapons$"] is invalid: " $ WeaponClassStrings[NumWeapons] ); break; } } DefaultWeapon = None; AmmoName = ''; WeaponName = ''; CurrentWeaponIndex = 0; NextChooseWeaponTime = 0.0; ChooseWeaponWarningTime = 0.0; if( WarningSound != None ) { ChooseWeaponWarningTime = GetSoundDuration( WarningSound ); } ResetUsedWeapons(); } //============================================================================= // Play the "about to switch weapon" warning sound and do the actual weapon // switching when the time is right. function Tick( float DeltaTime ) { local Pawn P; local Inventory Inv; Super.Tick( DeltaTime ); if( !bDidWarning && (Level.TimeSeconds >= (NextChooseWeaponTime - ChooseWeaponWarningTime )) ) { // warn that we are about to switch the weapon if( WarningSound != None ) { foreach AllActors( class'Pawn', P ) { P.PlaySound( WarningSound ); } } bDidWarning = true; } if( Level.TimeSeconds >= NextChooseWeaponTime ) { // time to change everybody's weapon ChooseWeapon(); foreach AllActors( class'Pawn', P ) { SetWeaponTo( P ); } bDidWarning = false; NextChooseWeaponTime = Level.TimeSeconds + TimeBetweenWeaponSwitches; } } //============================================================================= // Clear used weapon list used to make sure all weapons are used at least once // when bUseAllWeapons is set. function ResetUsedWeapons() { local int i; for( i=0; i= 1) { if( NumUsedWeapons == NumWeapons ) { ResetUsedWeapons(); } if( bRandomWeapons ) { CurrentWeaponIndex = Rand( NumWeapons ); if( bUseAllWeapons ) { while( UsedWeapons[CurrentWeaponIndex] != 0 ) { CurrentWeaponIndex++; if( CurrentWeaponIndex >= NumWeapons ) { CurrentWeaponIndex=0; } } } NumUsedWeapons++; UsedWeapons[CurrentWeaponIndex] = 1; } CurrentWeaponClass = class( DynamicLoadObject( WeaponClassStrings[CurrentWeaponIndex], class'Class' ) ); if( CurrentWeaponClass == None ) { warn( Self $ ": CurrentDefaultWeapon is None!" ); } if( !bRandomWeapons ) { CurrentWeaponIndex++; if( CurrentWeaponIndex >= NumWeapons ) { CurrentWeaponIndex=0; } } } else { warn( Self $ ": WeaponsClassStrings contain no valid weapon(s)!" ); } // turn all pickups in the level into ammo needed for current weapon foreach AllActors( class'Inventory', Inv ) { if( Inv.Owner == None ) { bAllowSpawn = true; if( (CurrentWeaponClass.default.AmmoName == None) || (CurrentWeaponClass.default.AmmoName.Name == '') || (CurrentWeaponClass == Class'SuperShockRifle') ) { // replace with vials of health -- keeps bot destination code happy if( !Inv.IsA( 'HealthVial' ) ) { ReplaceWith( Inv, "Botpack.HealthVial" ); Inv.Destroy(); } } else { if( Inv.Class.Name != CurrentWeaponClass.default.AmmoName.Name ) { ReplaceWith( Inv, string(CurrentWeaponClass.default.AmmoName) ); Inv.Destroy(); } } } } NextChooseWeaponTime = Level.TimeSeconds + TimeBetweenWeaponSwitches; } //============================================================================= // Set the given Pawn's weapon to the current one. Get rid of all inventory // before doing this. function SetWeaponTo( Pawn P ) { local Inventory Inv; local Weapon newWeapon; bAllowSpawn = true; // zap any current inventory for( Inv=P.Inventory; Inv!=None; Inv=Inv.Inventory ) { if( !Inv.IsA( 'Translocator' ) ) { P.DeleteInventory( Inv ); Inv.Destroy(); } } if( CurrentWeaponClass!=None ) { newWeapon = Spawn(CurrentWeaponClass); if( newWeapon != None ) { newWeapon.Instigator = P; newWeapon.BecomeItem(); P.AddInventory(newWeapon); newWeapon.BringUp(); newWeapon.GiveAmmo(P); newWeapon.SetSwitchPriority(P); newWeapon.WeaponSet(P); // make sure weapon can't be tossed newWeapon.bCanThrow = false; } } bAllowSpawn = false; } //============================================================================= // Make sure everyone is using the correct weapon, ammo no matter when they // join the game or respawn. function ModifyPlayer(Pawn Other) { if ( NextMutator != None ) { NextMutator.ModifyPlayer(Other); } SetWeaponTo( Other ); } //============================================================================= // Anything gets through at this point, although in some cases these will be // replaced with other actors with the first tick. function bool CheckReplacement( Actor Other, out byte bSuperRelevant ) { if( bAllowSpawn ) { bSuperRelevant = 1; return true; } return true; } //============================================================================= // No weapon by default -- this mutator hands out all weapons. function Class MyDefaultWeapon() { return None; } £#74"* €…ƒ ?x ī%{ Ew– …*„čppppV: WeaponsClassStrings[S] is invalid:   ¦*«!¬!%ęw *¤  € * * '’’’’ '’’’’# 'ž’’’' '’’’’& 'ž’’’= '’’’’( '’’’’ 'ž’’’G '’’’’! 'ž’’’F * 'ž’’’B 'ž’’’C 'ó’’’> 'ž’’’A =ś’’’$ Eż’’’7 Aõ’’’2 ;ō’’’, Gō’’’ 'ž’’’E 'ž’’’D =÷’’’5 '’’’’" Gś’’’ =ś’’’# G÷’’’ Bż’’’+ =ś’’’/ 'ž’’’% =ś’’’8 Eō’’’' G÷’’’ Gś’’’H G÷’’’ E÷’’’4 'ž’’’@ '’’’’) Gš’’’ 'ó’’’: ;š’’’7 ;š’’’3 *ó’’’? )Ó’’’<K LL X‡1 d—Rq‡9 ‡0 L‡9 Y‘N f r‡ ~§ KŽM W‡0 c˜P pŽO }‘ IQ U‘ a‡. mŽI z‘- FŽJ R˜6 ^ŠLkŠ›Xw!Š;O$Š©*J%Š„3t%‡. g&$X t&ŠVL0‡9 b3 4T‰o3Š£C½—"`½ n½Š|z½Ž vĄ[Public] Object=(Name=NIUT.NIUTMutator,Class=Class,MetaClass=Engine.Mutator,Description="NIUT, Server selects weapons, all pickups are replaced with ammo for the current weapon (ArtfulDodger).") Preferences=(Caption="Mutators",Parent="Advanced Options") Preferences=(Caption="NIUT",Parent="Mutators",Class=NIUT.NIUTMutator,Immediate=True) [NIUT.NIUTMutator] WeaponClassStrings[0]="Botpack.UT_Eightball" WeaponClassStrings[1]="Botpack.PulseGun" WeaponClassStrings[2]="Botpack.ShockRifle" WeaponClassStrings[3]="Botpack.MiniGun2" WeaponClassStrings[4]="Botpack.ImpactHammer" WeaponClassStrings[5]="Botpack.SuperShockRifle" bRandomWeapons=true bUseAllWeapons=true TimeBetweenWeaponSwitches=45.0 WarningSound=Sound'Botpack.Pickups.AmpOut' System\Manifest.iniESystem\Manifest.intEÆHelp\niut.txtō¹System\NIUT.u­ Ć3System\Niut.intp>[System\Niut.iniĖ?—£ÅćŸbA)B­5ą