amolstormes Posted August 15, 2025 Posted August 15, 2025 I'm using the banemaster's edition of defeat and find that male npcs keep on getting assaulted by creatures and female npcs despite having that category disabled in the mod menu. I tried reinstalling the mod and disabling creature on female as well but nothing prevents this.
traison Posted August 16, 2025 Posted August 16, 2025 (edited) It's a logic error in defeatconfig.pex. In the SexCombination function, it has this: ... If !SexLabConfig.UseCreatureGender Return True Else ... Meaning, if SexLab's configuration is set to not UseCreatureGender, then Defeat will not check the gender of the victim despite what you've set its configuration to. Change it to this to fix the issue: ... If !SexLabConfig.UseCreatureGender ;Return True If (McmConfig.CreaOnFemale && VictimFemale) Return true ElseIf (McmConfig.CreaOnMale && !VictimFemale) Return true EndIf Else ... Edit: Turns out this is not enough. Need to look into it again. Edited August 16, 2025 by traison
traison Posted August 16, 2025 Posted August 16, 2025 (edited) DefeatNVNOnHitScr is also full of places where config settings aren't checked. This thing is all spaghetti though so sorting this out is going to take a while. Edit: Add a new function: Bool Function IsVictimValid() If (McmConfig.CreaOnFemale && IsFemale) Return true ElseIf (McmConfig.CreaOnMale && !IsFemale) Return true EndIf Return false EndFunction Then call it in the OnHit and OnEnterBleedOut events: If Victim && !Victim.HasMagicEffect(RessConfig.MiscMagicEffects[0]) && (RessConfig.NVNKDtype <= 2) && IsVictimValid() ... If Victim && !Victim.HasMagicEffect(RessConfig.MiscMagicEffects[0]) && IsVictimValid() Not tested. Edited August 16, 2025 by traison
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now