[0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being applied

Curated user bug reports with enough information to reproduce problem. Moderators will move topics here from Help & Support once a bug has been confirmed and enough information has been provided.
Post Reply
AuntiePixel
Posts: 34
Joined: Sat Jan 30, 2021 6:24 pm
Location: US-central KY

[0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being applied

Post by AuntiePixel »

1. Cast invisibility
2. Attack an enemy
3. Wait for invisibility icon to disappear, noting how long it takes
4. Cast invisibility again (buff icon visible, character invisible)
5. Attack an enemy (buff icon still visible, character now visible)
6. Cast invisibility again before the icon disappears (buff icon still visible, character still visible)

Obs: @3, invisibility effect stops as soon as you make a successful attack, but the icon lingers for a few seconds. Sometimes the icon is solid, sometimes the icon blinks as though it were fading out. Not completely sure what causes the icon to flash or not, but this is tangential as it shouldn't be present at all if the effect is not present.

@6, Casting invis before the buff icon disappears will refresh the buff icon, but it doesn't apply the invisibility effect to your character. HUD shows active invisibility, but enemies will continue to track and attack you. At this point, attacking an enemy does not break the invisibility spell. It seems like the buff icon and the spell are tracked separately? Casting invisibility again at this point only refreshes the buff icon. Your character remains visible and enemies will still track and attack you. At this point the only way I've found to become invisible again is to wait for the spell icon to fade after the normal duration of the spell, then cast invis again. And be careful not to reapply it until after the buff icon vanishes.

Workaround ideas that I suspect will work but I haven't tried: 1. Dispell magic on self may remove the invis buff icon, allowing you to reapply the spell correctly. 2. Cast a different invisibility spell instead of recasting the same invisibility spell. 2.a (does the same or a different buff icon make a difference)

Expected: a successful attack should immediately break invisibility, which it does, and the buff icon should immediately vanish to match this state.

Notes; It's possible this is working as intended to match behavior in DFVanilla. If so, this may be a case where accuracy to the original might need to be sacrificed for a better user experience, imho.

User avatar
Interkarma
Posts: 6133
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being appli

Post by Interkarma »

If you cast Invisibility (Normal or True) while an enemy is already aware of you, they will move to your last known position to try and find you. Within melee range, they might still become aware of you. If you hit them from afar with a ranged attack, they'll run to where they think the attack came from. Imagine them swinging their weapons around blindly trying to find their invisible foe, just like you might when confronted with an invisible enemy. And don't forget some enemies can just see through invisibility at all times.

It's fun teasing the city watch with Invisibility True to get a feel for how the AI tries to locate you when they can't directly see you. Hit them from afar and run to a different spot, and they'll go to your previous position. Here's my old Twitter video of this in action. They can't see me directly, but they can tell where the fireball came from and will go looking for me. But they can't see where I moved to after attacking them.

https://twitter.com/gav_clayton/status/ ... 4860380160

When attacking an enemy entity, BreakNormalPowerConcealmentEffects() is called on each attack. This method should immediately end any Normal concealment effect, but I can confirm there's a delay here with spell icon that isn't intended. I'll move this to bug reports for review.

Other than icon persisting too long, the various concealment effects are operating as intended.

AuntiePixel
Posts: 34
Joined: Sat Jan 30, 2021 6:24 pm
Location: US-central KY

Re: [0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being appli

Post by AuntiePixel »

Hmm.. I'll try testing it again more carefully, but what you describe is not what I'm seeing. I'm aware of the attacking your last location behavior. It's pretty cool, and it's gotten me once or twice.

The effect I'm seeing is that enemies will stay aware of me and track me no matter how I move or how many times I recast the spell. And attacking enemies doesn't end the non-functioning spell. I'll try to get a video clip later to show what I'm seeing.

AuntiePixel
Posts: 34
Joined: Sat Jan 30, 2021 6:24 pm
Location: US-central KY

Re: [0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being appli

Post by AuntiePixel »

Here's a video that shows what I'm talking about pretty well. 0-40 seconds shows the normal behavior when you wait for the icon to vanish before recasting. At about 42 seconds, you can see me refresh invisibility before the previous buff icon goes away, and from that point on the enemy can track me despite strafing, dodging, running away, and recasting the spell many times. Then I attack the enemy, and the spell icon stays active despite attacking the enemy.


User avatar
Interkarma
Posts: 6133
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being appli

Post by Interkarma »

Your video also shows what I'm describing. :) Notice after you recast invisibility, they actually go to your last known position. They only become aware of you again when you get close enough for them to sense you.

If you keep your distance, they won't be able to track you while invisible. This isn't related to recasting invisibility, it's because the AI is already aware of you and doing whatever it can to fight an invisible foe using all of it's senses, the same way a human player might.

But the icon shouldn't persist so long after attacking, that's definitely a bug. It's sticking around until the icons refresh at start of next magic round, they need to be refreshed as soon as effect breaks.

The effect is operating as intended. The icon is the accepted bug here.

User avatar
Interkarma
Posts: 6133
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being appli

Post by Interkarma »

Actually, I can see what you're explaining now. I can see them continue to follow you towards end of video. Not sure of cause for that, I'll review this when I look at icon bug.

Thanks for your patience. :)

AuntiePixel
Posts: 34
Joined: Sat Jan 30, 2021 6:24 pm
Location: US-central KY

Re: [0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being appli

Post by AuntiePixel »

Cool, glad you saw it. I was wondering if I was really misunderstanding you. No worries. Glad to help. :geek:

User avatar
Interkarma
Posts: 6133
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.0] Invisibility buff icon does not disappear quickly enough, casting again prevents the spell from being appli

Post by Interkarma »

Completely my error. :)

I think I've worked out what's happening. The way the normal power concealment is currently ended happens at end of magic round. This is leading to a situation where the recast is actually stacking on top of a terminated effect and keeping it alive, but not actually attached to player properly. When timed right, it's possible to persist the terminated effect so it appears to still be running, but from the enemy perspective you no longer have active invisibility applied. So there ends up being a gap in logic between two different systems - effect persistence and enemy AI.

Should be an easy enough fix (famous last words haha).

Post Reply