Hi all,
I've contacted Xienen and he has agreed to add an extended mutator class, which will have new KF-specific events called during the game. I'll be compiling a list of events, writing the mutator base class, and detailing where the hooks should be placed.
So I'm asking you guys if there are any particular events that you need, so that they can be implemented. I've constructed a basic list so far:
Extended mutator event list
PostInitGame - Called directly after the game's InitGame function has been called, this allows modifying the current match after it has been initialized (useful for altering waves, the specimen list, and so on).
MatchBegin - Called when the match has begun.
MatchEnd (bool bWin) - Called when the match has ended, and indicates whether the humans survived or not.
WaveBegin (int WaveNum) - Called when a wave has begun, indicating said wave number.
WaveEnd (int WaveNum) - Called when a wave has ended, indicating said wave number.
EnterZedTime - Called when entering zed time.
LeaveZedTime - Called when leaving zed time.
int ModifyDamage(int OriginalDamage, Pawn Injured, Pawn InstigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType) - Equivalent of game rules' ReduceDamage, called for all pawns instead of just players. Useful for implementing a custom (possibly dynamically-adjusting) difficulty setting.
ZedSpawned (KFMonster Zed, ZombieVolume ZV) - Called when a specimen has spawned, and indicates which ZombieVolume spawned it.
ZedKilled (KFMonster Zed, Controller Killer) - Called when a specimen is killed, and indicates who the killer is.
PlayerKilled (PlayerController Player, Controller Killer) - Called when a player is killed, and indicates who the killer is.
ChatMessage (Controller Sender, out string Message) - Called when a player sends a chat message, and allows altering the message. Useful for logging chat and implementing filters and user commands.
DropWeapon (Controller Player, Pickup Weapon) - Called when a player drops a weapon, with a reference to the newly-created pickup.
bool PickupWeapon (Controller Player, Pickup Weapon) - Called before a player picks up a weapon, allowing a mutator to prevent said weapon from being picked up.
bool DoorOpen (KFDoorMover Door, Controller Opener) - Called when a door is opened.
bool DoorClose (KFDoorMover Door, Controller Closer) - Called when a door is closed.
bool DoorDestroyed (KFDoorMover Door, Controller Destroyer) - Called when a door is destroyed.
Pawn SetEnemy(KFMonster Specimen, Pawn enemy) - Called when a specimen is deciding whether a specific pawn should be considered an enemy.
Example mutator
I've contacted Xienen and he has agreed to add an extended mutator class, which will have new KF-specific events called during the game. I'll be compiling a list of events, writing the mutator base class, and detailing where the hooks should be placed.
So I'm asking you guys if there are any particular events that you need, so that they can be implemented. I've constructed a basic list so far:
Extended mutator event list
PostInitGame - Called directly after the game's InitGame function has been called, this allows modifying the current match after it has been initialized (useful for altering waves, the specimen list, and so on).
MatchBegin - Called when the match has begun.
MatchEnd (bool bWin) - Called when the match has ended, and indicates whether the humans survived or not.
WaveBegin (int WaveNum) - Called when a wave has begun, indicating said wave number.
WaveEnd (int WaveNum) - Called when a wave has ended, indicating said wave number.
EnterZedTime - Called when entering zed time.
LeaveZedTime - Called when leaving zed time.
int ModifyDamage(int OriginalDamage, Pawn Injured, Pawn InstigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType) - Equivalent of game rules' ReduceDamage, called for all pawns instead of just players. Useful for implementing a custom (possibly dynamically-adjusting) difficulty setting.
ZedSpawned (KFMonster Zed, ZombieVolume ZV) - Called when a specimen has spawned, and indicates which ZombieVolume spawned it.
ZedKilled (KFMonster Zed, Controller Killer) - Called when a specimen is killed, and indicates who the killer is.
PlayerKilled (PlayerController Player, Controller Killer) - Called when a player is killed, and indicates who the killer is.
ChatMessage (Controller Sender, out string Message) - Called when a player sends a chat message, and allows altering the message. Useful for logging chat and implementing filters and user commands.
DropWeapon (Controller Player, Pickup Weapon) - Called when a player drops a weapon, with a reference to the newly-created pickup.
bool PickupWeapon (Controller Player, Pickup Weapon) - Called before a player picks up a weapon, allowing a mutator to prevent said weapon from being picked up.
bool DoorOpen (KFDoorMover Door, Controller Opener) - Called when a door is opened.
bool DoorClose (KFDoorMover Door, Controller Closer) - Called when a door is closed.
bool DoorDestroyed (KFDoorMover Door, Controller Destroyer) - Called when a door is destroyed.
Pawn SetEnemy(KFMonster Specimen, Pawn enemy) - Called when a specimen is deciding whether a specific pawn should be considered an enemy.
Example mutator
Spoiler!
Code:
class ExampleMutator extends KFMutator;
function PostInitGame()
{
// Can be used for example to modify the specimen/wave lists
// ...
super.PostInitGame();
}
function MatchBegin()
{
// Indicates that the match has begun
// ...
super.MatchBegin();
}
function MatchEnd(bool bWin)
{
// Indicates that match has ended, along with if we (humans) won or not
// ...
super.MatchEnd(bWin);
}
function WaveBegin(int WaveNum)
{
// Indicates that a wave has begun
// ...
super.WaveBegin(WaveNum);
}
function WaveEnd(int WaveNum)
{
// Indicates that a wave has ended
// ...
super.WaveEnd(WaveNum);
}
function EnterZedTime()
{
// Indicates that we are entering zed time
// ...
super.EnterZedTime();
}
function LeaveZedTime()
{
// Indicates that we are leaving zed time
// ...
super.LeaveZedTime();
}
function int ModifyDamage(int OriginalDamage, Pawn Injured, Pawn InstigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType)
{
// Allows altering the amount of damage a pawn receives, for all types of pawn
// ...
super.ModifyDamage(OriginalDamage, Injured, InstigatedBy, HitLocation, Momentum, DamageType);
}
function ZedSpawned(KFMonster Zed, ZombieVolume ZV)
{
// Indicates that a specimen has spawned, and which ZombieVolume spawned it
super.ZedSpawned(Zed, ZV);
}
function ZedKilled(KFMonster Zed, Controller Killer)
{
// Indicates that a specimen has died, and who killed him
// ...
super.ZedKilled(Zed, Killer);
}
function PlayerKilled(PlayerController Player, Controller Killer)
{
// Indicates when a player dies, and who killed him
// ...
super.PlayerKilled(Player);
}
function ChatMessage(Controller Sender, out string Message)
{
// Indicates when a player sends a message, and allows modifying it
// Useful for monitoring chat and implementing filters and user commands
// ...
super.ChatMessage(Sender, Message);
}
function DropWeapon(Controller Player, Pickup Weapon)
{
// Indicates when a player drops a weapon
super.DropWeapon(Player, Weapon);
}
function bool PickupWeapon(Controller Player, Pickup Weapon)
{
// Indicates that player is trying to pick up a weapon, which can be prevented
// ...
return super.PickupWeapon(Player, Weapon);
}
defaultproperties
{
GroupName="KF-ExampleMutator"
FriendlyName="Example Mutator"
Description="..."
}
Last edited: