Infinity Engine
From SDA Knowledge Base
Infinity Engine is what BioWare's Baldur's Gate series runs on. Despite being a fairly robust engine for Dungeons & Dragons, it is still full of bugs. As the different games use varying versions of the engine, it will be noted which games can carry out each glitch.
Contents
- 1 Cutscene Breaking
- 1.1 Speedrunning Uses
- 1.2 Variant 1 - Initiate dialog during the cutscene
- 1.3 Variant 2 - Have the cutscene initiate whilst you are in dialog or an in-game menu
- 1.4 Variant 3 - Trigger an autosave during the cutscene, then load it
- 1.5 Variant 4 - Trigger two cutscenes at once
- 1.6 Variant 5 - Use casting animations to fast-forward cutscenes
- 1.7 Variant 6 - Be dead during the cutscene
- 2 Different Area Dialogue
- 3 Change area after triggering co-ordinate teleports to be teleported in the new area
- 4 Dimension Door Area Transition
- 5 Reset teleport co-ordinates to (0,0)
- 6 Encumbered Talk
- 7 Inventory Stack Underflow
- 8 Item Recharge
- 9 Polymorph-Teleport
- 10 Scripted Teleport Breaking
- 11 Talk Lock
- 12 Unpause Menus
- 13 Use Any Item
- 14 Run Speed Enhancements
Cutscene Breaking
Regain control of your characters in a cutscene by interrupting it. This is one of the most important techniques in BG2 and Torment speedrunning and there are many different methods of doing it - different ones will be preferable (and possible) in different situations.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | ? | ? | Y |
Note that by a 'cutscene' we mean a sequence in-game in which the player has no control over his characters and the user interface is removed. This includes several two second 'cutscenes' in which the player momentarily loses control of their characters prior to being teleported somewhere, or whilst a character teleports in to talk to you, or whilst some other short event unfolds that the party isn't supposed to interfere with. Here are the currently known methods of breaking cutscenes:
Speedrunning Uses
Too many to mention. The majority of cutscenes in BG2 and Torment can be broken using one of the methods below.
Variant 1 - Initiate dialog during the cutscene
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | ? | ? | ? |
Have a character initiate dialog during the cutscene. When you finish the dialog, the interface is restored and you have control. In BGII this method is generally acheived by kicking a character out of the party just prior to the cutscene so that they will approach the PC and ask to rejoin the group while the cutscene is playing, though other methods exist such as using a Djinni summoned with the Limited Wish spell.
One complication in Baldur's Gate II is that some cutscenes have scripts that give a 'Stop' command to everyone in the area (cancelling any 'talk' order that a kicked party member, for example, has), or which prevent any dialog from initiating in the area in which the cutscene takes place for the duration of the cutscene. A workaround that often works is to have a Simulacrum cast Limited wish in a different area before initiating the cutscene. The dialog between the Simulacrum and the Djinni will break the cutscene.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
? | Y | ? | ? | Y |
Certain cutscenes that occur immediately after dialog or after a loading screen can be broken by having the cutscene trigger over the top of a dialog or a menu screen. So far this has only been tested for Torment and BGII.
In Torment, there are three ways to do this. The first is to dialog-warp into an area in which a cutscene triggers the moment you arrive - the cutscene will start playing despite the dialog being open. The dialog window may disappear but the game will still respond to you pressing numbers on the keyboard that correspond to dialog choices, and if you end the dialogue this way, the interface will be restored and you will regain control. Alternatively, you can mash the hotkey for the Formations menu or the Status screen during the dialog or loading screen (and in the latter case, then enter the Reform Party screen). Whilst in the Formations or Reform Party menu, the cutscene will start and the menu will seem to disappear. However, if you now press Escape or 'd' or click the (no longer visible) 'Done' button, you will leave the menu, the interface will be (partly) restored and you will regain (partial) control.
Note that in Torment, due to the way the game drops frames after loading screens and the dialog window lingers for a fraction of a second after the end of a dialog, the cutscenes on which this glitch can be used appear to trigger instantly after a dialog or cutscene without a single frame of the normal interface being visible. You *can* still get into the menus, though.
In Baldur's Gate II, the cutscenes on which this glitch works are ones for which the interface is restored very briefly between the end of a loading screen or dialog and the start of a cutscene, and if hit the hotkey for a menu (or pause) during this brief moment, you will momentarily enter the menu (or pause) and then the game will take you out of the menu (or unpause the game) and start the cutscene. In BGII the 'Reform Party' variant of the trick doesn't seem to be possible, since you cannot stay on the Record screen long enough for a click on the 'Reform Party' button to register and there is no hotkey to enter the Reform Party screen. However, the dialog-based version of the trick can be made to work for cutscenes which follow dialog if you have someone initiate dialog a further during the moment in which the interface is restored. The only realistically possible known way to do this is to position the PC next to the character whose dialog triggers the cutscene, then kick a party member, wait for them to approach the PC and initiate dialog with the cutscene-triggering character just before the party member talks to the PC (the timing is quite specific). Like in Torment, the dialog window may disappear but you can still use dialog shortcuts to end the dialog and restore the interface. This method is often useful in BG2 in situations where order-cancelling or dialog-supression make it impossible to initiate dialog during the cutscene, and when possible it is generally faster than the Simulacrum/Limited Wish workaround.
In both games, this method may cause graphical anomalies and mess up sections of the interface, but this can be fixed by saving and loading or by entering and exiting dialog.
Variant 3 - Trigger an autosave during the cutscene, then load it
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
? | Y | ? | ? | Y |
It is sometimes possible to order a character to leave the area prior to a cutscene starting, such that they will hit the transition trigger and cause an autosave whilst the cutscene is in progress. When you load the autosave, the interface will be restored and you will have full control again.
Variant 4 - Trigger two cutscenes at once
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
? | ? | ? | ? | Y |
If you can get two cutscenes to play at once, then when the shorter cutscene finishes and its 'End cutscene mode' command triggers, the interface will be restored and you will effectively have broken the longer cutscene. In Torment, there is a simple way to do this: die during or just before the longer cutscene. Death of the main character in Torment is handled by the game by putting you into cutscene mode, teleporting the party to a respawn point, resurrecting the main character and then bringing you out of cutscene mode, and so it will break any cutscene going on at the same time. There may be other short cutscenes in Torment or other games which can be triggered to break longer cutscenes, as well.
Variant 5 - Use casting animations to fast-forward cutscenes
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
? | Y | ? | ? | ? |
In Baldur's Gate II, when a cutscene is triggered the game will enter cutscene mode and then wait for any party members to finish casting any spells they are currently casting before firing the first line of the cutscene's script. However, the way this behaviour is implemented can be abused to speed up cutscenes by having spell animations trigger during the cutscene. The only currently known way to do this is to cast Contingency or Chain Contingency lots of times prior to triggering the cutscene (and cancel out of the Contingency menu each time). There is a casting animation that only occurs after you cast Contingency, and if this triggers during the cutscene it will trigger the next scripting event immediately.
There may be other ways of abusing this glitch besides using Contingency, such as having summons cast spells during cutscenes or having multiple party members casting when a cutscene starts. These have not yet been tested.
Variant 6 - Be dead during the cutscene
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
? | ? | ? | ? | Y |
There is one known cutscene in Torment (the one in which two Trigits emerge from the ground to attack you as you pass by in Ravel's maze) which can be fast-forwarded by triggering it while The Nameless One is dead. If triggered with TNO is dead, all the events in the cutscene's script will happen simultaneously, including ending cutscene mode. It's not yet known why this happens or whether there are other cutscenes to which it can be applied.
Different Area Dialogue
Split your party up between areas by initiating dialogue improperly.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | ? | ? | ? |
Method
To perform this trick, leave a character who is trying to approach the PC to initiate dialogue (such as an NPC removed from the party) behind in an area, and have the PC travel to another area. In the new area, send the PC to the co-ordinates the NPC is at in the previous area, and the NPC will initiate dialogue. This is probably because the code to determine whether two characters can enter dialogue checks only their co-ordinates to see if they are next to each other, and does not check they are in the same area.
In order for the trick to work, it is required that after leaving the first area it remains loaded in the game's memory - whether or not this is the case depends upon the scripting of the individual areas, but a useful rule of thumb is that the game will keep loaded large areas when you enter smaller areas branching off them, but not the other way around. Useful cheats to use when planning tricks involving this glitch are CTRL-G and CTRL-X. The former lists the area codes of currently loaded areas, while the latter shows the co-ordinates of the point under the mouse cursor.
It is useful to note that, for unknown reasons, in Baldur's Gate II, having a party member join (or rejoin) the party in any area will keep that area loaded in the game's memory permanantly until you reload a save, which significantly broadens the range of uses of this trick. This method for keeping areas loaded has not yet been tested in any other games.
Speedrunning Uses
- Involved in breaking the cutscene after the summoning of the Avatar Of Rillifane in Baldur's Gate II. Video
Change area after triggering co-ordinate teleports to be teleported in the new area
If you trigger a teleport that is supposed to send you to particular co-ordinates in your current area, and then travel to a new area before the teleport can take effect, you'll be teleported to those same co-ordinates in the new area.
Variant 1 - Dimension Door
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | N | Y | ? | N |
Cast the Dimension Door spell and leave the area before the spell is finished. In the new area you'll be placed at the coordinates at which you would have been placed in the old area (check by pressing l or x). Addionally, maps sometimes have different coordinate systems, which can make this trick highly effective.
Note, importantly, that this trick can be used in conjunction with the trick to reset teleport co-ordinates to (0,0), mentioned later.
Variant 2 - Scripted teleports
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
N | Y | ? | ? | ? |
Activate a scripted teleport, then leave the area. Like with the Dimension Door version of the spell, you'll be placed at the same co-ordinates in the new area that you would've ended up at in the old area. In many cases, the game will enter cutscene mode, then carry out the scripted teleport, and then leave cutscene mode - if so, you will have to break out of cutscene mode using one of the methods above in order to use this trick.
Speedrunning Uses
- In Baldur's Gate to get into BG-City while the bridge is still raised
- In Baldur's Gate to quickly zone up the north-east and north parts of BG-City
- In Baldur's Gate to get in and out of Candlekeep before chapter 6
- Numerous times in Baldur's Gate and Icewind Dale to skip too much walking
Dimension Door Area Transition
Force yourself into a wall by casting Dimension Door on yourself.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | N | ? | ? | N |
When the Dimension Door spell is targetted at the caster itself, (s)he moves a tiny bit, depending on the position of the mouse click in the character's circle. This can be used to move the character closer to a wall, not normally reachable by simply walking towards the wall. This has been successfully used in Baldur's Gate I to trigger the area transition of the palace without opening the door. See this video
Reset teleport co-ordinates to (0,0)
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | ? | ? | ? | ? |
If you trigger an autosave after casting Dimension Door and then load it, the game will remember that you need to be teleported but forget the destination co-ordinates, and teleport you to (0,0), or as close as it can get you, instead.
It's not currently known whether this also works with scripted teleports.
Encumbered Talk
Avoid walking up to a NPC by being unable to do so.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | Y | Y | Y |
If you are encumbered and try to talk to a NPC, then the dialog starts immediately as long as the NPC is within sight range of you. This removes the need to walk to them.
Inventory Stack Underflow
Give yourself 65535 of an item by reducing its count below 0.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | Y | Y | ? |
Baldur's Gate I and Icewind Dale I
Note: due to reasons yet explained, drinking a potion using the drink potion function from your inventory will cause you to run up to the nearest NPC and take an action (that does nothing) against them. Then the potion will be drunk. So, if you drink a potion with no NPCs around then the drink potion just doesn't work. This annoyance is not noticeable in normal play as normally your characters are tightly bunched together and just interact with each other. What this means is you can drink a potion using the drink potion function and pick up that potion in the time it takes your character to run up to an NPC allowing you to dupe the potion without taking an action (normally drinking a different potion) first.
Note: This only works on Icewind Dale if you haven't installed Heart of Winter.
Potions
Open the inventory and drink any potion (not the one you want to dupe). Then drink the potion you want to dupe and pick it up so that it floats. After a few seconds the stack count of the floating potion is reduced. Then quickly drop the floating potion in the inventory, drink it and pick it up again. The stack count will wrap around to 65535. You can also put the potion into the inventory of another party member instead of keeping it floating in the inventory, with the same effect.
Scrolls
Cast the scroll, quickly open the inventory and pick up the scroll while it's still being casted. Repeat this to produce the underflow.
Baldur's Gate II and Icewind Dale II
In Throne Of Bhaal, this can only be used on stackable non-consumables. To execute the trick, right-click on a potion in the inventory, select 'Drink Potion', then swap a gem into the inventory slot the potion was in. Return to the game and wait a round. The gem will be consumed, reducing the number in the stack to zero. Repeat this process to reduce it further, wrapping it around to 65535.
Wands that are not destroyed upon reaching 0 charges can be wrapped around to 65535 charges in this way. However potions, scrolls, missiles, and wands that are destroyed at zero charges will be used up by this trick.
Note that the technique of choosing 'Drink Potion' and then swapping items in the inventory is also used in the Use Any Item's Abilities glitch.
For Icewind Dale II make sure that the game is paused in the inventory. To do this either hit space before entering the inventory or use the button in the lower right of the UI while in the inventory.
Speedrunning Uses
- Duplicating gems near the start of Baldur's Gate II and selling them to immediately gain the 15000GP needed to pay Bodhi or Gaelan.
- Duplicating potions and scrolls in any of the current Baldur's Gate and Icewind Dale runs.
Item Recharge
Fill an item's charges capacity at a vendor.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | Y | ? | ? |
Simply sell the charged item and buy it back. The item is then completely charged to the maximum number of charges.
Polymorph-Teleport
Force yourself through a wall by Polymorph-ing into a large creature.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | ? | ? | N |
Variant 1
Stand near a wall where you want to hop over. Then fill the surrounding space around you with NPCs (Party members, monsters, familiars, ...). Then polymorph into a creature which takes more space than the character's natural form, like a Mustard Jelly. If the character doesn't fit in the current location (because it's surrounded by other creatures), then the game checks the nearest possible location where it could place you. This nearest location can be behind a unpassable wall if everything else is populated with creatures.
Variant 2
Rather than polymorphing, releasing a familiar will have a similar effect. The familiar is placed directly under the PC, and the PC is teleported to the nearest possible location.
Speedrunning Uses
- In Baldur's Gate, to skip parts of the Labyrinth by using a greenslime that's walking by Video
- In Baldur's Gate to get in and out of Candlekeep Video
- In Baldur's Gate 2 to skip most of Spellhold
- In Baldur's Gate 2 to skip parts of Irenicus' Dungeon
Scripted Teleport Breaking
Interrupt a NPC's script by confusing the scripting engine.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | ? | ? | ? |
Baldur's Gate
With a solo character, initiate a dialog with an NPC who normally teleports the player to a different location. After the dialog ends (and the action block of the dialog is about to be run) pause the game and give the character another command. The key is to pause the game immediately after the dialog ends (i.e. by pressing enter and space very quickly). The character should then stay in the current area without being teleported. When using a character other than the main character to initiate the dialog you need to make sure that they have another command in their command queue before starting the dialog. This can be achieved by the following sequence: Pause the game, initiate the dialog, give command to loot a container and immediately unpause the game. The timing of the last two steps is very important, the game needs to be unpaused just a few milliseconds after giving the loot command. It's easiest to reproduce if the character is standing near the NPC so that the character doesn't need to move in order to start the dialog.
The other party members are still teleported away though. This can be avoided by ensuring that the other NPCs have other commands in their queue, i.e. by giving them multiple checkpoints (by holding shift) or by giving them the order to leave the area immediately after the dialog (while the game is still paused).
It's currently not known whether this glitch is reproducible with all dialogs.
Baldur's Gate II
Note that unlike in Baldur's Gate I, dialogues in Baldur's Gate II cannot be broken by giving characters another command after the teleport script initiates.
However, if you leave the area between the teleport script activating and the teleport occuring, you will be teleported to the same co-ordinates in the new area instead, like the first variant of the Dimension Door Glitch. For many dialogues this will break the game and leave you trapped in a cutscene; for some it will not. Furthermore, if an autosave is created upon leaving the area, loading this autosave will normally cancel the teleport.
Speedrunning Uses
- To avoid being teleported to Candlekeep by Eltan in Baldur's Gate I (not in any submitted speedrun) Video
- To perform the big chapter skip in Baldur's Gate I, involving two different dialogs (current multi segment Baldur's Gate and Baldur's Gate TOSC runs) Video
- Big chapter skip using the loot command and command queue as described Video
Talk Lock
Force a neutral target to remain neutral while you kill it.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
Y | Y | Y | Y | Y |
When an NPC has a blue circle (meaning they are neutral and not immediately hostile), pause, talk to them, then give a different command (like move to a different location) and unpause. The NPC will be waiting for your character to talk to them, and will not perform any action until one round goes by. You can repeat talking to them as many times as desired. This can be used to kill the most powerful enemies in the game with no resistance, as long as they are initially neutral (blue circle).
Also note that this glitch instantly rotates the targetted NPC to face the talk-locking character, which may be helpful in setting up a backstab.
Speedrunning Uses
- Killing various bosses (Bohdi, Sarevok, Aran Linvail, Gaelan Bayle, etc.)
- Running past NPCs that would otherwise delay you (e.g. the dryads and shadow thief in Irenicus's lair)
- Skipping the Severed Hand cutscene in Icewind Dale 1
- Protecting the Dukes from the Arrows of Detonation in the Duchal Palace (current Baldur's Gate ToSC multi segment route)
Unpause Menus
Allow the game to remain running while in a menu.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
? | Y | ? | ? | ? |
Without Throne Of Bhaal installed, the only menu that can be unpaused is the inventory. To do this, just enter and exit a container in the inventory, and the game will unpause.
With Throne Of Bhaal installed, every menu except the inventory can be unpaused. To do this, enter the map screen, and from there enter the menu you wish to enter unpaused.
This bug can be used for levelling up, memorising spells or managing the inventory without losing any time in menus.
Use Any Item
Activate an item's ability, whether you have the capability to use it or not.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
N | Y | N | Y | ? |
Method
To perform this trick, right-click on a potion in the inventory and choose 'Drink Potion', then swap an item with a usable ability (including potions, scrolls, weapons with castable powers, etc.) into the inventory slot containing the potion. Leave the inventory, and the item's ability will be used, targetted on the caster.
Note that the technique of choosing 'Drink Potion' and then swapping items in the inventory is also used in the Inventory Stack Underflow glitch.
For Icewind Dale II make sure that the game is paused in the inventory. To do this either hit space before entering the inventory or use the button in the lower right of the UI while in the inventory.
Speedrunning Uses
- Allows non-mages to cast spells from scrolls Video
- Allows non-warrior to use Vhailor's Helm
Run Speed Enhancements
Travel faster than a normally hasted character.
BG1 | BG2 | IWD1 | IWD2 | P:T |
---|---|---|---|---|
? | Y | ? | ? | ? |
Method
Several character models seem to have an innate speed boost. These speed boosts stack with haste. Access to these models can be achieved with a shapeshifting spell. The following models, when hasted, provide a faster speed than a hasted human:
- Iron Golem ~45% faster
- Giant Troll ~25% faster
- Earth Elemental ~15% faster
Other models, including Fire Elemental, Greater Wolfwere, Mind Flayer, and Wolf were slightly slower (~10%) than a human's speed.
Ogre, Flind, Spider, Mustard jelly, and bear models are much slower (~50%+) than a human's speed.
Speedrunning Uses
- Anywhere that a character needs to travel to a point quickly.