[Setup] Product=EavySpawnProtect Version=100 Archive=EavySpawnProtect.umod SrcPath=. MasterPath=.. Requires=UnrealTournament400Requirement Group=SetupGroup Group=EavySpawnProtectionGroup Group=umodIncludeFilesGroup [UnrealTournament400Requirement] Product=UnrealTournament Version=400 [SetupGroup] Copy=(Src=System\Manifest.ini,Master=System\Manifest.ini,Size=565,Flags=3) Copy=(Src=System\Manifest.int,Master=System\Manifest.int,Size=543,Flags=3) [EavySpawnProtectionGroup] File=(Src=System\EavySpawnProtect.int,Size=370) File=(Src=System\EavySpawnProtect.u,Size=18024) [umodIncludeFilesGroup] File=(Src=Help\EavySpawnProtect.txt,Size=5655) File=(Src=Help\EavyMods.bmp,Size=5590) [Setup] LocalProduct=EavySpawnProtect ReadMe=Help\EavySpawnProtect.txt SetupWindowTitle=EavySpawnProtection AutoplayWindowTitle=EavySpawnProtect Options ProductURL=http://unreal.eavy.de/ VersionURL=http://unreal.eavy.de/ Developer=Stefan Daniel Schwarz DeveloperURL=http://unreal.eavy.de/ Logo=Help\EavyMods.bmp [UnrealTournament400Requirement] LocalProduct=UnrealTournament ProductURL=http://www.unrealtournament.com/ VersionURL=http://unreal.epicgames.com/ Developer=Epic Games, Inc. DeveloperURL=http://www.epicgames.com/ ; EavySpawnProtect: "EavySpawnProtect" Stefan Daniel Schwarz [Public] Object=(Name=EavySpawnProtect.EavySpawnProtection,Class=Class,MetaClass=Engine.Mutator,Description="EavySpawnProtect,EavySpawnProtection") Object=(Name=EavySpawnProtect.EavyMenuItem,Class=Class,MetaClass=UMenu.UMenuModMenuItem,Description="EavySpawnProtect,EavySpawnProtection") *Ez@@BFv@3K>헟v@zNoneEavySpawnProtectionCreateControlSetTextEavySpawnProtectSetFontCoreSystem GetValueSetDelayedNotify SetValue SetMaxLengthSetNumericOnlyUWindowFindInventoryTypeEngineCreated Activate DestroyedTimerMutatorTakeDamageEavyFramedWindowEavyClientWindow EavyMenuItem MenuCaption MenuHelp BeforePaintNotify ClientClass TakeDamage PreBeginPlayActivateSpawnProtectEavySpawnProtectorDeactivateDamageMomentumUMenuGiveToExecuteRegisterDamageMutator ModifyPlayer WindowTitlePackage bGameEnded DamageType Rotation bIsPlayerbActive instigatedBy PlayerOwner ScaleGlowCountClassStyle bHeldItemOwner GameInfoEYi ScriptTextStaticSaveConfigCounter TextBufferOther actualDamageVictim bCheckedActor LevelInfoMutator MomentumStructPawnGame HitLocation NameProperty LocationObjectPropertyFloatProperty InventoryControlOffset BoolPropertyCXCanvasUMenuModMenuItemUWindowDialogClientWindowUWindowFramedWindowUWindowRootWindowWinTopSetSize CenterWidth CenterPos CreateWindow ControlWidth ControlLeft ControlRightUWindowWindowUWindowDialogControlUWindowCheckboxUWindowEditControlUWindowPulldownMenuItemUWindowPulldownMenuWinLeft WinWidth WinHeight bInitializedAlign EditBoxWidth MenuItem IntPropertyLevelRootObject Function BytePropertyLimitVectorStructPropertyInstigatorDamageScaleMaximumProtectionTimeMinimumProtectionTimeVictimDamageScale=1]v=$:ettt&S&tt&S&tt&S&&S&&S&&S&&S&!;4 2&S&Гtttttttttt ' #@!@@  @@&@$"* /(9<`- 8~]v|.Xڈ]v]vt]v]vt]v]vt]v]vt]v]v|.Xڈ]v|.Xچ|.Xچ|.Xچ|.Xڈ]vttttttt]vttttttt]vttttttt]vttttttt]v|.Xچ|.Xچ|.Xچ|.Xڈ]v|.Xچ|.Xڄtttttttttttt|.Xچ|.X 7?2.hQMo o  -']EavySpawnProtect%.$-%%-%' 3/ - w  w *- -$.  w$*-#$-"#% *,d '"&?,d '"& ),f,(*D @D?,?,D?,?D33@D?, ?? ????A???A???A???A ?? ? 0 &N .  6w * a- a  !    w * -' # % , ,  !,    8"sA- r*-a-D66  66 -'-%?? ? a% &a 23D @D?,?,D?,?D33@D?,D?&). ????, . ???? Activate Spawn Protect % $ - -,. ????Minimum Protection Time% ' ,$ ' S !. ????Maximum Protection Time% ' ,$ ' S ,. ????Victim Damage Scale% ' ,$ ' S . ????Instigator Damage Scale% ' ,$ ' S , . ???? "Deactivate Damage Momentum % $ - -# >@26Šєϰ;aGնmo " ]&EavySpawnProtect]EavySpawnProtection[//EavySpawnProtect: "EavyFramedWindow" Stefan Daniel Schwarz class EavyFramedWindow expands UWindowFramedWindow; function Created() { Super.Created(); WinLeft = Int((Root.WinWidth - WinWidth) / 2); WinTop = Int((Root.WinHeight - WinHeight) / 2); } :V.@w*$ a=' ib//EavySpawnProtect: "EavyClientWindow" Stefan Daniel Schwarz class EavyClientWindow expands UWindowDialogClientWindow; var UWindowCheckBox EavySpawnProtect; var UWindowCheckBox ActivateSpawnProtect; var UWindowEditControl MinimumProtectionTime; var UWindowEditControl MaximumProtectionTime; var UWindowEditControl VictimDamageScale; var UWindowEditControl InstigatorDamageScale; var UWindowCheckBox DeactivateDamageMomentum; function BeforePaint(Canvas C, float X, float Y) { local int ControlWidth, ControlLeft, ControlRight; local int CenterWidth, CenterPos; Super.BeforePaint(C, X, Y); ControlWidth = WinWidth/2.5; ControlLeft = (WinWidth/2 - ControlWidth)/2; ControlRight = WinWidth/2 + ControlLeft; CenterWidth = WinWidth/2.3; CenterPos = (WinWidth - CenterWidth)/2; ActivateSpawnProtect.SetSize(CenterWidth, 1); ActivateSpawnProtect.WinLeft = CenterPos; MinimumProtectionTime.SetSize(ControlWidth, 1); MinimumProtectionTime.WinLeft = ControlLeft; MinimumProtectionTime.EditBoxWidth = 25; MaximumProtectionTime.SetSize(ControlWidth, 1); MaximumProtectionTime.WinLeft = ControlRight; MaximumProtectionTime.EditBoxWidth = 25; VictimDamageScale.SetSize(ControlWidth, 1); VictimDamageScale.WinLeft = ControlLeft; VictimDamageScale.EditBoxWidth = 25; InstigatorDamageScale.SetSize(ControlWidth, 1); InstigatorDamageScale.WinLeft = ControlRight; InstigatorDamageScale.EditBoxWidth = 25; DeactivateDamageMomentum.SetSize(CenterWidth, 1); DeactivateDamageMomentum.WinLeft = CenterPos; } function Created() { local int ControlWidth, ControlLeft, ControlRight; local int CenterWidth, CenterPos; local int ControlOffset; Super.Created(); ControlWidth = WinWidth/2.5; ControlLeft = (WinWidth/2 - ControlWidth)/2; ControlRight = WinWidth/2 + ControlLeft; CenterWidth = WinWidth/2.3; CenterPos = (WinWidth - CenterWidth)/2; ControlOffset = WinHeight + 1; EavySpawnProtect = UWindowCheckbox(CreateControl(class'UWindowCheckbox', CenterPos, ControlOffset, CenterWidth, 1)); ControlOffset = 15; ActivateSpawnProtect = UWindowCheckbox(CreateControl(class'UWindowCheckbox', CenterPos, ControlOffset, CenterWidth, 1)); ActivateSpawnProtect.SetText("Activate Spawn Protect"); ActivateSpawnProtect.SetFont(F_Normal); ActivateSpawnProtect.Align = TA_Right; ActivateSpawnProtect.bChecked = class'EavySpawnProtection'.default.ActivateSpawnProtect; ControlOffset += 20; MinimumProtectionTime = UWindowEditControl(CreateControl(class'UWindowEditControl', ControlLeft, ControlOffset, ControlWidth, 1)); MinimumProtectionTime.SetText("Minimum Protection Time"); MinimumProtectionTime.SetFont(F_Normal); MinimumProtectionTime.SetNumericOnly(True); MinimumProtectionTime.SetMaxLength(3); MinimumProtectionTime.Align = TA_Right; MinimumProtectionTime.SetDelayedNotify(True); MinimumProtectionTime.SetValue(string(class'EavySpawnProtection'.default.MinimumProtectionTime)); MaximumProtectionTime = UWindowEditControl(CreateControl(class'UWindowEditControl', ControlRight, ControlOffset, ControlWidth, 1)); MaximumProtectionTime.SetText("Maximum Protection Time"); MaximumProtectionTime.SetFont(F_Normal); MaximumProtectionTime.SetNumericOnly(True); MaximumProtectionTime.SetMaxLength(3); MaximumProtectionTime.Align = TA_Right; MaximumProtectionTime.SetDelayedNotify(True); MaximumProtectionTime.SetValue(string(class'EavySpawnProtection'.default.MaximumProtectionTime)); ControlOffset += 20; VictimDamageScale = UWindowEditControl(CreateControl(class'UWindowEditControl', ControlLeft, ControlOffset, ControlWidth, 1)); VictimDamageScale.SetText("Victim Damage Scale"); VictimDamageScale.SetFont(F_Normal); VictimDamageScale.SetNumericOnly(True); VictimDamageScale.SetMaxLength(3); VictimDamageScale.Align = TA_Right; VictimDamageScale.SetDelayedNotify(True); VictimDamageScale.SetValue(string(class'EavySpawnProtection'.default.VictimDamageScale)); InstigatorDamageScale = UWindowEditControl(CreateControl(class'UWindowEditControl', ControlRight, ControlOffset, ControlWidth, 1)); InstigatorDamageScale.SetText("Instigator Damage Scale"); InstigatorDamageScale.SetFont(F_Normal); InstigatorDamageScale.SetNumericOnly(True); InstigatorDamageScale.SetMaxLength(3); InstigatorDamageScale.Align = TA_Right; InstigatorDamageScale.SetDelayedNotify(True); InstigatorDamageScale.SetValue(string(class'EavySpawnProtection'.default.InstigatorDamageScale)); ControlOffset += 20; DeactivateDamageMomentum = UWindowCheckbox(CreateControl(class'UWindowCheckbox', CenterPos, ControlOffset, CenterWidth, 1)); DeactivateDamageMomentum.SetText("Deactivate Damage Momentum"); DeactivateDamageMomentum.SetFont(F_Normal); DeactivateDamageMomentum.Align = TA_Right; DeactivateDamageMomentum.bChecked = class'EavySpawnProtection'.default.DeactivateDamageMomentum; } function Notify(UWindowDialogControl C, byte E) { switch(E) { case DE_Change: switch(C) { case ActivateSpawnProtect: class'EavySpawnProtection'.default.ActivateSpawnProtect = ActivateSpawnProtect.bChecked; class'EavySpawnProtection'.static.StaticSaveConfig(); break; case MinimumProtectionTime: class'EavySpawnProtection'.default.MinimumProtectionTime = int(MinimumProtectionTime.GetValue()); class'EavySpawnProtection'.static.StaticSaveConfig(); break; case MaximumProtectionTime: class'EavySpawnProtection'.default.MaximumProtectionTime = int(MaximumProtectionTime.GetValue()); class'EavySpawnProtection'.static.StaticSaveConfig(); break; case VictimDamageScale: class'EavySpawnProtection'.default.VictimDamageScale = int(VictimDamageScale.GetValue()); class'EavySpawnProtection'.static.StaticSaveConfig(); break; case InstigatorDamageScale: class'EavySpawnProtection'.default.InstigatorDamageScale = int(InstigatorDamageScale.GetValue()); class'EavySpawnProtection'.static.StaticSaveConfig(); break; case DeactivateDamageMomentum: class'EavySpawnProtection'.default.DeactivateDamageMomentum = DeactivateDamageMomentum.bChecked; class'EavySpawnProtection'.static.StaticSaveConfig(); break; } } }  MEw* R//EavySpawnProtect: "EavySpawnProtector" Stefan Daniel Schwarz class EavySpawnProtector expands Inventory; var int Count; var int Counter; var int Limit; var Pawn PlayerOwner; event Destroyed() { if ( PlayerOwner != None ) { PlayerOwner.Style = PlayerOwner.Default.Style; PlayerOwner.ScaleGlow = PlayerOwner.Default.ScaleGlow; } Super.Destroyed(); } function Activate() { PlayerOwner = Pawn(Owner); if ( PlayerOwner != None ) { PlayerOwner.Style = STY_Translucent; PlayerOwner.ScaleGlow = 0; } Counter = Count; SetTimer(0.1, True); } function Timer() { if ( Level.Game.bGameEnded || (PlayerOwner == None) || !PlayerOwner.bIsPlayer ) Destroy(); if ( !bActive && ((Location.X != PlayerOwner.Location.X) || (Location.Y != PlayerOwner.Location.Y)) ) bActive = True; if ( bActive ) { if ( Count > 0 ) PlayerOwner.ScaleGlow = (1 / Counter) * (Counter - Count--); else Destroy(); } else if ( (Limit > 0) && (Limit-- == 1) ) Destroy(); } 5+qq/ l$+ L  - - l  !J l  J l  J l 0 J l i  -# - l  {//EavySpawnProtect: "EavySpawnProtection" Stefan Daniel Schwarz class EavySpawnProtection expands Mutator; var bool bInitialized; var() config bool ActivateSpawnProtect; var() config bool DeactivateDamageMomentum; var() config int InstigatorDamageScale; var() config int MaximumProtectionTime; var() config int MinimumProtectionTime; var() config int VictimDamageScale; event PreBeginPlay() { if ( !bInitialized ) Level.Game.RegisterDamageMutator(Self); bInitialized = True; } function ModifyPlayer(Pawn Other) { local EavySpawnProtector I; I = EavySpawnProtector(Other.FindInventoryType(class'EavySpawnProtector')); if ( I != None ) I.Destroy(); if ( ActivateSpawnProtect ) { I = Spawn(class'EavySpawnProtector', Other, 'EavySpawnProtect', Other.Location, Other.Rotation); if ( I != None ) { I.bHeldItem = True; I.GiveTo(Other); if ( MaximumProtectionTime > 0 ) I.Limit = MaximumProtectionTime * 10 + 11; I.Count = MinimumProtectionTime * 10; I.Activate(); } } Super.ModifyPlayer(Other); } function MutatorTakeDamage(out int ActualDamage, Pawn Victim, Pawn InstigatedBy, out Vector HitLocation, out Vector Momentum, name DamageType) { local EavySpawnProtector I; if ( ActivateSpawnProtect && (Victim != InstigatedBy) && (InstigatedBy != None) && Victim.bIsPlayer && InstigatedBy.bIsPlayer ) { I = EavySpawnProtector(Victim.FindInventoryType(class'EavySpawnProtector')); if ( I != None ) { if ( DeactivateDamageMomentum || !I.bActive ) Momentum = vect(0,0,0); if ( InstigatorDamageScale > 0 ) InstigatedBy.TakeDamage(ActualDamage * (InstigatorDamageScale / 100), InstigatedBy, HitLocation, Momentum, DamageType); ActualDamage *= VictimDamageScale / 100; } } Super.MutatorTakeDamage(ActualDamage, Victim, InstigatedBy, HitLocation, Momentum, DamageType); } e//EavySpawnProtect: "EavyMenuItem" Stefan Daniel Schwarz class EavyMenuItem expands UMenuModMenuItem; function Execute() { MenuItem.Owner.Root.CreateWindow(class'EavyFramedWindow', 0, 0, 360, 125); } L?D?,?D?, $< .CB ( ((2c2`2b2G222m2B2p2LMg2q2NMf2a2DqYFtrjq;2=uK("M0PAMkP-2V2C2T2Pr326P,2ULoMh2WLnLHqq2Mqq&2dM8MR2uqqq\P4u+qq2S2rqP)2eMX2JL5qL5q$LlkL Aw#/ x&-y E'-v R'-x _'-w l'5O y'39 E(- R(-! _(1. l(3> y(5] F)2] R)5Z ^)2^ j) v)2Z B*w N*v Z*5[ f*1 r*5^ ~*1@ J+2_ W+y c+s o+1? {+2[ G,5_ S,< _,x k,1E w,! D-19 P-i ]-1* i-1I u-2R B.- N.28 [.<Q g.2Q t.dA/e=<7 d?8q?Mi@-WvC&tMIMAL-f NO`t\.:4fT_Szc-:4tbMeHA:4]I-Ff:4Fl6:4pr.Kb6$Im================================================================================ |EavySpawnProtect: "EavySpawnProtection" Stefan Daniel Schwarz | ================================================================================ I have been asked if I could provide some of the bonuspack features for other gametypes and now I finally got around to fulfil those requests. Since spawn protection is the most requested feature, in any gametype, I'm making it available as a stand-alone mutator. It's based on the one included with the Assault Bonus Pack, but without Assault-specific code, and thus applies to all the other gametypes. (Assault servers shouldn't use this mutator but upgrade to the Assault Bonus Pack as soon as it's available because the bonuspack protection differentiates between attackers and defenders and lets you configure protection times for each team independently!) This mutator is server-side-only, won't auto-download to players, and should be ngWorldStats-compatible as soon as possible. It's small, fast, and efficient - while being customizable and powerful at the same time. Since it is derived from the bonuspack spawn protection, the code has been tested on private and public servers for several months now, and should be free of bugs. FEATURES: - 6 KB zipped, 18 KB package, and it's server-side-only. It will not be downloaded to clients at all. You shouldn't add it to the serverpackages list, just add it to the mutator list, and run the server. - Mod configuration menu included for easy graphical setup (open up the mod menu and click on the mutator item to configure all options through the graphical user interface) - Console commands also supported for powerful remote administration (use a command like "Set EavySpawnProtect.EavySpawnProtection ActivateSpawnProtect True") - Spawn protection only protects against other players, not against self- inflicted damage, or environmental hazards - Protected players will be translucent, appearing like ghosts, gradually manifesting over time while protection runs out - The mutator's overall protection features can be toggled on and off using the menu or a console command - Not only does it protect against damage, but it also prevents knockback so freshly spawned players won't be bounced around by their enemies, unless the admin turns that option off - Minimum protection time determines how long it takes until protection wears off completely if the protected player has started to move - Maximum protection time determines how long it takes until protection wears off if the protected player doesn't move after respawning - Normal protection only runs out once a player has moved away from the spawnpoint, so if a camper is waiting nearby, you will remain protected until you feel ready to move - To prevent abuse, the protection will run out anyway after a certain amount of time, as determined by the server admin (no sitting ducks that are invulnerable) - Protected players can use weapons without limitations so being a spawncamper will be very dangerous (and quite impossible) - Protected players can take a percentage of the damage dealt as determined by the administrator (0 - 999%) - Spawncampers who hit a protected player can take damage as well (0 - 999%) to punish their assault on a freshly spawned player - Default values protect a player for as long as they don't move, but as soon as they move, they are vulnerable again (change the defaults to your liking) As you can see, there are a lot of possibilities, just a little example of how customizable the Assault Bonus Pack will be! :) SUGGESTED SETTINGS - pick your favorite: 1) Only protect while respawning, but no protection afterwards. This is useful if you don't want a sniper to shoot a player the second they respawn, or to prevent a camper lobbing grenades at a spawnpoint, and similar situations. It has the least impact on gameplay because it only protects the spawning process. Minimum protection time should be zero, maximum protection time a little more, somewhere between 10 and 30 seconds is a good value. 2) Don't protect spawning players, but punish campers. Set victim and instigator damage percentage to 100 so the respawning player will take normal damage, but the attacker will take the same damage. A minimum protection time of three to five seconds is good. 3) Protect respawning players while punishing campers. Simply set the instigator damage scale to a high value and watch them kill themselves when they attack a harmless player. 4) Play a knockmatch. Set minimum protection time to an extremely high value, maximum to zero (i.e. unlimited), and turn the momentum protection off. Now players can't hurt each other, only knock each other around. 5) The Quake3 way. Give a player 25 % more health when respawning by reducing damage dealt by the same value. Set victim damage scale to 75 and 25 % of the damage will be ignored. Keep minimum protection time around 5 seconds and maximum the same amount of time. Well, there are many more possible combinations, I'm sure you can make up your own configurations... :) Unless there are bugs (since I ripped it from the bonuspack, I doubt it, unless the conversion caused any problems) I don't expect the code to change so this is supposed to be the first and final release... -- Eavy Please contact me at -------------------- mailto:unreal@eavy.de http://unreal.eavy.de <<< "Stefan Daniel 'Eavy' Schwarz" >>> BM6(B JJJJkkkk{{{{ƌΜ֥޵޽JJkk{{Jk{<,<<<,<  <<<+$ $*<<<2-.<.-2< <1< << <"(><:.-4<4-.:< < 0<<<< <!+?<5-9<9-5< </<< <,</-1<1-/<<.<<  <,<8-7<6-8< < .< < <,<1-/</-1<<-<< <,<:-5<5-:< < ,<< < +<5-: <:-5<<+<< <"+C</-1 <1-/<<*<<<%(C<7-8 <7-7< < )<<<($D<1-/ </-1<<)<< <+D<9-5<5-9<<(<<<<!(D<4-.:<:.-4<<'<<<<( E<.-3<2-.< < < < < <<<'D<7-8<8-7< < < <  <<<<&*D<1-0</-1<<< < < <<<