Jump to content

Stealth in IWD2 Broken?


Guest Chippy

Recommended Posts

Hi folks,

The IE games are my favourite games sitting in my library since 1998, but I've only ever played IWD2 once because of the above issue. My understanding of it is that stealth only works for more than one round while your character is outside of the visual radious of a hostile enemy. You will automatically fail after one round if you are within the radius.

You can be within the radius, but standing behind something that blocks the enemy's line of sight, and stealth will work for more than one round.

I have a faint memory that Josh Sawyer may have nerfed stealth on purpose, or it may be a bug. Either way, it seems a shame that after 8 or so iterations of the game (with IWD2 being the 9th) we suddenly change gears on how stealth works.

Would this be something that could be fixed with a mod?.

Thanks for your continued work.

Link to comment

Thanks for your reply. I have tested this extensively and as metioned have been playing the IE games since 1998. I don't mean to sound too direct, but I played the game without mods and experienced this, and also tested it a while back on another forum and posted pics.

I've since deleted the pics, but could probably do it again. I think it took about an hour or so.

Just thought I'd bring it up. I anyone on these forums has IWD2 installed, maybe they could provide a second opinion on this?. Simply test it on x2 characters and Cheat XP in to maximise stealth, and test it on a goblin on the Targos docks.

I even tested it on 1 character with a high DEX and another with no DEX modifier at all - just in case there was a bug in the game like in BG2 with max stealth.

Link to comment

A maxed Drow Ranger with 27 DEX and 40 in Hide & MS.

Spoiler

Ranger-Attributes.png

Spoiler

Ranger-Outside-Range.png

Spoiler

Ranger-In-Range.png

Current Version:

Spoiler

IWD2-V2-01.png

Apologies if images are small, I'm a bit techless. I have another set from a Rogue with 10 DEX & 20 ranks in stealth which can be uploaded. Once again: I'm not trolling, and would greatly appreciate an answer to this, as it's keeping me from enjoying this IE game.

Link to comment

Here's another one where the character is behind a building, but still within sight range of the enemy:

Spoiler

No-Line-of-Sight-Fail.png

Another where I quaffed an invisibility potion - I don't think that effected infravision under the PnP rules? But the results are the same with human enemies:

Spoiler

Invisibility-Potion.png

I did that because in the original PST you could remain undetected if you were behind enemies. Even if you were a fighter or mage, you could stand behind an enemy and a hostile enemy wouldn't engage you. But it seems that in IWD2 enemies have a 360 degree field of vision, and they can see through walls.

Link to comment
1 hour ago, Guest Chippy said:

Apologies if images are small, I'm a bit techless.

The images sizes are fine, thing is, when you copy pasted the picture onto say MSpaint, you didn't resize the picture frame from the lower left corner to the pictures actual color corner, so now the 3/4rds of it is white.

The actual problem could be the dead peasant bodies in the ground. If they detect invisibility, you might just get screwed by them. Yeah, that's in other games too.

Link to comment

That's interesting, I didn't know that. I tested it on the goblins on the south of the map; there's a dead body outside of my character's sight range (in the grey area of the fog of war) and he still fails his check on the goblins.

Spoiler

No-Bodies-In-Range.png

I'm pretty confident this body is too far away to be causing the problem. It's funny really, that there are so many dead bodies on the docks that even luring enemies away is a problem. Here's another one:

Spoiler

Warehouse-no-bodies.png

I smashed all but 1 barrel. Lured them to one side of the warehouse, then quaffed an invisivility potion and went back to smash the barrel. Then I used hide before they got there and waited while they were adjacent to my character.

Still seems to fail...🤔

Link to comment

I've looked into this, and, yep, it's bugged. Here's pseduocode of what the engine does if there's an enemy in sight of the character hiding, (using the nearest enemy):

Spoiler

rand = [rand 5-100, increments of 5]

if (![Enemy DEAF])
{
    enemyDiff = max( ([Enemy CREHIDEM.2DA->QUIETMOD] + [Enemy WISBONUS] + [Enemy CLASSLEVELSUM]) * 5, 0)

    // BUG: THIS CONDITION IS FLIPPED!
    if (enemyDiff + rand < MOVESILENTLY)
    {
        // Fail
    }
    else
    {
        // Succeed (continue checking)
    }
}

if (![Enemy BLIND])
{
    enemyDiff = max( ([Enemy CREHIDEM.2DA->HIDEMOD] + [Enemy WISBONUS] + [Enemy CLASSLEVELSUM]) * 5, 0)

    if (enemyDiff + rand < HIDEINSHADOWS)
    {
        // Succeed (continue checking)
    }
    else
    {
        // Fail
    }
}

if ([Enemy DEAF] && [Enemy BLIND])
{
    // lightMod is complicated; it includes both move silently, hide in shadows, 
    //     and a light mod (which itself partially includes CRELIGHT.2DA)
    // Note: This is also the check that is done if no enemies are around
    if (rand < lightMod) 
    {
        // Succeed    
    }
    {
        // Fail
    }
}

 

So, first off, it's extremely hard to hide while an enemy is around. You have to pass two insane checks, the only saving grace is that they can each be disabled if the enemy has the counter-condition, (being deaf or blind). From the pseduocode, the MOVESILENTLY check was inverted, so a lower(!) MOVESILENTLY skill value was better here. I've attached an exe-patch that fixes that condition, but it is still insanely hard to hide while enemies are nearby; by design, I guess?

bubb_fix_hide.zip

Edited by Bubb
Link to comment
8 hours ago, kjeron said:

It looks like the calculations (5-100 rand, * 5) are based off the other games 2e thieving scores range (0 - 255), rather than IWD2 3e skills range (0 - 33

Time to multiple it with say 255/33 = 7.7 ... it's actually a split value, so the range is from -125 to 124 or what ever, so the proper multiplier is around 5. Yes with an effect, this would be, opcode = 59, parameter1=500 and parameter2=2 .

Link to comment

The ini option for extra feedback is handy here. If lightMod is anything like bg2, then there's a reference light level (23) involved that the current area one is compared to in a pretty convoluted way:

    ieDword lightness = game->GetCurrentArea()->GetLightLevel(Pos);
    // seems to be the color overlay at midnight; lightness of a point with rgb (200, 100, 100)
    ieDword light_diff = int((lightness - ref_lightness) * 100 / (100 - ref_lightness)) / 2;
    ieDword chance = (100 - light_diff) * skill/100;
which is then compared to the roll in other games
  
The light level is from:

// returns a lightness level in the range of [0-100]
// since the lightmap is much smaller than the area, we need to interpolate
unsigned int Map::GetLightLevel(const Point &Pos) const
{
    Color c = LightMap->GetPixel(Pos.x/16, Pos.y/12);
    // at night/dusk/dawn the lightmap color is adjusted by the color overlay. (Only get's darker.)
    const Color *tint = core->GetGame()->GetGlobalTint();
    if (tint) {
        return ((c.r - tint->r)*114 + (c.g - tint->g)*587 + (c.b - tint->b)*299)/2550;
    }
    return (c.r*114 + c.g*587 + c.b*299)/2550;
}

I don't know how crelight.2da works, but from the few entries it looks like a percentage and it could be a direct mod of lightness or the whole result.

Link to comment

Even if you wonderful people don't fix it, it's still extremely nice to have this issue acknowledged. 😁

You wouldn't believe the trouble I've had trying to prove this over the years. 😉

I still have a faint memory that it was nerfed by Josh Sawyer...but that doens't matter at this point.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...