Category: Code
Reproducibility: Always
Summary: In the beta, mod weapons no longer give dosh on zed kills.
Description: This is caused by a new validation function added to KFGame.KFPawn in the beta, ValidateDamageForDamageHistory(). In the function above it, UpdateDamageHistory() (about lines 2807-2868, v1080 SDK), it uses this function (about line 2816) before adding the given damage to the zed's damage history. This damage history is used to distribute XP and dosh upon the zed's death in KFGame.KFGameInfo function DistributeMoneyAndXP() (about line 2410).
When using a custom weapon, however, it fails this validation check, causing the damage to not be added and thus not giving out XP or dosh to the player using this weapon. This is likely intentional for the XP side to prevent leveling exploits (though see P.S. below), but unintentional for the dosh side.
It is likely that, in order to fix this, this function will have to be moved to KFGameInfo.DistributeMoneyAndXP() as a final validator for giving out XP for a damage type, as the XP check is done after the dosh rewards.
Online/Offline: Both
P.S. For the XP side of this, make sure that any XP that would have been given is still routed through KFGame.KFPlayerController function OnPlayerXPAdded(). This is a mod notification function, and is necessary for some mods (e.g. ServerExt) to function properly. This might require KFGameInfo.AddPlayerXP() to do the validations itself.
Reproducibility: Always
Summary: In the beta, mod weapons no longer give dosh on zed kills.
Description: This is caused by a new validation function added to KFGame.KFPawn in the beta, ValidateDamageForDamageHistory(). In the function above it, UpdateDamageHistory() (about lines 2807-2868, v1080 SDK), it uses this function (about line 2816) before adding the given damage to the zed's damage history. This damage history is used to distribute XP and dosh upon the zed's death in KFGame.KFGameInfo function DistributeMoneyAndXP() (about line 2410).
When using a custom weapon, however, it fails this validation check, causing the damage to not be added and thus not giving out XP or dosh to the player using this weapon. This is likely intentional for the XP side to prevent leveling exploits (though see P.S. below), but unintentional for the dosh side.
It is likely that, in order to fix this, this function will have to be moved to KFGameInfo.DistributeMoneyAndXP() as a final validator for giving out XP for a damage type, as the XP check is done after the dosh rewards.
Online/Offline: Both
P.S. For the XP side of this, make sure that any XP that would have been given is still routed through KFGame.KFPlayerController function OnPlayerXPAdded(). This is a mod notification function, and is necessary for some mods (e.g. ServerExt) to function properly. This might require KFGameInfo.AddPlayerXP() to do the validations itself.