[Setup] Product=Weapon Arena Version=210 Archive=WA21.umod SrcPath=. MasterPath=.. Group=SetupGroup Group=WeaponArenaGroup [SetupGroup] Copy=(Src=System\Manifest.ini,Master=System\Manifest.ini,Size=315,Flags=3) Copy=(Src=System\Manifest.int,Master=System\Manifest.int,Size=298,Flags=3) [WeaponArenaGroup] File=(Src=Help\WeaponArena.html,Size=6961) File=(Src=System\WeaponArena.u,Size=13274) File=(Src=System\WeaponArena.int,Size=244) [Setup] LocalProduct=Weapon Arena ReadMe=Help\WeaponArena.html SetupWindowTitle=Weapon Arena 2.1 AutoplayWindowTitle=Weapon Arena Options ProductURL=http://www.planetunreal.com/mutation VersionURL=http://www.planetunreal.com/mutation Developer=JbP DeveloperURL=mailto:jbp@planetunreal.com Weapon Arena Mutator

WeaponArena Mutator

Date: 28/10/99
Version: 2.1
Compatibility: UT 400


Author: JbP
email: jbp@planetunreal.com
site: http://www.planetunreal.com/mutation

------------

Description:

Weapon Arena is an arena mutator -- it replaces all weapons with weapons of a single type, and all ammo with the ammo which corresponds to the weapon type. The default weapon is of the same type.

However, the Weapon Arena mutator allows you to choose the weapon which will be used in the Arena match. You can choose any of the Unreal Tournament weapons, any of the Unreal 1 weapons, and any third-party weapons.

------------

Instructions:

Double-click the UMOD and install into your unrealtournament\ directory.

Then load up UT and choose Practice Session. Click the Mutators button. Double-click "Weapon Arena" in the list on the left -- this will add it to the list of current mutators. Click OK. Note that you can only have one active 'Arena' mutator, so make sure you remove any other such mutators from the 'current' list. This includes InstaGib. Configure the rest of your settings as necessary and start the game.

To select a different weapon as the arena weapon, click the Mods menu on the menu bar. Click "Weapon Arena Config". A dialog box will appear in the middle of your screen.

Select the weapon from the list. Once you have selected your weapon, hit enter and you should see the dialog box text change to the name of the new arena. Click Close. Remember to put the Weapon Arena mutator in your game, btw :). These settings are saved, and will be operative until you change them again.

------------

How WeaponArena finds weapons:

WeaponArena reads .int files (that is, files which describe the contents of an Unreal package) and displays all classes mentioned in those files with a metaclass of either "Botpack.TournamentWeapon" or "Engine.Weapon".

If you have a third-party weapon which is not being shown in the list, the most likely cause is that the .int file for the package does not mention it. You are going to have to add it yourself. You might find that the .int file doesn't exist at all. Create one named after the .u package containing the weapon (eg MyWeapon.int). The easiest way to correctly edit an .int file is to copy another .int file :) You will have to know the class name for the weapon -- it will be the same name that is used to 'summon' the weapon. eg, 'MyWeapon.Pistol'. You can always load the package in UnrealEd to find the classname.

If none of the above makes any sense, email the author of the weapon and politely ask for an .int file.

If you have an .int file reference to a weapon, but no package for it: when you select it from the list, the arena description will report that no weapon was found. If you just hit close, the next time you use WeaponArena, you won't have a weapon. Not much fun, really.

------------

Issues:

There is no reference to the Enhanced ShockRifle (the instagib gun) in botpack.int. So it won't show in the list. Of course, you could always just use the Instagib mutator instead :)

Double Enforcer support is a little simplistic -- you'll get a message saying you've picked up another enforcer on respawn. Sigh. Ignore it, for the time being. In the time it's taken me to explain this 'issue', I could have fixed it, but I'm a silly bugger that way.

------------

Thanks to mek for the UWindow tutorial and additional hints. Visit the mutation device and Mod Central for more mutators.

