Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Stealth/Invisibility wears off before attacking (Shadowstep bugs)

2

Comments

  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    Nice, I'll give it a try, thanks.

    By the way, this happens in BG2EE too.

  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    @Galactygon Unfortunately, It still happens, so the cause must be something else...

    Note that this happens if you aren't invisible too, as @kjeron reported before. I tested both cases (no cosmetic attacks).

  • GalactygonGalactygon Member, Developer Posts: 378
    Admittedly I added a new extended header at L1 instead of changing the original one so this might have still preserved the old behavior. I've re-updated the attachment, see previous post. When starting a new SoD game (at higher levels) I can reproduce this being fixed.

    HalfCelestial
  • HalfCelestialHalfCelestial Member Posts: 216
    Thanks, trying again.

    By the way, is this invisibility opcode there only for cosmetic purposes? Just curious.

  • HalfCelestialHalfCelestial Member Posts: 216
    Darn, it's still happening. I'm testing it in BGEE, not in SoD. Perhaps that could be a factor? Not using any mods either.

  • GalactygonGalactygon Member, Developer Posts: 378
    It should function regardless of engine. The only cross-game issue is that BG2EE/IWDEE use different .tlk entries and the above file looks for BGEE/SoD strings for name/description references.

    Did you place the unzipped file "SPSD02.spl" into your override folder?

  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    Yes. The only noticeable difference is that the character doesn't look invisible during Shadowstep. I can confirm without a doubt that the bug happens regardless, same behavior shown in the videos I shared.

  • kjeronkjeron Member Posts: 2,099
    It's not invisibility, but another effect ending that's causing it - the APR reduction, specifically being reduced to 0 APR.

    I stripped Shadowstep of everything except the Modify APR effects and it still happened, then made some custom item/spells using just a Set APR 0 effect and it occurred.

    I have noticed it becomes easier to trigger as the characters APR increases, or their attack speed decreases.

    I think this occurs when:
    - The Modify APR effects expire in the middle of a combat round.
    - Either through high APR or slow Attack Speed, the character is still has attacks to make during this combat round.

    HalfCelestialGalactygonCrevsDaak
  • GalactygonGalactygon Member, Developer Posts: 378
    I've replaced the attachment a few posts earlier with a version without the apr effects so you could try it yourself.

    HalfCelestial
  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    So it's as I suspected then, the way it disables your ability to attack is what's causing it. So what would be the solution? Is there some alternate way to disable your attacks perhaps?

    I've replaced the attachment a few posts earlier with a version without the apr effects so you could try it yourself.

    Testing, thanks.

    EDIT: I am unable to replicate the bug. As it stands, this is simply a 7 seconds long Time Stop.

  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    On top of this, I have to report another bug that is somewhat related to this (yes, I love the shadowdancer).

    It is possible to bypass the forced 0 APR of Shadowstep by equipping Kundane, Belm, Ninja-to of the Scarlet Brotherhood and/or Gauntlets of Extraordinary Specialization, they can grant you (as a pure shadowdancer) up to 5/2 attacks per round (3 or 5 if you are using Haste or Improved Haste, respectively) for the seven seconds Shadowstep lasts, which gives you plenty of free attacks, which means it's basically a weak Time Stop. To my untrained eye, this makes me think it's not possible to have a bug-free Shadowstep if forcing APR to 0 is the only solution to disable physical attacks.

    Warrior levels/proficiency points might add more attacks. EDIT: They do, but only if you are using the aforementioned items.

    @Gate70 @Galactygon You might want to take a look at this as well. Thanks.

    Post edited by HalfCelestial on
  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    Sorry for being a PITA, but do you guys see some possible solution now that the cause of the problem is known? Just want to know if making some quick fix is feasible.

    @Galactygon @kjeron @Gate70 @subtledoctor

  • kjeronkjeron Member Posts: 2,099
    Replace APR reduction with Immunity to Weapons for everyone. You'll be able to attack during Shadowstep, but not hit - basically the same as the failed attack you're currently getting after Shadowstep ends, except it will tell you "Weapon Ineffective" each time. Which is lore appropriate, your weapons cannot affect them from the Shadow Plane.

    Then delay the Invisibility until Shadowstep ends so it isn't removed by these attacks during Shadowstep.

    When Shadowstep ends, you will be invisible and ready to backstab.

    If you'd like to try it:

    HalfCelestialCrevsDaakJuliusBorisov
  • HalfCelestialHalfCelestial Member Posts: 216
    Sounds great, I'll give it a try, thanks.

  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    Works great, @kjeron! The only issue is that Shadowstep lost its name and description. It's now Invalid 74316 (in BGEE at least). Not a big deal though.

    Post edited by HalfCelestial on
  • kjeronkjeron Member Posts: 2,099

    Works great, @kjeron! The only issue is that Shadowstep lost its name and description. It's now Invalid 74316 (in BGEE at least). Not a big deal though.

    Oops, that was the BG2EE version. The BGEE version is terribly broken to begin with so it was easier to modify the other one, but I forgot to check the strings. This one will have correct strings for BGEE and SoD:

    HalfCelestialCrevsDaakGrond0JuliusBorisov
  • HalfCelestialHalfCelestial Member Posts: 216
    edited March 2017
    @kjeron , just so I understand exactly how you designed it, does your Shadowstep make you invisible just before it ends? Because that's what happens and I'm not sure if this is unintended, or I misunderstood your words when you said "delay invisibility."

    I didn't notice before because I always used stealth after activating Shadowstep.

  • kjeronkjeron Member Posts: 2,099
    edited March 2017

    @kjeron , just so I understand exactly how you designed it, does your Shadowstep make you invisible just before it ends? Because that's what happens and I'm not sure if this is unintended, or I misunderstood your words when you said "delay invisibility."

    I didn't notice before because I always used stealth after activating Shadowstep.

    Yes, shadowstep normally turned you invisible upon activation. It was meaningless though - it only lasted as long as Shadowstep, you can't do anything with it during Shadowstep, and you could still fail to Hide in Shadows while invisible and literally hiding in the Shadow Plane.

    So I just delayed that invisibility effect to not kick in until just before Shadowstep ends, it will then last for 1 round or until a hostile action is taken. It's basically the same as the grace period you get after failing a Hide In Shadows check while already hidden. You don't become visible right away, but usually have about a round to run away or make your backstab.

    So no, you don't need to activate Hide in Shadows during Shadowstep anymore if you are intending to attack immediately afterwards. It was the only way I could get it to work without touching APR. Without it, if you activated Hide In Shadows, you would likely attack before Shadowstep ends which would just end Stealth without the attack having any effect.

    HalfCelestial
  • HalfCelestialHalfCelestial Member Posts: 216
    edited August 2017
    I hope the necromancy is okay, but I have to say that this phenomenon seems to be entirely independent of number of attacks per round being zero, or Shadowstep itself.

    You can try this with a Shadowdancer:

    - First, dual wield weapons.
    - Then Use Oil of Speed or any other Haste effect.
    - Now try to repeatedly backstab someone by quickly going invisible after each successful attack within that round.

    (High APR seems to be the only relevant factor though)

    If you repeat that enough you will see eventually that sometimes the invisibility effect will get canceled before the actual attack is made.

    I suspect it has something to do with making that attack in the middle of a given round when you have more than 1 APR, instead of at the beginning. I think it also happens more often when I give the order to backstab (that is, to hide and attack) in the middle of an attack animation, but not sure.

    And IIRC I have seen this in the past with invisibility potions too, you could probably get this to happen by trying to backstab repeatedly with your plain, hasted thief.

    Might want to note this @Gate70 @Galactygon

    Post edited by HalfCelestial on
  • HalfCelestialHalfCelestial Member Posts: 216
    edited August 2017
    Here's a video showing what I mean by that:






    After the first attack I enter stealth mode, order to attack, and the invisibility gets canceled without making the attack. You can see also that there is no feedback in the log.

    My guess it's that the game gets "confused" when I interrupt my character in the middle of a round and give another order. It seems to happen much more often with hasted characters or when dual-wielding , not too sure.

    Post edited by HalfCelestial on
  • HalfCelestialHalfCelestial Member Posts: 216
    And I just confirmed that Haste and dual-wielding have nothing to do with the bug.

    It seems it happens when you have more than 1 attack per round no matter what, it also looks like it's increasingly more frequent, the more attacks you have per round.

    I guess it's an engine bug, and can only be avoided by timing your backstabs better. Maybe.

  • Grond0Grond0 Member Posts: 5,463
    edited August 2017
    If you have multiple attacks in a round, but take another action in the round before making all your attacks, there's a chance you'll lose the remaining attacks, i.e. you won't be able to attack again until the following round. I suspect what's happening here is that the suppressed attacks are triggering the loss of invisibility (I've seen the same sort of thing when using a potion of invisibility and then trying to attack too quickly after that). To avoid that happening don't attack again immediately you go into stealth, but wait a few seconds first so that you start a new combat round.

    HalfCelestial
  • HalfCelestialHalfCelestial Member Posts: 216
    Yes, I agree. It can be avoided that way, it always happens mid round.

  • TressetTresset Member, Moderator Posts: 7,687
    edited August 2017
    I am pretty sure that this issue can be blamed on the 2 effects of Shadowstep that set your APR to 0. They never seem to wear off on precisely the same moment; often lingering for up to a whole second after the other effects wear off. For whatever reason this seems to allow for a loophole in the laws of the BG engine that allows for an 'attack' to be initiated without an attack roll or any potential to hit or damage the enemy. I have been working on reproducing the issue for an hour or so now, and have found some repro steps that will work about 15-25% of the time, which is about as high as I could get it.

    1. Enable autopause option 'spell cast'.
    2. Cast Shadowstep and wait for the auto pause to happen.
    3. Before unpausing give the order to attack a target you are already in melee range of with a 0 speed factor weapon.
    4. Unpause.

    Like I said, this will only make it happen about 15-25% of the time.

    All that said, I messed with the duration of the 2 effects so that this will rarely happen (I set it to 80 ticks instead of 7 seconds). The downside is that, though it would be rare, an attack could conceivably potentially take place before you actually leave the plane of shadows (which is obviously against the laws of the multiverse, let alone the intentions of the developers). I will upload my tweak in case anyone is interested, but I don't think the devs would find it a satisfactory fix to the issue (I, myself, don't like it too much).

    Edit: Wow... I totally missed the second page of this discussion...

    HalfCelestialJuliusBorisovAerakar
  • HalfCelestialHalfCelestial Member Posts: 216
    edited August 2017
    Yeah, @kjeron already shared a fix that personally suits me just fine, if no one can be affected by weapons, in practical terms is the same as making you unable to attack, i.e. you can't damage anyone.

    Now I noticed that this phenomenon has nothing to do with Shadowstep necessarily, but with the timing within a given round when you have more than 1 APR, as I showed in the video. Unfortunately I'm pretty sure this is a hardcoded thing, so the only solution as far as I can see is just resisting the temptation to backstab immediately after going invisible.

  • Grond0Grond0 Member Posts: 5,463
    I agree it's not specifically related to Shadowstep (though using that means you're more likely to come across it) - I've seen this behavior many years ago in vanilla BG2.

    HalfCelestial
  • HalfCelestialHalfCelestial Member Posts: 216
    edited October 2017
    By the way @kjeron your version of Shadowstep works well almost always but sometimes for whatever reason the invisibility kicks in a little late (enough to be targeted by the enemies for an instant, after SS).

    Not sure why that happens, I have some video evidence if needed too.

    If you care to look into it... or simply remove the invisibility effect, after all, as far as I know the invisibility effect had no purpose originally anyway.

    Or how about reducing the delay before the invisibility kicks in? That might be enough to prevent this unexpected delay from becoming a problem. It's a shame because the current delay is perfect to backstab just as SS wears off.

  • HalfCelestialHalfCelestial Member Posts: 216
    Well, now that I think of it, the invisibility was perhaps put there to make enemies fail their spells and attacks (since invisibility prevents targeting).

  • kjeronkjeron Member Posts: 2,099
    @HalfCelestial That is amazing.
    It's nothing to do with the invisibility kicking in after timestop ends, rather, creatures frozen by time stop are still able to See() other creatures. I had not considered that, and it would explain why the ability granted invisibility for its duration. They are actually queuing non-instant actions while timestopped, becasuse ... magic, I guess? I've known timestop doesn't set the HELPLESS state, but this is crazy.

    I have found a partial fix, but it does have some side-effects:
    • Anytime you attack while using shadowstep will trigger an empty feedback message, in addition to the "Weapon Ineffective" it currently does. This is it maintaining invisibility, and I cannot suppressed it.
    • The invisibility now only lasts as long as the shadowstep, as it originally did. You will need to use Stealth / Hide in Plain Sight if you wish to remain invisible after shadowstep ends, or if you want to backstab.
    • There is a very slim chance(precise timing) of getting a hit in just as timestop ends, without breaking invisibility. I only saw it occur while stress testing with 10 APR.
    I've included copies for all 3 games (BGEE, BG2EE, IWDEE).
    There's an additional file now, "7EYES.2DA". If your override folder already contains this file from another mod, just add the last line from this one to yours, its just a simple text file.
    I haven't tested the IWDEE version, but there isn't anything v2.0 exclusive, so it should work.

    HalfCelestial
Sign In or Register to comment.