├── .github └── issue_template.md ├── LICENSE ├── README.md ├── ServerExt ├── Classes │ ├── ExtAutoPurchaseHelper.uc │ ├── ExtCharDataInfo.uc │ ├── ExtCharacterInfo.uc │ ├── ExtEmoteList.uc │ ├── ExtExplosion_SirenScream.uc │ ├── ExtGUI_PerkSelectionPage.uc │ ├── ExtHUD_PlayerBackpack.uc │ ├── ExtHUD_PlayerStatus.uc │ ├── ExtHUD_SpectatorInfo.uc │ ├── ExtHUD_WaveInfo.uc │ ├── ExtHUD_WeaponSelectWidget.uc │ ├── ExtHumanPawn.uc │ ├── ExtInventoryManager.uc │ ├── ExtMenu_Gear.uc │ ├── ExtMenu_Inventory.uc │ ├── ExtMenu_Perks.uc │ ├── ExtMenu_Trader.uc │ ├── ExtMoviePlayer_HUD.uc │ ├── ExtMoviePlayer_Manager.uc │ ├── ExtPawn_Customization.uc │ ├── ExtPawn_ZedHans_Pet.uc │ ├── ExtPerkManager.uc │ ├── ExtPerksContainer_Details.uc │ ├── ExtPerksContainer_Header.uc │ ├── ExtPerksContainer_Selection.uc │ ├── ExtPlayerController.uc │ ├── ExtPlayerInput.uc │ ├── ExtPlayerReplicationInfo.uc │ ├── ExtProj_CrackerGrenade.uc │ ├── ExtProj_SUPERGrenade.uc │ ├── ExtProj_SUPERMedGrenade.uc │ ├── ExtProj_SUPERMolotov.uc │ ├── ExtProj_SUPERMolotovS.uc │ ├── ExtSM_Player_Emote.uc │ ├── ExtSM_Siren_Scream.uc │ ├── ExtSaveDataBase.uc │ ├── ExtSpawnPointHelper.uc │ ├── ExtStatWriter.uc │ ├── ExtTraderContainer_Filter.uc │ ├── ExtTraderContainer_PlayerInfo.uc │ ├── ExtTraderContainer_Store.uc │ ├── ExtWeap_Pistol_9mm.uc │ ├── ExtWeap_Pistol_Dual9mm.uc │ ├── ExtWeap_Pistol_MedicS.uc │ ├── ExtWeaponSkinList.uc │ ├── ExtWebAdmin_UI.uc │ ├── ExtWidget_BossHealthBar.uc │ ├── ExtWidget_PartyInGame.uc │ ├── Ext_AICommandBasePet.uc │ ├── Ext_AINoTaunt.uc │ ├── Ext_PerkBase.uc │ ├── Ext_PerkBerserker.uc │ ├── Ext_PerkCommando.uc │ ├── Ext_PerkDemolition.uc │ ├── Ext_PerkFieldMedic.uc │ ├── Ext_PerkFirebug.uc │ ├── Ext_PerkGunslinger.uc │ ├── Ext_PerkRhythmPerkBase.uc │ ├── Ext_PerkSWAT.uc │ ├── Ext_PerkSharpshooter.uc │ ├── Ext_PerkSupport.uc │ ├── Ext_PerkSurvivalist.uc │ ├── Ext_TGroupBase.uc │ ├── Ext_TGroupMonster.uc │ ├── Ext_TGroupRegen.uc │ ├── Ext_TGroupZEDTime.uc │ ├── Ext_T_AmmoRegHelp.uc │ ├── Ext_T_ArmorRegHelp.uc │ ├── Ext_T_AutoFireHelper.uc │ ├── Ext_T_GhostHelper.uc │ ├── Ext_T_HealthRegHelp.uc │ ├── Ext_T_MonsterPRI.uc │ ├── Ext_T_SupplierInteract.uc │ ├── Ext_T_UnCloakHelper.uc │ ├── Ext_T_ZEDHelper.uc │ ├── Ext_TraitAPShots.uc │ ├── Ext_TraitAcidicCompound.uc │ ├── Ext_TraitAirborne.uc │ ├── Ext_TraitAirborneAgent.uc │ ├── Ext_TraitAmmoReg.uc │ ├── Ext_TraitArmorReg.uc │ ├── Ext_TraitArmorRep.uc │ ├── Ext_TraitAutoFire.uc │ ├── Ext_TraitBase.uc │ ├── Ext_TraitBoomWeld.uc │ ├── Ext_TraitBunnyHop.uc │ ├── Ext_TraitCarryCap.uc │ ├── Ext_TraitContactNade.uc │ ├── Ext_TraitDataStore.uc │ ├── Ext_TraitDemoAOE.uc │ ├── Ext_TraitDemoCriticalHit.uc │ ├── Ext_TraitDemoDirectHit.uc │ ├── Ext_TraitDemoNuke.uc │ ├── Ext_TraitDemoProfessional.uc │ ├── Ext_TraitDemoReactiveArmor.uc │ ├── Ext_TraitDireReload.uc │ ├── Ext_TraitDoorRepair.uc │ ├── Ext_TraitDuracell.uc │ ├── Ext_TraitEliteReload.uc │ ├── Ext_TraitEnemyHP.uc │ ├── Ext_TraitFanfire.uc │ ├── Ext_TraitFireExplode.uc │ ├── Ext_TraitFireRange.uc │ ├── Ext_TraitGhost.uc │ ├── Ext_TraitGrenadeCap.uc │ ├── Ext_TraitGrenadeSUpg.uc │ ├── Ext_TraitGrenadeUpg.uc │ ├── Ext_TraitHealthReg.uc │ ├── Ext_TraitHeavyArmor.uc │ ├── Ext_TraitKnockback.uc │ ├── Ext_TraitMachineGunner.uc │ ├── Ext_TraitMedBoost.uc │ ├── Ext_TraitMedDamBoost.uc │ ├── Ext_TraitMedShield.uc │ ├── Ext_TraitMedicPistol.uc │ ├── Ext_TraitNapalm.uc │ ├── Ext_TraitNightvision.uc │ ├── Ext_TraitPenetrator.uc │ ├── Ext_TraitRackEmUp.uc │ ├── Ext_TraitRagdoll.uc │ ├── Ext_TraitRanger.uc │ ├── Ext_TraitRapidAssault.uc │ ├── Ext_TraitRetali.uc │ ├── Ext_TraitSWATEnforcer.uc │ ├── Ext_TraitSirenResistance.uc │ ├── Ext_TraitSpartan.uc │ ├── Ext_TraitSupply.uc │ ├── Ext_TraitSupplyData.uc │ ├── Ext_TraitSupplyGren.uc │ ├── Ext_TraitTacticalMove.uc │ ├── Ext_TraitTactician.uc │ ├── Ext_TraitToxicDart.uc │ ├── Ext_TraitUberAmmo.uc │ ├── Ext_TraitUnCloak.uc │ ├── Ext_TraitUnGrab.uc │ ├── Ext_TraitVampire.uc │ ├── Ext_TraitWPBers.uc │ ├── Ext_TraitWPComm.uc │ ├── Ext_TraitWPDemo.uc │ ├── Ext_TraitWPFire.uc │ ├── Ext_TraitWPGuns.uc │ ├── Ext_TraitWPMedic.uc │ ├── Ext_TraitWPSWAT.uc │ ├── Ext_TraitWPSharp.uc │ ├── Ext_TraitWPSupp.uc │ ├── Ext_TraitWPSurv.uc │ ├── Ext_TraitWeapons.uc │ ├── Ext_TraitZEDBase.uc │ ├── Ext_TraitZED_Damage.uc │ ├── Ext_TraitZED_Health.uc │ ├── Ext_TraitZED_Summon.uc │ ├── Ext_TraitZED_SummonExt.uc │ ├── Ext_TraitZedTExt.uc │ ├── Ext_TraitZedative.uc │ ├── GUIStyleBase.uc │ ├── KF2GUIController.uc │ ├── KF2GUIInput.uc │ ├── KF2GUINetwork.uc │ ├── KF2Style.uc │ ├── KFDT_ZombieHit.uc │ ├── KFExtendedHUD.uc │ ├── KFGUIConsoleHack.uc │ ├── KFGUI_Base.uc │ ├── KFGUI_Button.uc │ ├── KFGUI_Button_CD.uc │ ├── KFGUI_CheckBox.uc │ ├── KFGUI_Clickable.uc │ ├── KFGUI_ColumnList.uc │ ├── KFGUI_ColumnTop.uc │ ├── KFGUI_ComboBox.uc │ ├── KFGUI_ComboSelector.uc │ ├── KFGUI_ComponentList.uc │ ├── KFGUI_EditBox.uc │ ├── KFGUI_EditControl.uc │ ├── KFGUI_FloatingWindow.uc │ ├── KFGUI_FloatingWindowHeader.uc │ ├── KFGUI_HTMLTextBox.txt │ ├── KFGUI_List.uc │ ├── KFGUI_ListItem.uc │ ├── KFGUI_List_CD.uc │ ├── KFGUI_MultiComponent.uc │ ├── KFGUI_NumericBox.uc │ ├── KFGUI_Page.uc │ ├── KFGUI_RightClickMenu.uc │ ├── KFGUI_RightClickMenu_CD.uc │ ├── KFGUI_ScrollBarBase.uc │ ├── KFGUI_ScrollBarH.uc │ ├── KFGUI_ScrollBarV.uc │ ├── KFGUI_ScrollBarV_CD.uc │ ├── KFGUI_SwitchComponent.uc │ ├── KFGUI_SwitchMenuBar.uc │ ├── KFGUI_TextField.uc │ ├── KFGUI_TextLable.uc │ ├── KFGUI_Tooltip.uc │ ├── KFGUI_Tooltip_CD.uc │ ├── KFPawn_ZedSirenX.uc │ ├── MS_Game.uc │ ├── MS_HUD.uc │ ├── MS_Input.uc │ ├── MS_PC.uc │ ├── MS_PendingData.uc │ ├── MS_TMPUI.uc │ ├── MX_MiniGameBase.uc │ ├── MX_PongGame.uc │ ├── SRPerkManager.uc │ ├── UIP_About.uc │ ├── UIP_AdminMenu.uc │ ├── UIP_MiniGame.uc │ ├── UIP_News.uc │ ├── UIP_PerkSelection.uc │ ├── UIP_PerkSelectionLobby.uc │ ├── UIP_PlayerSpecs.uc │ ├── UIP_Settings.uc │ ├── UIR_PerkStat.uc │ ├── UIR_PerkTraitList.uc │ ├── UIR_TraitInfoPopup.uc │ ├── UI_AdminMOTD.uc │ ├── UI_AdminPerkLevel.uc │ ├── UI_MidGameMenu.uc │ ├── UI_PrestigeNote.uc │ ├── UI_ResetWarning.uc │ ├── UI_Scoreboard.uc │ ├── UI_Scoreboard_CD.uc │ ├── UI_UnloadInfo.uc │ ├── VSFPZedHands.uc │ ├── VSZombie.uc │ ├── VS_ZedClotBase.uc │ ├── VS_ZedRecentZed.uc │ ├── xUI_MapRank.uc │ ├── xUI_MapVote.uc │ ├── xVotingHandlerBase.uc │ └── xVotingReplication.uc └── Globals.uci └── ServerExtMut └── Classes ├── CtryDatabase.uc ├── ExtPlayerStat.uc ├── ExtStatList.uc ├── ExtWebApp.uc ├── ExtXMLOutput.uc ├── ServerExtMut.uc ├── ServerExtMut.upkg ├── xMapVoteHistory.uc ├── xVoteBroadcast.uc ├── xVoteWebApp.uc └── xVotingHandler.uc /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | ### Details 2 | Tell us exactly what happens, every single detail that you can think of 3 | 4 | ### Screenshots 5 | Provide a screenshot of the issue so we can debug it's not a user issue 6 | 7 | ### Steps to reproduce 8 | Tell us how to reproduce the problem, step by step 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KF2-Server-Extension 2 | A repository for ServerExtension by Marco found here https://forums.tripwireinteractive.com/forum/killing-floor-2/killing-floor-2-modifications/general-modding-discussion-ad/beta-mod-releases/109463-mutator-server-extension-mod 3 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtCharDataInfo.uc: -------------------------------------------------------------------------------- 1 | Class ExtCharDataInfo extends Object 2 | config(Game) 3 | perobjectconfig 4 | DependsOn(ExtPlayerReplicationInfo); 5 | 6 | var config byte HeadMeshIndex,HeadSkinIndex,BodyMeshIndex,BodySkinIndex,AttachmentMesh0,AttachmentSkin0,AttachmentMesh1,AttachmentSkin1,AttachmentMesh2,AttachmentSkin2,HasInit; 7 | 8 | final function FMyCustomChar LoadData() 9 | { 10 | local FMyCustomChar R; 11 | 12 | if( HasInit==0 ) 13 | { 14 | AttachmentMesh0 = 255; 15 | AttachmentMesh1 = 255; 16 | AttachmentMesh2 = 255; 17 | } 18 | R.HeadMeshIndex = HeadMeshIndex; 19 | R.HeadSkinIndex = HeadSkinIndex; 20 | R.BodyMeshIndex = BodyMeshIndex; 21 | R.BodySkinIndex = BodySkinIndex; 22 | R.AttachmentMeshIndices[0] = AttachmentMesh0; 23 | R.AttachmentSkinIndices[0] = AttachmentSkin0; 24 | R.AttachmentMeshIndices[1] = AttachmentMesh1; 25 | R.AttachmentSkinIndices[1] = AttachmentSkin1; 26 | R.AttachmentMeshIndices[2] = AttachmentMesh2; 27 | R.AttachmentSkinIndices[2] = AttachmentSkin2; 28 | return R; 29 | } 30 | final function SaveData( FMyCustomChar R ) 31 | { 32 | HeadMeshIndex = R.HeadMeshIndex; 33 | HeadSkinIndex = R.HeadSkinIndex; 34 | BodyMeshIndex = R.BodyMeshIndex; 35 | BodySkinIndex = R.BodySkinIndex; 36 | AttachmentMesh0 = R.AttachmentMeshIndices[0]; 37 | AttachmentSkin0 = R.AttachmentSkinIndices[0]; 38 | AttachmentMesh1 = R.AttachmentMeshIndices[1]; 39 | AttachmentSkin1 = R.AttachmentSkinIndices[1]; 40 | AttachmentMesh2 = R.AttachmentMeshIndices[2]; 41 | AttachmentSkin2 = R.AttachmentSkinIndices[2]; 42 | HasInit = 1; 43 | SaveConfig(); 44 | } 45 | 46 | defaultproperties 47 | { 48 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtExplosion_SirenScream.uc: -------------------------------------------------------------------------------- 1 | class ExtExplosion_SirenScream extends KFExplosion_SirenScream; 2 | 3 | protected function SpecialCringeEffectsFor(Actor Victim, float VictimDist) 4 | { 5 | return; 6 | } 7 | 8 | DefaultProperties 9 | { 10 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtGUI_PerkSelectionPage.uc: -------------------------------------------------------------------------------- 1 | Class ExtGUI_PerkSelectionPage extends UI_MidGameMenu; 2 | 3 | function InitMenu() 4 | { 5 | local byte i; 6 | local KFGUI_Button B; 7 | 8 | PageSwitcher = KFGUI_SwitchMenuBar(FindComponentID('Pager')); 9 | Super(KFGUI_Page).InitMenu(); 10 | 11 | for( i=0; i EPerkClass; 4 | 5 | function UpdateGrenades() 6 | { 7 | local int CurrentGrenades; 8 | local ExtPerkManager PM; 9 | 10 | if(MyKFInvManager != none) 11 | CurrentGrenades = MyKFInvManager.GrenadeCount; 12 | 13 | //Update the icon the for grenade type. 14 | if( ExtPlayerController(MyKFPC)!=None ) 15 | { 16 | PM = ExtPlayerController(MyKFPC).ActivePerkManager; 17 | 18 | if( PM!=None && PM.CurrentPerk!=None && EPerkClass!=PM.CurrentPerk.Class ) 19 | { 20 | SetString("backpackGrenadeType", "img://"$PM.CurrentPerk.GrenadeWeaponDef.Static.GetImagePath()); 21 | EPerkClass = PM.CurrentPerk.Class; 22 | } 23 | } 24 | // Update the grenades count value 25 | if(CurrentGrenades != LastGrenades) 26 | { 27 | SetInt("backpackGrenades" , Min(CurrentGrenades,9)); 28 | LastGrenades = CurrentGrenades; 29 | } 30 | } 31 | 32 | DefaultProperties 33 | { 34 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtHUD_PlayerStatus.uc: -------------------------------------------------------------------------------- 1 | class ExtHUD_PlayerStatus extends KFGFxHUD_PlayerStatus; 2 | 3 | var ExtPlayerController ExPC; 4 | var class ExLastPerkClass; 5 | var string CurPerkPath; 6 | 7 | function InitializeHUD() 8 | { 9 | Super.InitializeHUD(); 10 | ExPC = ExtPlayerController(MyPC); 11 | } 12 | 13 | function UpdatePerk() 14 | { 15 | local int CurrentPerkLevel,CurrentPerkEXP; 16 | local Ext_PerkBase CurrentPerk; 17 | local GFxObject PerkIconObject; 18 | 19 | if( ExPC == none || ExPC.ActivePerkManager==None || ExPC.ActivePerkManager.CurrentPerk==None ) 20 | return; 21 | 22 | CurrentPerk = ExPC.ActivePerkManager.CurrentPerk; 23 | CurrentPerkLevel = CurrentPerk.CurrentLevel; 24 | CurrentPerkEXP = CurrentPerk.CurrentEXP; 25 | 26 | // Update the perk class. 27 | if( ( ExLastPerkClass != CurrentPerk.Class ) || ( LastPerkLevel != CurrentPerkLevel ) ) 28 | { 29 | CurPerkPath = CurrentPerk.GetPerkIconPath(CurrentPerkLevel); 30 | 31 | PerkIconObject = CreateObject("Object"); 32 | PerkIconObject.SetString("perkIcon", CurPerkPath); 33 | SetObject("playerPerkIcon", PerkIconObject); 34 | 35 | SetInt("playerPerkXPPercent", CurrentPerk.GetProgressPercent() * 100.f ); 36 | if( LastPerkLevel != CurrentPerkLevel && ExLastPerkClass==CurrentPerk.Class ) 37 | { 38 | SetBool("bLevelUp", true); 39 | ShowXPBark(CurrentPerkEXP-LastEXPValue,CurPerkPath,true); 40 | } 41 | ExLastPerkClass = CurrentPerk.class; 42 | 43 | SetInt("playerPerkLevel" , CurrentPerkLevel); 44 | LastPerkLevel = CurrentPerkLevel; 45 | LastEXPValue = CurrentPerkEXP; 46 | } 47 | else if( LastEXPValue!=CurrentPerkEXP ) 48 | { 49 | SetBool("bLevelUp", false); 50 | SetInt("playerPerkXPPercent", CurrentPerk.GetProgressPercent() * 100.f ); 51 | ShowXPBark(CurrentPerkEXP-LastEXPValue,CurPerkPath,true); 52 | LastEXPValue = CurrentPerkEXP; 53 | } 54 | } 55 | function ShowXPBark( int DeltaXP, string IconPath, bool bIsCurrentPerk ) 56 | { 57 | ActionScriptVoid("showXPBark"); 58 | } 59 | 60 | function UpdateHealth() 61 | { 62 | if( MyPC.Pawn == none ) 63 | { 64 | LastHealth = 0; 65 | SetInt("playerHealth" , LastHealth); 66 | } 67 | else if( LastHealth != MyPC.Pawn.Health ) 68 | { 69 | LastHealth = MyPC.Pawn.Health; 70 | SetInt("playerHealth" , LastHealth); 71 | } 72 | } 73 | 74 | defaultproperties 75 | { 76 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtHUD_SpectatorInfo.uc: -------------------------------------------------------------------------------- 1 | class ExtHUD_SpectatorInfo extends KFGFxHUD_SpectatorInfo; 2 | 3 | var class ExtLastPerkClass; 4 | var bool bUnsetInfo; 5 | 6 | function LocalizeText() 7 | { 8 | local GFxObject TempObject; 9 | TempObject = CreateObject("Object"); 10 | 11 | TempObject.SetString("prevPlayer", "FREE CAMERA"); 12 | TempObject.SetString("nextPlayer", PrevPlayerString); 13 | TempObject.SetString("changeCamera", ChangeCameraString); 14 | 15 | SetObject("localizedText", TempObject); 16 | } 17 | 18 | function UpdatePlayerInfo( optional bool bForceUpdate ) 19 | { 20 | local GFxObject TempObject; 21 | local ExtPlayerReplicationInfo E; 22 | 23 | if( SpectatedKFPRI == None ) 24 | return; 25 | 26 | E = ExtPlayerReplicationInfo(SpectatedKFPRI); 27 | 28 | if( LastPerkLevel != E.ECurrentPerkLevel || LastPerkLevel != E.ECurrentPerkLevel || bForceUpdate ) 29 | { 30 | LastPerkLevel = E.ECurrentPerkLevel; 31 | ExtLastPerkClass = E.ECurrentPerk; 32 | TempObject = CreateObject( "Object" ); 33 | TempObject.SetString( "playerName", SpectatedKFPRI.GetHumanReadableName() ); 34 | if( ExtLastPerkClass!=None && TempObject !=None ) 35 | { 36 | TempObject.SetString( "playerPerk", SpectatedKFPRI.CurrentPerkClass.default.LevelString @LastPerkLevel @ExtLastPerkClass.default.PerkName ); 37 | TempObject.SetString( "iconPath", ExtLastPerkClass.Static.GetPerkIconPath(LastPerkLevel) ); 38 | SetObject( "playerData", TempObject ); 39 | } 40 | else TempObject.SetString( "playerPerk","No perk" ); 41 | SetVisible( true ); 42 | } 43 | } 44 | 45 | defaultproperties 46 | { 47 | } 48 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtHUD_WaveInfo.uc: -------------------------------------------------------------------------------- 1 | class ExtHUD_WaveInfo extends KFGFxHUD_WaveInfo; 2 | 3 | function TickHud(float DeltaTime) 4 | { 5 | local int i; 6 | 7 | if(KFGRI == none) 8 | KFGRI = KFGameReplicationInfo(GetPC().WorldInfo.GRI); 9 | else 10 | { 11 | if(KFGRI.bTraderIsOpen) 12 | { 13 | i = KFGRI.GetTraderTimeRemaining(); 14 | if(LastTraderTimeRemaining != i) 15 | { 16 | SetInt("remainingTraderTime" ,i); 17 | LastTraderTimeRemaining = i; 18 | } 19 | } 20 | else 21 | { 22 | i = KFGRI.IsFinalWave() ? INDEX_NONE : Max(KFGRI.AIRemaining,0); 23 | if(LastZEDCount != i) 24 | { 25 | SetInt("remainingZEDs" ,i); 26 | LastZEDCount = i; 27 | } 28 | } 29 | 30 | // Max # of waves. 31 | if(LastWaveMax != KFGRI.WaveMax) 32 | { 33 | LastWaveMax = KFGRI.WaveMax; 34 | SetInt("maxWaves" ,LastWaveMax-1); 35 | } 36 | 37 | // Current wave we're on. 38 | if( LastWave!=KFGRI.WaveNum ) 39 | { 40 | LastWave = KFGRI.WaveNum; 41 | if( LastWave>LastWaveMax ) 42 | { 43 | SetInt("currentWave",0); // Force text to refresh. 44 | SetString("finalText", "END"); 45 | } 46 | SetInt("currentWave",Min(LastWave,LastWaveMax)); 47 | } 48 | } 49 | } 50 | 51 | function UpdateWaveCount(); 52 | 53 | DefaultProperties 54 | { 55 | LastWave=-1 56 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtInventoryManager.uc: -------------------------------------------------------------------------------- 1 | class ExtInventoryManager extends KFInventoryManager; 2 | 3 | // Dosh spamming barrier. 4 | var transient float MoneyTossTime; 5 | var transient byte MoneyTossCount; 6 | 7 | reliable server function ServerThrowMoney() 8 | { 9 | if( MoneyTossTime>WorldInfo.TimeSeconds ) 10 | { 11 | if( MoneyTossCount>=10 ) 12 | return; 13 | ++MoneyTossCount; 14 | MoneyTossTime = FMax(MoneyTossTime,WorldInfo.TimeSeconds+0.5); 15 | } 16 | else 17 | { 18 | MoneyTossCount = 0; 19 | MoneyTossTime = WorldInfo.TimeSeconds+1; 20 | } 21 | Super.ServerThrowMoney(); 22 | } 23 | 24 | simulated function Inventory CreateInventory(class NewInventoryItemClass, optional bool bDoNotActivate) 25 | { 26 | local KFWeapon Wep; 27 | local Inventory SupClass; 28 | 29 | SupClass = Super.CreateInventory(NewInventoryItemClass, bDoNotActivate); 30 | Wep = KFWeapon(SupClass); 31 | 32 | if( Wep != none ) 33 | { 34 | if( KFWeap_Pistol_Dual9mm(Wep) != None && ExtWeap_Pistol_Dual9mm(Wep) == None ) 35 | { 36 | Wep.Destroy(); 37 | return Super.CreateInventory(class'ExtWeap_Pistol_Dual9mm', bDoNotActivate); 38 | } 39 | 40 | return Wep; 41 | } 42 | 43 | return SupClass; 44 | } 45 | 46 | simulated function CheckForExcessRemoval(KFWeapon NewWeap) 47 | { 48 | local Inventory RemoveInv, Inv; 49 | 50 | if( KFWeap_Pistol_Dual9mm(NewWeap) != None ) 51 | { 52 | for (Inv = InventoryChain; Inv != None; Inv = Inv.Inventory) 53 | { 54 | if (Inv.Class == class'ExtWeap_Pistol_9mm') 55 | { 56 | RemoveInv = Inv; 57 | Inv = Inv.Inventory; 58 | RemoveFromInventory(RemoveInv); 59 | } 60 | } 61 | } 62 | 63 | Super.CheckForExcessRemoval(NewWeap); 64 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtMenu_Inventory.uc: -------------------------------------------------------------------------------- 1 | class ExtMenu_Inventory extends KFGFxMenu_Inventory; 2 | 3 | function bool IsItemActive(int ItemDefinition) 4 | { 5 | local class WeaponDef; 6 | local int ItemIndex; 7 | 8 | ItemIndex = class'ExtWeaponSkinList'.default.Skins.Find('Id', ItemDefinition); 9 | 10 | if(ItemIndex == INDEX_NONE) 11 | { 12 | return false; 13 | } 14 | 15 | WeaponDef = class'ExtWeaponSkinList'.default.Skins[ItemIndex].WeaponDef; 16 | 17 | if(WeaponDef != none) 18 | { 19 | return class'ExtWeaponSkinList'.Static.IsSkinEquip(WeaponDef, ItemDefinition, ExtPlayerController(KFPC)); 20 | } 21 | 22 | return false; 23 | } 24 | 25 | function Callback_Equip( int ItemDefinition ) 26 | { 27 | local class WeaponDef; 28 | local int ItemIndex; 29 | 30 | ItemIndex = class'ExtWeaponSkinList'.default.Skins.Find('Id', ItemDefinition); 31 | 32 | if(ItemIndex == INDEX_NONE) 33 | { 34 | return; 35 | } 36 | 37 | WeaponDef = class'ExtWeaponSkinList'.default.Skins[ItemIndex].WeaponDef; 38 | 39 | if(WeaponDef != none) 40 | { 41 | if(IsItemActive(ItemDefinition)) 42 | { 43 | class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, 0, ExtPlayerController(KFPC)); 44 | 45 | if(class'WorldInfo'.static.IsConsoleBuild( )) 46 | { 47 | Manager.CachedProfile.ClearWeaponSkin(WeaponDef.default.WeaponClassPath); 48 | } 49 | } 50 | else 51 | { 52 | class'ExtWeaponSkinList'.Static.SaveWeaponSkin(WeaponDef, ItemDefinition, ExtPlayerController(KFPC)); 53 | if(class'WorldInfo'.static.IsConsoleBuild( )) 54 | { 55 | Manager.CachedProfile.SaveWeaponSkin(WeaponDef.default.WeaponClassPath, ItemDefinition); 56 | } 57 | } 58 | } 59 | 60 | InitInventory(); 61 | } 62 | 63 | defaultproperties 64 | { 65 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtMenu_Perks.uc: -------------------------------------------------------------------------------- 1 | class ExtMenu_Perks extends KFGFxMenu_Perks; 2 | 3 | var ExtPlayerController ExtKFPC; 4 | var Ext_PerkBase ExtPrevPerk; 5 | 6 | function OnOpen() 7 | { 8 | KFPC = KFPlayerController( GetPC() ); 9 | if( ExtKFPC == none ) 10 | ExtKFPC = ExtPlayerController(KFPC); 11 | 12 | if( ExtKFPC.ActivePerkManager==None ) 13 | { 14 | ExtKFPC.SetTimer(0.25,true,'OnOpen',Self); 15 | return; 16 | } 17 | ExtKFPC.ClearTimer('OnOpen',Self); 18 | 19 | if( ExtPrevPerk==None ) 20 | ExtPrevPerk = ExtKFPC.ActivePerkManager.CurrentPerk; 21 | 22 | ExUpdateContainers(ExtPrevPerk); 23 | SetBool( "locked", true); 24 | } 25 | final function ExUpdateContainers( Ext_PerkBase PerkClass ) 26 | { 27 | LastPerkLevel = PerkClass.CurrentLevel; 28 | if ( ExtPerksContainer_Header(HeaderContainer)!=none ) 29 | ExtPerksContainer_Header(HeaderContainer).ExUpdatePerkHeader( PerkClass ); 30 | if ( ExtPerksContainer_Details(DetailsContainer)!=none ) 31 | { 32 | ExtPerksContainer_Details(DetailsContainer).ExUpdateDetails( PerkClass ); 33 | ExtPerksContainer_Details(DetailsContainer).ExUpdatePassives( PerkClass ); 34 | } 35 | if ( SelectionContainer != none ) 36 | SelectionContainer.UpdatePerkSelection(ExtKFPC.ActivePerkManager.UserPerks.Find(PerkClass)); 37 | } 38 | 39 | function CheckTiersForPopup(); 40 | 41 | event OnClose() 42 | { 43 | ExtPrevPerk = None; 44 | if ( ExtKFPC != none ) 45 | ExtKFPC.ClearTimer('OnOpen',Self); 46 | super.OnClose(); 47 | } 48 | 49 | function PerkChanged( byte NewPerkIndex, bool bClickedIndex) 50 | { 51 | ExUpdateContainers(ExtPrevPerk); 52 | } 53 | 54 | function OneSecondLoop() 55 | { 56 | if( ExtPrevPerk!=None && LastPerkLevel!=ExtPrevPerk.CurrentLevel ) 57 | ExUpdateContainers(ExtPrevPerk); 58 | } 59 | 60 | function UpdateLock(); 61 | function SavePerkData(); 62 | 63 | function Callback_PerkSelected(byte NewPerkIndex, bool bClickedIndex) 64 | { 65 | ExtPrevPerk = ExtKFPC.ActivePerkManager.UserPerks[NewPerkIndex]; 66 | ExUpdateContainers(ExtPrevPerk); 67 | 68 | ExtKFPC.PendingPerkClass = ExtPrevPerk.Class; 69 | ExtKFPC.SwitchToPerk(ExtPrevPerk.Class); 70 | } 71 | function Callback_SkillSelectionOpened(); 72 | 73 | defaultproperties 74 | { 75 | SubWidgetBindings(0)=(WidgetClass=Class'ExtPerksContainer_Selection') 76 | SubWidgetBindings(1)=(WidgetClass=Class'ExtPerksContainer_Header') 77 | SubWidgetBindings(3)=(WidgetClass=Class'ExtPerksContainer_Details') 78 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtMenu_Trader.uc: -------------------------------------------------------------------------------- 1 | class ExtMenu_Trader extends KFGFxMenu_Trader; 2 | 3 | var ExtPlayerController ExtKFPC; 4 | var Ext_PerkBase ExLastPerkClass; 5 | 6 | function InitializeMenu( KFGFxMoviePlayer_Manager InManager ) 7 | { 8 | Super.InitializeMenu(InManager); 9 | ExtKFPC = ExtPlayerController ( GetPC() ); 10 | } 11 | function int GetPerkIndex() 12 | { 13 | return (ExtKFPC.ActivePerkManager!=None ? Max(ExtKFPC.ActivePerkManager.UserPerks.Find(ExtKFPC.ActivePerkManager.CurrentPerk),0) : 0); 14 | } 15 | function UpdatePlayerInfo() 16 | { 17 | if( ExtKFPC != none && PlayerInfoContainer != none ) 18 | { 19 | PlayerInfoContainer.SetPerkInfo(); 20 | PlayerInfoContainer.SetPerkList(); 21 | if( ExtKFPC.ActivePerkManager!=None && ExtKFPC.ActivePerkManager.CurrentPerk!=ExLastPerkClass) 22 | { 23 | ExLastPerkClass = ExtKFPC.ActivePerkManager.CurrentPerk; 24 | OnPerkChanged(GetPerkIndex()); 25 | } 26 | 27 | RefreshItemComponents(); 28 | } 29 | } 30 | 31 | function Callback_PerkChanged(int PerkIndex) 32 | { 33 | ExtKFPC.PendingPerkClass = ExtKFPC.ActivePerkManager.UserPerks[PerkIndex].Class; 34 | ExtKFPC.SwitchToPerk(ExtKFPC.PendingPerkClass); 35 | 36 | if( PlayerInventoryContainer != none ) 37 | { 38 | PlayerInventoryContainer.UpdateLock(); 39 | } 40 | UpdatePlayerInfo(); 41 | 42 | // Refresht he UI 43 | RefreshItemComponents(); 44 | } 45 | 46 | defaultproperties 47 | { 48 | SubWidgetBindings.Remove((WidgetName="filterContainer",WidgetClass=class'KFGFxTraderContainer_Filter')) 49 | SubWidgetBindings.Add((WidgetName="filterContainer",WidgetClass=class'ExtTraderContainer_Filter')) 50 | SubWidgetBindings.Remove((WidgetName="shopContainer",WidgetClass=class'KFGFxTraderContainer_Store')) 51 | SubWidgetBindings.Add((WidgetName="shopContainer",WidgetClass=class'ExtTraderContainer_Store')) 52 | SubWidgetBindings.Remove((WidgetName="playerInfoContainer",WidgetClass=class'KFGFxTraderContainer_PlayerInfo')) 53 | SubWidgetBindings.Add((WidgetName="playerInfoContainer",WidgetClass=class'ExtTraderContainer_PlayerInfo')) 54 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtPawn_ZedHans_Pet.uc: -------------------------------------------------------------------------------- 1 | class ExtPawn_ZedHans_Pet extends KFPawn_ZedHansFriendlyTest; 2 | 3 | static simulated event bool IsABoss() 4 | { 5 | return false; 6 | } 7 | 8 | defaultproperties 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtPerksContainer_Details.uc: -------------------------------------------------------------------------------- 1 | class ExtPerksContainer_Details extends KFGFxPerksContainer_Details; 2 | 3 | `define AddWeaponsInfo(InClassDef) if( `InClassDef!=None ) AddWeaponInfo(WeaponNames, WeaponSources, `InClassDef.static.GetItemName(), `InClassDef.static.GetImagePath()) 4 | 5 | final function ExUpdateDetails( Ext_PerkBase PerkClass ) 6 | { 7 | local GFxObject DetailsProvider; 8 | local KFPlayerController KFPC; 9 | local KFGameReplicationInfo KFGRI; 10 | local array WeaponNames; 11 | local array WeaponSources; 12 | local int i; 13 | 14 | DetailsProvider = CreateObject( "Object" ); 15 | 16 | KFPC = KFPlayerController( GetPC() ); 17 | 18 | if ( KFPC != none) 19 | { 20 | KFGRI = KFGameReplicationInfo(KFPC.WorldInfo.GRI); 21 | 22 | DetailsProvider.SetString( "ExperienceMessage", ExperienceString @ PerkClass.CurrentEXP ); 23 | 24 | if(KFGRI != none) 25 | { 26 | `AddWeaponsInfo(PerkClass.PrimaryWeaponDef); 27 | `AddWeaponsInfo(PerkClass.SecondaryWeaponDef); 28 | `AddWeaponsInfo(PerkClass.KnifeWeaponDef); 29 | `AddWeaponsInfo(PerkClass.GrenadeWeaponDef); 30 | } 31 | 32 | for (i = 0; i < WeaponNames.length; i++) 33 | { 34 | DetailsProvider.SetString( "WeaponName" $ i, WeaponNames[i] ); 35 | DetailsProvider.SetString( "WeaponImage" $ i, "img://"$WeaponSources[i] ); 36 | } 37 | 38 | DetailsProvider.SetString( "EXPAction1", "Kill zombies" ); 39 | //DetailsProvider.SetString( "EXPAction2", PerkClass.default.EXPAction2 ); 40 | 41 | SetObject( "detailsData", DetailsProvider ); 42 | } 43 | } 44 | 45 | final function ExUpdatePassives( Ext_PerkBase PerkClass ) 46 | { 47 | local GFxObject PassivesProvider; 48 | local GFxObject PassiveObject; 49 | local int i; 50 | 51 | PassivesProvider = CreateArray(); 52 | for( i=0; i0 ) 51 | SetNightVision(!bNightVisionActive); 52 | else Super.ToggleFlashlight(); 53 | } 54 | 55 | function PreClientTravel( string PendingURL, ETravelType TravelType, bool bIsSeamlessTravel) 56 | { 57 | Super.PreClientTravel(PendingURL,TravelType,bIsSeamlessTravel); 58 | if( !bHandledTravel ) 59 | { 60 | bHandledTravel = true; 61 | if( KFExtendedHUD(MyHUD)!=None ) 62 | KFExtendedHUD(MyHUD).NotifyLevelChange(true); 63 | } 64 | } 65 | 66 | event bool FilterButtonInput(int ControllerId, Name Key, EInputEvent Event, float AmountDepressed, bool bGamepad) 67 | { 68 | if ( MyGfxManager.bAfterLobby && Event==IE_Pressed && (Key == 'Escape' || Key == 'XboxTypeS_Start') ) 69 | { 70 | if( MyGUIController==None || MyGUIController.bIsInvalid ) 71 | { 72 | MyGUIController = class'KF2GUIController'.Static.GetGUIController(Outer); 73 | if( MyGUIController==None ) 74 | { 75 | ExtPlayerController(Outer).CancelConnection(); 76 | return false; 77 | } 78 | } 79 | if( MyGUIController.bIsInMenuState ) 80 | { 81 | return false; 82 | } 83 | else if( MyGFxManager.bMenusOpen ) 84 | { 85 | return MyGFxManager.ToggleMenus(); 86 | } 87 | else 88 | { 89 | MyGUIController.OpenMenu(ExtPlayerController(Outer).MidGameMenuClass); 90 | return true; 91 | } 92 | } 93 | return false; 94 | } 95 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtProj_SUPERGrenade.uc: -------------------------------------------------------------------------------- 1 | // Written by Marco. 2 | class ExtProj_SUPERGrenade extends KFProj_FragGrenade 3 | hidedropdown; 4 | 5 | /** On Contact demo skill can turn our grenade into an insta boom device */ 6 | var bool bExplodeOnContact; 7 | 8 | var class ClusterNades; 9 | var() byte NumClusters; 10 | 11 | simulated function PostBeginPlay() 12 | { 13 | local KFPerk InstigatorPerk; 14 | local KFPawn InstigatorPawn; 15 | 16 | InstigatorPawn = KFPawn(Instigator); 17 | if( InstigatorPawn != none ) 18 | { 19 | InstigatorPerk = InstigatorPawn.GetPerk(); 20 | if( InstigatorPerk != none ) 21 | bExplodeOnContact = InstigatorPerk.IsOnContactActive(); 22 | } 23 | 24 | Super.PostBeginPlay(); 25 | if( Instigator!=None && ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo)!=None && ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ECurrentPerk!=None ) 26 | ClusterNades = ExtPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ECurrentPerk.Default.PerkGrenade; 27 | } 28 | 29 | simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal) 30 | { 31 | if( bExplodeOnContact && Other != Instigator && !Other.bWorldGeometry && Pawn(Other)!=None && Pawn(Other).GetTeamNum() != GetTeamNum() ) 32 | { 33 | // For opposing team, make the grenade explode instantly 34 | GetExplodeEffectLocation( HitLocation, HitNormal, Other ); 35 | TriggerExplosion( HitLocation, HitNormal, Other ); 36 | } 37 | else super.ProcessTouch( Other, HitLocation, HitNormal ); 38 | } 39 | 40 | simulated function Disintegrate( rotator inDisintegrateEffectRotation ); // Nope! 41 | 42 | simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor HitActor) 43 | { 44 | local byte i; 45 | local KFProj_Grenade P; 46 | 47 | if( bHasExploded ) 48 | return; 49 | if( InstigatorController==None && WorldInfo.NetMode!=NM_Client ) // Prevent Team-Kill. 50 | { 51 | Destroy(); 52 | return; 53 | } 54 | Super.TriggerExplosion(HitLocation,HitNormal,HitActor); 55 | if( WorldInfo.NetMode!=NM_Client ) 56 | { 57 | for( i=0; i Res ); 30 | function SetData( out array S ); 31 | 32 | // Archive version (to allow modder to make upgraded stat binarily compatible) 33 | function int GetArVer(); 34 | function SetArVer( int Ver ); 35 | 36 | // Push/Pop file limitators (to prevent it from reading EoF in sub sections). 37 | function PushEOFLimit( int EndOffset ); 38 | function PopEOFLimit(); 39 | 40 | // Get most recent save version for this user. 41 | function int GetSaveVersion(); 42 | function SetSaveVersion( int Num ); 43 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtStatWriter.uc: -------------------------------------------------------------------------------- 1 | // Interface class for outputting stats into a file or something. 2 | Interface ExtStatWriter; 3 | 4 | function WriteValue( string Key, string Value ); 5 | function StartIntendent( string Section, optional string Key, optional string Value ); 6 | function EndIntendent(); 7 | function ResetFile(); 8 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtTraderContainer_Filter.uc: -------------------------------------------------------------------------------- 1 | class ExtTraderContainer_Filter extends KFGFxTraderContainer_Filter; 2 | 3 | function SetPerkFilterData(byte FilterIndex) 4 | { 5 | local int i; 6 | local GFxObject DataProvider; 7 | local GFxObject FilterObject; 8 | local ExtPlayerController KFPC; 9 | local KFPlayerReplicationInfo KFPRI; 10 | local ExtPerkManager PrM; 11 | 12 | SetBool("filterVisibliity", true); 13 | 14 | KFPC = ExtPlayerController( GetPC() ); 15 | if ( KFPC != none ) 16 | { 17 | PrM = KFPC.ActivePerkManager; 18 | KFPRI = KFPlayerReplicationInfo(KFPC.PlayerReplicationInfo); 19 | if ( KFPRI != none && PrM!=None ) 20 | { 21 | i = Max(PrM.UserPerks.Find(PrM.CurrentPerk),0); 22 | SetInt("selectedIndex", i); 23 | 24 | // Set the title of this filter based on either the perk or the off perk string 25 | if( FilterIndex < PrM.UserPerks.Length ) 26 | { 27 | SetString("filterText", PrM.UserPerks[FilterIndex].PerkName); 28 | } 29 | else 30 | { 31 | SetString("filterText", OffPerkString); 32 | } 33 | 34 | DataProvider = CreateArray(); 35 | for (i = 0; i < PrM.UserPerks.Length; i++) 36 | { 37 | FilterObject = CreateObject( "Object" ); 38 | FilterObject.SetString("source", PrM.UserPerks[i].GetPerkIconPath(PrM.UserPerks[i].CurrentLevel)); 39 | DataProvider.SetElementObject( i, FilterObject ); 40 | } 41 | 42 | FilterObject = CreateObject( "Object" ); 43 | FilterObject.SetString("source", "img://"$class'KFGFxObject_TraderItems'.default.OffPerkIconPath); 44 | DataProvider.SetElementObject( i, FilterObject ); 45 | 46 | SetObject( "filterSource", DataProvider ); 47 | } 48 | } 49 | } 50 | 51 | defaultproperties 52 | { 53 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtTraderContainer_PlayerInfo.uc: -------------------------------------------------------------------------------- 1 | class ExtTraderContainer_PlayerInfo extends KFGFxTraderContainer_PlayerInfo; 2 | 3 | function SetPerkInfo() 4 | { 5 | local Ext_PerkBase CurrentPerk; 6 | local ExtPlayerController KFPC; 7 | local float V; 8 | 9 | KFPC = ExtPlayerController(GetPC()); 10 | if( KFPC!=none && KFPC.ActivePerkManager!=None && KFPC.ActivePerkManager.CurrentPerk!=None ) 11 | { 12 | CurrentPerk = KFPC.ActivePerkManager.CurrentPerk; 13 | SetString("perkName", CurrentPerk.PerkName); 14 | SetString("perkIconPath", CurrentPerk.GetPerkIconPath(CurrentPerk.CurrentLevel)); 15 | SetInt("perkLevel", CurrentPerk.CurrentLevel); 16 | V = CurrentPerk.GetProgressPercent()*100.f; 17 | SetInt("xpBarValue", int(V)); 18 | } 19 | } 20 | 21 | function SetPerkList() 22 | { 23 | local GFxObject PerkObject; 24 | local GFxObject DataProvider; 25 | local ExtPlayerController KFPC; 26 | local byte i; 27 | local float PerkPercent; 28 | local Ext_PerkBase P; 29 | 30 | KFPC = ExtPlayerController(GetPC()); 31 | if( KFPC != none && KFPC.ActivePerkManager!=None ) 32 | { 33 | DataProvider = CreateArray(); 34 | 35 | for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++) 36 | { 37 | P = KFPC.ActivePerkManager.UserPerks[i]; 38 | PerkObject = CreateObject( "Object" ); 39 | PerkObject.SetString("name", P.PerkName); 40 | PerkObject.SetString("perkIconSource", P.GetPerkIconPath(P.CurrentLevel)); 41 | PerkObject.SetInt("level", P.CurrentLevel); 42 | 43 | PerkPercent = P.GetProgressPercent()*100.f; 44 | PerkObject.SetInt("perkXP", int(PerkPercent)); 45 | 46 | DataProvider.SetElementObject(i, PerkObject); 47 | } 48 | 49 | SetObject("perkList", DataProvider); 50 | } 51 | } 52 | 53 | defaultproperties 54 | { 55 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtTraderContainer_Store.uc: -------------------------------------------------------------------------------- 1 | class ExtTraderContainer_Store extends KFGFxTraderContainer_Store; 2 | 3 | function RefreshWeaponListByPerk(byte FilterIndex, const out array ItemList) 4 | { 5 | local int i, SlotIndex; 6 | local GFxObject ItemDataArray; // This array of information is sent to ActionScript to update the Item data 7 | local array OnPerkWeapons, SecondaryWeapons, OffPerkWeapons; 8 | local class TargetPerkClass; 9 | local ExtPlayerController EKFPC; 10 | 11 | EKFPC = ExtPlayerController(KFPC); 12 | if ( EKFPC!=none && EKFPC.ActivePerkManager!=None) 13 | { 14 | if( FilterIndex 0 && ItemList[i].AssociatedPerkClasses[0] != none && TargetPerkClass != class'KFPerk_Survivalist' 27 | && (TargetPerkClass==None || ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass) == INDEX_NONE ) ) 28 | { 29 | continue; // filtered by perk 30 | } 31 | else 32 | { 33 | if(ItemList[i].AssociatedPerkClasses.length > 0) 34 | { 35 | switch (ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass)) 36 | { 37 | case 0: //primary perk 38 | OnPerkWeapons.AddItem(ItemList[i]); 39 | break; 40 | 41 | case 1: //secondary perk 42 | SecondaryWeapons.AddItem(ItemList[i]); 43 | break; 44 | 45 | default: //off perk 46 | OffPerkWeapons.AddItem(ItemList[i]); 47 | break; 48 | } 49 | } 50 | } 51 | } 52 | 53 | for (i = 0; i < OnPerkWeapons.length; i++) 54 | { 55 | SetItemInfo(ItemDataArray, OnPerkWeapons[i], SlotIndex); 56 | SlotIndex++; 57 | } 58 | 59 | for (i = 0; i < SecondaryWeapons.length; i++) 60 | { 61 | SetItemInfo(ItemDataArray, SecondaryWeapons[i], SlotIndex); 62 | SlotIndex++; 63 | } 64 | 65 | for (i = 0; i < OffPerkWeapons.length; i++) 66 | { 67 | SetItemInfo(ItemDataArray, OffPerkWeapons[i], SlotIndex); 68 | SlotIndex++; 69 | } 70 | 71 | SetObject("shopData", ItemDataArray); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtWeap_Pistol_9mm.uc: -------------------------------------------------------------------------------- 1 | class ExtWeap_Pistol_9mm extends KFWeap_Pistol_9mm; 2 | 3 | defaultproperties 4 | { 5 | SpareAmmoCapacity[0]=-1 6 | InitialSpareMags[0]=0 7 | 8 | bInfiniteSpareAmmo=True 9 | 10 | DualClass=class'ExtWeap_Pistol_Dual9mm' 11 | } 12 | 13 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtWeap_Pistol_Dual9mm.uc: -------------------------------------------------------------------------------- 1 | class ExtWeap_Pistol_Dual9mm extends KFWeap_Pistol_Dual9mm; 2 | 3 | defaultproperties 4 | { 5 | SingleClass=class'ExtWeap_Pistol_9mm' 6 | } 7 | 8 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtWeap_Pistol_MedicS.uc: -------------------------------------------------------------------------------- 1 | class ExtWeap_Pistol_MedicS extends KFWeap_Pistol_Medic; 2 | 3 | defaultproperties 4 | { 5 | AssociatedPerkClasses(0)=none 6 | bCanThrow=false 7 | 8 | SpareAmmoCapacity[0]=-1 9 | InitialSpareMags[0]=0 10 | 11 | bInfiniteSpareAmmo=True 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/ExtWebAdmin_UI.uc: -------------------------------------------------------------------------------- 1 | // Webadmin playinfo config variables. 2 | // Just an information holder. 3 | Class ExtWebAdmin_UI extends Object 4 | transient; 5 | 6 | /* List of PropTypes: 7 | 0 = Integer 8 | 1 = Boolean 9 | 2 = string 10 | 3 = multiline text field 11 | */ 12 | struct FWebAdminConfigInfo 13 | { 14 | var byte PropType; 15 | var name PropName; 16 | var string UIName,UIDesc; 17 | var int NumElements; 18 | 19 | structdefaultproperties 20 | { 21 | NumElements=1 22 | } 23 | }; 24 | struct FPropGroup 25 | { 26 | var string PageName; 27 | var class ObjClass; 28 | var array Configs; 29 | var delegate GetValue; 30 | var delegate SetValue; 31 | var int Dupes; 32 | }; 33 | var array ConfigList; 34 | 35 | // Value accessors. 36 | Delegate string OnGetValue( name PropName, int ElementIndex ); 37 | Delegate OnSetValue( name PropName, int ElementIndex, string Value ); 38 | 39 | final function Cleanup() 40 | { 41 | ConfigList.Length = 0; 42 | } 43 | final function AddSettingsPage( string PageName, class Obj, const out array Configs, delegate GetFunc, delegate SetFunc ) 44 | { 45 | local int i; 46 | 47 | i = ConfigList.Find('PageName',PageName); 48 | if( i>=0 ) // Make sure no dupe pages. 49 | PageName $= "_"$(ConfigList[i].Dupes++); 50 | 51 | i = ConfigList.Length; 52 | ConfigList.Length = i+1; 53 | ConfigList[i].PageName = PageName; 54 | ConfigList[i].ObjClass = Obj; 55 | ConfigList[i].Configs = Configs; 56 | ConfigList[i].GetValue = GetFunc; 57 | ConfigList[i].SetValue = SetFunc; 58 | } 59 | final function bool HasConfigFor( class Obj ) 60 | { 61 | return (ConfigList.Find('ObjClass',Obj)>=0); 62 | } 63 | -------------------------------------------------------------------------------- /ServerExt/Classes/ExtWidget_PartyInGame.uc: -------------------------------------------------------------------------------- 1 | class ExtWidget_PartyInGame extends KFGFxWidget_PartyInGame; 2 | 3 | var class PPerkSlots[6]; 4 | var byte PPerkLevels[6]; 5 | 6 | struct ExtMemberSlotStruct 7 | { 8 | var class PerkClass; 9 | 10 | structdefaultproperties 11 | { 12 | PerkClass=none 13 | } 14 | }; 15 | var ExtMemberSlotStruct ExtMemberSlots[13]; 16 | 17 | function GFxObject RefreshSlot( int SlotIndex, KFPlayerReplicationInfo KFPRI ) 18 | { 19 | local string PlayerName; 20 | local UniqueNetId AdminId; 21 | local bool bIsLeader; 22 | local bool bIsMyPlayer; 23 | local ExtPlayerController EPC; 24 | local GFxObject PlayerInfoObject, PerkIconObject; 25 | local ExtPlayerReplicationInfo EPRI; 26 | 27 | PlayerInfoObject = CreateObject("Object"); 28 | EPC = ExtPlayerController(GetPC()); 29 | 30 | if( KFPRI != none ) 31 | { 32 | EPRI = ExtPlayerReplicationInfo(KFPRI); 33 | } 34 | if( OnlineLobby != none ) 35 | { 36 | OnlineLobby.GetLobbyAdmin( OnlineLobby.GetCurrentLobbyId(), AdminId); 37 | } 38 | bIsLeader = EPRI.UniqueId == AdminId; 39 | PlayerInfoObject.SetBool("bLeader", bIsLeader); 40 | bIsMyPlayer = EPC.PlayerReplicationInfo.UniqueId == KFPRI.UniqueId; 41 | ExtMemberSlots[SlotIndex].PerkClass = EPRI.ECurrentPerk; 42 | PlayerInfoObject.SetBool("myPlayer", bIsMyPlayer); 43 | if( ExtMemberSlots[SlotIndex].PerkClass != none ) 44 | { 45 | PerkIconObject = CreateObject("Object"); 46 | PerkIconObject.SetString("perkIcon", ExtMemberSlots[SlotIndex].PerkClass.static.GetPerkIconPath(EPRI.ECurrentPerkLevel)); 47 | PlayerInfoObject.SetObject("perkImageSource", PerkIconObject); 48 | 49 | PlayerInfoObject.SetString("perkLevel", string(EPRI.ECurrentPerkLevel)); 50 | } 51 | if( !bIsMyPlayer ) 52 | { 53 | PlayerInfoObject.SetBool("muted", EPC.IsPlayerMuted(EPRI.UniqueId)); 54 | } 55 | if( class'WorldInfo'.static.IsE3Build() ) 56 | { 57 | PlayerName = EPRI.PlayerName; 58 | } 59 | else 60 | { 61 | PlayerName = EPRI.PlayerName; 62 | } 63 | PlayerInfoObject.SetString("playerName", PlayerName); 64 | if( class'WorldInfo'.static.IsConsoleBuild(CONSOLE_Orbis) ) 65 | { 66 | PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetPS4Avatar(PlayerName)); 67 | } 68 | else 69 | { 70 | PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetSteamAvatar(EPRI.UniqueId)); 71 | } 72 | if( KFGRI != none ) 73 | { 74 | PlayerInfoObject.SetBool("ready", EPRI.bReadyToPlay && !KFGRI.bMatchHasBegun); 75 | } 76 | 77 | return PlayerInfoObject; 78 | } 79 | 80 | DefaultProperties 81 | { 82 | } 83 | -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_AINoTaunt.uc: -------------------------------------------------------------------------------- 1 | class Ext_AINoTaunt extends KFSM_PlaySingleAnim; 2 | 3 | function SpecialMoveStarted(bool bForced, Name PrevMove) 4 | { 5 | KFPOwner.EndSpecialMove(); 6 | } 7 | function SpecialMoveEnded(Name PrevMove, Name NextMove) 8 | { 9 | } 10 | 11 | DefaultProperties 12 | { 13 | Handle=KFSM_Taunt 14 | bDisableMovement=true 15 | bDisablesWeaponFiring=true 16 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkBerserker.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkBerserker extends Ext_PerkBase; 2 | 3 | var float VampRegenRate,ZedTimeMeleeAtkRate; 4 | 5 | replication 6 | { 7 | // Things the server should send to the client. 8 | if ( true ) 9 | ZedTimeMeleeAtkRate; 10 | } 11 | 12 | simulated function ModifyMeleeAttackSpeed( out float InDuration ) 13 | { 14 | InDuration *= Modifiers[4]; 15 | if( ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f ) 16 | InDuration *= ZedTimeMeleeAtkRate; 17 | } 18 | simulated function ModifyRateOfFire( out float InRate, KFWeapon KFW ) 19 | { 20 | if( IsWeaponOnPerk(KFW) ) 21 | { 22 | InRate *= Modifiers[4]; 23 | if( ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f ) 24 | InRate *= ZedTimeMeleeAtkRate; 25 | } 26 | } 27 | 28 | function PlayerKilled( KFPawn_Monster Victim, class DT ) 29 | { 30 | if( VampRegenRate>0 && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health>0 && class(DT)!=None && class(DT).Default.ModifierPerkList.Find(BasePerk)>=0 ) 31 | PlayerOwner.Pawn.HealDamage( Max(PlayerOwner.Pawn.HealthMax*VampRegenRate,1), PlayerOwner, class'KFDT_Healing', false, false ); 32 | } 33 | 34 | defaultproperties 35 | { 36 | PerkName="Berserker" 37 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Berserker' 38 | DefTraitList.Add(class'Ext_TraitWPBers') 39 | DefTraitList.Add(class'Ext_TraitUnGrab') 40 | DefTraitList.Add(class'Ext_TraitVampire') 41 | DefTraitList.Add(class'Ext_TraitSpartan') 42 | DefPerkStats(15)=(bHiddenConfig=false) // Poison damage. 43 | BasePerk=class'KFPerk_Berserker' 44 | 45 | PrimaryMelee=class'KFWeap_Knife_Berserker' 46 | PrimaryWeapon=class'KFWeap_Blunt_Crovel' 47 | PerkGrenade=class'KFProj_EMPGrenade' 48 | 49 | PrimaryWeaponDef=class'KFWeapDef_Crovel' 50 | KnifeWeaponDef=class'KFweapDef_Knife_Berserker' 51 | GrenadeWeaponDef=class'KFWeapDef_Grenade_Berserker' 52 | 53 | AutoBuyLoadOutPath=(class'KFWeapDef_Crovel', class'KFWeapDef_Nailgun', class'KFWeapDef_Pulverizer', class'KFWeapDef_Eviscerator') 54 | 55 | ZedTimeMeleeAtkRate=1.0 56 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkCommando.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkCommando extends Ext_PerkBase; 2 | 3 | var bool bUseProfessional,bUseMachineGunner; 4 | var float ZTExtCount; 5 | 6 | replication 7 | { 8 | // Things the server should send to the client. 9 | if ( true ) 10 | bUseProfessional,bUseMachineGunner; 11 | } 12 | 13 | simulated function bool GetUsingTactialReload( KFWeapon KFW ) 14 | { 15 | return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.65 : false); 16 | } 17 | 18 | simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class DamageType, optional int HitZoneIdx ) 19 | { 20 | if( (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || (KFWeapon(DamageCauser)!=None && IsWeaponOnPerk(KFWeapon(DamageCauser))) ) 21 | { 22 | if( bUseMachineGunner && WorldInfo.TimeDilation < 1.f ) 23 | InDamage += InDamage * 0.03; 24 | } 25 | 26 | Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx); 27 | } 28 | 29 | simulated function float GetZedTimeModifier( KFWeapon W ) 30 | { 31 | local name StateName; 32 | StateName = W.GetStateName(); 33 | 34 | if( bUseProfessional && IsWeaponOnPerk( W ) ) 35 | { 36 | if( StateName == 'Reloading' || StateName == 'AltReloading' ) 37 | return 1.f; 38 | else if( StateName == 'WeaponPuttingDown' || StateName == 'WeaponEquipping' ) 39 | return 0.3f; 40 | } 41 | 42 | if( bUseMachineGunner && IsWeaponOnPerk( W ) && BasePerk.Default.ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE ) 43 | return 0.5f; 44 | 45 | return 0.f; 46 | } 47 | 48 | simulated function float GetZedTimeExtensions( byte Level ) 49 | { 50 | return ZTExtCount; 51 | } 52 | 53 | defaultproperties 54 | { 55 | PerkName="Commando" 56 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Commando' 57 | DefTraitList.Add(class'Ext_TraitWPComm') 58 | DefTraitList.Add(class'Ext_TraitUnCloak') 59 | DefTraitList.Add(class'Ext_TraitZedTExt') 60 | DefTraitList.Add(class'Ext_TraitEnemyHP') 61 | DefTraitList.Add(class'Ext_TraitEliteReload') 62 | DefTraitList.Add(class'Ext_TraitTactician') 63 | DefTraitList.Add(class'Ext_TraitMachineGunner') 64 | BasePerk=class'KFPerk_Commando' 65 | 66 | ZTExtCount=1.f; 67 | 68 | PrimaryMelee=class'KFWeap_Knife_Commando' 69 | PrimaryWeapon=class'KFWeap_AssaultRifle_AR15' 70 | PerkGrenade=class'KFProj_HEGrenade' 71 | 72 | PrimaryWeaponDef=class'KFWeapDef_AR15' 73 | KnifeWeaponDef=class'KFweapDef_Knife_Commando' 74 | GrenadeWeaponDef=class'KFWeapDef_Grenade_Commando' 75 | 76 | AutoBuyLoadOutPath=(class'KFWeapDef_AR15', class'KFWeapDef_Bullpup', class'KFWeapDef_AK12', class'KFWeapDef_SCAR') 77 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkFirebug.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkFirebug extends Ext_PerkBase; 2 | 3 | defaultproperties 4 | { 5 | PerkName="Firebug" 6 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Firebug' 7 | DefTraitList.Add(class'Ext_TraitWPFire') 8 | DefTraitList.Add(class'Ext_TraitNapalm') 9 | DefTraitList.Add(class'Ext_TraitFireExplode') 10 | DefTraitList.Add(class'Ext_TraitFireRange') 11 | BasePerk=class'KFPerk_Firebug' 12 | 13 | PrimaryMelee=class'KFWeap_Knife_Firebug' 14 | PrimaryWeapon=class'KFWeap_Flame_CaulkBurn' 15 | PerkGrenade=class'KFProj_MolotovGrenade' 16 | SuperGrenade=class'ExtProj_SUPERMolotov' 17 | 18 | PrimaryWeaponDef=class'KFWeapDef_CaulkBurn' 19 | KnifeWeaponDef=class'KFWeapDef_Knife_Firebug' 20 | GrenadeWeaponDef=class'KFWeapDef_Grenade_Firebug' 21 | 22 | AutoBuyLoadOutPath=(class'KFWeapDef_CaulkBurn', class'KFWeapDef_DragonsBreath', class'KFWeapDef_FlameThrower', class'KFWeapDef_MicrowaveGun') 23 | 24 | DefPerkStats(13)=(Progress=3,bHiddenConfig=false) // Self damage. 25 | DefPerkStats(17)=(bHiddenConfig=false) // Fire resistance 26 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkGunslinger.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkGunslinger extends Ext_PerkRhythmPerkBase; 2 | 3 | var bool bHasUberAmmo,bHasFanfire; 4 | 5 | replication 6 | { 7 | // Things the server should send to the client. 8 | if ( true ) 9 | bHasUberAmmo,bHasFanfire; 10 | } 11 | 12 | simulated function bool GetUsingTactialReload( KFWeapon KFW ) 13 | { 14 | return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.8 : false); 15 | } 16 | 17 | simulated function bool GetIsUberAmmoActive( KFWeapon KFW ) 18 | { 19 | return bHasUberAmmo && IsWeaponOnPerk(KFW) && WorldInfo.TimeDilation < 1.f; 20 | } 21 | 22 | simulated function float GetZedTimeModifier( KFWeapon W ) 23 | { 24 | local name StateName; 25 | 26 | if( bHasFanfire && IsWeaponOnPerk( W ) ) 27 | { 28 | StateName = W.GetStateName(); 29 | if( BasePerk.Default.ZedTimeModifyingStates.Find( StateName ) != INDEX_NONE || StateName == 'Reloading' ) 30 | return 1.f; 31 | } 32 | 33 | return 0.f; 34 | } 35 | 36 | defaultproperties 37 | { 38 | PerkName="Gunslinger" 39 | DefTraitList.Add(class'Ext_TraitWPGuns') 40 | DefTraitList.Add(class'Ext_TraitUberAmmo') 41 | DefTraitList.Add(class'Ext_TraitFanfire') 42 | DefTraitList.Add(class'Ext_TraitRackEmUp') 43 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Gunslinger' 44 | BasePerk=class'KFPerk_Gunslinger' 45 | 46 | PrimaryMelee=class'KFWeap_Knife_Gunslinger' 47 | PrimaryWeapon=class'KFWeap_Revolver_DualRem1858' 48 | PerkGrenade=class'KFProj_NailBombGrenade' 49 | 50 | PrimaryWeaponDef=class'KFWeapDef_Remington1858Dual' 51 | KnifeWeaponDef=class'KFWeapDef_Knife_Gunslinger' 52 | GrenadeWeaponDef=class'KFWeapDef_Grenade_Gunslinger' 53 | 54 | AutoBuyLoadOutPath=(class'KFWeapDef_Remington1858', class'KFWeapDef_Remington1858Dual', class'KFWeapDef_Colt1911', class'KFWeapDef_Colt1911Dual',class'KFWeapDef_Deagle', class'KFWeapDef_DeagleDual', class'KFWeapDef_SW500', class'KFWeapDef_SW500Dual') 55 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkSWAT.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkSWAT extends Ext_PerkBase; 2 | 3 | var byte RepTacticalMove; 4 | var float MoveSpeedMods[3]; 5 | var bool bRapidAssault; 6 | 7 | replication 8 | { 9 | // Things the server should send to the client. 10 | if ( true ) 11 | RepTacticalMove, bRapidAssault; 12 | } 13 | 14 | simulated function float GetIronSightSpeedModifier( KFWeapon KFW ) 15 | { 16 | return ((RepTacticalMove>0 && IsWeaponOnPerk(KFW)) ? MoveSpeedMods[RepTacticalMove-1] : 1.f); 17 | } 18 | 19 | simulated function bool GetIsUberAmmoActive( KFWeapon KFW ) 20 | { 21 | return bRapidAssault && IsWeaponOnPerk(KFW) && WorldInfo.TimeDilation < 1.f; 22 | } 23 | 24 | simulated function float GetZedTimeModifier( KFWeapon W ) 25 | { 26 | if( bRapidAssault && WorldInfo.TimeDilation<1.f && IsWeaponOnPerk(W) && BasePerk.Default.ZedTimeModifyingStates.Find(W.GetStateName()) != INDEX_NONE ) 27 | return 0.51f; 28 | return 0.f; 29 | } 30 | 31 | defaultproperties 32 | { 33 | PerkName="SWAT" 34 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_SWAT' 35 | DefTraitList.Add(class'Ext_TraitWPSWAT') 36 | DefTraitList.Add(class'Ext_TraitHeavyArmor') 37 | DefTraitList.Add(class'Ext_TraitTacticalMove') 38 | DefTraitList.Add(class'Ext_TraitSWATEnforcer') 39 | DefTraitList.Add(class'Ext_TraitRapidAssault') 40 | BasePerk=class'KFPerk_SWAT' 41 | 42 | PrimaryMelee=class'KFWeap_Knife_SWAT' 43 | PrimaryWeapon=class'KFWeap_SMG_MP7' 44 | PerkGrenade=class'KFProj_FlashBangGrenade' 45 | 46 | PrimaryWeaponDef=class'KFWeapDef_MP7' 47 | KnifeWeaponDef=class'KFweapDef_Knife_SWAT' 48 | GrenadeWeaponDef=class'KFWeapDef_Grenade_SWAT' 49 | 50 | AutoBuyLoadOutPath=(class'KFWeapDef_MP7', class'KFWeapDef_MP5RAS', class'KFWeapDef_P90', class'KFWeapDef_Kriss') 51 | 52 | MoveSpeedMods(0)=1.3 53 | MoveSpeedMods(1)=1.5 54 | MoveSpeedMods(2)=2 55 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkSharpshooter.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkSharpshooter extends Ext_PerkRhythmPerkBase; 2 | 3 | var bool bHasDireReload; 4 | var float ZEDTimeStunPower,DireReloadSpeed; 5 | 6 | replication 7 | { 8 | // Things the server should send to the client. 9 | if ( true ) 10 | bHasDireReload; 11 | } 12 | 13 | simulated function float GetReloadRateScale(KFWeapon KFW) 14 | { 15 | if( bHasDireReload && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health<40 ) 16 | return Super.GetReloadRateScale(KFW)*DireReloadSpeed; 17 | return Super.GetReloadRateScale(KFW); 18 | } 19 | function float GetStunPowerModifier( optional class DamageType, optional byte HitZoneIdx ) 20 | { 21 | if( ZEDTimeStunPower>0 && HitZoneIdx==HZI_Head && WorldInfo.TimeDilation<1.f && (class(DamageType)!=None && class(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0) ) 22 | return Super.GetStunPowerModifier(DamageType,HitZoneIdx) + ZEDTimeStunPower; 23 | return Super.GetStunPowerModifier(DamageType,HitZoneIdx); 24 | } 25 | 26 | defaultproperties 27 | { 28 | PerkName="Sharpshooter" 29 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Sharpshooter' 30 | DefTraitList.Add(class'Ext_TraitWPSharp') 31 | DefTraitList.Add(class'Ext_TraitRackEmUp') 32 | DefTraitList.Add(class'Ext_TraitRanger') 33 | DefTraitList.Add(class'Ext_TraitDireReload') 34 | DefTraitList.Add(class'Ext_TraitEliteReload') 35 | BasePerk=class'KFPerk_Sharpshooter' 36 | 37 | PrimaryMelee=class'KFWeap_Knife_Sharpshooter' 38 | PrimaryWeapon=class'KFWeap_Rifle_Winchester1894' 39 | PerkGrenade=class'KFProj_FreezeGrenade' 40 | 41 | PrimaryWeaponDef=class'KFWeapDef_Winchester1894' 42 | KnifeWeaponDef=class'KFWeapDef_Knife_Sharpshooter' 43 | GrenadeWeaponDef=class'KFWeapDef_Grenade_Sharpshooter' 44 | 45 | AutoBuyLoadOutPath=(class'KFWeapDef_Winchester1894', class'KFWeapDef_Crossbow', class'KFWeapDef_M14EBR', class'KFWeapDef_RailGun') 46 | 47 | DireReloadSpeed=0.25f 48 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkSupport.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkSupport extends Ext_PerkBase; 2 | 3 | var bool bUseAPShot,bUsePerforate,bCanRepairDoors; 4 | var float APShotMul; 5 | 6 | replication 7 | { 8 | // Things the server should send to the client. 9 | if ( true ) 10 | bCanRepairDoors, bUseAPShot, bUsePerforate, APShotMul; 11 | } 12 | 13 | simulated function bool GetUsingTactialReload( KFWeapon KFW ) 14 | { 15 | return (IsWeaponOnPerk(KFW) ? Modifiers[5]<0.75 : false); 16 | } 17 | 18 | simulated function bool CanRepairDoors() 19 | { 20 | return bCanRepairDoors; 21 | } 22 | 23 | simulated function float GetPenetrationModifier( byte Level, class DamageType, optional bool bForce ) 24 | { 25 | local float PenetrationPower; 26 | if( !bForce && (DamageType == none || ( DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk) == INDEX_NONE ))) 27 | return 0; 28 | 29 | PenetrationPower = bUseAPShot ? APShotMul : 0.f; 30 | PenetrationPower = IsPerforateActive() ? 40.f : PenetrationPower; 31 | 32 | return PenetrationPower; 33 | } 34 | 35 | simulated function bool IsPerforateActive() 36 | { 37 | return bUsePerforate && WorldInfo.TimeDilation < 1.f; 38 | } 39 | 40 | defaultproperties 41 | { 42 | PerkName="Support" 43 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Support' 44 | DefTraitList.Add(class'Ext_TraitGrenadeSUpg') 45 | DefTraitList.Add(class'Ext_TraitWPSupp') 46 | DefTraitList.Add(class'Ext_TraitSupply') 47 | DefTraitList.Add(class'Ext_TraitAPShots') 48 | DefTraitList.Add(class'Ext_TraitDoorRepair') 49 | DefTraitList.Add(class'Ext_TraitPenetrator') 50 | BasePerk=class'KFPerk_Support' 51 | WeldExpUpNum=80 52 | 53 | DefPerkStats(0)=(MaxValue=20,CostPerValue=2) 54 | DefPerkStats(8)=(bHiddenConfig=false) 55 | 56 | PrimaryMelee=class'KFWeap_Knife_Support' 57 | PrimaryWeapon=class'KFWeap_Shotgun_MB500' 58 | 59 | PrimaryWeaponDef=class'KFWeapDef_MB500' 60 | KnifeWeaponDef=class'KFWeapDef_Knife_Support' 61 | GrenadeWeaponDef=class'KFWeapDef_Grenade_Support' 62 | 63 | AutoBuyLoadOutPath=(class'KFWeapDef_MB500', class'KFWeapDef_DoubleBarrel', class'KFWeapDef_M4', class'KFWeapDef_AA12') 64 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_PerkSurvivalist.uc: -------------------------------------------------------------------------------- 1 | Class Ext_PerkSurvivalist extends Ext_PerkBase; 2 | 3 | defaultproperties 4 | { 5 | PerkName="Survivalist" 6 | PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Survivalist' 7 | DefTraitList.Add(class'Ext_TraitWPSurv') 8 | //DefTraitList.Add(class'Ext_TraitHeavyArmor') 9 | BasePerk=class'KFPerk_Survivalist' 10 | 11 | PrimaryMelee=class'KFWeap_Random' 12 | PrimaryWeapon=class'KFWeap_Knife_Support' 13 | PerkGrenade=class'KFProj_HEGrenade' 14 | 15 | PrimaryWeaponDef=class'KFWeapDef_Random' 16 | KnifeWeaponDef=class'KFweapDef_Knife_Support' 17 | GrenadeWeaponDef=class'KFWeapDef_Grenade_Commando' 18 | 19 | AutoBuyLoadOutPath=(class'KFWeapDef_DragonsBreath', class'KFWeapDef_M16M203', class'KFWeapDef_MedicRifle') 20 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TGroupBase.uc: -------------------------------------------------------------------------------- 1 | // Trait group info. 2 | Class Ext_TGroupBase extends Object 3 | abstract; 4 | 5 | var() string GroupInfo; 6 | var() bool bLimitToOne; // Limit to only one trait for this group. 7 | 8 | static function string GetUIInfo( Ext_PerkBase Perk ) 9 | { 10 | return (Default.bLimitToOne ? Default.GroupInfo$" (MAX 1)" : Default.GroupInfo); 11 | } 12 | static function string GetUIDesc() 13 | { 14 | return Default.GroupInfo$" trait group"; 15 | } 16 | 17 | // See if group is already using up limitation. 18 | static function bool GroupLimited( Ext_PerkBase Perk, class Trait ) 19 | { 20 | local int i; 21 | 22 | if( Default.bLimitToOne ) 23 | { 24 | for( i=0; i0 && Perk.PerkTraits[i].TraitType!=Trait && Perk.PerkTraits[i].TraitType.Default.TraitGroup==Default.Class ) 26 | return true; 27 | } 28 | return false; 29 | } 30 | 31 | defaultproperties 32 | { 33 | GroupInfo="Group" 34 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TGroupMonster.uc: -------------------------------------------------------------------------------- 1 | class Ext_TGroupMonster extends Ext_TGroupBase; 2 | 3 | defaultproperties 4 | { 5 | GroupInfo="Monster" 6 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TGroupRegen.uc: -------------------------------------------------------------------------------- 1 | class Ext_TGroupRegen extends Ext_TGroupBase; 2 | 3 | static function string GetUIInfo( Ext_PerkBase Perk ) 4 | { 5 | return Default.GroupInfo$" (MAX "$GetMaxLimit(Perk)$")"; 6 | } 7 | static function string GetUIDesc() 8 | { 9 | return Super.GetUIDesc()$"|To buy additional regen abilities:|-Prestige level 1 + Perk level 100 = MAX 2 traits|-Prestige level 5 + Perk level 150 = MAX 3 traits"; 10 | } 11 | 12 | static function bool GroupLimited( Ext_PerkBase Perk, class Trait ) 13 | { 14 | local int i; 15 | local byte n; 16 | 17 | n = GetMaxLimit(Perk); 18 | for( i=0; i0 && Perk.PerkTraits[i].TraitType!=Trait && Perk.PerkTraits[i].TraitType.Default.TraitGroup==Default.Class && --n==0 ) 20 | return true; 21 | return false; 22 | } 23 | 24 | static final function byte GetMaxLimit( Ext_PerkBase Perk ) 25 | { 26 | if( Perk.CurrentPrestige<1 || Perk.CurrentLevel<100 ) 27 | return 1; 28 | return ((Perk.CurrentPrestige<5 || Perk.CurrentLevel<150) ? 2 : 3); 29 | } 30 | 31 | defaultproperties 32 | { 33 | GroupInfo="Regeneration" 34 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TGroupZEDTime.uc: -------------------------------------------------------------------------------- 1 | class Ext_TGroupZEDTime extends Ext_TGroupBase; 2 | 3 | defaultproperties 4 | { 5 | GroupInfo="ZED Time" 6 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_T_AmmoRegHelp.uc: -------------------------------------------------------------------------------- 1 | Class Ext_T_AmmoRegHelp extends Info 2 | transient; 3 | 4 | var Pawn PawnOwner; 5 | var float RegCount; 6 | 7 | function PostBeginPlay() 8 | { 9 | PawnOwner = Pawn(Owner); 10 | if( PawnOwner==None ) 11 | Destroy(); 12 | else SetTimer(29+FRand(),true); 13 | } 14 | function Timer() 15 | { 16 | local KFWeapon W; 17 | local byte i; 18 | 19 | if( PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.InvManager==None ) 20 | Destroy(); 21 | else 22 | { 23 | foreach PawnOwner.InvManager.InventoryActors(class'KFWeapon',W) 24 | { 25 | for( i=0; i<2; ++i ) 26 | { 27 | if( W.SpareAmmoCount[i] AssociatedPerkClass; 5 | var Pawn PawnOwner; 6 | var PlayerController LocalPC; 7 | var bool bNetworkOwner; 8 | 9 | replication 10 | { 11 | if ( bNetOwner ) 12 | PawnOwner,AssociatedPerkClass; 13 | } 14 | 15 | function PostBeginPlay() 16 | { 17 | PawnOwner = Pawn(Owner); 18 | if( PawnOwner==None ) 19 | Destroy(); 20 | else SetTimer(0.5+FRand()*0.4,true); 21 | } 22 | function Timer() 23 | { 24 | if( PawnOwner==None || PawnOwner.Health<=0 || PawnOwner.InvManager==None ) 25 | Destroy(); 26 | } 27 | simulated function Tick( float Delta ) 28 | { 29 | if( WorldInfo.NetMode==NM_DedicatedServer || PawnOwner==None || PawnOwner.InvManager==None || KFWeapon(PawnOwner.Weapon)==None || KFWeapon(PawnOwner.Weapon).GetWeaponPerkClass(AssociatedPerkClass)!=AssociatedPerkClass ) 30 | return; 31 | 32 | // Find local playercontroller. 33 | if( LocalPC==None ) 34 | { 35 | LocalPC = PlayerController(PawnOwner.Controller); 36 | if( LocalPC==None ) 37 | return; 38 | bNetworkOwner = (LocalPlayer(LocalPC.Player)!=None); 39 | } 40 | if( !bNetworkOwner ) 41 | return; 42 | 43 | // Force always to pending fire. 44 | if( LocalPC.bFire!=0 && !PawnOwner.InvManager.IsPendingFire(None,0) ) 45 | PawnOwner.Weapon.StartFire(0); 46 | else if( LocalPC.bAltFire!=0 && !PawnOwner.InvManager.IsPendingFire(None,1) ) 47 | PawnOwner.Weapon.StartFire(1); 48 | } 49 | 50 | defaultproperties 51 | { 52 | Components.Empty() 53 | RemoteRole=ROLE_SimulatedProxy 54 | bOnlyRelevantToOwner=true 55 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_T_HealthRegHelp.uc: -------------------------------------------------------------------------------- 1 | Class Ext_T_HealthRegHelp extends Info 2 | transient; 3 | 4 | var KFPawn_Human PawnOwner; 5 | var byte RegCount; 6 | 7 | function PostBeginPlay() 8 | { 9 | PawnOwner = KFPawn_Human(Owner); 10 | if( PawnOwner==None ) 11 | Destroy(); 12 | else SetTimer(9+FRand(),true); 13 | } 14 | function Timer() 15 | { 16 | if( PawnOwner==None || PawnOwner.Health<=0 ) 17 | Destroy(); 18 | else if( PawnOwner.Health MonsterType; 4 | var repnotify PlayerReplicationInfo OwnerPRI; 5 | var Controller OwnerController; 6 | var string MonsterName; 7 | var int HealthStatus,HealthMax; 8 | var Pawn PawnOwner; 9 | var KFExtendedHUD OwnerHUD; 10 | 11 | replication 12 | { 13 | // Things the server should send to the client. 14 | if (bNetDirty) 15 | OwnerPRI,MonsterType,HealthStatus,HealthMax; 16 | } 17 | 18 | // Make no efforts with this one. 19 | simulated event PostBeginPlay() 20 | { 21 | if( WorldInfo.NetMode!=NM_Client ) 22 | SetTimer(1,true); 23 | } 24 | simulated event Destroyed() 25 | { 26 | if( OwnerHUD!=None ) 27 | { 28 | OwnerHUD.MyCurrentPet.RemoveItem(Self); 29 | OwnerHUD = None; 30 | } 31 | if ( WorldInfo.GRI != None ) 32 | WorldInfo.GRI.RemovePRI(self); 33 | } 34 | simulated event ReplicatedEvent(name VarName) 35 | { 36 | if( VarName=='OwnerPRI' && OwnerPRI!=None ) 37 | NotifyOwner(); 38 | else if( VarName=='MonsterType' && MonsterType!=None ) 39 | MonsterName = Class'KFExtendedHUD'.Static.GetNameOf(MonsterType); 40 | } 41 | simulated function Timer() 42 | { 43 | if( PawnOwner==None || PawnOwner.Health<=0 ) 44 | Destroy(); 45 | else if( HealthStatus!=PawnOwner.Health ) 46 | HealthStatus = PawnOwner.Health; 47 | } 48 | simulated final function NotifyOwner() 49 | { 50 | local PlayerController PC; 51 | 52 | PC = GetALocalPlayerController(); 53 | if( PC==None || PC.PlayerReplicationInfo!=OwnerPRI || KFExtendedHUD(PC.MyHUD)==None ) 54 | return; 55 | OwnerHUD = KFExtendedHUD(PC.MyHUD); 56 | OwnerHUD.MyCurrentPet.AddItem(Self); 57 | } 58 | 59 | defaultproperties 60 | { 61 | bBot=true 62 | MonsterName="Petty" 63 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_T_UnCloakHelper.uc: -------------------------------------------------------------------------------- 1 | Class Ext_T_UnCloakHelper extends Info 2 | transient; 3 | 4 | var Pawn PawnOwner; 5 | var float HandleRadius; 6 | 7 | function PostBeginPlay() 8 | { 9 | PawnOwner = Pawn(Owner); 10 | if( PawnOwner==None ) 11 | Destroy(); 12 | else SetTimer(0.5+FRand()*0.1,true); 13 | } 14 | function Timer() 15 | { 16 | local KFPawn_Monster M; 17 | 18 | if( PawnOwner==None || PawnOwner.Health<=0 ) 19 | Destroy(); 20 | else 21 | { 22 | foreach WorldInfo.AllPawns(class'KFPawn_Monster',M,PawnOwner.Location,HandleRadius) 23 | if( M.bCanCloak ) 24 | M.CallOutCloaking(); 25 | } 26 | } 27 | 28 | defaultproperties 29 | { 30 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitAPShots.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitAPShots extends Ext_TraitBase; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkSupport(Perk).APShotMul = 1 + (0.25 + (((float(Level) - 1.f) * 5.f) / 100.f)); 6 | } 7 | 8 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | Ext_PerkSupport(Perk).APShotMul = 0.f; 11 | } 12 | 13 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | Ext_PerkSupport(Perk).bUseAPShot = true; 16 | } 17 | 18 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 19 | { 20 | Ext_PerkSupport(Perk).bUseAPShot = false; 21 | } 22 | 23 | defaultproperties 24 | { 25 | SupportedPerk=class'Ext_PerkSupport' 26 | TraitName="Armor Piercing Rounds" 27 | NumLevels=4 28 | DefLevelCosts(0)=15 29 | DefLevelCosts(1)=30 30 | DefLevelCosts(2)=40 31 | DefLevelCosts(3)=50 32 | DefMinLevel=15 33 | Description="Greatly increases penetration with perk weapons! The penetration strength is increased by every level in:|Lv1-4: 25%, 30%, 35%, 40%" 34 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitAcidicCompound.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitAcidicCompound extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkFieldMedic(Perk).bUseToxicDamage = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkFieldMedic(Perk).bUseToxicDamage = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkFieldMedic' 15 | TraitName="Acidic Compound" 16 | DefLevelCosts(0)=15 17 | DefMinLevel=5 18 | Description="When activated medic weapons have a chance to poison zeds." 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitAirborne.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitAirborne extends Ext_TraitBase; 2 | 3 | var array HealRates; 4 | 5 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | Ext_PerkFieldMedic(Perk).AirborneAgentHealRate = Default.HealRates[Level-1]; 8 | Ext_PerkFieldMedic(Perk).AirborneAgentLevel = (Level<4 ? 1 : 2); 9 | } 10 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 11 | { 12 | Ext_PerkFieldMedic(Perk).AirborneAgentLevel = 0; 13 | } 14 | 15 | defaultproperties 16 | { 17 | SupportedPerk=class'Ext_PerkFieldMedic' 18 | TraitName="Airborne Agent" 19 | DefLevelCosts(0)=20 20 | DefLevelCosts(1)=10 21 | DefLevelCosts(2)=10 22 | DefLevelCosts(3)=60 23 | HealRates(0)=0.05 24 | HealRates(1)=0.1 25 | HealRates(2)=0.2 26 | HealRates(3)=0.15 27 | NumLevels=4 28 | DefMinLevel=50 29 | Description="Give extra health boost and area of heal effect for medic darts during ZED-time,|each level gives extra amount of heal boost at a rate of:|Lv 1-3: +5%, +10%, +20%|Lv 4: +15%, but works outside of ZED-time too!" 30 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitAirborneAgent.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitAirborneAgent extends Ext_TraitBase; 2 | 3 | static function string GetPerkDescription() 4 | { 5 | local string S; 6 | 7 | S = Super.GetPerkDescription(); 8 | S $= "|Trait requires prestige level: #{FF4000}1"; 9 | return S; 10 | } 11 | 12 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 13 | { 14 | local int i; 15 | 16 | if( Perk.CurrentLevel RegenValues; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | local Ext_T_AmmoRegHelp H; 8 | 9 | H = Player.Spawn(class'Ext_T_AmmoRegHelp',Player); 10 | if( H!=None ) 11 | H.RegCount = Default.RegenValues[Level-1]; 12 | } 13 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | local Ext_T_AmmoRegHelp H; 16 | 17 | foreach Player.ChildActors(class'Ext_T_AmmoRegHelp',H) 18 | H.Destroy(); 19 | } 20 | 21 | defaultproperties 22 | { 23 | TraitGroup=class'Ext_TGroupRegen' 24 | TraitName="Ammo Regeneration" 25 | NumLevels=3 26 | DefLevelCosts(0)=10 27 | DefLevelCosts(1)=20 28 | DefLevelCosts(2)=40 29 | Description="With this trait all your weapons ammo (not grenades) will regen every half minute at rate of:|Lvl1-3: 2%, 5%, 10% of max ammo" 30 | RegenValues.Add(0.02) 31 | RegenValues.Add(0.05) 32 | RegenValues.Add(0.1) 33 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitArmorReg.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitArmorReg extends Ext_TraitHealthReg; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | local Ext_T_ArmorRegHelp H; 6 | 7 | H = Player.Spawn(class'Ext_T_ArmorRegHelp',Player); 8 | if( H!=None ) 9 | H.RegCount = Default.RegenValues[Level-1]; 10 | } 11 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 12 | { 13 | local Ext_T_ArmorRegHelp H; 14 | 15 | foreach Player.ChildActors(class'Ext_T_ArmorRegHelp',H) 16 | H.Destroy(); 17 | } 18 | 19 | defaultproperties 20 | { 21 | TraitName="Armor Regeneration" 22 | Description="With this trait your armor will regen every 10 seconds at a rate of:|Lvl1-3: +7pts, +12pts, +25pts" 23 | RegenValues.Empty() 24 | RegenValues.Add(7) 25 | RegenValues.Add(12) 26 | RegenValues.Add(25) 27 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitArmorRep.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitArmorRep extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkFieldMedic(Perk).RepairArmorRate = float(Level)*0.05f; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkFieldMedic(Perk).RepairArmorRate = 0; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkFieldMedic' 15 | TraitName="Armor Repair" 16 | NumLevels=5 17 | DefLevelCosts(0)=10 18 | DefLevelCosts(1)=15 19 | DefLevelCosts(2)=20 20 | DefLevelCosts(3)=25 21 | DefLevelCosts(4)=35 22 | Description="With this trait you will repair armor as you heal, for each level will repair armor with a rate of:|Lv1-5: +5%, +10%, +15%, +20%, +25%" 23 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitAutoFire.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitAutoFire extends Ext_TraitBase; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | local Ext_T_AutoFireHelper H; 6 | 7 | H = Player.Spawn(class'Ext_T_AutoFireHelper',Player); 8 | H.AssociatedPerkClass = Perk.BasePerk; 9 | } 10 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 11 | { 12 | local Ext_T_AutoFireHelper H; 13 | 14 | foreach Player.ChildActors(class'Ext_T_AutoFireHelper',H) 15 | H.Destroy(); 16 | } 17 | 18 | defaultproperties 19 | { 20 | TraitName="Auto-Fire weapons" 21 | DefLevelCosts(0)=50 22 | Description="Make all perked weapons fully automatic." 23 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitBoomWeld.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitBoomWeld extends Ext_TraitBase 2 | abstract; 3 | 4 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 5 | { 6 | Perk.bExplosiveWeld = true; 7 | } 8 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | Perk.bExplosiveWeld = false; 11 | } 12 | 13 | defaultproperties 14 | { 15 | TraitName="Explosive Weld" 16 | DefLevelCosts(0)=30 17 | Description="Cases welded doors explode when broken by zeds. The more you weld one door, the bigger explosion." 18 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitBunnyHop.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitBunnyHop extends Ext_TraitBase; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | if( ExtHumanPawn(Player)!=None ) 6 | ExtHumanPawn(Player).bHasBunnyHop = true; 7 | } 8 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | if( ExtHumanPawn(Player)!=None ) 11 | ExtHumanPawn(Player).bHasBunnyHop = false; 12 | } 13 | 14 | defaultproperties 15 | { 16 | TraitName="Bunny Hop" 17 | DefLevelCosts(0)=50 18 | DefMinLevel=100 19 | Description="Enable player to do bunny hopping. It means the more you continiously make successful jumps while moving forward you will keep accelerating in speed." 20 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitCarryCap.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitCarryCap extends Ext_TraitBase; 2 | 3 | var array CarryAdds; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | local KFInventoryManager M; 8 | 9 | M = KFInventoryManager(Player.InvManager); 10 | if( M!=None ) 11 | M.MaxCarryBlocks = M.Default.MaxCarryBlocks+Default.CarryAdds[Level-1]; 12 | } 13 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | local KFInventoryManager M; 16 | 17 | M = KFInventoryManager(Player.InvManager); 18 | if( M!=None ) 19 | M.MaxCarryBlocks = M.Default.MaxCarryBlocks; 20 | } 21 | 22 | defaultproperties 23 | { 24 | TraitName="Carry Capacity" 25 | NumLevels=5 26 | DefLevelCosts(0)=10 27 | DefLevelCosts(1)=15 28 | DefLevelCosts(2)=20 29 | DefLevelCosts(3)=25 30 | DefLevelCosts(4)=50 31 | Description="With this trait you can carry more.|Lv1-5: +2,+4,+6,+8,+15 slots" 32 | CarryAdds.Add(2) 33 | CarryAdds.Add(4) 34 | CarryAdds.Add(6) 35 | CarryAdds.Add(8) 36 | CarryAdds.Add(15) 37 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitContactNade.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitContactNade extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Perk.bExplodeOnContact = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Perk.bExplodeOnContact = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | TraitName="Explode on Contact" 15 | DefLevelCosts(0)=25 16 | Description="Make dynamites explode on contact with the ZED." 17 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDataStore.uc: -------------------------------------------------------------------------------- 1 | // Optional additional player specific data for a trait. 2 | Class Ext_TraitDataStore extends Info 3 | abstract; 4 | 5 | var Ext_PerkBase Perk; 6 | var ExtPlayerController PlayerOwner; 7 | var class TraitClass; 8 | 9 | defaultproperties 10 | { 11 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDemoAOE.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDemoAOE extends Ext_TraitBase; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkDemolition(Perk).AOEMult = 1 + (0.15 + (((float(Level) - 1.f) * 5.f) / 100.f)); 6 | } 7 | 8 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | Ext_PerkDemolition(Perk).AOEMult = 1.0f; 11 | } 12 | 13 | defaultproperties 14 | { 15 | SupportedPerk=class'Ext_PerkDemolition' 16 | TraitName="Area Of Damage" 17 | NumLevels=4 18 | DefLevelCosts(0)=25 19 | DefLevelCosts(1)=15 20 | DefLevelCosts(2)=30 21 | DefLevelCosts(3)=40 22 | DefMinLevel=15 23 | Description="Increases the AOE of your demo weapons. The distance is increased by every level in:|Lv1-4: 15%, 20%, 25%, 30%" 24 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDemoCriticalHit.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDemoCriticalHit extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkDemolition(Perk).bCriticalHit = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkDemolition(Perk).bCriticalHit = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkDemolition' 15 | TraitName="Armor Piercing Rounds" 16 | DefLevelCosts(0)=100 17 | DefMinLevel=50 18 | Description="Demo weapons will do 50% more damage when hitting a critical point!" 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDemoDirectHit.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDemoDirectHit extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkDemolition(Perk).bDirectHit = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkDemolition(Perk).bDirectHit = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkDemolition' 15 | TraitName="High Impact" 16 | DefLevelCosts(0)=65 17 | DefMinLevel=35 18 | Description="Demo weapons will do 25% more damage on a direct hit!" 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDemoNuke.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDemoNuke extends Ext_TraitBase; 2 | 3 | static function string GetPerkDescription() 4 | { 5 | local string S; 6 | 7 | S = Super.GetPerkDescription(); 8 | S $= "|Trait requires prestige level: #{FF4000}3"; 9 | return S; 10 | } 11 | 12 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 13 | { 14 | local int i; 15 | 16 | if( Perk.CurrentLevel=0 ) 23 | return (Perk.PerkStats[i].CurrentValue>=30); 24 | } 25 | 26 | return true; 27 | } 28 | 29 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 30 | { 31 | local ExtPlayerReplicationInfo MyPRI; 32 | 33 | MyPRI = ExtPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo); 34 | if( MyPRI == None || Ext_PerkDemolition(Perk) == None ) 35 | return; 36 | 37 | MyPRI.bNukeActive = true; 38 | Ext_PerkDemolition(Perk).NukeDamageMult = 1.0 + (((float(Level) - 1.f) * 5.f) / 100.f); 39 | } 40 | 41 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 42 | { 43 | local ExtPlayerReplicationInfo MyPRI; 44 | 45 | MyPRI = ExtPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo); 46 | if( MyPRI == None || Ext_PerkDemolition(Perk) == None ) 47 | return; 48 | 49 | MyPRI.bNukeActive = false; 50 | Ext_PerkDemolition(Perk).NukeDamageMult = 1.0; 51 | } 52 | 53 | defaultproperties 54 | { 55 | SupportedPerk=class'Ext_PerkDemolition' 56 | TraitGroup=class'Ext_TGroupZEDTime' 57 | TraitName="ZED Time - Nuke" 58 | NumLevels=4 59 | DefLevelCosts(0)=100 60 | DefLevelCosts(1)=150 61 | DefLevelCosts(2)=200 62 | DefLevelCosts(3)=250 63 | DefMinLevel=100 64 | Description="Demo weapons will spawn a nuke during ZED time. |Each level increases the damage & time of the nuke field. ||-REQUIREMENT: Damage bonus trait needs to have at least 30 points!" 65 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDemoProfessional.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDemoProfessional extends Ext_TraitBase; 2 | 3 | static function string GetPerkDescription() 4 | { 5 | local string S; 6 | 7 | S = Super.GetPerkDescription(); 8 | S $= "|Trait requires prestige level: #{FF4000}1"; 9 | return S; 10 | } 11 | 12 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 13 | { 14 | local int i; 15 | 16 | if( Perk.CurrentLevel=0 ) 23 | return (Perk.PerkStats[i].CurrentValue>=30); 24 | } 25 | 26 | return true; 27 | } 28 | 29 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 30 | { 31 | Ext_PerkDemolition(Perk).bProfessionalActive = true; 32 | } 33 | 34 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 35 | { 36 | Ext_PerkDemolition(Perk).bProfessionalActive = false; 37 | } 38 | 39 | defaultproperties 40 | { 41 | SupportedPerk=class'Ext_PerkDemolition' 42 | TraitName="Demolitions Specialist" 43 | DefLevelCosts(0)=100 44 | DefMinLevel=100 45 | Description="Projectiles from demo weapons will never be duds. ||-REQUIREMENT: Reload bonus trait needs to have at least 30 points!" 46 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDemoReactiveArmor.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDemoReactiveArmor extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkDemolition(Perk).bCanUseSacrifice = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkDemolition(Perk).bCanUseSacrifice = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkDemolition' 15 | TraitName="Reactive Armor" 16 | DefLevelCosts(0)=25 17 | DefMinLevel=45 18 | Description="When near death you will explode and leave yourself with 5 health" 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDireReload.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDireReload extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkSharpshooter(Perk).bHasDireReload = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkSharpshooter(Perk).bHasDireReload = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkSharpshooter' 15 | TraitName="Dire reloader" 16 | DefLevelCosts(0)=35 17 | Description="This trait will make you reload much faster when you have less then 40 health." 18 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDoorRepair.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDoorRepair extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkSupport(Perk).bCanRepairDoors = true; 6 | } 7 | 8 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | Ext_PerkSupport(Perk).bCanRepairDoors = false; 11 | } 12 | 13 | defaultproperties 14 | { 15 | SupportedPerk=class'Ext_PerkSupport' 16 | TraitName="Door Repair" 17 | NumLevels=1 18 | DefLevelCosts(0)=30 19 | DefMinLevel=25 20 | Description="Allows you to repair doors using the welder." 21 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitDuracell.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitDuracell extends Ext_TraitBase; 2 | 3 | var array BatteryCharges; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | if( ExtHumanPawn(Player)!=None ) 8 | ExtHumanPawn(Player).SetBatteryRate(Default.BatteryCharges[Level-1]); 9 | } 10 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 11 | { 12 | if( ExtHumanPawn(Player)!=None ) 13 | ExtHumanPawn(Player).SetBatteryRate(1.f); 14 | } 15 | 16 | defaultproperties 17 | { 18 | TraitName="Duracell Batteries" 19 | NumLevels=4 20 | DefLevelCosts(0)=5 21 | DefLevelCosts(1)=10 22 | DefLevelCosts(2)=20 23 | DefLevelCosts(3)=25 24 | Description="With this trait your flashlight batteries becomes extra durable.|Lv1-4: +30,+100,+300,+1000% lifetime" 25 | BatteryCharges.Add(0.77) 26 | BatteryCharges.Add(0.5) 27 | BatteryCharges.Add(0.333) 28 | BatteryCharges.Add(0.1) 29 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitEliteReload.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitEliteReload extends Ext_TraitBase; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Perk.bTacticalReload = true; 6 | } 7 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Perk.bTacticalReload = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | TraitName="Tactical Reload" 15 | DefLevelCosts(0)=50 16 | Description="With this trait you will have extra speedy tactical reload moves for your perked weapons." 17 | DefMinLevel=50 18 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitEnemyHP.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitEnemyHP extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Perk.EnemyHealthRange = Level; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Perk.EnemyHealthRange = 0; 10 | } 11 | 12 | defaultproperties 13 | { 14 | TraitName="Enemy Health Bar" 15 | NumLevels=4 16 | DefLevelCosts(0)=25 17 | DefLevelCosts(1)=15 18 | DefLevelCosts(2)=20 19 | DefLevelCosts(3)=30 20 | Description="This trait lets you see enemy health bars. The distance is increased by every level in:|Lv1-4: 5m, 7m, 10m, 16m" 21 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitFanfire.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitFanfire extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkGunslinger(Perk).bHasFanfire = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkGunslinger(Perk).bHasFanfire = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkGunslinger' 15 | TraitGroup=class'Ext_TGroupZEDTime' 16 | TraitName="ZED TIME - Fanfire" 17 | DefLevelCosts(0)=30 18 | Description="Make perked weapons fire at normal firerate during ZED-time." 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitFireExplode.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitFireExplode extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Perk.bFireExplode = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Perk.bFireExplode = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | TraitName="Fire Explosion" 15 | DefLevelCosts(0)=50 16 | Description="Make zombies sometimes explode when burned to death." 17 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitFireRange.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitFireRange extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | KFPlayerReplicationInfo(Perk.PlayerOwner.PlayerReplicationInfo).bExtraFireRange = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | TraitName="Extra Fire Range" 15 | DefLevelCosts(0)=35 16 | Description="Add some additional fire range to flamethrowers." 17 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitGhost.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitGhost extends Ext_TraitBase; 2 | 3 | static function bool PreventDeath( KFPawn_Human Player, Controller Instigator, Class DamType, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | local Controller C; 6 | 7 | if( (Instigator==None || Instigator==Player.Controller) && DamType==Class'DmgType_Suicided' ) 8 | return false; // Allow normal suicide to go ahead. 9 | 10 | if( Ext_T_GhostHelper(Data).CanResPlayer(Player,Level) ) 11 | { 12 | // Abort current special move 13 | if( Player.IsDoingSpecialMove() ) 14 | Player.SpecialMoveHandler.EndSpecialMove(); 15 | 16 | // Notify AI to stop hunting me. 17 | foreach Player.WorldInfo.AllControllers(class'Controller',C) 18 | C.NotifyKilled(Instigator,Player.Controller,Player,DamType); 19 | return true; 20 | } 21 | return false; 22 | } 23 | 24 | defaultproperties 25 | { 26 | bHighPriorityDeath=true 27 | NumLevels=2 28 | TraitData=class'Ext_T_GhostHelper' 29 | TraitName="Redemption" 30 | DefLevelCosts(0)=30 31 | DefLevelCosts(1)=30 32 | DefMinLevel=30 33 | Description="With this trait you will turn into ghost when you die and redeem at another spot in the map.|Level 1: Works 50 % of the time, but never again until you respawned after death.|Level 2: Always works, and it lets you redeem again after 3 minutes" 34 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitGrenadeCap.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitGrenadeCap extends Ext_TraitCarryCap; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ); 4 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ); 5 | 6 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 7 | { 8 | Perk.PerkManager.SetGrenadeCap(Default.CarryAdds[Level-1]); 9 | } 10 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 11 | { 12 | Perk.PerkManager.SetGrenadeCap(0); 13 | } 14 | 15 | defaultproperties 16 | { 17 | TraitName="Grenade Capacity" 18 | DefLevelCosts(0)=40 19 | DefLevelCosts(1)=55 20 | DefLevelCosts(2)=70 21 | DefLevelCosts(3)=90 22 | DefLevelCosts(4)=150 23 | Description="With this trait you can carry more grenades.|Lv1-5: +1,+2,+3,+5,+8 grenades" 24 | CarryAdds(0)=1 25 | CarryAdds(1)=2 26 | CarryAdds(2)=3 27 | CarryAdds(3)=5 28 | CarryAdds(4)=8 29 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitGrenadeSUpg.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitGrenadeSUpg extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | if( Level==1 ) 6 | Perk.GrenadeClass = Perk.SuperGrenade; 7 | } 8 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | Perk.GrenadeClass = Perk.Default.GrenadeClass; 11 | } 12 | 13 | defaultproperties 14 | { 15 | TraitName="Grenade Upgrade" 16 | DefLevelCosts(0)=50 17 | Description="With this upgrade you will upgrade to your perk specific grenades.|Level 1: SUPER grenade" 18 | DefMinLevel=50 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitGrenadeUpg.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitGrenadeUpg extends Ext_TraitBase; 2 | 3 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 4 | { 5 | if( Lvl>=1 && Perk.CurrentLevel<50 ) 6 | return false; 7 | return Super.MeetsRequirements(Lvl,Perk); 8 | } 9 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 10 | { 11 | if( Level==1 ) 12 | Perk.GrenadeClass = Perk.PerkGrenade; 13 | else if( Level==2 ) 14 | Perk.GrenadeClass = Perk.SuperGrenade; 15 | } 16 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 17 | { 18 | Perk.GrenadeClass = Perk.Default.GrenadeClass; 19 | } 20 | 21 | defaultproperties 22 | { 23 | TraitName="Grenade Upgrade" 24 | NumLevels=2 25 | DefLevelCosts(0)=5 26 | DefLevelCosts(1)=50 27 | Description="With this upgrade you will upgrade to your perk specific grenades.|Level 1: Normal perk grenade|Level 2: Perk SUPER grenade (REQUIRES perk level 50 to buy)!" 28 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitHealthReg.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitHealthReg extends Ext_TraitBase; 2 | 3 | var array RegenValues; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | local Ext_T_HealthRegHelp H; 8 | 9 | H = Player.Spawn(class'Ext_T_HealthRegHelp',Player); 10 | if( H!=None ) 11 | H.RegCount = Default.RegenValues[Level-1]; 12 | } 13 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | local Ext_T_HealthRegHelp H; 16 | 17 | foreach Player.ChildActors(class'Ext_T_HealthRegHelp',H) 18 | H.Destroy(); 19 | } 20 | 21 | defaultproperties 22 | { 23 | TraitGroup=class'Ext_TGroupRegen' 24 | TraitName="Health Regeneration" 25 | NumLevels=3 26 | DefLevelCosts(0)=10 27 | DefLevelCosts(1)=20 28 | DefLevelCosts(2)=40 29 | Description="With this trait your health will regen every 10 seconds at a rate of:|Lvl1-3: +5HP, +10HP, +20HP" 30 | RegenValues.Add(5) 31 | RegenValues.Add(10) 32 | RegenValues.Add(20) 33 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitHeavyArmor.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitHeavyArmor extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Perk.bHeavyArmor = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Perk.bHeavyArmor = false; 10 | } 11 | 12 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 13 | { 14 | if( Level <= 1 ) 15 | return; 16 | 17 | Level == 2 ? Player.AddArmor(50) : Player.AddArmor(Player.MaxArmor); 18 | } 19 | 20 | defaultproperties 21 | { 22 | TraitName="Heavy Armor" 23 | NumLevels=3 24 | DefLevelCosts(0)=50 25 | DefLevelCosts(1)=20 26 | DefLevelCosts(2)=60 27 | DefMinLevel=50 28 | Description="Makes your armor stop all damage (except for Siren scream and fall damage).|Level 2 makes you in addition spawn with 50 points of armor.|Level 3 makes you spawn with full armor." 29 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitKnockback.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitKnockback extends Ext_TraitRagdoll; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | if( ExtHumanPawn(Player)!=None ) 6 | ExtHumanPawn(Player).KnockbackResist = Default.ChanceValues[Level-1]; 7 | } 8 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | if( ExtHumanPawn(Player)!=None ) 11 | ExtHumanPawn(Player).KnockbackResist = 1.f; 12 | } 13 | 14 | defaultproperties 15 | { 16 | TraitName="Knockback Resistance" 17 | NumLevels=4 18 | DefLevelCosts(0)=30 19 | DefLevelCosts(1)=30 20 | DefLevelCosts(2)=40 21 | DefLevelCosts(3)=60 22 | DefMinLevel=70 23 | Description="Reduce the amount of knockback zeds do to you in a rate of:|Lvl1-4: -20%, -50%, -70%, -90%" 24 | 25 | ChanceValues(0)=0.8 26 | ChanceValues(1)=0.5 27 | ChanceValues(2)=0.3 28 | ChanceValues(3)=0.1 29 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitMachineGunner.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitMachineGunner extends Ext_TraitBase; 2 | 3 | static function string GetPerkDescription() 4 | { 5 | local string S; 6 | 7 | S = Super.GetPerkDescription(); 8 | S $= "|Trait requires prestige level: #{FF4000}2"; 9 | return S; 10 | } 11 | 12 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 13 | { 14 | if( Perk.CurrentLevel ComboSize; 4 | 5 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | Ext_PerkRhythmPerkBase(Perk).SetMaxRhythm(Default.ComboSize[Level-1]); 8 | } 9 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 10 | { 11 | Ext_PerkRhythmPerkBase(Perk).ResetRhythm(); 12 | } 13 | 14 | defaultproperties 15 | { 16 | SupportedPerk=class'Ext_PerkRhythmPerkBase' 17 | TraitName="Rack 'em up" 18 | DefLevelCosts(0)=10 19 | DefLevelCosts(1)=15 20 | DefLevelCosts(2)=20 21 | DefLevelCosts(3)=30 22 | DefLevelCosts(4)=50 23 | ComboSize.Add(4) 24 | ComboSize.Add(8) 25 | ComboSize.Add(12) 26 | ComboSize.Add(16) 27 | ComboSize.Add(28) 28 | NumLevels=5 29 | Description="Deals more damage to each consequtive headshot done to zeds by +7.5%.|For each level you can make a bigger combo and deal more damage in a rate of:|Lv1-5: +30%, +60%, +90%, +120%, +210%" 30 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitRagdoll.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitRagdoll extends Ext_TraitBase; 2 | 3 | var float ChanceValues[4]; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | if( ExtHumanPawn(Player)!=None ) 8 | ExtHumanPawn(Player).NoRagdollChance = Default.ChanceValues[Level-1]; 9 | } 10 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 11 | { 12 | if( ExtHumanPawn(Player)!=None ) 13 | ExtHumanPawn(Player).NoRagdollChance = 0.f; 14 | } 15 | 16 | defaultproperties 17 | { 18 | TraitName="Knockout Resistance" 19 | NumLevels=3 20 | DefLevelCosts(0)=30 21 | DefLevelCosts(1)=30 22 | DefLevelCosts(2)=40 23 | DefMinLevel=100 24 | Description="Prevent you from being ragdolled. For each level you lower the chance of being knocked out by:|Lvl1-3: 20%, 50%, 80%" 25 | 26 | ChanceValues(0)=0.2 27 | ChanceValues(1)=0.5 28 | ChanceValues(2)=0.8 29 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitRanger.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitRanger extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkSharpshooter(Perk).ZEDTimeStunPower = 4.f; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkSharpshooter(Perk).ZEDTimeStunPower = 0.f; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkSharpshooter' 15 | TraitGroup=class'Ext_TGroupZEDTime' 16 | TraitName="ZED TIME - Ranger" 17 | DefLevelCosts(0)=40 18 | Description="This will make you effectively stun enemies with headshots during ZED-time." 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitRapidAssault.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitRapidAssault extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkSWAT(Perk).bRapidAssault = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkSWAT(Perk).bRapidAssault = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkSWAT' 15 | TraitGroup=class'Ext_TGroupZEDTime' 16 | TraitName="ZED TIME - Rapid Assault" 17 | DefLevelCosts(0)=30 18 | Description="Gives player unlimited ammunition for perked weapons during ZED-time and allows them to fire in realtime." 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitRetali.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitRetali extends Ext_TraitBase; 2 | 3 | static function bool PreventDeath( KFPawn_Human Player, Controller Instigator, Class DamType, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | local ExtProj_SUPERGrenade P; 6 | 7 | P = Player.Spawn(class'ExtProj_SUPERGrenade'); 8 | if( P!=None ) 9 | { 10 | P.bExplodeOnContact = false; // Nope! 11 | P.InstigatorController = Player.Controller; 12 | P.ClusterNades = class'ExtProj_CrackerGrenade'; 13 | } 14 | return false; 15 | } 16 | 17 | defaultproperties 18 | { 19 | TraitName="Retaliation" 20 | DefLevelCosts(0)=50 21 | DefMinLevel=40 22 | Description="End your life with a BOOM!" 23 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitSWATEnforcer.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitSWATEnforcer extends Ext_TraitBase; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | if( ExtHumanPawn(Player)!=None ) 6 | ExtHumanPawn(Player).bMovesFastInZedTime = true; 7 | } 8 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | if( ExtHumanPawn(Player)!=None ) 11 | ExtHumanPawn(Player).bMovesFastInZedTime = false; 12 | } 13 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | Perk.bHasSWATEnforcer = true; 16 | } 17 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 18 | { 19 | Perk.bHasSWATEnforcer = false; 20 | } 21 | 22 | defaultproperties 23 | { 24 | TraitName="ZED TIME - SWAT Enforcer" 25 | TraitGroup=class'Ext_TGroupZEDTime' 26 | DefLevelCosts(0)=50 27 | Description="This trait makes you move at normal speed and allows you to knock down zeds by bumping into them during ZED-time." 28 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitSirenResistance.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitSirenResistance extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkDemolition(Perk).bSirenResistance = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkDemolition(Perk).bSirenResistance = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | TraitName="Siren Resistance" 15 | DefLevelCosts(0)=50 16 | DefMinLevel=75 17 | Description="Make all your projectiles resistant to siren screams." 18 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitSpartan.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitSpartan extends Ext_TraitBase; 2 | 3 | var array AtkRates; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | if( ExtHumanPawn(Player)!=None ) 8 | ExtHumanPawn(Player).bMovesFastInZedTime = true; 9 | Ext_PerkBerserker(Perk).ZedTimeMeleeAtkRate = 1.f/Default.AtkRates[Level-1]; 10 | } 11 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 12 | { 13 | if( ExtHumanPawn(Player)!=None ) 14 | ExtHumanPawn(Player).bMovesFastInZedTime = false; 15 | Ext_PerkBerserker(Perk).ZedTimeMeleeAtkRate = 1.f; 16 | } 17 | 18 | defaultproperties 19 | { 20 | SupportedPerk=class'Ext_PerkBerserker' 21 | TraitGroup=class'Ext_TGroupZEDTime' 22 | TraitName="ZED TIME - Spartan!" 23 | NumLevels=3 24 | DefLevelCosts(0)=50 25 | DefLevelCosts(1)=40 26 | DefLevelCosts(2)=80 27 | Description="This trait lets you move at normal speed and attack faster in ZED-time.|Lv1-3: +50,+120,+300% atk speed" 28 | AtkRates.Add(1.5) 29 | AtkRates.Add(2.2) 30 | AtkRates.Add(4.0) 31 | DefMinLevel=100 32 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitSupply.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitSupply extends Ext_TraitBase; 2 | 3 | var() Texture2D SupplyIcon; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | Ext_TraitSupplyData(Data).SpawnSupplier(Player); 8 | } 9 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 10 | { 11 | Ext_TraitSupplyData(Data).RemoveSupplier(); 12 | } 13 | static function PlayerDied( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | Ext_TraitSupplyData(Data).RemoveSupplier(); 16 | } 17 | 18 | defaultproperties 19 | { 20 | TraitName="Ammunition Supply" 21 | DefLevelCosts(0)=50 22 | Description="With this trait you can supply ammunition for your team mates. For each use you will receive a little bit of XP points." 23 | TraitData=class'Ext_TraitSupplyData' 24 | 25 | SupplyIcon=Texture2D'UI_World_TEX.Support_Supplier_HUD' 26 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitSupplyData.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitSupplyData extends Ext_TraitDataStore; 2 | 3 | var Ext_T_SupplierInteract SupplyInteraction; 4 | 5 | final function SpawnSupplier( KFPawn_Human H, optional bool bGrenades ) 6 | { 7 | if( SupplyInteraction!=None ) 8 | SupplyInteraction.Destroy(); 9 | 10 | SupplyInteraction = Spawn( class'Ext_T_SupplierInteract', H,, H.Location, H.Rotation,, true ); 11 | SupplyInteraction.SetBase( H ); 12 | SupplyInteraction.PlayerOwner = H; 13 | SupplyInteraction.PerkOwner = Perk; 14 | SupplyInteraction.bGrenades = bGrenades; 15 | 16 | if( PlayerOwner!=None && ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo)!=None ) 17 | ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo).HasSupplier = class(TraitClass); 18 | } 19 | final function RemoveSupplier() 20 | { 21 | if( SupplyInteraction!=None ) 22 | SupplyInteraction.Destroy(); 23 | 24 | if( PlayerOwner!=None && ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo)!=None ) 25 | ExtPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo).HasSupplier = None; 26 | } 27 | function Destroyed() 28 | { 29 | RemoveSupplier(); 30 | } 31 | -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitSupplyGren.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitSupplyGren extends Ext_TraitSupply; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_TraitSupplyData(Data).SpawnSupplier(Player,true); 6 | } 7 | 8 | defaultproperties 9 | { 10 | TraitName="Grenade Supply" 11 | Description="With this trait you can supply grenades for your team mates. For each use you will receive a little bit of XP points." 12 | 13 | SupplyIcon=Texture2D'UI_World_TEX.Demolitionist_Supplier_HUD' 14 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitTacticalMove.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitTacticalMove extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkSWAT(Perk).RepTacticalMove = Level; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkSWAT(Perk).RepTacticalMove = 0; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkSWAT' 15 | TraitName="Tactical Movement" 16 | NumLevels=3 17 | DefLevelCosts(0)=30 18 | DefLevelCosts(1)=35 19 | DefLevelCosts(2)=50 20 | Description="This trait makes you move faster while in iron sight and crouched at a rate of:|Lv 1-3: +30%,+50%,+100%" 21 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitTactician.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitTactician extends Ext_TraitBase; 2 | 3 | static function string GetPerkDescription() 4 | { 5 | local string S; 6 | 7 | S = Super.GetPerkDescription(); 8 | S $= "|Trait requires prestige level: #{FF4000}1"; 9 | return S; 10 | } 11 | 12 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 13 | { 14 | local int i; 15 | 16 | if( Perk.CurrentLevel=0 ) 23 | return (Perk.PerkStats[i].CurrentValue>=30); 24 | } 25 | 26 | return true; 27 | } 28 | 29 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 30 | { 31 | Ext_PerkCommando(Perk).bUseProfessional = true; 32 | } 33 | 34 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 35 | { 36 | Ext_PerkCommando(Perk).bUseProfessional = false; 37 | } 38 | 39 | defaultproperties 40 | { 41 | SupportedPerk=class'Ext_PerkCommando' 42 | TraitGroup=class'Ext_TGroupZEDTime' 43 | TraitName="ZED TIME - Tactician" 44 | NumLevels=1 45 | DefLevelCosts(0)=30 46 | DefMinLevel=35 47 | Description="During Zed time, you reload perk weapons at full speed and switch perk weapons twice as fast! ||-REQUIREMENT: Damage bonus trait needs to have at least 30 points!" 48 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitToxicDart.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitToxicDart extends Ext_TraitBase; 2 | 3 | var array DartDamages; 4 | 5 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | Perk.ToxicDartDamage = Default.DartDamages[Level-1]; 8 | Perk.bToxicDart = true; 9 | } 10 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 11 | { 12 | Perk.bToxicDart = false; 13 | } 14 | 15 | defaultproperties 16 | { 17 | TraitName="Toxic Darts" 18 | DefLevelCosts(0)=25 19 | DefLevelCosts(1)=25 20 | DefLevelCosts(2)=30 21 | DartDamages(0)=15 22 | DartDamages(1)=35 23 | DartDamages(2)=70 24 | NumLevels=3 25 | Description="Make your healing darts poison the ZEDs, the damage is increased in a rate of:|Lv 1-3: +15, +35, +70 dmg" 26 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitUberAmmo.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitUberAmmo extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkGunslinger(Perk).bHasUberAmmo = true; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Ext_PerkGunslinger(Perk).bHasUberAmmo = false; 10 | } 11 | 12 | defaultproperties 13 | { 14 | SupportedPerk=class'Ext_PerkGunslinger' 15 | TraitGroup=class'Ext_TGroupZEDTime' 16 | TraitName="ZED TIME - Uber Ammo" 17 | DefLevelCosts(0)=30 18 | Description="Gives player unlimited ammunition for perked weapons during ZED-time." 19 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitUnCloak.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitUnCloak extends Ext_TraitBase; 2 | 3 | var array RadiusValues; 4 | 5 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | local Ext_T_UnCloakHelper H; 8 | 9 | H = Player.Spawn(class'Ext_T_UnCloakHelper',Player); 10 | if( H!=None ) 11 | H.HandleRadius = Default.RadiusValues[Level-1]; 12 | } 13 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | local Ext_T_UnCloakHelper H; 16 | 17 | foreach Player.ChildActors(class'Ext_T_UnCloakHelper',H) 18 | H.Destroy(); 19 | } 20 | 21 | defaultproperties 22 | { 23 | TraitName="Cloak Detection" 24 | NumLevels=5 25 | DefLevelCosts(0)=5 26 | DefLevelCosts(1)=7 27 | DefLevelCosts(2)=10 28 | DefLevelCosts(3)=15 29 | DefLevelCosts(4)=25 30 | Description="Detect cloaked stalkers with radius for each level:|Lv1-5: 3m, 5m, 7m, 10m, 15m" 31 | RadiusValues.Add(300) 32 | RadiusValues.Add(500) 33 | RadiusValues.Add(700) 34 | RadiusValues.Add(1000) 35 | RadiusValues.Add(1500) 36 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitUnGrab.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitUnGrab extends Ext_TraitBase; 2 | 3 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Perk.bCanBeGrabbed = false; 6 | } 7 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 8 | { 9 | Perk.bCanBeGrabbed = true; 10 | } 11 | 12 | defaultproperties 13 | { 14 | TraitName="Fake Out" 15 | DefLevelCosts(0)=30 16 | Description="With this trait you are ungrabbable by the zeds." 17 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitVampire.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitVampire extends Ext_TraitBase; 2 | 3 | var() array RegenRate; 4 | 5 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 6 | { 7 | Ext_PerkBerserker(Perk).VampRegenRate = Default.RegenRate[Level-1]; 8 | } 9 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 10 | { 11 | Ext_PerkBerserker(Perk).VampRegenRate = 0; 12 | } 13 | 14 | defaultproperties 15 | { 16 | SupportedPerk=class'Ext_PerkBerserker' 17 | TraitName="Vampire" 18 | NumLevels=4 19 | DefLevelCosts(0)=25 20 | DefLevelCosts(1)=15 21 | DefLevelCosts(2)=20 22 | DefLevelCosts(3)=25 23 | RegenRate.Add(0.02) 24 | RegenRate.Add(0.03) 25 | RegenRate.Add(0.04) 26 | RegenRate.Add(0.06) 27 | Description="With this trait you will recover some of your health by every kill (with a melee weapon), in a rate of:|Lv1-4: +2%, +3%, +4%, +6%" 28 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPBers.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPBers extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Berserker Weapon Loadout" 6 | Description="This will grant you berserker weapon loadout to spawn with.|Level 1: Pulverizer|Level 2: Nailgun|Level 3: Sawblade Gun|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_Blunt_Pulverizer')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_Shotgun_Nailgun')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_Eviscerator')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_Blunt_Pulverizer',class'KFWeap_Shotgun_Nailgun',class'KFWeap_Eviscerator')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPComm.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPComm extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Commando Weapon Loadout" 6 | Description="This will grant you commando weapon loadout to spawn with.|Level 1: Bullpup|Level 2: AK12|Level 3: SCAR|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_AssaultRifle_Bullpup')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_AssaultRifle_AK12')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_AssaultRifle_SCAR')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_AssaultRifle_Bullpup',class'KFWeap_AssaultRifle_AK12',class'KFWeap_AssaultRifle_SCAR')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPDemo.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPDemo extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Demolitionist Weapon Loadout" 6 | Description="This will grant you demolitionist weapon loadout to spawn with.|Level 1: C4|Level 2: M79 Grenade Launcher|Level 3: RPG Rocket Launcher|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_Thrown_C4')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_GrenadeLauncher_M79')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_RocketLauncher_RPG7')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_Thrown_C4',class'KFWeap_GrenadeLauncher_M79',class'KFWeap_RocketLauncher_RPG7')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPFire.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPFire extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Firebug Weapon Loadout" 6 | Description="This will grant you firebug weapon loadout to spawn with.|Level 1: Dragons Breath|Level 2: Flamethrower|Level 3: Microwave Gun|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_Shotgun_DragonsBreath')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_Flame_Flamethrower')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_Beam_Microwave')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_Shotgun_DragonsBreath',class'KFWeap_Flame_Flamethrower',class'KFWeap_Beam_Microwave')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPGuns.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPGuns extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Gunslinger Weapon Loadout" 6 | Description="This will grant you gunslinger weapon loadout to spawn with.|Level 1: M1911 Pistol|Level 2: Desert Eagle|Level 3: Magnum Revolver|Level 4: All 3 with dualies" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_Pistol_Colt1911')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_Pistol_Deagle')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_Revolver_SW500')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_Pistol_DualColt1911',class'KFWeap_Pistol_DualDeagle',class'KFWeap_Revolver_DualSW500')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPMedic.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPMedic extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Medic Weapon Loadout" 6 | Description="This will grant you Field Medic weapon loadout to spawn with.|Level 1: SMG|Level 2: Shotgun|Level 3: Assault Rifle|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_SMG_Medic')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_Shotgun_Medic')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_AssaultRifle_Medic')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_SMG_Medic',class'KFWeap_Shotgun_Medic',class'KFWeap_AssaultRifle_Medic')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPSWAT.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPSWAT extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="SWAT Weapon Loadout" 6 | Description="This will grant you SWAT weapon loadout to spawn with.|Level 1: MP5 RAS|Level 2: P90|Level 3: Kriss|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_SMG_MP5RAS')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_SMG_P90')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_SMG_Kriss')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_SMG_MP5RAS',class'KFWeap_SMG_P90',class'KFWeap_SMG_Kriss')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPSharp.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPSharp extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Sharpshooter Weapon Loadout" 6 | Description="This will grant you sharpshooter weapon loadout to spawn with.|Level 1: Crossbow|Level 2: M14 EBR|Level 3: Railgun|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_Bow_Crossbow')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_Rifle_M14EBR')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_Rifle_RailGun')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_Bow_Crossbow',class'KFWeap_Rifle_M14EBR',class'KFWeap_Rifle_RailGun')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPSupp.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPSupp extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Support Weapon Loadout" 6 | Description="This will grant you support weapon loadout to spawn with.|Level 1: M4 Shotgun|Level 2: Boomstick|Level 3: AA12|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_Shotgun_M4')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_Shotgun_DoubleBarrel')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_Shotgun_AA12')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_Shotgun_M4',class'KFWeap_Shotgun_DoubleBarrel',class'KFWeap_Shotgun_AA12')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWPSurv.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWPSurv extends Ext_TraitWeapons; 2 | 3 | defaultproperties 4 | { 5 | TraitName="Survivalist Weapon Loadout" 6 | Description="This will grant you Survivalist weapon loadout to spawn with.|Level 1: Dragons Breath|Level 2: M16M203 Assault Rifle|Level 3: Medic Assault Rifle|Level 4: All 3" 7 | 8 | LevelEffects(0)=(LoadoutClasses=(class'KFWeap_Shotgun_DragonsBreath')) 9 | LevelEffects(1)=(LoadoutClasses=(class'KFWeap_AssaultRifle_M16M203')) 10 | LevelEffects(2)=(LoadoutClasses=(class'KFWeap_AssaultRifle_Medic')) 11 | LevelEffects(3)=(LoadoutClasses=(class'KFWeap_Shotgun_DragonsBreath',class'KFWeap_AssaultRifle_M16M203',class'KFWeap_AssaultRifle_Medic')) 12 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitWeapons.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitWeapons extends Ext_TraitBase 2 | abstract; 3 | 4 | struct FLevelFX 5 | { 6 | var array< class > LoadoutClasses; 7 | }; 8 | var array LevelEffects; 9 | 10 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 11 | { 12 | if( Lvl>=3 && (Perk.CurrentLevel<50 || !HasMaxCarry(Perk)) ) 13 | return false; 14 | return Super.MeetsRequirements(Lvl,Perk); 15 | } 16 | static final function bool HasMaxCarry( Ext_PerkBase Perk ) 17 | { 18 | local int i; 19 | 20 | i = Perk.PerkTraits.Find('TraitType',Class'Ext_TraitCarryCap'); 21 | return (i==-1 || Perk.PerkTraits[i].CurrentLevel>=3); 22 | } 23 | static function string GetPerkDescription() 24 | { 25 | return Super.GetPerkDescription()$"|- Level 4 requires perk level 50 and level 3 carry capacity trait!"; 26 | } 27 | 28 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 29 | { 30 | Perk.PrimaryWeapon = None; // Give a new primary weapon. 31 | } 32 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 33 | { 34 | Perk.PrimaryWeapon = Perk.Default.PrimaryWeapon; 35 | } 36 | 37 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 38 | { 39 | local class IC; 40 | local KFInventoryManager M; 41 | local Inventory Inv; 42 | 43 | Level = Min(Level-1,Default.LevelEffects.Length-1); 44 | M = KFInventoryManager(Player.InvManager); 45 | if( M!=None ) 46 | M.bInfiniteWeight = true; 47 | foreach Default.LevelEffects[Level].LoadoutClasses(IC) 48 | { 49 | if( Player.FindInventoryType(IC)==None ) 50 | { 51 | Inv = Player.CreateInventory(IC,Player.Weapon!=None); 52 | if ( KFWeapon(Inv)!=None ) 53 | KFWeapon(Inv).bGivenAtStart = true; 54 | } 55 | } 56 | if( M!=None ) 57 | M.bInfiniteWeight = false; 58 | } 59 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 60 | { 61 | local class IC; 62 | local Inventory Inv; 63 | 64 | if( Level==0 ) 65 | return; 66 | Level = Min(Level-1,Default.LevelEffects.Length-1); 67 | foreach Default.LevelEffects[Level].LoadoutClasses(IC) 68 | { 69 | Inv = Player.FindInventoryType(IC); 70 | if( Inv!=None ) 71 | Inv.Destroy(); 72 | } 73 | } 74 | 75 | defaultproperties 76 | { 77 | NumLevels=4 78 | DefLevelCosts(0)=10 79 | DefLevelCosts(1)=15 80 | DefLevelCosts(2)=20 81 | DefLevelCosts(3)=40 82 | LoadPriority=1 // Make sure Carry Cap trait gets loaded first. 83 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitZEDBase.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitZEDBase extends Ext_TraitBase 2 | abstract; 3 | 4 | var class BaseTrait; 5 | var bool bIsSummoner; 6 | 7 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 8 | { 9 | local int i; 10 | 11 | // First check level. 12 | if( Perk.CurrentLevel=0 ) 20 | return (Perk.PerkTraits[i].CurrentLevel>0); 21 | } 22 | return true; 23 | } 24 | 25 | defaultproperties 26 | { 27 | TraitGroup=class'Ext_TGroupMonster' 28 | BaseTrait=class'Ext_TraitZED_Summon' 29 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitZED_Damage.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitZED_Damage extends Ext_TraitZEDBase 2 | abstract; 3 | 4 | var array DamList; 5 | 6 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 7 | { 8 | local Ext_T_ZEDHelper H; 9 | 10 | foreach Player.ChildActors(class'Ext_T_ZEDHelper',H) 11 | H.SetDamageScale(Default.DamList[Level-1]); 12 | } 13 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | local Ext_T_ZEDHelper H; 16 | 17 | foreach Player.ChildActors(class'Ext_T_ZEDHelper',H) 18 | H.SetDamageScale(1); 19 | } 20 | 21 | defaultproperties 22 | { 23 | NumLevels=5 24 | TraitName="Monster Damage" 25 | Description="This trait will scale how much damage your helper ZED will deal:|Lv1-5: +10%, +25%, +50%, +100%, +200%||-Requires Monster Tongue trait." 26 | DefLevelCosts(0)=10 27 | DefLevelCosts(1)=20 28 | DefLevelCosts(2)=30 29 | DefLevelCosts(3)=40 30 | DefLevelCosts(4)=60 31 | bPostApplyEffect=true 32 | 33 | DamList.Add(1.1) 34 | DamList.Add(1.25) 35 | DamList.Add(1.5) 36 | DamList.Add(2) 37 | DamList.Add(3) 38 | DamList.Add(3) 39 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitZED_Health.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitZED_Health extends Ext_TraitZEDBase 2 | abstract; 3 | 4 | var array HPList; 5 | 6 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 7 | { 8 | local Ext_T_ZEDHelper H; 9 | 10 | foreach Player.ChildActors(class'Ext_T_ZEDHelper',H) 11 | H.SetHealthScale(Default.HPList[Level-1]); 12 | } 13 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 14 | { 15 | local Ext_T_ZEDHelper H; 16 | 17 | foreach Player.ChildActors(class'Ext_T_ZEDHelper',H) 18 | H.SetHealthScale(1); 19 | } 20 | 21 | defaultproperties 22 | { 23 | NumLevels=5 24 | bPostApplyEffect=true 25 | TraitName="Monster Health" 26 | Description="This trait will scale how much health your helper ZED will have:|Lv1-5: +25%, +50%, +75%, +100%, +200%||-Requires Monster Tongue trait." 27 | DefLevelCosts(0)=5 28 | DefLevelCosts(1)=15 29 | DefLevelCosts(2)=25 30 | DefLevelCosts(3)=40 31 | DefLevelCosts(4)=60 32 | 33 | HPList.Add(1.25) 34 | HPList.Add(1.5) 35 | HPList.Add(1.75) 36 | HPList.Add(2) 37 | HPList.Add(3) 38 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitZED_SummonExt.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitZED_SummonExt extends Ext_TraitZEDBase 2 | abstract; 3 | 4 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 5 | { 6 | local int i; 7 | local byte MaxLevel; 8 | 9 | MaxLevel = 0; 10 | for( i=0; i0 && Class(Perk.PerkTraits[i].TraitType)!=None && !Class(Perk.PerkTraits[i].TraitType).Default.bIsSummoner ) 34 | Perk.PerkTraits[i].TraitType.Static.ApplyEffectOn(Player,Perk,Level,Data); 35 | } 36 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 37 | { 38 | local Ext_T_ZEDHelper H; 39 | 40 | foreach Player.ChildActors(class'Ext_T_ZEDHelper',H) 41 | if( H.bIsExtra ) 42 | H.Destroy(); 43 | } 44 | static final function AddHelperType( byte Lv, KFPawn_Human Player ) 45 | { 46 | local Ext_T_ZEDHelper H; 47 | 48 | H = Player.Spawn(class'Ext_T_ZEDHelper',Player); 49 | if( H!=None ) 50 | { 51 | H.CurLevel = Lv; 52 | H.bIsExtra = true; 53 | } 54 | } 55 | 56 | defaultproperties 57 | { 58 | bIsSummoner=true 59 | NumLevels=4 60 | TraitName="Monster Tongue Extra" 61 | Description="With this trait you will spawn yourself extra helper zeds.|Lv 1: Spawn one extra weak zed.|Lv 2: Spawn one extra strong zed.|Lv 3: Spawn one weak and one strong zed.|Lv 4: Spawn two strong zeds.||-Requires Monster Tongue trait." 62 | DefLevelCosts(0)=100 63 | DefLevelCosts(1)=40 64 | DefLevelCosts(2)=80 65 | DefLevelCosts(3)=50 66 | DefMinLevel=100 67 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitZedTExt.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitZedTExt extends Ext_TraitBase; 2 | 3 | static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 4 | { 5 | Ext_PerkCommando(Perk).ZTExtCount = Level; 6 | } 7 | 8 | static function CancelEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 9 | { 10 | Ext_PerkCommando(Perk).ZTExtCount = Level; 11 | } 12 | 13 | defaultproperties 14 | { 15 | SupportedPerk=class'Ext_PerkCommando' 16 | TraitName="ZED Time Extensions" 17 | NumLevels=6 18 | DefLevelCosts(0)=15 19 | DefLevelCosts(1)=25 20 | DefLevelCosts(2)=35 21 | DefLevelCosts(3)=45 22 | DefLevelCosts(4)=55 23 | DefLevelCosts(5)=65 24 | DefMinLevel=15 25 | Description="Adds ZED Time extensions to your perk. The amount of extensions is increased by 1 every level" 26 | } -------------------------------------------------------------------------------- /ServerExt/Classes/Ext_TraitZedative.uc: -------------------------------------------------------------------------------- 1 | Class Ext_TraitZedative extends Ext_TraitBase; 2 | 3 | static function string GetPerkDescription() 4 | { 5 | local string S; 6 | 7 | S = Super.GetPerkDescription(); 8 | S $= "|Trait requires prestige level: #{FF4000}2"; 9 | return S; 10 | } 11 | 12 | static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk ) 13 | { 14 | local int i; 15 | 16 | if( Perk.CurrentLevel=0 ) 23 | return (Perk.PerkStats[i].CurrentValue>=25); 24 | } 25 | 26 | return true; 27 | } 28 | 29 | static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 30 | { 31 | Ext_PerkFieldMedic(Perk).bUseSlug = true; 32 | } 33 | 34 | static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) 35 | { 36 | Ext_PerkFieldMedic(Perk).bUseSlug = false; 37 | } 38 | 39 | defaultproperties 40 | { 41 | SupportedPerk=class'Ext_PerkFieldMedic' 42 | TraitGroup=class'Ext_TGroupZEDTime' 43 | TraitName="ZED TIME - Zedative" 44 | NumLevels=1 45 | DefLevelCosts(0)=50 46 | DefMinLevel=65 47 | Description="During Zed time, damaging Zeds with perk weapons will slow them 30% and do massive amounts of poison damage. ||-REQUIREMENT: Healing bonus trait needs to have at least 25 points!" 48 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KF2GUIInput.uc: -------------------------------------------------------------------------------- 1 | // Input while in a menu. 2 | class KF2GUIInput extends KFPlayerInput; 3 | 4 | var KF2GUIController ControllerOwner; 5 | var PlayerInput BaseInput; 6 | 7 | function DrawHUD( HUD H ) 8 | { 9 | //ControllerOwner.RenderMenu(H.Canvas); 10 | } 11 | function PostRender( Canvas Canvas ) 12 | { 13 | if( ControllerOwner.bIsInMenuState ) 14 | ControllerOwner.HandleDrawMenu(); 15 | //ControllerOwner.RenderMenu(Canvas); 16 | } 17 | 18 | // Postprocess the player's input. 19 | function PlayerInput( float DeltaTime ) 20 | { 21 | // Do not move. 22 | ControllerOwner.MenuInput(DeltaTime); 23 | 24 | if( !ControllerOwner.bAbsorbInput ) 25 | { 26 | aMouseX = 0; 27 | aMouseY = 0; 28 | aBaseX = BaseInput.aBaseX; 29 | aBaseY = BaseInput.aBaseY; 30 | aBaseZ = BaseInput.aBaseZ; 31 | aForward = BaseInput.aForward; 32 | aTurn = BaseInput.aTurn; 33 | aStrafe = BaseInput.aStrafe; 34 | aUp = BaseInput.aUp; 35 | aLookUp = BaseInput.aLookUp; 36 | Super.PlayerInput(DeltaTime); 37 | } 38 | else 39 | { 40 | aMouseX = 0; 41 | aMouseY = 0; 42 | aBaseX = 0; 43 | aBaseY = 0; 44 | aBaseZ = 0; 45 | aForward = 0; 46 | aTurn = 0; 47 | aStrafe = 0; 48 | aUp = 0; 49 | aLookUp = 0; 50 | } 51 | } 52 | 53 | function PreClientTravel( string PendingURL, ETravelType TravelType, bool bIsSeamlessTravel) 54 | { 55 | ControllerOwner.BackupInput.PreClientTravel(PendingURL,TravelType,bIsSeamlessTravel); // Let original mod do stuff too! 56 | ControllerOwner.NotifyLevelChange(); // Close menu NOW! 57 | } 58 | 59 | defaultproperties 60 | { 61 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KF2GUINetwork.uc: -------------------------------------------------------------------------------- 1 | Class KF2GUINetwork extends ReplicationInfo 2 | NotPlaceable; 3 | 4 | var PlayerController PlayerOwner; 5 | var transient KF2GUIController GUIController; 6 | 7 | var bool bLocalClient; 8 | 9 | static function OpenMenuForClient( PlayerController PC, class Page ) 10 | { 11 | local KF2GUINetwork G; 12 | 13 | foreach PC.ChildActors(class'KF2GUINetwork',G) 14 | break; 15 | if( G==None ) 16 | G = PC.Spawn(class'KF2GUINetwork',PC); 17 | G.ClientOpenMenu(Page); 18 | } 19 | static function CloseMenuForClient( PlayerController PC, class Page, optional bool bCloseAll ) 20 | { 21 | local KF2GUINetwork G; 22 | 23 | foreach PC.ChildActors(class'KF2GUINetwork',G) 24 | break; 25 | if( G==None ) 26 | G = PC.Spawn(class'KF2GUINetwork',PC); 27 | G.ClientCloseMenu(Page,bCloseAll); 28 | } 29 | 30 | simulated reliable client function ClientOpenMenu( class Page ) 31 | { 32 | if( !bLocalClient ) 33 | return; 34 | if( GUIController==None ) 35 | GUIController = Class'KF2GUIController'.Static.GetGUIController(PlayerOwner); 36 | GUIController.OpenMenu(Page); 37 | } 38 | simulated reliable client function ClientCloseMenu( class Page, bool bCloseAll ) 39 | { 40 | if( !bLocalClient ) 41 | return; 42 | if( GUIController==None ) 43 | GUIController = Class'KF2GUIController'.Static.GetGUIController(PlayerOwner); 44 | GUIController.CloseMenu(Page,bCloseAll); 45 | } 46 | 47 | simulated function PostBeginPlay() 48 | { 49 | PlayerOwner = PlayerController(Owner); 50 | if( WorldInfo.NetMode==NM_Client || (PlayerOwner!=None && LocalPlayer(PlayerOwner.Player)!=None) ) 51 | { 52 | bLocalClient = true; 53 | if( PlayerOwner==None ) 54 | PlayerOwner = GetALocalPlayerController(); 55 | } 56 | } 57 | 58 | defaultproperties 59 | { 60 | bAlwaysRelevant=false 61 | bOnlyRelevantToOwner=true 62 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFDT_ZombieHit.uc: -------------------------------------------------------------------------------- 1 | class KFDT_ZombieHit extends KFDT_Bludgeon 2 | abstract; 3 | 4 | defaultproperties 5 | { 6 | KDamageImpulse=3500 7 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUIConsoleHack.uc: -------------------------------------------------------------------------------- 1 | // Ugly hack to draw ontop of flash UI! 2 | Class KFGUIConsoleHack extends Console; 3 | 4 | var KF2GUIController OutputObject; 5 | 6 | function PostRender_Console(Canvas Canvas) 7 | { 8 | OutputObject.RenderMenu(Canvas); 9 | } 10 | -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_Button.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_Button extends KFGUI_Clickable; 2 | 3 | var() Canvas.CanvasIcon OverlayTexture; 4 | var() string ButtonText; 5 | var() color TextColor; 6 | var() Canvas.FontRenderInfo TextFontInfo; 7 | var() byte FontScale,ExtravDir; 8 | var bool bIsHighlighted; 9 | 10 | function DrawMenu() 11 | { 12 | Owner.CurrentStyle.RenderButton(Self); 13 | } 14 | 15 | function HandleMouseClick( bool bRight ) 16 | { 17 | PlayMenuSound(MN_ClickButton); 18 | if( bRight ) 19 | OnClickRight(Self); 20 | else OnClickLeft(Self); 21 | } 22 | 23 | Delegate OnClickLeft( KFGUI_Button Sender ); 24 | Delegate OnClickRight( KFGUI_Button Sender ); 25 | 26 | defaultproperties 27 | { 28 | ButtonText="Button!" 29 | TextColor=(R=255,G=255,B=255,A=255) 30 | TextFontInfo=(bClipText=true,bEnableShadow=true) 31 | FontScale=1 32 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_Button_CD.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_Button_CD extends KFGUI_Button; 2 | 3 | function DrawMenu() 4 | { 5 | local float XL,YL,TS; 6 | local byte i, FrameOpacity; 7 | 8 | FrameOpacity = 200; 9 | if( bDisabled ) 10 | Canvas.SetDrawColor(10, 10, 10, FrameOpacity); 11 | else if( bPressedDown ) 12 | Canvas.SetDrawColor(20, 20, 20, FrameOpacity); 13 | else if( bFocused ) 14 | Canvas.SetDrawColor(75, 75, 75, FrameOpacity); 15 | else Canvas.SetDrawColor(45, 45, 45, FrameOpacity); 16 | 17 | if( bIsHighlighted ) 18 | { 19 | Canvas.DrawColor.R = Min(Canvas.DrawColor.R + 25, FrameOpacity); 20 | Canvas.DrawColor.G = Min(Canvas.DrawColor.G + 25, FrameOpacity); 21 | Canvas.DrawColor.B = Min(Canvas.DrawColor.B + 25, FrameOpacity); 22 | } 23 | 24 | Canvas.SetPos(0.f,0.f); 25 | if( ExtravDir==255 ) 26 | Owner.CurrentStyle.DrawWhiteBox(CompPos[2],CompPos[3]); 27 | else Owner.CurrentStyle.DrawRectBox(0,0,CompPos[2],CompPos[3],Min(CompPos[2],CompPos[3])*0.2,ExtravDir); 28 | 29 | if( OverlayTexture.Texture!=None ) 30 | { 31 | Canvas.SetPos(0.f,0.f); 32 | Canvas.DrawTile(OverlayTexture.Texture,CompPos[2],CompPos[3],OverlayTexture.U,OverlayTexture.V,OverlayTexture.UL,OverlayTexture.VL); 33 | } 34 | if( ButtonText!="" ) 35 | { 36 | // Chose the best font to fit this button. 37 | i = Min(FontScale+Owner.CurrentStyle.DefaultFontSize,Owner.CurrentStyle.MaxFontScale); 38 | while( true ) 39 | { 40 | Canvas.Font = Owner.CurrentStyle.PickFont(i,TS); 41 | Canvas.TextSize(ButtonText,XL,YL,TS,TS); 42 | if( i==0 || (XL<(CompPos[2]*0.95) && YL<(CompPos[3]*0.95)) ) 43 | break; 44 | --i; 45 | } 46 | Canvas.SetPos((CompPos[2]-XL)*0.5,(CompPos[3]-YL)*0.5); 47 | if( bDisabled ) 48 | Canvas.DrawColor = TextColor*0.5f; 49 | else Canvas.DrawColor = TextColor; 50 | Canvas.DrawText(ButtonText,,TS,TS,TextFontInfo); 51 | } 52 | } 53 | 54 | defaultproperties 55 | { 56 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_CheckBox.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_CheckBox extends KFGUI_EditControl; 2 | 3 | var() Texture CheckMark,CheckDisabled,CheckIdle,CheckFocus,CheckClicked; 4 | var() bool bForceUniform,bChecked; 5 | 6 | function UpdateSizes() 7 | { 8 | Super.UpdateSizes(); 9 | if( bForceUniform ) 10 | XSize = (YSize*InputPos[3]) / InputPos[2]; 11 | } 12 | 13 | function DrawMenu() 14 | { 15 | Owner.CurrentStyle.RenderCheckbox(Self); 16 | } 17 | 18 | function HandleMouseClick( bool bRight ) 19 | { 20 | bChecked = !bChecked; 21 | if( bChecked ) 22 | PlayMenuSound(MN_ClickCheckboxOn); 23 | else PlayMenuSound(MN_ClickCheckboxOff); 24 | OnCheckChange(Self); 25 | } 26 | 27 | Delegate OnCheckChange( KFGUI_CheckBox Sender ); 28 | 29 | defaultproperties 30 | { 31 | bForceUniform=true 32 | LableWidth=0.85 33 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_Clickable.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_Clickable extends KFGUI_Base 2 | abstract; 3 | 4 | var() int IntIndex; // More user variables. 5 | var() string ToolTip; 6 | 7 | var KFGUI_Tooltip ToolTipItem; 8 | 9 | var byte PressedDown[2]; 10 | var bool bPressedDown; 11 | 12 | function InitMenu() 13 | { 14 | Super.InitMenu(); 15 | bClickable = !bDisabled; 16 | } 17 | function MouseClick( bool bRight ) 18 | { 19 | if( !bDisabled ) 20 | { 21 | PressedDown[byte(bRight)] = 1; 22 | bPressedDown = true; 23 | } 24 | } 25 | function MouseRelease( bool bRight ) 26 | { 27 | if( !bDisabled && PressedDown[byte(bRight)]==1 ) 28 | { 29 | PressedDown[byte(bRight)] = 0; 30 | bPressedDown = (PressedDown[0]!=0 || PressedDown[1]!=0); 31 | HandleMouseClick(bRight); 32 | } 33 | } 34 | function MouseLeave() 35 | { 36 | Super.MouseLeave(); 37 | if( !bDisabled ) 38 | PlayMenuSound(MN_LostFocus); 39 | PressedDown[0] = 0; 40 | PressedDown[1] = 0; 41 | bPressedDown = false; 42 | } 43 | function MouseEnter() 44 | { 45 | Super.MouseEnter(); 46 | if( !bDisabled ) 47 | PlayMenuSound(MN_Focus); 48 | } 49 | 50 | function SetDisabled( bool bDisable ) 51 | { 52 | Super.SetDisabled(bDisable); 53 | bClickable = !bDisable; 54 | PressedDown[0] = 0; 55 | PressedDown[1] = 0; 56 | bPressedDown = false; 57 | } 58 | 59 | function NotifyMousePaused() 60 | { 61 | if( Owner.InputFocus==None && ToolTip!="" ) 62 | { 63 | if( ToolTipItem==None ) 64 | { 65 | ToolTipItem = New(None)Class'KFGUI_Tooltip'; 66 | ToolTipItem.Owner = Owner; 67 | ToolTipItem.ParentComponent = Self; 68 | ToolTipItem.InitMenu(); 69 | ToolTipItem.SetText(ToolTip); 70 | } 71 | ToolTipItem.ShowMenu(); 72 | ToolTipItem.CompPos[0] = Owner.MousePosition.X; 73 | ToolTipItem.CompPos[1] = Owner.MousePosition.Y; 74 | ToolTipItem.GetInputFocus(); 75 | } 76 | } 77 | final function ChangeToolTip( string S ) 78 | { 79 | if( ToolTipItem!=None ) 80 | ToolTipItem.SetText(S); 81 | else ToolTip = S; 82 | } 83 | 84 | function HandleMouseClick( bool bRight ); 85 | 86 | defaultproperties 87 | { 88 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_ComboBox.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_ComboBox extends KFGUI_EditControl; 2 | 3 | var KFGUI_ComboSelector Selection; 4 | 5 | var float BorderSize; 6 | var() array Values; 7 | var() int SelectedIndex; 8 | var() color SelectedTextColor,TextColor; 9 | var() bool bButtonStretched; 10 | 11 | function UpdateSizes() 12 | { 13 | // Update height. 14 | if( bScaleByFontSize ) 15 | YSize = (TextHeight + (BorderSize*2)) / InputPos[3]; 16 | } 17 | 18 | function DrawMenu() 19 | { 20 | Owner.CurrentStyle.RenderComboBox(Self); 21 | } 22 | 23 | function HandleMouseClick( bool bRight ) 24 | { 25 | PlayMenuSound(MN_Dropdown); 26 | if( Selection==None ) 27 | { 28 | Selection = New(None)Class'KFGUI_ComboSelector'; 29 | Selection.Owner = Owner; 30 | Selection.Combo = Self; 31 | Selection.InitMenu(); 32 | } 33 | Selection.XPosition = CompPos[0] / Owner.ScreenSize.X; 34 | Selection.YPosition = (CompPos[1]+CompPos[3]) / Owner.ScreenSize.Y; 35 | Selection.XSize = CompPos[2] / Owner.ScreenSize.X; 36 | Selection.YSize = (TextHeight / Owner.ScreenSize.Y) * Values.Length + ((BorderSize*2) / Owner.ScreenSize.Y); 37 | if( (Selection.YPosition+Selection.YSize)>1.f ) 38 | Selection.YPosition-=((Selection.YPosition+Selection.YSize)-1.f); 39 | Selection.GetInputFocus(); 40 | } 41 | final function string GetCurrent() 42 | { 43 | if( SelectedIndex=0 ) 16 | { 17 | Combo.SelectedIndex = CurrentRow; 18 | Combo.OnComboChanged(Combo); 19 | } 20 | } 21 | 22 | defaultproperties 23 | { 24 | CurrentRow=-1 25 | OldRow=-1 26 | bFocusedPostDrawItem=true 27 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_EditControl.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_EditControl extends KFGUI_Clickable; 2 | 3 | var export editinline KFGUI_TextLable TextLable; 4 | var transient float TextHeight,TextScale; 5 | var transient Font TextFont; 6 | var Canvas.FontRenderInfo TextFontInfo; 7 | 8 | var(Lable) float LableWidth; 9 | var(Lable) string LableString; 10 | var(Lable) color LableColor; // Label text color. 11 | var(Lable) byte FontScale; 12 | var(Lable) bool bScaleByFontSize; // Scale this component height by font height. 13 | 14 | function InitMenu() 15 | { 16 | if( LableString=="" ) 17 | TextLable = None; 18 | else 19 | { 20 | TextLable.SetText(LableString); 21 | TextLable.FontScale = FontScale; 22 | TextLable.XPosition = XPosition; 23 | TextLable.YPosition = YPosition; 24 | TextLable.XSize = (XSize*LableWidth*0.975); 25 | TextLable.YSize = YSize; 26 | TextLable.Owner = Owner; 27 | TextLable.TextColor = LableColor; 28 | TextLable.ParentComponent = Self; 29 | TextLable.InitMenu(); 30 | XPosition+=(XSize*LableWidth); 31 | XSize*=(1.f-LableWidth); 32 | } 33 | Super.InitMenu(); 34 | bClickable = !bDisabled; 35 | } 36 | 37 | function UpdateSizes() 38 | { 39 | // Update height. 40 | if( bScaleByFontSize ) 41 | YSize = ((TextHeight*1.05) + 6) / InputPos[3]; 42 | } 43 | 44 | function PreDraw() 45 | { 46 | local float XS; 47 | local byte i; 48 | 49 | Canvas.Font = Owner.CurrentStyle.PickFont(Min(FontScale+Owner.CurrentStyle.DefaultFontSize,Owner.CurrentStyle.MaxFontScale),TextScale); 50 | TextFont = Canvas.Font; 51 | Canvas.TextSize("ABC",XS,TextHeight,TextScale,TextScale); 52 | 53 | UpdateSizes(); 54 | 55 | Super.PreDraw(); 56 | if( TextLable!=None ) 57 | { 58 | TextLable.YSize = YSize; 59 | TextLable.Canvas = Canvas; 60 | for( i=0; i<4; ++i ) 61 | TextLable.InputPos[i] = InputPos[i]; 62 | TextLable.PreDraw(); 63 | } 64 | } 65 | 66 | final function DrawClippedText( string S, float TScale, float MaxX ) 67 | { 68 | local int i,l; 69 | local float X,XL,YL; 70 | 71 | l = Len(S); 72 | for( i=0; iMaxX ) 76 | { 77 | --i; 78 | break; 79 | } 80 | X+=XL; 81 | } 82 | Canvas.DrawText(Left(S,i),,TScale,TScale,TextFontInfo); 83 | } 84 | 85 | defaultproperties 86 | { 87 | LableColor=(R=255,G=255,B=255,A=255) 88 | FontScale=0 89 | LableWidth=0.5 90 | bScaleByFontSize=true 91 | TextFontInfo=(bClipText=true,bEnableShadow=true) 92 | 93 | Begin Object Class=KFGUI_TextLable Name=MyBoxLableText 94 | AlignX=0 95 | AlignY=1 96 | TextFontInfo=(bClipText=true,bEnableShadow=true) 97 | End Object 98 | TextLable=MyBoxLableText 99 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_FloatingWindow.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_FloatingWindow extends KFGUI_Page 2 | abstract; 3 | 4 | var() string WindowTitle; // Title of this window. 5 | var float DragOffset[2]; 6 | var KFGUI_FloatingWindowHeader HeaderComp; 7 | var bool bDragWindow; 8 | 9 | function InitMenu() 10 | { 11 | Super.InitMenu(); 12 | HeaderComp = new (Self) class'KFGUI_FloatingWindowHeader'; 13 | AddComponent(HeaderComp); 14 | } 15 | function DrawMenu() 16 | { 17 | Owner.CurrentStyle.RenderFramedWindow(Self); 18 | 19 | if( HeaderComp!=None ) 20 | { 21 | HeaderComp.CompPos[3] = Owner.CurrentStyle.DefaultHeight; 22 | HeaderComp.YSize = HeaderComp.CompPos[3] / CompPos[3]; // Keep header height fit the window height. 23 | } 24 | } 25 | function SetWindowDrag( bool bDrag ) 26 | { 27 | bDragWindow = bDrag; 28 | if( bDrag ) 29 | { 30 | DragOffset[0] = Owner.MousePosition.X-CompPos[0]; 31 | DragOffset[1] = Owner.MousePosition.Y-CompPos[1]; 32 | } 33 | } 34 | function bool CaptureMouse() 35 | { 36 | if( bDragWindow && HeaderComp!=None ) // Always keep focus on window frame now! 37 | { 38 | MouseArea = HeaderComp; 39 | return true; 40 | } 41 | return Super.CaptureMouse(); 42 | } 43 | function PreDraw() 44 | { 45 | if( bDragWindow ) 46 | { 47 | XPosition = FClamp(Owner.MousePosition.X-DragOffset[0],0,InputPos[2]-CompPos[2]) / InputPos[2]; 48 | YPosition = FClamp(Owner.MousePosition.Y-DragOffset[1],0,InputPos[3]-CompPos[3]) / InputPos[3]; 49 | } 50 | Super.PreDraw(); 51 | } 52 | 53 | defaultproperties 54 | { 55 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_FloatingWindowHeader.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_FloatingWindowHeader extends KFGUI_Base; 2 | 3 | var bool bDragWindow; 4 | 5 | function PreDraw() 6 | { 7 | ComputeCoords(); 8 | } 9 | function MouseClick( bool bRight ) 10 | { 11 | if( !bRight ) 12 | KFGUI_FloatingWindow(ParentComponent).SetWindowDrag(true); 13 | } 14 | function MouseRelease( bool bRight ) 15 | { 16 | if( !bRight ) 17 | KFGUI_FloatingWindow(ParentComponent).SetWindowDrag(false); 18 | } 19 | 20 | defaultproperties 21 | { 22 | bClickable=true 23 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_ListItem.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_ListItem extends Object 2 | transient; 3 | 4 | var KFGUI_ListItem Next; 5 | var array Columns,SortColumns; 6 | var int Index,Value; 7 | 8 | var transient string Temp; // Cache sorting key. 9 | 10 | function SetValue( string S, int i, string SortStr ) 11 | { 12 | ParseStringIntoArray(S,Columns,"\n",false); 13 | if( SortStr=="" ) 14 | SortColumns.Length = 0; 15 | else ParseStringIntoArray(Caps(SortStr),SortColumns,"\n",false); 16 | Value = i; 17 | } 18 | 19 | // Return string to draw on HUD. 20 | function string GetDisplayStr( int Column ) 21 | { 22 | if( Column0 ) 31 | { 32 | if( Column Components; 4 | 5 | function InitMenu() 6 | { 7 | local int i; 8 | 9 | for( i=0; i Res ) 93 | { 94 | local int i; 95 | 96 | if( ID==InID ) 97 | Res[Res.Length] = Self; 98 | for( i=0; i=48 && ControllerId<=57) || ControllerId==46 ) 36 | Super.NotifyInputChar(ControllerId,Unicode); 37 | return true; 38 | } 39 | 40 | function LostKeyFocus() 41 | { 42 | ValidateValue(); 43 | Super.LostKeyFocus(); 44 | } 45 | 46 | defaultproperties 47 | { 48 | MaxValue=9999999 49 | MaxTextLength=7 50 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_Page.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_Page extends KFGUI_MultiComponent 2 | abstract; 3 | 4 | var() byte FrameOpacity; // Transperancy of the frame. 5 | var() bool bPersistant, // Reuse the same menu object throughout the level. 6 | bUnique, // If calling OpenMenu multiple times with same menu class, only open one instance of it. 7 | bAlwaysTop, // This menu should stay always on top. 8 | bOnlyThisFocus; // Only this menu should stay focused. 9 | 10 | var bool bWindowFocused; // This page is currently focused. 11 | 12 | function DrawMenu() 13 | { 14 | Owner.CurrentStyle.RenderWindow(Self); 15 | } 16 | 17 | defaultproperties 18 | { 19 | bUnique=true 20 | bPersistant=true 21 | FrameOpacity=220 22 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_RightClickMenu.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_RightClickMenu extends KFGUI_Clickable; 2 | 3 | struct FRowItem 4 | { 5 | var string Text; 6 | var int Value; 7 | var bool bSplitter,bDisabled; 8 | }; 9 | var array ItemRows; 10 | var int CurrentRow,OldRow; 11 | var int EdgeSize; 12 | 13 | function OpenMenu( KFGUI_Base Menu ) 14 | { 15 | Owner = Menu.Owner; 16 | InitMenu(); 17 | PlayMenuSound(MN_Dropdown); 18 | 19 | // Calc needed size for this menu. 20 | ComputeSize(); 21 | XPosition = float(Owner.MousePosition.X+4) / Owner.ScreenSize.X; 22 | YPosition = float(Owner.MousePosition.Y+4) / Owner.ScreenSize.Y; 23 | if( (XPosition+XSize)>1.f ) 24 | YPosition = (float(Owner.MousePosition.X) / Owner.ScreenSize.X) - XSize; // Move to left side of mouse pointer. 25 | if( (YPosition+YSize)>1.f ) 26 | YPosition-=((YPosition+YSize)-1.f); // Move up until fit on screen. 27 | GetInputFocus(); 28 | } 29 | final function ComputeSize() 30 | { 31 | local float XS,YS,Scalar; 32 | local int i,XL,YL; 33 | local Font F; 34 | local string S; 35 | 36 | if( ItemRows.Length==0 ) 37 | { 38 | YS = 0; 39 | XS = 50; 40 | } 41 | else 42 | { 43 | YS = Owner.CurrentStyle.DefaultHeight * ItemRows.Length; 44 | XS = 20; 45 | F = Owner.CurrentStyle.PickFont(Owner.CurrentStyle.DefaultFontSize,Scalar); 46 | for( i=0; i=0 && (ItemRows[CurrentRow].bSplitter || ItemRows[CurrentRow].bDisabled) ) 79 | return; 80 | PlayMenuSound(MN_ClickButton); 81 | DropInputFocus(); 82 | if( CurrentRow>=0 ) 83 | OnSelectedItem(CurrentRow); 84 | } 85 | function LostInputFocus() 86 | { 87 | OnBecameHidden(Self); 88 | } 89 | 90 | Delegate OnSelectedItem( int Index ); 91 | Delegate OnBecameHidden( KFGUI_RightClickMenu M ); 92 | 93 | defaultproperties 94 | { 95 | CurrentRow=-1 96 | OldRow=-1 97 | bFocusedPostDrawItem=true 98 | EdgeSize=4 99 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_RightClickMenu_CD.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_RightClickMenu_CD extends KFGUI_RightClickMenu; 2 | 3 | function DrawMenu() 4 | { 5 | local float X,Y,YP,Edge,TextScale; 6 | local int i; 7 | local bool bCheckMouse; 8 | 9 | // Draw background. 10 | Edge = EdgeSize; 11 | Canvas.SetPos(0.f,0.f); 12 | Canvas.SetDrawColor(45, 45, 45, 200); 13 | Owner.CurrentStyle.DrawWhiteBox(CompPos[2],CompPos[3]); 14 | Canvas.SetPos(Edge,Edge); 15 | Canvas.SetDrawColor(10, 10, 10, 160); 16 | Owner.CurrentStyle.DrawWhiteBox(CompPos[2]-(Edge*2.f),CompPos[3]-(Edge*2.f)); 17 | 18 | // While rendering, figure out mouse focus row. 19 | X = Owner.MousePosition.X - Canvas.OrgX; 20 | Y = Owner.MousePosition.Y - Canvas.OrgY; 21 | 22 | bCheckMouse = (X>0.f && X0.f && Y=YP && Y<=(YP+Owner.CurrentStyle.DefaultHeight) ) 33 | { 34 | bCheckMouse = false; 35 | CurrentRow = i; 36 | Canvas.SetPos(4.f,YP); 37 | Canvas.SetDrawColor(110,110,110,255); 38 | Owner.CurrentStyle.DrawWhiteBox(CompPos[2]-(Edge*2.f),Owner.CurrentStyle.DefaultHeight); 39 | } 40 | 41 | Canvas.SetPos(Edge,YP); 42 | if( ItemRows[i].bSplitter ) 43 | { 44 | Canvas.SetDrawColor(255,255,255,255); 45 | Canvas.DrawText("-------",,TextScale,TextScale); 46 | } 47 | else 48 | { 49 | if( ItemRows[i].bDisabled ) 50 | Canvas.SetDrawColor(148,148,148,255); 51 | else Canvas.SetDrawColor(248,248,248,255); 52 | Canvas.DrawText(ItemRows[i].Text,,TextScale,TextScale); 53 | } 54 | 55 | YP+=Owner.CurrentStyle.DefaultHeight; 56 | } 57 | Canvas.PopMaskRegion(); 58 | if( OldRow!=CurrentRow ) 59 | { 60 | OldRow = CurrentRow; 61 | PlayMenuSound(MN_DropdownChange); 62 | } 63 | } 64 | 65 | defaultproperties 66 | { 67 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_ScrollBarH.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_ScrollBarH extends KFGUI_ScrollBarBase; 2 | 3 | defaultproperties 4 | { 5 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_ScrollBarV.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_ScrollBarV extends KFGUI_ScrollBarBase; 2 | 3 | defaultproperties 4 | { 5 | bVertical=true 6 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_ScrollBarV_CD.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_ScrollBarV_CD extends KFGUI_ScrollBarV; 2 | 3 | function DrawMenu() 4 | { 5 | local float A; 6 | local byte i; 7 | 8 | if( bDisabled ) 9 | Canvas.SetDrawColor(5, 5, 5, 0); 10 | else if( bFocused || bGrabbedScroller ) 11 | Canvas.SetDrawColor(30, 30, 30, 160); 12 | else Canvas.SetDrawColor(30, 30, 30, 160); 13 | 14 | Owner.CurrentStyle.DrawRectBox (0.f, 0.f, CompPos[2], CompPos[3], 4); 15 | 16 | if( bDisabled ) 17 | return; 18 | 19 | if( bVertical ) 20 | i = 3; 21 | else i = 2; 22 | 23 | SliderScale = FMax(PageStep * (CompPos[i] - 32.f) / (MaxRange + PageStep),CalcButtonScale); 24 | 25 | if( bGrabbedScroller ) 26 | { 27 | // Track mouse. 28 | if( bVertical ) 29 | A = Owner.MousePosition.Y - CompPos[1] - GrabbedOffset; 30 | else A = Owner.MousePosition.X - CompPos[0] - GrabbedOffset; 31 | 32 | A /= ((CompPos[i]-SliderScale) / float(MaxRange)); 33 | SetValue(A); 34 | } 35 | 36 | A = float(CurrentScroll) / float(MaxRange); 37 | ButtonOffset = A*(CompPos[i]-SliderScale); 38 | 39 | if( bGrabbedScroller ) 40 | Canvas.SetDrawColor(90,90,90,255); 41 | else if( bFocused ) 42 | Canvas.SetDrawColor(65,65,65,255); 43 | else Canvas.SetDrawColor(40,40,40,255); 44 | 45 | if( bVertical ) 46 | Owner.CurrentStyle.DrawRectBox (0.f, ButtonOffset, CompPos[2], SliderScale, 4); 47 | else Owner.CurrentStyle.DrawRectBox (ButtonOffset, 0.f, SliderScale, CompPos[3], 4); 48 | } 49 | 50 | defaultproperties 51 | { 52 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_SwitchComponent.uc: -------------------------------------------------------------------------------- 1 | // A component to have multiple "pages" of different components. 2 | Class KFGUI_SwitchComponent extends KFGUI_MultiComponent; 3 | 4 | var protected int CurrentComponent; 5 | 6 | function PreDraw() 7 | { 8 | local byte j; 9 | 10 | ComputeCoords(); 11 | if( CurrentComponent<0 || CurrentComponent>=Components.Length ) 12 | return; 13 | Components[CurrentComponent].Canvas = Canvas; 14 | for( j=0; j<4; ++j ) 15 | Components[CurrentComponent].InputPos[j] = CompPos[j]; 16 | Components[CurrentComponent].PreDraw(); 17 | } 18 | 19 | function bool CaptureMouse() 20 | { 21 | if( (CurrentComponent>=0 || CurrentComponent=0 && Num Lines; 4 | var() Canvas.FontRenderInfo TextFontInfo; 5 | var byte CurrentAlpha; 6 | 7 | function InputMouseMoved() 8 | { 9 | DropInputFocus(); 10 | } 11 | function MouseClick( bool bRight ) 12 | { 13 | DropInputFocus(); 14 | } 15 | function MouseRelease( bool bRight ) 16 | { 17 | DropInputFocus(); 18 | } 19 | function ShowMenu() 20 | { 21 | CurrentAlpha = 1; 22 | } 23 | 24 | final function SetText( string S ) 25 | { 26 | ParseStringIntoArray(S,Lines,"|",false); 27 | } 28 | 29 | function PreDraw() 30 | { 31 | Owner.CurrentStyle.RenderToolTip(Self); 32 | } 33 | 34 | defaultproperties 35 | { 36 | TextFontInfo=(bClipText=true,bEnableShadow=true) 37 | bCanFocus=false 38 | bFocusedPostDrawItem=true 39 | } -------------------------------------------------------------------------------- /ServerExt/Classes/KFGUI_Tooltip_CD.uc: -------------------------------------------------------------------------------- 1 | Class KFGUI_Tooltip_CD extends KFGUI_Tooltip; 2 | 3 | function PreDraw() 4 | { 5 | local int i; 6 | local float X,Y,XS,YS,TX,TY,TS; 7 | 8 | if( Owner.CurrentStyle == None ) 9 | return; 10 | 11 | Canvas.Font = Owner.CurrentStyle.PickFont(Owner.CurrentStyle.DefaultFontSize,TS); 12 | 13 | // First compute textbox size. 14 | TY = Owner.CurrentStyle.DefaultHeight*Lines.Length; 15 | for( i=0; iOwner.ScreenSize.X ) 32 | X = Owner.ScreenSize.X-TX; 33 | if( (Y+TY)>Owner.ScreenSize.Y ) 34 | Y = CompPos[1]-TY; 35 | 36 | if( CurrentAlpha<255 ) 37 | CurrentAlpha = Min(CurrentAlpha+25,255); 38 | 39 | // Reset clipping. 40 | Canvas.SetOrigin(0,0); 41 | Canvas.SetClip(Owner.ScreenSize.X,Owner.ScreenSize.Y); 42 | 43 | // Draw frame. 44 | //Canvas.SetDrawColor(200,200,80,CurrentAlpha); 45 | Canvas.SetDrawColor(45, 45, 45, 160); 46 | Canvas.SetPos(X-2,Y-2); 47 | Owner.CurrentStyle.DrawWhiteBox(TX+4,TY+4); 48 | //Canvas.SetDrawColor(80,10,80,CurrentAlpha); 49 | Canvas.SetDrawColor(10, 10, 10, 160); 50 | Canvas.SetPos(X,Y); 51 | Owner.CurrentStyle.DrawWhiteBox(TX,TY); 52 | 53 | // Draw text. 54 | Canvas.SetDrawColor(255,255,255,CurrentAlpha); 55 | X+=KF2Style(Owner.CurrentStyle).TOOLTIP_BORDER; 56 | Y+=KF2Style(Owner.CurrentStyle).TOOLTIP_BORDER; 57 | for( i=0; i ProgressLines; 5 | var MX_MiniGameBase ActiveGame; 6 | 7 | function PostBeginPlay() 8 | { 9 | Super.PostBeginPlay(); 10 | ActiveGame = new (PlayerController(Owner)) class'MX_PongGame'; 11 | ActiveGame.Init(); 12 | ActiveGame.SetFXTrack(class'MS_PC'.Default.TravelData.PendingFX); 13 | } 14 | event PostRender() 15 | { 16 | ActiveGame.Canvas = Canvas; 17 | ActiveGame.Render(Canvas.ClipX*0.1,Canvas.ClipY*0.2,Canvas.ClipX*0.8,Canvas.ClipY*0.7); 18 | ActiveGame.Canvas = None; 19 | if( bShowProgress ) 20 | RenderProgress(); 21 | } 22 | 23 | function Tick( float Delta ) 24 | { 25 | ActiveGame.Tick(Delta); 26 | } 27 | 28 | final function ShowProgressMsg( string S, optional bool bDis ) 29 | { 30 | if( S=="" ) 31 | { 32 | bShowProgress = false; 33 | return; 34 | } 35 | bShowProgress = true; 36 | ParseStringIntoArray(S,ProgressLines,"|",false); 37 | bProgressDC = bDis; 38 | if( !bDis ) 39 | ProgressLines.AddItem("Press [Esc] to cancel connection"); 40 | } 41 | 42 | final function RenderProgress() 43 | { 44 | local float Y,XL,YL,Sc; 45 | local int i; 46 | 47 | Canvas.Font = Canvas.GetDefaultCanvasFont(); 48 | Sc = FMin(Canvas.ClipY/1000.f,3.f); 49 | if( bProgressDC ) 50 | Canvas.SetDrawColor(255,80,80,255); 51 | else Canvas.SetDrawColor(255,255,255,255); 52 | Y = Canvas.ClipY*0.05; 53 | 54 | for( i=0; i=StatBuyers.Length ) 33 | { 34 | StatBuyers[StatBuyers.Length] = UIR_PerkStat(StatsList.AddListComponent(class'UIR_PerkStat')); 35 | StatBuyers[i].StatIndex = i; 36 | StatBuyers[i].InitMenu(); 37 | } 38 | else 39 | { 40 | StatsList.ItemComponents.Length = i+1; 41 | StatsList.ItemComponents[i] = StatBuyers[i]; 42 | } 43 | } 44 | } 45 | else if( StatsList.ItemComponents.Length>PendingPerk.PerkStats.Length ) 46 | { 47 | for( i=PendingPerk.PerkStats.Length; i"); 67 | } 68 | } 69 | else if( PendingPerk!=None && OldPerkPoints!=PendingPerk.CurrentSP ) 70 | { 71 | OldPerkPoints = PendingPerk.CurrentSP; 72 | PerkLabel.SetText("Lv"$PendingPerk.GetLevelString()@PendingPerk.PerkName$" (Points: "$PendingPerk.CurrentSP$")"); 73 | for( i=0; i MyTrait; 7 | var int TraitIndex; 8 | var Ext_PerkBase MyPerk; 9 | var int OldPoints,OldLevel; 10 | 11 | function InitMenu() 12 | { 13 | TraitInfo = KFGUI_TextField(FindComponentID('Info')); 14 | YesButton = KFGUI_Button(FindComponentID('Yes')); 15 | Super.InitMenu(); 16 | } 17 | function CloseMenu() 18 | { 19 | Super.CloseMenu(); 20 | MyPerk = None; 21 | MyTrait = None; 22 | SetTimer(0,false); 23 | } 24 | 25 | function ShowTraitInfo( int Index, Ext_PerkBase Perk ) 26 | { 27 | MyTrait = Perk.PerkTraits[Index].TraitType; 28 | WindowTitle = MyTrait.Default.TraitName; 29 | TraitInfo.SetText(MyTrait.Static.GetPerkDescription()); 30 | 31 | OldPoints = -1; 32 | OldLevel = -1; 33 | TraitIndex = Index; 34 | MyPerk = Perk; 35 | Timer(); 36 | SetTimer(0.2,true); 37 | } 38 | function Timer() 39 | { 40 | local int Cost; 41 | 42 | if( OldPoints!=MyPerk.CurrentSP || OldLevel!=MyPerk.PerkTraits[TraitIndex].CurrentLevel ) 43 | { 44 | OldPoints = MyPerk.CurrentSP; 45 | OldLevel = MyPerk.PerkTraits[TraitIndex].CurrentLevel; 46 | if( OldLevel>=MyTrait.Default.NumLevels ) 47 | { 48 | YesButton.ButtonText = "Max level"; 49 | YesButton.SetDisabled(true); 50 | return; 51 | } 52 | Cost = MyTrait.Static.GetTraitCost(OldLevel); 53 | YesButton.ButtonText = "Buy ("$Cost$")"; 54 | if( Cost>OldPoints || !MyTrait.Static.MeetsRequirements(OldLevel,MyPerk) ) 55 | YesButton.SetDisabled(true); 56 | else YesButton.SetDisabled(false); 57 | } 58 | } 59 | function ButtonClicked( KFGUI_Button Sender ) 60 | { 61 | switch( Sender.ID ) 62 | { 63 | case 'Yes': 64 | ExtPlayerController(GetPlayer()).BoughtTrait(MyPerk.Class,MyTrait); 65 | break; 66 | case 'No': 67 | DoClose(); 68 | break; 69 | } 70 | } 71 | 72 | defaultproperties 73 | { 74 | XPosition=0.3 75 | YPosition=0.15 76 | XSize=0.4 77 | YSize=0.7 78 | bAlwaysTop=true 79 | bOnlyThisFocus=true 80 | 81 | Begin Object Class=KFGUI_TextField Name=TraitInfoLbl 82 | ID="Info" 83 | XPosition=0.05 84 | YPosition=0.1 85 | XSize=0.9 86 | YSize=0.8 87 | End Object 88 | Begin Object Class=KFGUI_Button Name=BuyButten 89 | ID="Yes" 90 | Tooltip="Purchase this trait (you can not undo this action!)" 91 | XPosition=0.3 92 | YPosition=0.91 93 | XSize=0.19 94 | YSize=0.07 95 | ExtravDir=1 96 | OnClickLeft=ButtonClicked 97 | OnClickRight=ButtonClicked 98 | End Object 99 | Begin Object Class=KFGUI_Button Name=CancelButten 100 | ID="No" 101 | ButtonText="Cancel" 102 | Tooltip="Abort without doing anything" 103 | XPosition=0.5 104 | YPosition=0.91 105 | XSize=0.19 106 | YSize=0.07 107 | OnClickLeft=ButtonClicked 108 | OnClickRight=ButtonClicked 109 | End Object 110 | 111 | Components.Add(TraitInfoLbl) 112 | Components.Add(BuyButten) 113 | Components.Add(CancelButten) 114 | } -------------------------------------------------------------------------------- /ServerExt/Classes/UI_AdminMOTD.uc: -------------------------------------------------------------------------------- 1 | Class UI_AdminMOTD extends KFGUI_FloatingWindow; 2 | 3 | var KFGUI_TextField NewsField; 4 | var KFGUI_EditBox EditField; 5 | 6 | function InitMenu() 7 | { 8 | Super.InitMenu(); 9 | 10 | // Client settings 11 | NewsField = KFGUI_TextField(FindComponentID('News')); 12 | EditField = KFGUI_EditBox(FindComponentID('Edit')); 13 | Timer(); 14 | } 15 | function Timer() 16 | { 17 | if( !ExtPlayerController(GetPlayer()).bMOTDReceived ) 18 | SetTimer(0.2,false); 19 | else 20 | { 21 | EditField.Value = ExtPlayerController(GetPlayer()).ServerMOTD; 22 | MOTDEdited(EditField); 23 | } 24 | } 25 | function ButtonClicked( KFGUI_Button Sender ) 26 | { 27 | local string S; 28 | 29 | switch( Sender.ID ) 30 | { 31 | case 'Yes': 32 | S = EditField.Value; 33 | while( Len(S)>510 ) 34 | { 35 | ExtPlayerController(GetPlayer()).ServerSetMOTD(Left(S,500),false); 36 | S = Mid(S,500); 37 | } 38 | ExtPlayerController(GetPlayer()).ServerSetMOTD(S,true); 39 | DoClose(); 40 | break; 41 | case 'No': 42 | DoClose(); 43 | break; 44 | } 45 | } 46 | function MOTDEdited( KFGUI_EditBox Sender ) 47 | { 48 | NewsField.SetText("MOTD Preview:|"$Sender.Value); 49 | } 50 | 51 | defaultproperties 52 | { 53 | WindowTitle="Edit MOTD line" 54 | XPosition=0.25 55 | YPosition=0.2 56 | XSize=0.5 57 | YSize=0.6 58 | bAlwaysTop=true 59 | bOnlyThisFocus=true 60 | 61 | Begin Object Class=KFGUI_TextField Name=WarningLabel 62 | ID="News" 63 | XPosition=0.01 64 | YPosition=0.18 65 | XSize=0.98 66 | YSize=0.77 67 | End Object 68 | Begin Object Class=KFGUI_Button Name=YesButten 69 | ID="Yes" 70 | ButtonText="Submit" 71 | Tooltip="Submit changes to server" 72 | XPosition=0.4 73 | YPosition=0.9 74 | XSize=0.09 75 | YSize=0.04 76 | ExtravDir=1 77 | OnClickLeft=ButtonClicked 78 | OnClickRight=ButtonClicked 79 | End Object 80 | Begin Object Class=KFGUI_Button Name=NoButten 81 | ID="No" 82 | ButtonText="Cancel" 83 | Tooltip="Abort without doing anything" 84 | XPosition=0.5 85 | YPosition=0.9 86 | XSize=0.09 87 | YSize=0.04 88 | OnClickLeft=ButtonClicked 89 | OnClickRight=ButtonClicked 90 | End Object 91 | Begin Object Class=KFGUI_EditBox Name=EditBox 92 | ID="Edit" 93 | Tooltip="Enter the text here, use vertical line character for line switches." 94 | XPosition=0.05 95 | YPosition=0.09 96 | XSize=0.9 97 | YSize=0.08 98 | OnTextChange=MOTDEdited 99 | End Object 100 | 101 | Components.Add(WarningLabel) 102 | Components.Add(YesButten) 103 | Components.Add(NoButten) 104 | Components.Add(EditBox) 105 | } -------------------------------------------------------------------------------- /ServerExt/Classes/UI_AdminPerkLevel.uc: -------------------------------------------------------------------------------- 1 | Class UI_AdminPerkLevel extends KFGUI_FloatingWindow; 2 | 3 | var KFGUI_NumericBox LevelBox; 4 | var int PlayerID,BaseValue; 5 | 6 | function InitMenu() 7 | { 8 | Super.InitMenu(); 9 | 10 | LevelBox = KFGUI_NumericBox(FindComponentID('Edit')); 11 | } 12 | final function InitPage( int UserID, byte Mode ) 13 | { 14 | local PlayerReplicationInfo PRI; 15 | 16 | PlayerID = UserID; 17 | 18 | // Find matching player by ID 19 | foreach GetPlayer().WorldInfo.GRI.PRIArray(PRI) 20 | { 21 | if ( PRI.PlayerID==UserID ) 22 | break; 23 | } 24 | if( ExtPlayerReplicationInfo(PRI)==None ) 25 | { 26 | WindowTitle = Mode==1 ? "Set level" : "Set prestige level"; 27 | return; 28 | } 29 | WindowTitle = (Mode==1 ? "Set level of " : "Set prestige level of ")$PRI.GetHumanReadableName(); 30 | LevelBox.ChangeValue(string(Mode==1 ? ExtPlayerReplicationInfo(PRI).ECurrentPerkLevel : ExtPlayerReplicationInfo(PRI).ECurrentPerkPrestige)); 31 | BaseValue = (Mode==1 ? 100 : 100000); 32 | } 33 | function ButtonClicked( KFGUI_Button Sender ) 34 | { 35 | switch( Sender.ID ) 36 | { 37 | case 'Yes': 38 | ExtPlayerController(GetPlayer()).AdminRPGHandle(PlayerID,BaseValue+LevelBox.GetValueInt()); 39 | DoClose(); 40 | break; 41 | case 'No': 42 | DoClose(); 43 | break; 44 | } 45 | } 46 | 47 | defaultproperties 48 | { 49 | XPosition=0.35 50 | YPosition=0.4 51 | XSize=0.4 52 | YSize=0.15 53 | bAlwaysTop=true 54 | bOnlyThisFocus=true 55 | 56 | Begin Object Class=KFGUI_Button Name=YesButten 57 | ID="Yes" 58 | ButtonText="Submit" 59 | Tooltip="Set the perk/prestige level" 60 | XPosition=0.4 61 | YPosition=0.5 62 | XSize=0.09 63 | YSize=0.4 64 | ExtravDir=1 65 | OnClickLeft=ButtonClicked 66 | OnClickRight=ButtonClicked 67 | End Object 68 | Begin Object Class=KFGUI_Button Name=NoButten 69 | ID="No" 70 | ButtonText="Cancel" 71 | Tooltip="Abort without doing anything" 72 | XPosition=0.5 73 | YPosition=0.5 74 | XSize=0.09 75 | YSize=0.4 76 | OnClickLeft=ButtonClicked 77 | OnClickRight=ButtonClicked 78 | End Object 79 | Begin Object Class=KFGUI_NumericBox Name=EditBox 80 | ID="Edit" 81 | Tooltip="Enter the new perk/prestige level to set this player to." 82 | XPosition=0.05 83 | YPosition=0.2 84 | XSize=0.9 85 | YSize=0.3 86 | MaxValue=99999 87 | End Object 88 | 89 | Components.Add(YesButten) 90 | Components.Add(NoButten) 91 | Components.Add(EditBox) 92 | } -------------------------------------------------------------------------------- /ServerExt/Classes/UI_PrestigeNote.uc: -------------------------------------------------------------------------------- 1 | Class UI_PrestigeNote extends UI_ResetWarning; 2 | 3 | function SetupTo( Ext_PerkBase P ) 4 | { 5 | PerkToReset = P.Class; 6 | WindowTitle = "NOTICE: Prestige "$P.PerkName; 7 | InfoLabel.SetText("NOTICE: If you prestige your perk, you can not undo this operation!|All your gained XP and level will be reset to #{FF0000}0#{DEF}.|But this will also increase the amount of points by #{F7FE2E}+"$P.PrestigeSPIncrease$"#{DEF} you earn for every level up in the future.||Are you sure you want to do this?"); 8 | } 9 | 10 | defaultproperties 11 | { 12 | bIsPrestige=true 13 | 14 | Begin Object Name=YesButten 15 | Tooltip="Prestige the perk (you can not undo this action!)" 16 | End Object 17 | } -------------------------------------------------------------------------------- /ServerExt/Classes/UI_ResetWarning.uc: -------------------------------------------------------------------------------- 1 | Class UI_ResetWarning extends KFGUI_FloatingWindow; 2 | 3 | var KFGUI_TextField InfoLabel; 4 | var class PerkToReset; 5 | var bool bIsPrestige; 6 | 7 | function InitMenu() 8 | { 9 | InfoLabel = KFGUI_TextField(FindComponentID('Info')); 10 | Super.InitMenu(); 11 | } 12 | function SetupTo( Ext_PerkBase P ) 13 | { 14 | PerkToReset = P.Class; 15 | WindowTitle = "WARNING: Reset "$P.PerkName; 16 | } 17 | function ButtonClicked( KFGUI_Button Sender ) 18 | { 19 | switch( Sender.ID ) 20 | { 21 | case 'Yes': 22 | ExtPlayerController(GetPlayer()).ServerResetPerk(PerkToReset,bIsPrestige); 23 | PerkToReset = None; 24 | DoClose(); 25 | break; 26 | case 'No': 27 | DoClose(); 28 | break; 29 | } 30 | } 31 | 32 | defaultproperties 33 | { 34 | XPosition=0.35 35 | YPosition=0.2 36 | XSize=0.3 37 | YSize=0.45 38 | bAlwaysTop=true 39 | bOnlyThisFocus=true 40 | 41 | Begin Object Class=KFGUI_TextField Name=WarningLabel 42 | ID="Info" 43 | XPosition=0.01 44 | YPosition=0.12 45 | XSize=0.98 46 | YSize=0.775 47 | Text="#{FF0000}WARNING:#{DEF} If you reset your perk to initial status, you can not undo this operation!|#{FF0000}All your gained XP and level (including prestige level) will be reset to 0.#{DEF}|Do NOT cry to an admin later if this was a mistake!||Are you sure you want to do this?" 48 | End Object 49 | Begin Object Class=KFGUI_Button Name=YesButten 50 | ID="Yes" 51 | ButtonText="YES" 52 | Tooltip="Reset the perk (you can not undo this action!)" 53 | XPosition=0.2 54 | YPosition=0.9 55 | XSize=0.29 56 | YSize=0.07 57 | ExtravDir=1 58 | OnClickLeft=ButtonClicked 59 | OnClickRight=ButtonClicked 60 | End Object 61 | Begin Object Class=KFGUI_Button Name=NoButten 62 | ID="No" 63 | ButtonText="ABORT" 64 | Tooltip="Abort without doing anything" 65 | XPosition=0.5 66 | YPosition=0.9 67 | XSize=0.29 68 | YSize=0.07 69 | OnClickLeft=ButtonClicked 70 | OnClickRight=ButtonClicked 71 | End Object 72 | 73 | Components.Add(WarningLabel) 74 | Components.Add(YesButten) 75 | Components.Add(NoButten) 76 | } -------------------------------------------------------------------------------- /ServerExt/Classes/VS_ZedClotBase.uc: -------------------------------------------------------------------------------- 1 | class VS_ZedClotBase extends VSZombie 2 | abstract; 3 | 4 | simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp) 5 | { 6 | Super.PostInitAnimTree( SkelComp ); 7 | 8 | if( bCanHeadTrack ) 9 | { 10 | IK_Look_Head = SkelControlLookAt(Mesh.FindSkelControl('HeadLook')); 11 | //IK_Look_Spine = SkelControlLookAt(Mesh.FindSkelControl('SpineLook')); 12 | } 13 | } 14 | 15 | simulated function float StartAttackAnim( byte Num ) // Return animation duration. 16 | { 17 | if( FPHandModel!=None ) 18 | FPHandModel.PlayHandsAnim('Atk_Combo1_V1'); 19 | return PlayBodyAnim('Atk_Combo1_V1',EAS_UpperBody); 20 | } 21 | 22 | defaultproperties 23 | { 24 | MonsterArchPath="ZED_ARCH.ZED_Clot_UnDev_Archetype" 25 | CharacterMonsterArch=KFCharacterInfo_Monster'ZED_ARCH.ZED_Clot_UnDev_Archetype' 26 | DoshValue=12 27 | HitsPerAttack=2 28 | KnockedDownBySonicWaveOdds=0.230000 29 | Mass=50.000000 30 | GroundSpeed=190.000000 31 | RotationRate=(Pitch=50000,Yaw=30000,Roll=50000) 32 | } -------------------------------------------------------------------------------- /ServerExt/Classes/xUI_MapRank.uc: -------------------------------------------------------------------------------- 1 | Class xUI_MapRank extends KFGUI_Page; 2 | 3 | var xVotingReplication RepInfo; 4 | 5 | function CloseMenu() 6 | { 7 | Super.CloseMenu(); 8 | RepInfo = None; 9 | } 10 | function ButtonClicked( KFGUI_Button Sender ) 11 | { 12 | switch( Sender.ID ) 13 | { 14 | case 'Yes': 15 | RepInfo.ServerRankMap(true); 16 | DoClose(); 17 | break; 18 | case 'No': 19 | RepInfo.ServerRankMap(false); 20 | DoClose(); 21 | break; 22 | } 23 | } 24 | 25 | defaultproperties 26 | { 27 | bPersistant=false 28 | bAlwaysTop=true 29 | bOnlyThisFocus=true 30 | XPosition=0.35 31 | YPosition=0.4 32 | XSize=0.3 33 | YSize=0.2 34 | 35 | Begin Object Class=KFGUI_TextLable Name=InfoLabel 36 | XPosition=0.1 37 | YPosition=0.15 38 | XSize=0.8 39 | YSize=0.35 40 | AlignX=1 41 | AlignY=1 42 | Text="Did you like this map?" 43 | End Object 44 | Begin Object Class=KFGUI_Button Name=YesButton 45 | XPosition=0.3 46 | YPosition=0.5 47 | XSize=0.2 48 | YSize=0.3 49 | ID="Yes" 50 | ButtonText="Like" 51 | ToolTip="Press this if you liked this map." 52 | OnClickLeft=ButtonClicked 53 | OnClickRight=ButtonClicked 54 | ExtravDir=1 55 | TextColor=(R=128,G=255,B=128,A=255) 56 | End Object 57 | Begin Object Class=KFGUI_Button Name=NoButton 58 | XPosition=0.5 59 | YPosition=0.5 60 | XSize=0.2 61 | YSize=0.3 62 | ID="No" 63 | ButtonText="Dislike" 64 | ToolTip="Press this if you disliked this map." 65 | OnClickLeft=ButtonClicked 66 | OnClickRight=ButtonClicked 67 | TextColor=(R=255,G=128,B=128,A=255) 68 | End Object 69 | 70 | Components.Add(InfoLabel) 71 | Components.Add(YesButton) 72 | Components.Add(NoButton) 73 | } -------------------------------------------------------------------------------- /ServerExt/Classes/xVotingHandlerBase.uc: -------------------------------------------------------------------------------- 1 | Class xVotingHandlerBase extends Mutator 2 | abstract; 3 | 4 | function ClientDownloadInfo( xVotingReplication V ); 5 | function ClientCastVote( xVotingReplication V, int GameIndex, int MapIndex, bool bAdminForce ); 6 | function ClientRankMap( xVotingReplication V, bool bUp ); 7 | function ClientDisconnect( xVotingReplication V ); 8 | function ShowMapVote( PlayerController PC ); 9 | -------------------------------------------------------------------------------- /ServerExt/Globals.uci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForrestMarkX/KF2-Server-Extension/670911850700ad65ca7e2256a7ff9811c23dc158/ServerExt/Globals.uci -------------------------------------------------------------------------------- /ServerExtMut/Classes/ExtXMLOutput.uc: -------------------------------------------------------------------------------- 1 | Class ExtXMLOutput extends FileWriter implements(ExtStatWriter); 2 | 3 | var transient string Intendent; 4 | var transient array StackedSect; 5 | 6 | event PreBeginPlay(); 7 | 8 | final function DumpXML( ExtPerkManager M ) 9 | { 10 | OpenFile(class'OnlineSubsystem'.Static.UniqueNetIdToString(M.PRIOwner.UniqueId),FWFT_Stats,".xml",false); 11 | M.OutputXML(Self); 12 | CloseFile(); 13 | ResetFile(); 14 | } 15 | 16 | function WriteValue( string Key, string Value ) 17 | { 18 | Logf(Intendent$"<"$Key$">"$Value$""); 19 | } 20 | function StartIntendent( string Section, optional string Key, optional string Value ) 21 | { 22 | if( Key!="" ) 23 | Logf(Intendent$"-<"$Section$" "$Key$"=\""$Value$"\">"); 24 | else Logf(Intendent$"-<"$Section$">"); 25 | Intendent $= Chr(9); 26 | StackedSect.AddItem(Section); 27 | } 28 | function EndIntendent() 29 | { 30 | Intendent = Left(Intendent,Len(Intendent)-1); 31 | Logf(Intendent$""); 32 | StackedSect.Remove(StackedSect.Length-1,1); 33 | } 34 | function ResetFile() 35 | { 36 | Intendent = ""; 37 | StackedSect.Length = 0; 38 | } 39 | 40 | defaultproperties 41 | { 42 | bFlushEachWrite=false 43 | } -------------------------------------------------------------------------------- /ServerExtMut/Classes/ServerExtMut.upkg: -------------------------------------------------------------------------------- 1 | [Flags] 2 | AllowDownload=False 3 | ClientOptional=False 4 | ServerSideOnly=True 5 | -------------------------------------------------------------------------------- /ServerExtMut/Classes/xMapVoteHistory.uc: -------------------------------------------------------------------------------- 1 | Class xMapVoteHistory extends Object 2 | config(xMapVoteHistory); 3 | 4 | var config array M; 5 | struct FMapInfoEntry 6 | { 7 | var config int U,D,S,N; 8 | var config string T; 9 | }; 10 | var config array N; 11 | 12 | static final function int GetMapHistory( string MapName, string MapTitle ) 13 | { 14 | local int i; 15 | 16 | MapName = Caps(MapName); 17 | i = Default.M.Find(MapName); 18 | if( i==-1 ) 19 | { 20 | i = Default.M.Length; 21 | Default.M.Length = i+1; 22 | Default.M[i] = MapName; 23 | Default.N.Length = i+1; 24 | } 25 | if( !(MapTitle~=MapName) && MapTitle!=Class'WorldInfo'.Default.Title && MapTitle!="" ) 26 | Default.N[i].T = MapTitle; 27 | return i; 28 | } 29 | static final function GetHistory( int i, out int UpVotes, out int DownVotes, out int Seq, out int NumP, out string Title ) 30 | { 31 | UpVotes = Default.N[i].U; 32 | DownVotes = Default.N[i].D; 33 | Seq = Default.N[i].S; 34 | NumP = Default.N[i].N; 35 | Title = Default.N[i].T; 36 | } 37 | 38 | static final function UpdateMapHistory( int iWon ) 39 | { 40 | local int i; 41 | 42 | for( i=(Default.M.Length-1); i>=0; --i ) 43 | { 44 | if( i==iWon ) 45 | { 46 | ++Default.N[i].N; 47 | Default.N[i].S = 0; 48 | } 49 | else ++Default.N[i].S; 50 | } 51 | } 52 | static final function AddMapKarma( int i, bool bUp ) 53 | { 54 | if( bUp ) 55 | ++Default.N[i].U; 56 | else ++Default.N[i].D; 57 | } 58 | -------------------------------------------------------------------------------- /ServerExtMut/Classes/xVoteBroadcast.uc: -------------------------------------------------------------------------------- 1 | class xVoteBroadcast extends BroadcastHandler; 2 | 3 | var BroadcastHandler NextBroadcaster; 4 | var xVotingHandler Handler; 5 | 6 | function UpdateSentText() 7 | { 8 | NextBroadcaster.UpdateSentText(); 9 | } 10 | 11 | function Broadcast( Actor Sender, coerce string Msg, optional name Type ) 12 | { 13 | if( (Type=='Say' || Type=='TeamSay') && Left(Msg,1)=="!" && PlayerController(Sender)!=None ) 14 | Handler.ParseCommand(Mid(Msg,1),PlayerController(Sender)); 15 | NextBroadcaster.Broadcast(Sender,Msg,Type); 16 | } 17 | 18 | function BroadcastTeam( Controller Sender, coerce string Msg, optional name Type ) 19 | { 20 | if( (Type=='Say' || Type=='TeamSay') && Left(Msg,1)=="!" && PlayerController(Sender)!=None ) 21 | Handler.ParseCommand(Mid(Msg,1),PlayerController(Sender)); 22 | NextBroadcaster.BroadcastTeam(Sender,Msg,Type); 23 | } 24 | 25 | function AllowBroadcastLocalized( actor Sender, class Message, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject ) 26 | { 27 | NextBroadcaster.AllowBroadcastLocalized(Sender,Message,Switch,RelatedPRI_1,RelatedPRI_2,OptionalObject); 28 | } 29 | 30 | event AllowBroadcastLocalizedTeam( int TeamIndex, actor Sender, class Message, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject ) 31 | { 32 | NextBroadcaster.AllowBroadcastLocalizedTeam(TeamIndex,Sender,Message,Switch,RelatedPRI_1,RelatedPRI_2,OptionalObject); 33 | } 34 | 35 | defaultproperties 36 | { 37 | } --------------------------------------------------------------------------------