Questions, complaints, bugs, etc: jbp@planetunreal.com

*Dv@-41D/*pjDEST-vNoneSetText WeaponArenaSystemCoreUWindowChangeArenaWeapon GetWeapNameAddWeaponStringItemsSetFontAddItemCreatedEngine GetValue2WAConfigClientWWAConfigWindow SetEditableBotpack ClientClass GetValue MenuCaption MenuHelpExecute ClearValuePostBeginPlay NoWeaponTextWeapArenaMenuItem ModifyPlayerUMenuCreateControlCloseHandlePickupQuery WindowTitleNotifyGetNextIntDesciEC ReturnValue ScriptText NewWeaponAmmo ItemNameInv AmmoName AmmoType enforcerOtherDynamicLoadObjectP StrPropertyClassProperty WeaponNameOwnerMutatorObjectPawnDefaultWeaponClass BoolPropertyNameUWindowDialogClientWindowUWindowFramedWindowUWindowComboControl TextBufferUWindowDialogControlUWindowWindowUWindowPulldownMenuGetPlayerOwnerSetSize CreateWindow FunctionWeaponAlign ParentWindow NotifyWindowWinLeft EditBoxWidth WinHeight WinWidthWinTopRoot CancelButton CloseButton ClassString InventoryActor NameProperty PlayerPawnUMenuLabelControlUMenuModMenuItem WeaponNumWeaponClassName MenuItemPackage WeaponString AmmoStringArena IntPropertyFloatPropertyObjectPropertyUWindowSmallButton bInitialisedbDoubleEnforcersWeaponStringBox ArenaLabelUWindowRootWindowWADefaultWeaponWAWeaponString WAWeaponName WAAmmoString WAAmmoName BytePropertyWCDescbIntValNotFoundUWindowPulldownMenuItemdotPosUWindowSmallCloseButton)#?Z~_4_4᱘ro'ro'ڇ᱘᱘ro'_4.'lPU_4PU_4_4_4_4_4᱘᱘᱘ro'᱘᱘7XÑ7XÖВ]No valid weapon selected. @ @@@@@@+@@@@  @@,#2GMo o  ]Weapon Arena Config X\CB?,?,  + -       - -|BotPack.Enforcer-' fO//============================================================================= // WAConfigClientW. //============================================================================= class WAConfigClientW expands UWindowDialogClientWindow config; //(Mutators); //----- controls ------------- var UWindowComboControl WeaponStringBox; var UWindowSmallButton CloseButton; var UWindowSmallCloseButton CancelButton; var UMenuLabelControl ArenaLabel; var string NoWeaponText; //----- config vars used by the mutator ------ var config class WADefaultWeapon; var config string WAWeaponString; var config name WAWeaponName; var config string WAAmmoString; var config name WAAmmoName; var config bool bDoubleEnforcers; //--------------------------- function Created() { Super.Created(); // Combo box. WeaponStringBox = UWindowComboControl( CreateControl( class'UWindowComboControl', 10, 10, 200, 1 ) ); WeaponStringBox.SetText( "Weapon: " ); WeaponStringBox.SetFont(F_Normal); WeaponStringBox.SetEditable( FALSE ); WeaponStringBox.EditBoxWidth = 156; AddWeaponStringItems(); // ArenaLabel ArenaLabel = UMenuLabelControl(CreateWindow(class'UMenuLabelControl', 10, 45, 200, WinHeight-30)); ArenaLabel.Align = TA_Center; ArenaLabel.SetFont(F_Bold); // for some reason, class config vars are not automatically loaded.. WADefaultWeapon = class(DynamicLoadObject( WAWeaponString, class'Class')); if ( WADefaultWeapon != None) { if (!bDoubleEnforcers) ArenaLabel.SetText( WADefaultWeapon.Default.ItemName$" Arena" ); else ArenaLabel.SetText( "Double Enforcers Arena" ); } else ArenaLabel.SetText( NoWeaponText ); // Update button -- not a close button because we need to do some special stuff when // closing via this button (ie, save configuration settings..). CloseButton = UWindowSmallButton(CreateWindow(class'UWindowSmallButton', 94 , 80, 48, 16)); CloseButton.SetText( "Close" ); CloseButton.NotifyWindow = Self; // doesn't seem to work otherwise. // Cancel button CancelButton = UWindowSmallCloseButton(CreateWindow(class'UWindowSmallCloseButton', 152, 80, 48, 16)); CancelButton.SetText( "Cancel" ); } function AddWeaponStringItems() { local playerpawn P; local int WeaponNum; local string WeaponClassName, WCDesc; local bool bIntValNotFound; P = GetPlayerOwner(); for ( WeaponNum = 0; bIntValNotFound == FALSE; WeaponNum++ ) { P.GetNextIntDesc( "Botpack.TournamentWeapon", WeaponNum, WeaponClassName, WCDesc ); if ( WeaponClassName == "" ) bIntValNotFound = TRUE; else { if ( WCDesc == "" ) WCDesc = GetWeapName( WeaponClassName ); WeaponStringBox.AddItem( WCDesc, WeaponClassName ); } } bIntValNotFound = FALSE; for ( WeaponNum = 0; bIntValNotFound == FALSE; WeaponNum++ ) { P.GetNextIntDesc( "Engine.Weapon", WeaponNum, WeaponClassName, WCDesc ); if ( WeaponClassName == "" ) bIntValNotFound = TRUE; else { if ( WCDesc == "" ) WCDesc = GetWeapName( WeaponClassName ); WeaponStringBox.AddItem( WCDesc, WeaponClassName ); } } } function string GetWeapName( string classString ) { local int dotPos; dotPos = inStr( classString, "." ); if ( dotPos != -1 ) return mid( classString, dotPos + 1 ); else return classString; } function Notify( UWindowDialogControl C, byte E ) { Super.Notify( C, E ); switch(E) { case DE_Change: switch(C) { case WeaponStringBox: ChangeArenaWeapon(); break; } case DE_Click: switch(C) { case CloseButton: if ( WeaponStringBox.GetValue() != "" ) ChangeArenaWeapon(); SaveConfig(); ParentWindow.Close(); break; } } } function ChangeArenaWeapon() { local string NewWeapon; local class ammotype; local int i; NewWeapon = WeaponStringBox.GetValue2(); // If double enforcers is the request, we need to set our special case // flag and set the weapon string to a single enforcer. The mutator // will take care of the rest. if ( NewWeapon ~= "BotPack.DoubleEnforcer" ) { bDoubleEnforcers = TRUE; NewWeapon = "BotPack.Enforcer"; } else bDoubleEnforcers = FALSE; // Let's find this bugger, then.. WADefaultWeapon = class( DynamicLoadObject( NewWeapon, class'Class' ) ); // not there? reset and return. if ( WADefaultWeapon == None ) { WeaponStringBox.ClearValue(); ArenaLabel.SetText( NoWeaponText ); return; } // We've found it, so change the default weapon and ammo for the arena WAWeaponString = string( WADefaultWeapon ); WAWeaponName = WADefaultWeapon.Name; WAAmmoString = string(WADefaultWeapon.Default.AmmoName); ammoType = class( DynamicLoadObject( WAAmmoString, class'Class' ) ); WAAmmoName = ammoType.Name; // special case for double enforcers. if (bDoubleEnforcers) ArenaLabel.SetText( "Double Enforcers Arena" ); else ArenaLabel.SetText( WADefaultWeapon.Default.ItemName$" Arena" ); } !HN O%- (/Botpack.TournamentWeaponnz- 'z - (%M- ($Engine.Weapon z- 'C*z   .  A AHC?Weapon:  %(C.  A4BHC?,$ & Xw*.-p ArenaUDouble Enforcers Arenal  . BB@BA Close . CB@BACancel $a-  a Sw. *   a K//============================================================================= // WAConfigWindow. //============================================================================= class WAConfigWindow expands UWindowFramedWindow; function Created() { Super.Created(); SetSize(220, 120); WinLeft = (Root.WinWidth - WinWidth) / 2; WinTop = (Root.WinHeight - WinHeight) / 2; } *"$N5ԱoMM?Z?Z?Z?Z?Z?Z Z//============================================================================= // WeapArenaMenuItem. //============================================================================= class WeapArenaMenuItem expands UMenuModMenuItem; function Execute() { MenuItem.Owner.Root.CreateWindow(class'WAConfigWindow', 10, 10, 150, 100); } (!xr  7$ 47 $ | g{b  %-2'*ͷ;aGV撡o ]&Weapon Arena Config]B@Choose the weapon you want to use for the Weapon Arena mutator. n :~.2&8 & Im  Z| BotPack.DoubleEnforcer-' BotPack.Enforcerb-( r*  V V D-Double Enforcers Arenakp Arena D//============================================================================= // WeaponArena. //============================================================================= class WeaponArena expands Arena; var bool bInitialised; var bool bDoubleEnforcers; function PostBeginPlay() { if ( bInitialised ) return; DefaultWeapon = class'WAConfigClientW'.Default.WADefaultWeapon; WeaponString = class'WAConfigClientW'.Default.WAWeaponString; WeaponName = class'WAConfigClientW'.Default.WAWeaponName; AmmoString = class'WAConfigClientW'.Default.WAAmmoString; AmmoName = class'WAConfigClientW'.Default.WAAmmoName; bDoubleEnforcers = (class'WAConfigClientW'.Default.bDoubleEnforcers) && (WeaponString ~= "BotPack.Enforcer"); //log ("WEAPONARENA: DefaultWeapon is " $ DefaultWeapon); //log ("WEAPONARENA: WeaponString is " $ WeaponString); //log ("WEAPONARENA: WeaponName is " $ WeaponName); //log ("WEAPONARENA: AmmoString is " $ AmmoString ); //log ("WEAPONARENA: AmmoName is " $ AmmoName ); //log ("WEAPONARENA: bDoubleEnforcers is " $ bDoubleEnforcers ); bInitialised = TRUE; } function ModifyPlayer(Pawn Other) { local Inventory Inv; Super.ModifyPlayer( Other ); if ( !bDoubleEnforcers ) return; Inv = Spawn( class'Enforcer' ); if ( Enforcer(Inv) != None ) { Other.Inventory.HandlePickupQuery( Inv ); } Inv.Destroy(); } @<  A ACB ^^^ :B::^:?:Y:7^:G:2:H:d:a:U:e:Z:;:@:V:u:=GF:>G0:6:X:b:)dQcN:j:AG2_:sG"G!:.:3cO:8W<2*G :WG GD3,GcPpIdKdU:C39cL:pd]GdJcMGEd52`W,W4\Mh i%kv%i D& q Q& \ ]& [ i&g u& r A'"+ M'S Z')( g'n s' 1 '(T L((t X(&% d(l q( }($g I)R U)$f b)"/ n)m {)o G*&$ S*)-`*Bn* Tp,$JD.'4qON0s yr$Vk'4VA]W''4et!sYOLA[K\$'4Og(& v)# B'GN[Public] Object=(Name=WeaponArena.WeapArenaMenuItem,Class=Class,MetaClass=UMenu.UMenuModMenuItem) Object=(Name=WeaponArena.WeaponArena,Class=Class,MetaClass=Engine.Mutator,Description="Weapon Arena, Play Arena with your favourite weapon") System\Manifest.iniSystem\Manifest.int*Help\WeaponArena.html1System\WeaponArena.u"3System\WeaponArena.intQRSRӓ