Ad placeholder

Sight mechanics

From bg3.wiki
Jump to navigation Jump to search

Sight or Vision in Baldur's Gate 3 is governed by a combination of physical lines of sight, environmental lighting (obscurity), and specific surface/area properties. These interacting systems dictate whether a creature can be targeted, whether an attack receives a bonus or a penalty, and whether a character can successfully hide.

Overview[edit section | visual editor]

Line of sight[edit section | visual editor]

A line of sight is needed to spot a sneaking character, and use ranged "target" abilities on a target or a ground position. When there is no line of sight, these actions or spells cannot be used. A line of sight can blocked by terrain, objects, and clouds such as FogFog and DarknessDarkness.

Line of sight and obscuration[edit section | visual editor]

Understanding how the game engine processes vision requires knowing its distinction between total concealment and obscuration:

  • Total Concealment occurs when a physical object or specific magical area ends or otherwise interrupts the line of sight between a source and the target of its observation. Total Concealment can be caused by obstacles such as walls, closed doors, trees and large rocks.
  • Obscuration is a measure of brightness with three stages: ClearClear, Lightly ObscuredLightly Obscured, and Heavily ObscuredHeavily Obscured. It is caused by naturally dark areas, clouds and fog, and areas of certain spells (e.g., Hunger of HadarHunger of Hadar). Many creatures have a basic 2m (7ft) of DarkvisionDarkvision, which reduces obscuration by 1 level for the viewer. Attack rolls have DisadvantageDisadvantage against a Heavily ObscuredHeavily Obscured target ("too dark"), and AdvantageAdvantage when the attacker is heavily obscured from the perspective of the target ("attacking from shadows").

Target actions and Projectile actions[edit section | visual editor]

Line of sight check is integral for character actions. The game engine divides ranged abilities into "target actions" and "projectile actions."

  • A ranged target action targets a creature or a place on the ground, requires Line of sight to the target, and does not use a projectile. Examples include Sacred FlameSacred Flame, SleepSleep, ShatterShatter, and Misty StepMisty Step. These abilities commonly use a saving throw, or sometimes no roll at all. For example, Bone ChillBone Chill is a target action with an attack roll.
  • A projectile action involves transit of a projectile - which can be identified by a trajectory line reaching to the target when aiming the ability. Examples include ranged weapon attacks and spells like Fire BoltFire Bolt, FireballFireball, and Magic MissileMagic Missile. They do not require sight, but do require an unobstructed physical path. This distinction becomes relevant when interacting with artificial clouds. Although not required, these actions commonly use attack rolls, in which case they are affected by obscuration. Magic MissileMagic Missile and FireballFireball are examples of projectile-like spells which have no attack rolls.

Cloud interactions with Line of sight[edit section | visual editor]

In addition to landscape features and objects blocking line of sight and projectile paths, clouds created by spells or other features can also do this.

  • Fog cloudsFog clouds block vision, preventing the use of targeting actions through or into them, and also cut off NPC vision cones, preventing them from spotting sneaking characters. This does not affect projectile actions. Fog clouds also create Heavy ObscurationHeavy Obscuration within their area, but this does not affect creatures outside of the cloud that are merely seen through the cloud (unlike Line of sight). This obscuration can be negated by DarkvisionDarkvision as usual, even when creatures with Darkvision cannot 'see' through the cloud, as the line of sight and obscuration systems are not connected. These mechanics allow creatures with Darkvision to make ranged attacks at targets in clouds without disadvantage, and also allow creatures with Darkvision to negate the advantage a creature would normally get by firing from obscuration created by a cloud.
  • Clouds like CloudkillCloudkill and Stinking CloudStinking Cloud provide obscuration only, and do not block 'sight', leaving Target actions unaffected.
  • Darkness cloudsDarkness clouds block vision and create obscuration like Fog clouds, but also block projectiles completely (although objects can move through them otherwise). Their sight and projectile blocking behaviour prevents ranged actions into or through them entirely, except to creature who are immune to them via features like Devil's SightDevil's Sight or the Eversight Ring. Ordinary DarkvisionDarkvision does not help creatures attacking into Darkness clouds, as they cannot make attacks into them to begin with, although it should still enable them to avoid a creature in the darkness cloud from gaining advantage when attacking them due to being in a Heavily ObscuredHeavily Obscured location.

The IgnoreSurfaceCover Bug[edit section | visual editor]

Creatures with immunity to Darkness cloudsDarkness clouds from features such as Devil's SightDevil's Sight or Born into DarknessBorn into Darkness can also 'see' through Fog clouds, letting them use targeting abilities through them. The obscuration effect is not changed, still being dependent on Darkvision, which is also granted by some – but not all – features giving immunity to Darkness clouds.

This is caused by a bug with the IgnoreSurfaceCover() Boost which causes a creature that is granted immunity to any cloud via IgnoreSurfaceCover() to be allowed to see through clouds which block vision (CanShootThrough = false), but does not block projectiles (CanShootThrough = true/default) – such as Fog. The bug does not affect clouds that also block projectiles (CanShootThrough = false) - such as magical Darkness.

Creature behaviour regarding sight[edit section | visual editor]

There are generally 3 scenarios with multiple sub-scenarios regarding creatures in relation to the player character which change depending on whether the player character is in combat or not. Vision cone range, obscuration, total concealment, creature vision bonuses, functional invisibility and the properties of Sense Hidden Presence all combine to generate creature behaviour. Functional invisibility refers to the player hiding (after passing a stealth check vs creature passive perception or while outside of line of sight and/or vision cone range) or actual invisibility. This section will be focusing mainly on a scenario 1 creature and 1 player character for simplicity, but it can be extrapolated to more of either/both.

  1. The creature has line of sight on the player character.
  2. The creature has potential line of sight on the player character, but the player character is hiding, invisible, out of range, or not currently in line of sight. This can be further broken down into sub-scenarios.
    1. Out of combat, this is typically relevant regarding stealth attacks outside a witness creature's line of sight and/or vision cone range.
    2. In combat, the creature simply does not have line of sight due to an obstructing object/total concealment and player character is not hiding.
    3. In combat, inside of a fog or darkness cloud but not hiding.
    4. In combat, hiding in a lightly obscured or equivalent area (heavily obscured and creature darkvision or fog/darkness and creature Devil's Sight) while inside the creature's potential Sense Hidden Presence range. This is generally transient and generates a creature passive perception vs player character stealth check that leads to scenario 1 or 2-5.
    5. In combat, hiding after the creature fails the above passive perception check or under invisibility while inside the creature's potential Sense Hidden Presence range. This is basically the follow up of 2-4.
    6. In combat, hiding or invisible while outside the creature's potential Sense Hidden Presence range.
  3. The creature does not have line of sight or potential line of sight on the player character, and the player is functionally invisible.
    • Example: player character is hiding withing fog/darkness and the creature does not have Devil's Sight.

Out of combat[edit section | visual editor]

Out of combat line of sight and stealth mechanics along with related creature behavior are discussed in the stealth attacks section of the stealth page.

In combat[edit section | visual editor]

In combat creature AI is complex, and different creatures have different can have somewhat different behaviour. However, the behaviour in the above scenarios is reasonably predictable.

  • Looking at scenario 1, this is simply the the general combat behaviour of the creature.
  • Looking at scenario 3, the creature has nothing as the player is functionally invisible and
  • Scenario 2 is where it gets very complicated, so it will be broken down into the above stated subsections.

2-2: The creature will generally use an ability that does not require line of sight or move positions to obtain line of sight and use a favorable ability.

2-3: Fog and darkness can be a bit complicated. Darkness has an added effect of preventing ranged attacks, and creature AI can be somewhat difficult to predict. Generally with fog, creatures will either just attack you with ranged projectile abilities or move into the fog to use other desired abilities. Darkness on the other hand blocks ranged projectile abilities and often dissuades creatures from entering into the darkness. Creatures tend to prioritize throwing items from range if able and outside the darkness, use general available abilities if already in the darkness, and then usually do nothing or sometimes move into the darkness otherwise.

2-4: This scenario generates a check of creature passive perception vs player character stealth as mentioned above. It is generally a transient scenario when it occurs.if not having already occurred, the creature will attempt to move to overlap their sight cone with the player character's last known location.

2-5: If the creature's attempt to find the player character in 2-4 failed, the creature will use Sense Hidden Presence in the region of the player character's last known location.

2-6: The creature's Sense Hidden Presence uses a bonus action resource and requires a range of 3m. If the creature does not perceive that it can reach a 3m range near the player's last known location and use Sense Hidden Presence in the same turn, the creature will most often do nothing. The logical thing for the creature to do would be to use their turn to close the distance and use Sense Hidden Presence on the next turn, however this is not how the creature AI behaves. The most common examples are if the character is hiding with total concealment that requires the creature to use jump to get within range, like a different elevation or an intervening gap. This is also the case if the player character is outside of the range of the creatures movement speed doubled by a single dash. Even if the creature could potentially jump and reveal the player character with their vision cone alone, the creature would not be able to cast Sense Hidden Presence if they fail and therefore will do nothing.

  • Scenario 2-6 is not completely consistent, but along with Scenario 3, they create an extremely strong strategy for the player in which they can hide every turn, and the enemy creatures effectively skip all of their turns.