View Full Version : How to make jumpmatch and damage modifier mutator?
08-08-2003, 01:25 AM
I like to modify damage inflicts from the player (not the bots) called damage modifier mutator.
I also like to make jumpmatch mutator with manipuation of jumpz variable (not related to gravity).
I think it should be simple to make but need few help to build such mutator.
Give me some example about damage modify-based mutator AND jump-modify-based mutator.
08-11-2003, 01:26 AM
I found jump arena mutator from other Web Site and it seems to function correctly so I don't need to make Jump Arena/Match mutator and deleted my source file for JumpMatch.
However, I need to make damage-modifying mutator, though.
I also found NetDamage() and ReduceDamage() functions. I don't think I can use RegisterDamageMutator() function in UT2003!
ReduceDamage affect both armor and health while NetDamage function only modify the health after armor is applied. I prefer ReduceDamage function (because I want to modify the damage for both armor and health) but I don't know how to register my mutator for ReduceDamage function. UT2003 will not call my ReduceDamage function unless my mutator's function is registered!!!
How can I register ReduceDamage function? I need some help for it. All other functions are compatible with both UT1 and UT2003.
08-11-2003, 03:11 AM
You can have your mutator spawn a subclass of GameRules, and mess with the NetDamage function.
function int NetDamage( int OriginalDamage, int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType )
08-11-2003, 06:03 AM
I know NetDamage() but only modify the damage AFTER the armor damage is already calculated so armor will receive normal damage, no matter I can apply the modifier.
ReduceDamage() is only way I can modify the damage BEFORE apply the damage to armor (shield) then health.
New! I found I can add ReduceDamage function into my mutator class without have to register. However, at end of my customized ReduceDamage function, I must call Super.ReduceDamage(), however.
I will test my mutator script tomorrow or two or so.
08-11-2003, 06:17 AM
Alrighty, glad I could be of absolutely no help. :D
08-11-2003, 11:59 PM
Okay! ReduceDamage() is linked to TeamGame.uc (lowest class), not linked to mutator.uc.
I wanted to make my source code AS the mutator but I have to declare "class DanDamage extends TeamGame" because parent class of ReduceDamage() would be in TeamGame.uc. Mutator.uc and parents of Mutator.uc don't have this function.
I wish I can write "class DanDamge extends Mutator extends TeamGame"!!!
I want to make my own ReduceDamage highest priority function so it would be called first before other same function would be called.
I have textpad and found all links in only 2 seconds because I have very large disk cache.
08-12-2003, 12:25 AM
You can access the ReduceDamage function the same way that Rachel described above for accessing the NetDamage function. Just change the function name from NetDamage to ReduceDamage :)
08-12-2003, 11:52 PM
While ReduceDamage() don't exist on mutator.uc and parents class of mutator.uc. Latest patch change list says
"Fix TeamGame ReduceDamage() allows the mutator to override even if instigator==None".
I am fearing that I couldn't override ReduceDamage function anymore with 2225 patch or later unless otherwise proven. Only NetDamage can be overriden because GameRules provide the registration for NetDamage function. I couldn't find any class of GameRules or Mutator that support registration for ReduceDamage function.
Until Epic release the patch that allows function override OR otherwise proven, I will not able to continue using my damage-modifying mutator.
08-13-2003, 09:52 PM
You don't understand the way this works.
GameRules.uc is extended from GameInfo. EVERY GAMETYPE extends from GameInfo (through other classes).
By subclassing GameRules.uc YOU CAN ALTER ANY GAMETYPES GAMERULES. Simply do something similar to the following:
//Class that modifies game rules
class myGameRules extends GameRules;
function ReduceDamage( int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType )
//modify the taken damage here
Then in your mutator class you put something like this in PreBeginPlay or PostBeginPlay:
local GameRules G;
G = spawn(class'myGameRules');
if ( Level.Game.GameRulesModifiers == None )
Level.Game.GameRulesModifiers = G;
Good luck :)
P.S. Caps are for emphasis not yelling.
08-14-2003, 03:54 AM
I have run ucc make and it passed everything except only one function. The compiler generated the error relating to
Super.ReduceDamage function! There is NO ReduceDamage function exists in class Engine.GameRules!
Only dandamagemain.uc is successfully compiled. dangamerules.uc failed!
I must add Super.ReduceDamage so other classes can have the chance to pick up and update scoreboard and other(s).
08-14-2003, 07:02 AM
Yes, there is no ReduceDamage function in GameRules (and GameRules is not extended from GameInfo, Sir_Brizz).
So you're either stuck with NetDamage, or you'll have to make your own game type (defeating the idea of making a mutator, of course).
08-14-2003, 12:37 PM
How about giving everyone an Armor inventory item with a high priority, then it can adjust damage before anything else.
08-14-2003, 09:45 PM
// The GameRules class handles game rule modifications for the GameInfo such as scoring,
// finding player starts, and damage modification.
class GameRules extends Info;
yah whoops I don't know where I got that idea from...something... oh well sorry.
I guess what I would suggest is to use NetDamage and then you decide how much armor to take away also. You can modify shield through the pawn class.
08-16-2003, 02:32 AM
How can I feedback to Epic Programmer about adding new "PreDamage" function -- it is exactly same as ReduceDamage but it is mutator hookable function call that modify the damage before apply against the armor first then the health?
For now, I have suspended my programming for DanDamage mutator until the patch come out.
I think UT 2003 need least one more patch...
08-16-2003, 10:10 PM
goto this thread:
and sign up for the mailing list. The programmers at Epic often read the mail that comes here and reply to it.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.