https://wiki.beyondunreal.com/w/index.php?action=history&feed=atom Legacy:Mutator (UT) - Revision history 2017-11-17T22:22:22Z Revision history for this page on the wiki MediaWiki 1.25.1 https://wiki.beyondunreal.com/Legacy:Mutator_(UT)?diff=46441&oldid=prev 213.46.33.10 at 08:50, 11 November 2017 2017-11-11T08:50:51Z <p></p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 08:50, 11 November 2017</td> </tr><tr><td colspan='4' style='text-align: center;' class='diff-multi'>(One intermediate revision by one other user not shown)</td></tr><tr><td colspan="2" class="diff-lineno" id="L21" >Line 21:</td> <td colspan="2" class="diff-lineno">Line 21:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; ModifyPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s AddDefaultInventory function which is called by RestartPlayer and AcceptInventory.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; ModifyPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s AddDefaultInventory function which is called by RestartPlayer and AcceptInventory.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleRestartGame ( ) : This function is never called anywhere in script.&#160; Nowhere.&#160; It is serving no other purpose than to add a couple of bytes to the Engine.U package.&#160; Completely useless...</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleRestartGame ( ) : This function is never called anywhere in script.&#160; Nowhere.&#160; It is serving no other purpose than to add a couple of bytes to the Engine.U package.&#160; Completely useless...</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleEndGame ( ) : This is called when the GameInfo wants to end the game.&#160; If the mutator returns True, the Game will not attempt to Set the end cams.&#160; If it <del class="diffchange diffchange-inline">does </del>return true, the code should either execute its own implementation of the gameinfo.SendEndCams() function or set bOverTime to true to force the game into overtime...</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleEndGame ( ) : This is called when the GameInfo wants to end the game.&#160; If the mutator returns True, the Game will not attempt to Set the end cams.&#160; If it <ins class="diffchange diffchange-inline">doesn't </ins>return true, the code should either execute its own implementation of the gameinfo.SendEndCams() function or set bOverTime to true to force the game into overtime...</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandlePickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] item, out byte bAllowPickup) : This is similar to the [[Legacy:Inventory (UT)|Inventory (UT)]]'s HandlePickupQuery function. Return true handle the pickup query from this function or deny pickup.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandlePickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] item, out byte bAllowPickup) : This is similar to the [[Legacy:Inventory (UT)|Inventory (UT)]]'s HandlePickupQuery function. Return true handle the pickup query from this function or deny pickup.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool PreventDeath ([[Legacy:Pawn (UT)|Pawn (UT)]] Killed, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer, name damageType, vector HitLocation) : Called by the killed pawn's Died function. If the function returns True it should set the pawn's health to a value greater than 0.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool PreventDeath ([[Legacy:Pawn (UT)|Pawn (UT)]] Killed, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer, name damageType, vector HitLocation) : Called by the killed pawn's Died function. If the function returns True it should set the pawn's health to a value greater than 0.</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L31" >Line 31:</td> <td colspan="2" class="diff-lineno">Line 31:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool ReplaceWith ([[Legacy:Actor (UT)|Actor (UT)]] Other, string aClassName) : Intended to use in CheckReplacement. ReplaceWith replaces an actor ''Other'' with a new one of the class specified in aClassName.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool ReplaceWith ([[Legacy:Actor (UT)|Actor (UT)]] Other, string aClassName) : Intended to use in CheckReplacement. ReplaceWith replaces an actor ''Other'' with a new one of the class specified in aClassName.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool AlwaysKeep ([[Legacy:Actor (UT)|Actor (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. If it returns true neither the GameInfo nor any mutator will try to remove the actor. In this case no mutator receives a CheckReplacement call for this actor.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool AlwaysKeep ([[Legacy:Actor (UT)|Actor (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. If it returns true neither the GameInfo nor any mutator will try to remove the actor. In this case no mutator receives a CheckReplacement call for this actor.</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; bool IsRelevant ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Also called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. It <del class="diffchange diffchange-inline">calles </del>the CheckReplacement function, so you don't need to modify IsRelevant.&lt;br /&gt;If bSuperRelevant is set to 1 the [[Legacy:GameInfo (UT)|GameInfo (UT)]] will not modify the actor (generally running filter tests). If IsRelevant returns false the actor will be destroyed.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; bool IsRelevant ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Also called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. It <ins class="diffchange diffchange-inline">calls </ins>the CheckReplacement function, so you don't need to modify IsRelevant.&lt;br /&gt;If bSuperRelevant is set to 1 the [[Legacy:GameInfo (UT)|GameInfo (UT)]] will not modify the actor (generally running filter tests). If IsRelevant returns false the actor will be destroyed.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool [[Legacy:CheckReplacement|CheckReplacement]] ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Called by IsRelevant() to determine whether the actor should be available within the game or not.&#160; If this function returns ''true'' for every mutator within the mutator chain then the actor will be kept within the game.&#160; If '''any''' of the mutators within the mutator chain return ''false'' then the actor will be removed.&#160; You can replace actors by using ReplaceWith() and then return false.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool [[Legacy:CheckReplacement|CheckReplacement]] ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Called by IsRelevant() to determine whether the actor should be available within the game or not.&#160; If this function returns ''true'' for every mutator within the mutator chain then the actor will be kept within the game.&#160; If '''any''' of the mutators within the mutator chain return ''false'' then the actor will be removed.&#160; You can replace actors by using ReplaceWith() and then return false.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; Mutate (string MutateString, [[Legacy:PlayerPawn|PlayerPawn]] Sender) : With this function mutators are able to handle console commands. (e.g. &quot;mutate tossrelic&quot;, MutateString then is &quot;tossrelic&quot;)</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; Mutate (string MutateString, [[Legacy:PlayerPawn|PlayerPawn]] Sender) : With this function mutators are able to handle console commands. (e.g. &quot;mutate tossrelic&quot;, MutateString then is &quot;tossrelic&quot;)</div></td></tr> </table> 213.46.33.10 https://wiki.beyondunreal.com/Legacy:Mutator_(UT)?diff=4563&oldid=prev Draconx: * 2005-10-25T15:47:50Z <p>*</p> <p><b>New page</b></p><div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] &gt;&gt; [[Legacy:Info (UT)|Info (UT)]] &gt;&gt; Mutator (Package: Engine)}}<br /> <br /> An actor designed to modify smaller aspects of the game. For an overview of how the Mutator system, see [[Legacy:Mutator Topics|Mutator Topics]].<br /> <br /> See [[Legacy:Linked List/Existing Lists In Unreal Tournament|Linked List/Existing Lists in Unreal Tournament]] for a thorough description of the different mutator types (including how to make a working HUD mutator).<br /> <br /> See [[Legacy:Mutator|Mutator]] for the UT2003 version of this class.<br /> <br /> ==Properties ==<br /> ; Mutator NextMutator : The next mutator in the mutators linked list.<br /> ; Mutator NextDamageMutator : The next registered damage mutator. These mutators receive MutatorTakeDamage calls from [[Legacy:Pawn (UT)|Pawn (UT)]]s.<br /> ; Mutator NextMessageMutator : The next registered message mutator. Message mutators receive MutatorTeamMessage, MutatorBroadcastMessage and MutatorBroadcastLocalizedMessage calls.<br /> ; Mutator NextHUDMutator : The next registered HUD mutator. Mutators can only be registered to one [[Legacy:HUD (UT)|HUD (UT)]]. However HUDs work client-side, so a HUD mutator can be registered to one HUD on the first client or the server and to another HUD on another client.<br /> ; bool bHUDMutator : If this variable is true the mutator was successfully registered as HUD mutator on this client/server.<br /> ; class&lt;[[Legacy:Weapon (UT)|Weapon (UT)]]&gt; DefaultWeapon : A weapon class that should replace the default weapon (usually the impact hammer).<br /> <br /> ==Functions ==<br /> <br /> Most mutator functions (except ReplaceWith, RegisterHUDMutator, CheckReplacement and MyDefaultWeapon) call the corresponding function of the next mutator in the list.<br /> ; PostRender ([[Legacy:Canvas (UT)|Canvas (UT)]] Canvas) [simulated] : Called by the [[Legacy:HUD (UT)|HUD (UT)]] when this mutator is registered as HUD mutator. Always call NextHUDMutator.PostRender(Canvas) to allow the next HUD mutator to draw on the canvas.<br /> ; ModifyPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s AddDefaultInventory function which is called by RestartPlayer and AcceptInventory.<br /> ; bool HandleRestartGame ( ) : This function is never called anywhere in script. Nowhere. It is serving no other purpose than to add a couple of bytes to the Engine.U package. Completely useless...<br /> ; bool HandleEndGame ( ) : This is called when the GameInfo wants to end the game. If the mutator returns True, the Game will not attempt to Set the end cams. If it does return true, the code should either execute its own implementation of the gameinfo.SendEndCams() function or set bOverTime to true to force the game into overtime...<br /> ; bool HandlePickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] item, out byte bAllowPickup) : This is similar to the [[Legacy:Inventory (UT)|Inventory (UT)]]'s HandlePickupQuery function. Return true handle the pickup query from this function or deny pickup.<br /> ; bool PreventDeath ([[Legacy:Pawn (UT)|Pawn (UT)]] Killed, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer, name damageType, vector HitLocation) : Called by the killed pawn's Died function. If the function returns True it should set the pawn's health to a value greater than 0.<br /> ; ModifyLogin (out class&lt;[[Legacy:PlayerPawn|PlayerPawn]]&gt; SpawnClass, out string Portal, out string Options) : Called from the GameInfo's LogIn function. The mutator can change any options before the LogIn function processes them.<br /> ; ScoreKill ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the GameInfo's ScoreKill function.<br /> ; Class&lt;[[Legacy:Weapon (UT)|Weapon (UT)]]&gt; MutatedDefaultWeapon ( ) : Returns which weapon should be used as default weapon. You shouldn't modify this function. Use the DefaultWeapon property instead.<br /> ; Class&lt;[[Legacy:Weapon (UT)|Weapon (UT)]]&gt; MyDefaultWeapon ( ) : Use by the MutatedDefaultWeapon function. Returns the DefaultWeapon property of this mutator or (if DefaultWeapon is None) the DefaultWeapon of the GameInfo.<br /> ; AddMutator (Mutator M) : Adds another mutator to the list of mutators. If NextMutator is None it is set to M, otherwise NextMutator.AddMutator(M) is called.<br /> ; bool ReplaceWith ([[Legacy:Actor (UT)|Actor (UT)]] Other, string aClassName) : Intended to use in CheckReplacement. ReplaceWith replaces an actor ''Other'' with a new one of the class specified in aClassName.<br /> ; bool AlwaysKeep ([[Legacy:Actor (UT)|Actor (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. If it returns true neither the GameInfo nor any mutator will try to remove the actor. In this case no mutator receives a CheckReplacement call for this actor.<br /> ; bool IsRelevant ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Also called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. It calls the CheckReplacement function, so you don't need to modify IsRelevant.&lt;br /&gt;If bSuperRelevant is set to 1 the [[Legacy:GameInfo (UT)|GameInfo (UT)]] will not modify the actor (generally running filter tests). If IsRelevant returns false the actor will be destroyed.<br /> ; bool [[Legacy:CheckReplacement|CheckReplacement]] ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Called by IsRelevant() to determine whether the actor should be available within the game or not. If this function returns ''true'' for every mutator within the mutator chain then the actor will be kept within the game. If '''any''' of the mutators within the mutator chain return ''false'' then the actor will be removed. You can replace actors by using ReplaceWith() and then return false.<br /> ; Mutate (string MutateString, [[Legacy:PlayerPawn|PlayerPawn]] Sender) : With this function mutators are able to handle console commands. (e.g. &quot;mutate tossrelic&quot;, MutateString then is &quot;tossrelic&quot;)<br /> ; MutatorTakeDamage(out int ActualDamage, [[Legacy:Pawn (UT)|Pawn (UT)]] Victim, [[Legacy:Pawn (UT)|Pawn (UT)]] InstigatedBy, out Vector HitLocation, out Vector Momentum, name DamageType) : Called by the victim's take damage function if the mutator is a registered damage mutator. (Done via [[Legacy:GameInfo (UT)|GameInfo (UT)]].RegisterDamageMutator(Self); from within the mutator.)&lt;br /&gt;This is called after the [[Legacy:GameInfo (UT)|GameInfo (UT)]] and the victim's [[Legacy:Inventory (UT)|Inventory (UT)]] items had the chance to reduce the damage.<br /> ; bool MutatorTeamMessage ([[Legacy:Actor (UT)|Actor (UT)]] Sender, [[Legacy:Pawn (UT)|Pawn (UT)]] Receiver, [[Legacy:PlayerReplicationInfo|PlayerReplicationInfo]] PRI, coerce string S, name Type, optional bool bBeep) : Called by the Say and TeamSay functions of PlayerPawn (= Sender). The message will be sent eventually if all message mutators return True.<br /> ; bool MutatorBroadcastMessage ([[Legacy:Actor (UT)|Actor (UT)]] Sender, [[Legacy:Pawn (UT)|Pawn (UT)]] Receiver, out coerce string Msg, optional bool bBeep, out optional name Type) : Called by the BroadcastMessage function of the sending actor. The message mutator can change the string and the message type. Only if all message mutators return true the message will be sent to Receiver.<br /> ; bool MutatorBroadcastLocalizedMessage ([[Legacy:Actor (UT)|Actor (UT)]] Sender, [[Legacy:Pawn (UT)|Pawn (UT)]] Receiver, out class&lt;[[Legacy:LocalMessage (UT)|LocalMessage (UT)]]&gt; Message, out optional int Switch, out optional [[Legacy:PlayerReplicationInfo (UT)|PlayerReplicationInfo (UT)]] RelatedPRI_1, out optional [[Legacy:PlayerReplicationInfo (UT)|PlayerReplicationInfo (UT)]] RelatedPRI_2, out optional [[Legacy:Object|Object]] OptionalObject) : Called by the BroadcastLocalizedMessage function of the sending actor. The message mutator can change all aspects of the message. Only if all message mutators return true the message will be sent to Receiver.<br /> ; RegisterHUDMutator ( ) [simulated] : Registers this mutator as a HUD mutator if the local [[Legacy:PlayerPawn|PlayerPawn]] (the PlayerPawn with a HUD) exists. bHUDMutator is set to True after successfully registering the HUD mutator. See [[Legacy:Useful Mutator Functions|Useful Mutator Functions]] for details.<br /> <br /> ==Known Subclasses ==<br /> * [[Legacy:Arena|Arena]]<br /> * [[Legacy:ChainsawMelee|ChainsawMelee]]<br /> * [[Legacy:DMMutator|DMMutator]]<br /> * [[Legacy:FatBoy|FatBoy]]<br /> * [[Legacy:InstantRockets|InstantRockets]]<br /> * [[Legacy:JumpMatch|JumpMatch]]<br /> * [[Legacy:LowGrav|LowGrav]]<br /> * [[Legacy:NoPowerups|NoPowerups]]<br /> * [[Legacy:NoRedeemer|NoRedeemer]]<br /> * [[Legacy:Stealth|Stealth]]<br /> :<br /> * [[Legacy:Relic|Relic]]<br /> * [[Legacy:HUDMutator|HUDMutator]] (used as base class for the relic HUD mutator) &amp;ndash; '''Don't use this! Prefer breaking compatibility with the relic HUD mutator instead of breaking compatibility with any other HUD mutator. See [[Legacy:Relics_Patch|Relics_Patch]] for restoring compatibility without using this subclass.'''<br /> * [[Legacy:EnhancedItems|EnhancedMutator]] ([[Legacy:EnhancedItems|EnhancedItems]])<br /> <br /> ----<br /> <br /> '''Tarquin:''' probably a dumb question... is it possible to embed a mutator in a map so that it is included automatically when the map is played?<br /> <br /> '''Wormbo:''' Should be possible with this code: &lt;uscript&gt;<br /> function PreBeginPlay()<br /> {<br /> Level.Game.BaseMutator.AddMutator(Self);<br /> }&lt;/uscript&gt;It might not be able to replace map actors, but I wouldn't consider that being a problem in this particular case.<br /> <br /> '''Mychaeel:''' Alright... you were faster. (Damn. ;-))<br /> <br /> '''Dawn:''' I have developed a robust, generic Embedded Mutator and written a tutorial to accompany it. Go here to check it out: [[Legacy:Writing And Using An Embedded Mutator|Writing and Using an Embedded Mutator]]. Hope someone finds it useful!<br /> <br /> [[Category:Legacy Class (UT)|{{PAGENAME}}]]</div> Draconx https://wiki.beyondunreal.com/Legacy:Mutator_(UT)?diff=4565&oldid=prev Ramx: * 2005-04-16T01:58:35Z <p>*</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 01:58, 16 April 2005</td> </tr><tr><td colspan="2" class="diff-lineno" id="L21" >Line 21:</td> <td colspan="2" class="diff-lineno">Line 21:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; ModifyPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s AddDefaultInventory function which is called by RestartPlayer and AcceptInventory.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; ModifyPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s AddDefaultInventory function which is called by RestartPlayer and AcceptInventory.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleRestartGame ( ) : This function is never called anywhere in script.&#160; Nowhere.&#160; It is serving no other purpose than to add a couple of bytes to the Engine.U package.&#160; Completely useless...</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleRestartGame ( ) : This function is never called anywhere in script.&#160; Nowhere.&#160; It is serving no other purpose than to add a couple of bytes to the Engine.U package.&#160; Completely useless...</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleEndGame ( ) : This is called when the GameInfo wants to end the game.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleEndGame ( ) : This is called when the GameInfo wants to end the game. <ins class="diffchange diffchange-inline"> </ins>If the mutator returns True, the Game will not attempt to Set the end cams. <ins class="diffchange diffchange-inline"> </ins>If it does return true, the code should either execute its own implementation of the gameinfo.SendEndCams() function or set bOverTime to true to force the game into overtime...</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">:</del>If the mutator returns True, the Game will not attempt to Set the end cams.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">:</del>If it does return true, the code should either execute its own implementation of the gameinfo.SendEndCams() function or set bOverTime to true to force the game into overtime...</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandlePickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] item, out byte bAllowPickup) : This is similar to the [[Legacy:Inventory (UT)|Inventory (UT)]]'s HandlePickupQuery function. Return true handle the pickup query from this function or deny pickup.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandlePickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] item, out byte bAllowPickup) : This is similar to the [[Legacy:Inventory (UT)|Inventory (UT)]]'s HandlePickupQuery function. Return true handle the pickup query from this function or deny pickup.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool PreventDeath ([[Legacy:Pawn (UT)|Pawn (UT)]] Killed, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer, name damageType, vector HitLocation) : Called by the killed pawn's Died function. If the function returns True it should set the pawn's health to a value greater than 0.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool PreventDeath ([[Legacy:Pawn (UT)|Pawn (UT)]] Killed, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer, name damageType, vector HitLocation) : Called by the killed pawn's Died function. If the function returns True it should set the pawn's health to a value greater than 0.</div></td></tr> </table> Ramx https://wiki.beyondunreal.com/Legacy:Mutator_(UT)?diff=4564&oldid=prev Ramx: * 2005-04-16T01:56:56Z <p>*</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 01:56, 16 April 2005</td> </tr><tr><td colspan='4' style='text-align: center;' class='diff-multi'>(One intermediate revision by one other user not shown)</td></tr><tr><td colspan="2" class="diff-lineno" id="L21" >Line 21:</td> <td colspan="2" class="diff-lineno">Line 21:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; ModifyPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s AddDefaultInventory function which is called by RestartPlayer and AcceptInventory.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; ModifyPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s AddDefaultInventory function which is called by RestartPlayer and AcceptInventory.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleRestartGame ( ) : This function is never called anywhere in script.&#160; Nowhere.&#160; It is serving no other purpose than to add a couple of bytes to the Engine.U package.&#160; Completely useless...</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleRestartGame ( ) : This function is never called anywhere in script.&#160; Nowhere.&#160; It is serving no other purpose than to add a couple of bytes to the Engine.U package.&#160; Completely useless...</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleEndGame ( ) : This is called when the GameInfo wants to end the game. <del class="diffchange diffchange-inline"> </del>If the mutator returns True, the Game will not attempt to Set the end cams. <del class="diffchange diffchange-inline"> </del>If it does return true, the code should either execute its own implementation of the gameinfo.SendEndCams() function or set bOverTime to true to force the game into overtime...</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; bool HandleEndGame ( ) : This is called when the GameInfo wants to end the game.</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">:</ins>If the mutator returns True, the Game will not attempt to Set the end cams.</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">:</ins>If it does return true, the code should either execute its own implementation of the gameinfo.SendEndCams() function or set bOverTime to true to force the game into overtime...</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandlePickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] item, out byte bAllowPickup) : This is similar to the [[Legacy:Inventory (UT)|Inventory (UT)]]'s HandlePickupQuery function. Return true handle the pickup query from this function or deny pickup.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool HandlePickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] item, out byte bAllowPickup) : This is similar to the [[Legacy:Inventory (UT)|Inventory (UT)]]'s HandlePickupQuery function. Return true handle the pickup query from this function or deny pickup.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool PreventDeath ([[Legacy:Pawn (UT)|Pawn (UT)]] Killed, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer, name damageType, vector HitLocation) : Called by the killed pawn's Died function. If the function returns True it should set the pawn's health to a value greater than 0.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool PreventDeath ([[Legacy:Pawn (UT)|Pawn (UT)]] Killed, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer, name damageType, vector HitLocation) : Called by the killed pawn's Died function. If the function returns True it should set the pawn's health to a value greater than 0.</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L31" >Line 31:</td> <td colspan="2" class="diff-lineno">Line 33:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool ReplaceWith ([[Legacy:Actor (UT)|Actor (UT)]] Other, string aClassName) : Intended to use in CheckReplacement. ReplaceWith replaces an actor ''Other'' with a new one of the class specified in aClassName.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool ReplaceWith ([[Legacy:Actor (UT)|Actor (UT)]] Other, string aClassName) : Intended to use in CheckReplacement. ReplaceWith replaces an actor ''Other'' with a new one of the class specified in aClassName.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool AlwaysKeep ([[Legacy:Actor (UT)|Actor (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. If it returns true neither the GameInfo nor any mutator will try to remove the actor. In this case no mutator receives a CheckReplacement call for this actor.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool AlwaysKeep ([[Legacy:Actor (UT)|Actor (UT)]] Other) : Called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. If it returns true neither the GameInfo nor any mutator will try to remove the actor. In this case no mutator receives a CheckReplacement call for this actor.</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; bool IsRelevant ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Also called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. It <del class="diffchange diffchange-inline">calls </del>the CheckReplacement function, so you don't need to modify IsRelevant.&lt;br /&gt;If bSuperRelevant is set to 1 the [[Legacy:GameInfo (UT)|GameInfo (UT)]] will not modify the actor (generally running filter tests). If IsRelevant returns false the actor will be destroyed.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; bool IsRelevant ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Also called by the [[Legacy:GameInfo (UT)|GameInfo (UT)]]'s IsRelevant function. It <ins class="diffchange diffchange-inline">calles </ins>the CheckReplacement function, so you don't need to modify IsRelevant.&lt;br /&gt;If bSuperRelevant is set to 1 the [[Legacy:GameInfo (UT)|GameInfo (UT)]] will not modify the actor (generally running filter tests). If IsRelevant returns false the actor will be destroyed.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool [[Legacy:CheckReplacement|CheckReplacement]] ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Called by IsRelevant() to determine whether the actor should be available within the game or not.&#160; If this function returns ''true'' for every mutator within the mutator chain then the actor will be kept within the game.&#160; If '''any''' of the mutators within the mutator chain return ''false'' then the actor will be removed.&#160; You can replace actors by using ReplaceWith() and then return false.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool [[Legacy:CheckReplacement|CheckReplacement]] ([[Legacy:Actor (UT)|Actor (UT)]] Other, out byte bSuperRelevant) : Called by IsRelevant() to determine whether the actor should be available within the game or not.&#160; If this function returns ''true'' for every mutator within the mutator chain then the actor will be kept within the game.&#160; If '''any''' of the mutators within the mutator chain return ''false'' then the actor will be removed.&#160; You can replace actors by using ReplaceWith() and then return false.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; Mutate (string MutateString, [[Legacy:PlayerPawn|PlayerPawn]] Sender) : With this function mutators are able to handle console commands. (e.g. &quot;mutate tossrelic&quot;, MutateString then is &quot;tossrelic&quot;)</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; Mutate (string MutateString, [[Legacy:PlayerPawn|PlayerPawn]] Sender) : With this function mutators are able to handle console commands. (e.g. &quot;mutate tossrelic&quot;, MutateString then is &quot;tossrelic&quot;)</div></td></tr> </table> Ramx