XCOM 2
XModBase 2.0 for War of the Chosen (beta)
 This topic has been pinned, so it's probably important
xylthixlm  [developer] 8 Sep, 2017 @ 12:59am
Bug reports
This thread is for bug reports. Please be as descriptive as you can, and include any code needed to trigger the problem (I suggest throwing it on pastebin.com).
Last edited by xylthixlm; 8 Sep, 2017 @ 1:00am
< >
Showing 1-10 of 10 comments
RedDobe 10 Jul, 2018 @ 11:21pm 
It's not handling multiplicative offense stat effects correctly. For the simple red fog plugin when you use the multiplicative stat effect on offense the effect is negated. IE. When you set it at .75 the correct calculation would be a aim penalty of -25% of the base offense for that character. But that number is being changed to +25% instead, giving an aim bonus when it is meant to affect the aim negatively. All of the other stats work with red fog multiplicative, so it is something particularly with your offense calculation. Thanks.
xylthixlm  [developer] 11 Jul, 2018 @ 10:16am 
Which class specifically isn't handling multiplicative offense stat effects correctly?
RedDobe 11 Jul, 2018 @ 3:35pm 
Here is the code for the function to create the ability. Thanks for looking into it.

static function X2AbilityTemplate CreateLightRedFog()
{
local XMBEffect_ConditionalStatChange Effect;
local X2Condition_UnitStatCheck Condition;
//local ChrmSRF_Getter Getter;
local int idx;

//Getter = new class 'ChrmSRF_Getter';
Condition = new class'X2Condition_UnitStatCheck';
Condition.AddCheckStat(eStat_HP, default.LightBreakpoint, eCheck_LessThan,,, true);
Condition.AddCheckStat(eStat_HP, (default.ModerateBreakpoint - 1), eCheck_GreaterThan,,, true);

Effect = new class'XMBEffect_ConditionalStatChange';
for(idx=0;idx<default.StatList.Length;idx++)
{
//Effect.AddPersistentStatChange(eStat_Mobility, -2);
//Effect.AddPersistentStatChange(eStat_Offense, -10);
if(!default.bPercentage[idx])
Effect.AddPersistentStatChange(default.StatList[idx], default.LightEffect[idx]);
else
Effect.AddPersistentStatChange(default.StatList[idx], default.LightEffect[idx], MODOP_Multiplication);
}
//ConditionalStatChangeEffect.SetDisplayInfo(ePerkBuff_Bonus, Template.LocFriendlyName, Template.LocHelpText, Template.IconImage, true,,Template.AbilitySourceName);

// The effect only applies while wounded
Effect.Conditions.AddItem(Condition);
//Effect.AbilityTargetConditionsAsTarget.AddItem(Condition);

// Create the template using a helper function
return Passive('LightRedFog', "img:///UILibrary_XPACK_Common.PerkIcons.UIPerk_mountainmist", true, Effect, true, true);
}
xylthixlm  [developer] 11 Jul, 2018 @ 10:57pm 
XMBEffect_ConditionalStatChange just uses XComGameState_Unit.ApplyEffectToStats to apply the stat change to the unit, so if one part is not working and the other modifications are, it's almost certainly a bug in the game code. I'm afraid I have no idea what might be going on.
Last edited by xylthixlm; 11 Jul, 2018 @ 10:58pm
RedDobe 12 Jul, 2018 @ 7:40am 
Thanks for checking on that. I wasn't sure if it was your code or the actual games. Take care. :)
Synapsiz 24 Oct, 2018 @ 6:16pm 
Not sure if this qualifies as a bug, but the +1 bonus on items from the packmaster perk in your examples does not apply to items added your "XMBEffect_AddUtilityItem".
bstar 18 May, 2020 @ 10:06am 
Hi xylthixlm, love XModBase, thank you for making it! Not sure if you're still working on/updating it, but:

One issue with XMBEffect_BonusDamageByDamageType: When used for a passive ability (e.g. your Pyromaniac example), it does not display a damage preview (e.g. adding psi damage doesn't affect Soulfire's damage preview, fire doesn't affect Flamethrowers etc.). I believe the damage preview works with grenades though and the damage dealt is also correctly affect for all skills I have tested so far.
Dęąth Viper 16 Apr, 2022 @ 7:03pm 
D:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Development\Src\XModBase_Core_2_0_2\Classes\XMBAbilityToHitCalc_StandardAim.uc(300) : Error, Unrecognized member 'GetStatModifiersFixed' in class 'XComGameState_Unit'


Is this safe to ignore?? It gives me a failed build. I havent even started putting in code yet just wanted to make sure all the files were locked in
greenpeapea 19 Jun, 2022 @ 12:49pm 
Originally posted by Frizzeldian12:
D:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Development\Src\XModBase_Core_2_0_2\Classes\XMBAbilityToHitCalc_StandardAim.uc(300) : Error, Unrecognized member 'GetStatModifiersFixed' in class 'XComGameState_Unit'


Is this safe to ignore?? It gives me a failed build. I havent even started putting in code yet just wanted to make sure all the files were locked in

I am also seeing this issue and do not know how to resolve.
Dęąth Viper 22 Oct, 2022 @ 1:41am 
Originally posted by greenpeapea:
Originally posted by Frizzeldian12:
D:\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\Development\Src\XModBase_Core_2_0_2\Classes\XMBAbilityToHitCalc_StandardAim.uc(300) : Error, Unrecognized member 'GetStatModifiersFixed' in class 'XComGameState_Unit'


Is this safe to ignore?? It gives me a failed build. I havent even started putting in code yet just wanted to make sure all the files were locked in

I am also seeing this issue and do not know how to resolve.
Guess we will never know man... Holy crap
< >
Showing 1-10 of 10 comments
Per page: 1530 50