You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to be caused by the reward calculating what to set the soldier's base stat to by using GetMaxStat.
presumably it could be fixed by changing GetMaxStat to GetBaseStat, but i haven't tested that to see if it results in any other wierdness.
vanilla modifiers (gremlin, skullmining) work around this by being built into the aim calculation rather than being actual stat mods, so this is primarily an issue with modded bonuses.
The text was updated successfully, but these errors were encountered:
Did a bit of logging with this - Specialist with Gremlin MKII and Iridar's Hacker's Laptop - Base hack stat of 55 and with +25 from Hacker's Laptop:
function ApplyEnemyProtocol(XComGameState_Unit Hacker, XComGameState_BaseObject HackTarget, XComGameState NewGameState)
{
local XComGameState_Unit HackerState;
HackerState = XComGameState_Unit(NewGameState.ModifyStateObject(class'XComGameState_Unit', Hacker.ObjectID));
`log("Enemy protocol acitvated: Old Base Stat:" @ HackerState.GetBaseStat(eStat_Hacking) @ "Old Max Stat: " @ HackerState.GetMaxStat(eStat_Hacking) @ "Old CurrentStat: " @ HackerState.GetCurrentStat(eStat_Hacking),,'BDLOG');
HackerState.SetBaseMaxStat(eStat_Hacking, HackerState.GetMaxStat(eStat_Hacking) + ENEMY_PROTOCOL_HACKING_BONUS);
`log("Enemy protocol acitvated: New Base Stat:" @ HackerState.GetBaseStat(eStat_Hacking) @ "New Max Stat: " @ HackerState.GetMaxStat(eStat_Hacking) @ "New CurrentStat: " @ HackerState.GetCurrentStat(eStat_Hacking),,'BDLOG');
}
[0105.52] BDLOG: Enemy protocol activated: Old Base Stat: 55.0000 Old Max Stat: 80.0000 Old CurrentStat: 80.0000
[0105.52] BDLOG: Enemy protocol activated: New Base Stat: 100.0000 New Max Stat: 125.0000 New CurrentStat: 125.0000
So this gave a hack boost of essentially 45 to the unit (+25 from items and +20 from default.ENEMY_PROTOCOL_HACKING_BONUS) instead of just 20.
Doing it with just a Gremlin equipped gives different results:
[1589.38] BDLOG: Enemy protocol acitvated: Old Base Stat: 75.0000 Old Max Stat: 75.0000 Old CurrentStat: 75.0000
[1589.38] BDLOG: Enemy protocol acitvated: New Base Stat: 95.0000 New Max Stat: 95.0000 New CurrentStat: 95.0000
So it seems Mitz is correct regarding how these are applied.
Tested this a fair bit with changing the code to base stat and this does appear to fix the problem quite well. Further testing required but looks promising.
This appears to be caused by the reward calculating what to set the soldier's base stat to by using GetMaxStat.
presumably it could be fixed by changing GetMaxStat to GetBaseStat, but i haven't tested that to see if it results in any other wierdness.
vanilla modifiers (gremlin, skullmining) work around this by being built into the aim calculation rather than being actual stat mods, so this is primarily an issue with modded bonuses.
The text was updated successfully, but these errors were encountered: