• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code KF RPG Mod.

Snebbers

Member
Jul 27, 2011
23
0
Been running through this recently and have been fixing things to my players standards.. However. I notice there is a rather prominent bug and I am unsure of how to fix it... The bug is that your weapon damage multiplier in the mod ONLY counts for the weapon that you have equipped... But say if you have placed a turret and you are using a flamethrower for example, you would get the damage increase from the flamethrower skill and the All damage skill respectively. However the catch is, that because the turret is unequipped and is not currently in the players hands, then the turret only receives bonuses from the All Damage skill and not the Turret Damage skill..

The file in question (I believe) is:
ID_RPG_Base_Skill_Weapon.uc
Code:
class ID_RPG_Base_Skill_Weapon extends ID_RPG_Base_Skill;

var float DamageMulti;
var float ReloadMulti;
var float ClipMulti;
var class<ID_RPG_Base_Weapon> Weapon;

[COLOR=Yellow]static function float GetDamageMulti(ID_RPG_Base_HumanPawn Player, class<DamageType> DmgType)
{
    if (ClassIsChildOf(Player.Weapon.class, default.Weapon))
        return GetDamageMultiInternal(GetSkillLevel(Player));
    return 0;
}[/COLOR]

static function float  GetDamageMultiInternal(int level)
{
    return level * default.DamageMulti;
}

static function string GetCurrentSkillInfoInternal(int level)
{
    local float damage;
    damage = GetDamageMultiInternal(level);
    return "+" $ ToPercent(damage) @ "damage with" @ default.Weapon.default.ItemName;
}

static function string GetNextSkillInfoInternal(int level)
{
    return GetCurrentSkillInfoInternal(level);
}

static function string GetSkillTitle(ID_RPG_Stats_ReplicationLink Link)
{
    return default.Weapon.default.ItemName @ "Mastery";
}

defaultproperties
{
     DamageMulti=0.050000
     Weapon=Class'IDRPGMod.ID_Weapon_Base_AA12AS'
     Title="Weapon Mastery"
}
This is exactly as it was in the sourcecode.. What I am looking for is a method to get the IDRPGMod to read the turret skill when the turret is not equipped and to make it so that the damage bonus from the turret skill ISN'T called twice when the turret is equipped. Any help would be appreciated.

Also, another bug I have experienced, is with the SCAR. The first shot before any recoil reduction takes place is so inaccurate, it can shoot behind you. There is no way what-so-ever of estimating where the bullet will land. It doesn't matter if it is in Semi-Auto or Full-Auto. The first bullet (When there is maximum accuracy) Will fly off in a random direction. Any insight into this issue is also appreciated.
 
Last edited: