ZerdBG3 / RAW

MIT License
31 stars 13 forks source link

See Invisibility Rework #185

Closed drkekyll closed 1 month ago

drkekyll commented 11 months ago

Added copies of all invisibility statuses with modified boost lines. Removed SEE_INVISIBILITY_SEEN from SEE_INVISIBILITY aura. Now just applies SEE_INVISIBILITY_REVEAL. Invisibility statuses are replaced with modified copies when removed by SEE_INVISIBILITY_REVEAL. When SEE_INVISIBILITY_REVEAL is removed, original invisibility statuses are replaced. NPC short range invisibility detection duration changed because at 0 duration it simply removed invisibility. Checks for _SEEN invisibility statuses and ability to sense invisible creatures added to reaction interrupts based on moving in and out of weapon range. Also modified removal conditions on invisibility. It's no longer removed by taking damage, but is removed by any attack whether it successfully deals damage or not.

drkekyll commented 11 months ago

I have also been working on an edit that uses SE to add Stealth checks and the ability to make an active Perception check to try and find sneaking invisible creatures, but Eric was saying that NPCs don't really use stealth and don't have the means to use it intelligently, so the only thing it adds is the ability to avoid the NPC seek ability by sneaking while invisible.

FelipeRenault commented 11 months ago

Well, invisibility gives you heavily obscured against creatures that can't see invisible. That's all there is to it. It gives you the prerequisite to TRY to sneak, but if the enemy can see invisible, there's not even a stealth check to find the sneaking invisible creature. Seeing invisible completely nullifies invisibility and we're back to normal stealth rules, so if you're out in the open, there shouldn't even need a sneak check against perception, you're instantly seen. I didn't get to test the changes you've made, but my only suggestion would be to make sure the aura that reveals invisible creatures have a LOS check, so we simulate the "out in the open" part at least

drkekyll commented 11 months ago

Well, technically, See Invisible only counters the first bullet of the invisible condition that talks about seeing the creature, so I didn't put the RAW_CanSeeInvisibleTarget() check on the advantage boosts. The invisible condition heavily obscures you in one bullet and gives attackers disadvantage against you and you advantage attacking others in a separate bullet. I interpreted it the same way I interpret Shadow of Moil's "you ... become heavily obscured to others" clause. It's its own benefit unrelated to the light level rules. If you interpret the invisible condition differently, I can easily add the check to the advantage boosts.

I recognize this is a pedantic interpretation. I have no real preference; I just default to pedantry in cases of RAW.

But regarding the stealth check, you're right. I just forgot the normal stealth and perception checks would resume if the invisible character is detected. No need for special checks.

FelipeRenault commented 11 months ago

This is one of the rare instances where I disagree with Sage Advice, JC, or whatever. It feels super weird to me that an invisible creature still gets adv on atk rolls (and causes disadv on attacks against it) when matched against a creature that can see invisible See Invisibility is already super niche, since it's only useful against invisible creatures, so it's a reaction to something the opponent does, contrary to choosing to go invisible, which works most of the time. This makes preparing See Invisibility a large sacrifice of your prepared slots, and to make it so the few times when it's useful, be weak, is very weird. I'd argue that characters with true sight or that cast See Invisibility treat invisible enemies as if they weren't invisible at all - pretty much as if they didn't have the status against them.

drkekyll commented 11 months ago

I disagree with Sage Advice a lot, so you'll get no complaints from me. I'll add the checks to the boosts and the LOS check when I get home.

drkekyll commented 11 months ago

After a little more testing, I noticed that making an opportunity attack doesn't seem to break invisibility. Also, I realized I can't use or where I did in one of those checks. Need to change those to | real quick.

A little more testing and it seems like the reaction triggers, but the invisible enemy doesn't actually make the attack. I get the feeling this isn't from these changes, but I'll look into it more. Confirmed vanilla behavior.

FelipeRenault commented 10 months ago

Sorry for taking this long to look into it. Now that I've released v4.0.0.0 and the mod is fully optionable, I'll return to testing this

drkekyll commented 9 months ago

No problem. Just fixed an issue with Greater Invis not going away if you were detected and concentration broke. Also made the reveal status remove itself if you lose invis so you'd reappear properly, but in retrospect that might be better fixed with changing which status has the effect attached to it. Removed a bunch of extra closing parentheses too.

data "InterruptFlags" "InterruptWhileInvisible" can be added to AoO and the PAM and WarCaster interrupts to make them work while invisible, but I didn't do that because, not having played the game very far, I don't know how important it is that enemies don't AoO when they're invisible.

drkekyll commented 8 months ago

I went ahead and added the facing check so you can test it out whenever you get back to the mod.

drkekyll commented 8 months ago

Alternatively there's IsInSightPyramid(context.Source,context.TargetPosition) if you want the narrower sight cone.

edit: It occurs to me, though, that this might limit the ability to See Invisibility if you are blinded. I'll test it, but I don't think the rules are explicit on how See Invisibility is affected by being blinded.

update: Yeah, blindness limits it if we use this one. Makes sense to me, but I guess it comes down to how you interpret RAW.

re-edit: I'm an idiot and forgot that SG_Blinded stops See Invisibility on its own. I don't think anything else uses the sight range reduction, but I'll test it out anyway.

re-update: IsInSightPyramid() is indeed affected by SightRangeMaximum() (and I assume SightRangeOverride()), so going with that one will also be affected by any non SG_Blinded sight range limits anyone imposes with other mods.

drkekyll commented 8 months ago

Narrowing the effect to the sight cone in testing made it painfully obvious how short the range on Detect Invisibility is. RAW it has no range, so I increased it to the sight range given for hero characters in Character.txt.

drkekyll commented 7 months ago

Also removed those entity interaction remove events from most of the invisibility statuses.

Also, I didn't change it, but it occurs to me that the NPC SEE_INVISIBILITY_SEEK status should probably be excluded from the things that allow you to avoid having disadvantage attacking invisible creatures since it's not really meant to be See Invisible so much as represent an active perception check so they can pinpoint and attack your location.

And, in retrospect, I didn't test in bright light to see if GameplayObscurity() not working is an actual problem. We might need to change the initial statuses to boosts if I wasn't just doing something wrong with it.