Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
You'll have to decide if you prefer not being crit by low hit shot or dodge being completely nullified on a 100% shot. A possible solution if a modder wants to, is to combine both mods into one and have both changes being in a single override. But that's another topic and I am not an expert on it.
I understood the bar should show 80 dodge, but as for hit and crit, would it be 40/40 hit/crit or does crit remain unscaled so it is now 30/50 hit/crit?
I was having an issue where my grenades were missing more often than they were hitting - not being dodged, having falloff from terrain, or being blast shielded, actually straight up missing (printing "Missed!"), even if they were literally dropped in the target's panel.
After a LOT of binary testing, I narrowed the issue down to this mod, even though that makes no sense. With this mod disabled, grenades no longer miss.
Obviously it's nonsensical that this mod is the cause of the issue, which is why it took me so long to figure it out, but it's definitely this one - at least, as definitely as I can be with only one person testing it; it's possible I just got lucky multiple times, but based on previous results (where if you threw a grenade into a pack of 3 enemies you'd be lucky if it hit one of them at all), I'm fairly certain this is the cause. Will update if it starts happening again.
Thanks for the clarification! And, again, for the mods :)
Which is ultimately, why you have to do a loop to fixup ability templates. Well, that would appear to be the neatest method anyway, if you check the change notes, you'll see I used to use a fixed list of abilities to fixup. Notice how I check the class property, not using IsA() or cast/none check, since I don't want to change abilities which use X2AbilityToHitCalc_StandardAim itself, not a derived class.
So although there may now before more comprehensive guides out there now about how Overrides work, and therefore their limitations, I was there there for what you might call the "first wave" of mods when we just had to find out by trial and error!
Anway, briefly, Overrides can only change class references which are resolved at run time, not class references resoved at compile time. In practice, this means anywhere you see something like class'X2AbilityToHitCalc_StandardAim' in code, and crucially nothing In DefaultProperties block, since that is not "code" in the sense of code that runs, and is fully resolved during compilation.
Your "Scars are Back" Mod is amazing! Always been one of my favorites! ;)
Anyway, I haven't still found a way to make my Override_X2AbilityToHitCalc_StandardAim work in WotC. Yours works well because it doesn't override the GetHitChance Function... but in my case I have no idea what is causing the game freezing (Only when that funciton is overridden! even with the original unchanged WotC one!)... probably some variable belonging to parent/child Classes not seen from child/parent? Well, instead of keeping to try to find out the reason I am deciding to try another method and, Instead of overriding that Class I will try to create my custom class "not overriding the original" (and identical to X2AbilityToHitCalc_StandardAim except for the GetHitChance personal change) and replace it manually similarly as shown before in every Ability that needs it (and paying attention to preserve those .AbilityToHitCalc.Variables)... ;)
AbilityToMeleeTemplate = X2AbilityToHitCalc_StandardMelee(AbilityTemplate.AbilityToHitCalc); if (AbilityToMeleeTemplate != None) continue; //EVEN THIS LINE... JUST IN CASE X2ABILITYTOHITCALC_STANDARDMELEE'S FATHER (_STANDARDAIM) DOESNT SEE THE .BMELEEATTACK VARIABLE SET...
AbilityTemplate.AbilityToHitCalc = new class'Override_X2AbilityToHitCalc_StandardAim';
AbilityToHitTemplate = X2AbilityToHitCalc_StandardAim(AbilityTemplate.AbilityToHitOwnerOnMissCalc); if (AbilityToHitTemplate == None) continue;
AbilityTemplate.AbilityToHitOwnerOnMissCalc = new class'Override_X2AbilityToHitCalc_StandardAim’;}}
AbilityToHitTemplate.bHitsAreCrits == true || //DEFINITION NOT REFERENCING DIRECTLY TO HABILITYTOHITCALC
AbilityToHitTemplate.bMultiTargetOnly == true || //AND THEREFORE USING THE UNOVERRIDDEN HITABILITY CLASS
AbilityToHitTemplate.bOnlyMultiHitWithSuccess == true || //... ?? ... ONLYMULTIHITWITHSUCCESS DEFINED ONLY ON SHARPSHOOTER'S FACEOFF ABILITY (AS FALSE)... BUT UNDEFINED BOOLS ARE ALWAYS FALSE... MAYBE FIREAXIS IS STILL "THINKING ABOUT IT"???
AbilityToHitTemplate.bGuaranteedHit == true ||
AbilityToHitTemplate.FinalMultiplier != 1 ||
AbilityToHitTemplate.BuiltInHitMod > 0 || //) continue;
AbilityToHitTemplate.BuiltInCritMod > 0 ||
function ReplaceStandardAimAlsoInAbilitiesWithUnusuallyDefinedHitCalc() {
local X2DataTemplate DataTemplate;
local X2AbilityTemplate AbilityTemplate;
local X2AbilityToHitCalc_StandardAim AbilityToHitTemplate;
local X2AbilityToHitCalc_StandardMelee AbilityToMeleeTemplate;
foreach class'X2AbilityTemplateManager'.static.GetAbilityTemplateManager().IterateTemplates(DataTemplate, None) {
AbilityTemplate = X2AbilityTemplate(DataTemplate); if (AbilityTemplate == None) continue;
AbilityToHitTemplate = X2AbilityToHitCalc_StandardAim(AbilityTemplate.AbilityToHitCalc); if (AbilityToHitTemplate == None) continue;
if (AbilityToHitTemplate.bIndirectFire == true || //HITABILITIESTEMPLATE WITH THESE VARIABLES PRESENT
AbilityToHitTemplate.bReactionFire == true || //ALREADY CORRECTLY USE THE OVERRIDDEN HITABILITY CLASS
My own attempt to check if the original X2AbilityToHitCalc_StandardAim is still being used, is etself affected by the override, since I name the class in open code (which override affects), not define it in defaultproperties where it wouldn't be
(cont.) The reason why the mod can't work just with overrides, is that a lot of the uses of "standard aim" come from variants set up in "defaultproperties" in X2Ability, and defaultproperties are "Immune" to overrides.
I was dreading making alist of the X2AbilityThoHitCalc_StandardAim properties which would have to be copied over! But there way be clverer ways around the issue....
So yeah, it is true that it doesn't transpose over those variables (are there any you missed?).
AbilityTemplate.AbilityToHitCalc.bIndirectFire
AbilityTemplate.AbilityToHitCalc.bReactionFire
AbilityTemplate.AbilityToHitCalc.bAllowCrit
AbilityTemplate.AbilityToHitCalc.bHitsAreCrits
AbilityTemplate.AbilityToHitCalc.bMultiTargetOnly
AbilityTemplate.AbilityToHitCalc.bOnlyMultiHitWithSuccess
AbilityTemplate.AbilityToHitCalc.bGuaranteedHit
AbilityTemplate.AbilityToHitCalc.FinalMultiplier
AbilityTemplate.AbilityToHitCalc.BuiltInHitMod
AbilityTemplate.AbilityToHitCalc.BuiltInCritMod
I don't know if EU-Rolls copied that change when the patch over a year ago put that in (like this mod (under a different name, see background above) EU rolls predates that patch change). It won't have simply inherited the change, because as I say above, it doesn't use that section of code anyway. Ask over in EU Aim rolls, and if it does stop dodges at 100%+ to hit, ask
Finally, note EU rolls does make dodges less likely. EG if you have 99% to hit (so vanilla allows dodge), 50% crit, 50% dodge, than vanilla(and this mod) would give you 1% chance to miss, 50% chance to crit, 49% chance to graze. EU rolls will give 1% chance to miss, 49.5% chance to crit, 24.75 chance to graze and 24.75% chance to hit without critting.
Anyway, this mod works by changing the code which works out the "boundaries" for the four different results (standard hit/crit/graze/miss), and its at that stage that dodges are stopped for 100%+ hit chances. That code is completely unused by EU rolls, since to roll them seperately that's irrelavant.
Anyway I definitely consider both of these a "fix". If u don't use EU aim rolls, it basically makes it so that SOMETIMES you'll want lower aim to ensure a crit IF you hit. For example: your ranger is your last solider with actions, and he can easily flank the ADVENT officer, but will ONLY kill him on a crit. If I stand next to him I'll have 100% hit and 50% crit. If I stand slightly further I will have 70% to hit and 50% to crit. Now I'm not a mathematician, but without EU aim rolls I'd rather take the latter since IF I hit there's like a +-80% chance he's gonna get crit (I want him dead, not damaged). With EU aim rolls I'd take the former (which should be the obvious choice in a logical XCOM 2 world).
Anyway EU rolls seperates out hit, crit and dodge into seperate rolls, rather than slotting them all into a single 1-100 roll, so the issue of how 100+ hit affects the other two has no meaning to EU rolls.
So I'm not sure what you would expect from both this mod and EU rolls "working together" (which of course they don't at the moment, due to clashing overrides).