Skip to content

[Known 9856] (Chain) Contingency is always permanent

GalactygonGalactygon Member, Developer Posts: 412
edited September 2014 in BGII:EE Bugs (v1.2.2030)
Existing behavior: According to the spell descriptions both contingency spells (SPWI617, SPWI908) have a duration of 1 day/level or until triggered. In reality, their durations are permanent until triggered. I have tried setting a duration in chain contingency, but the contingency opcode used (#234) is hardcoded to become opcode 232 (cast spell on condition) with a permanent timing mode.

How to reproduce the existing behavior: Cast any of the contingency spells and press Ctrl + T to try and force them to expire. Alternatively, you can open your saved games via SK or DLTCEP and check the list of effects on your PC. They are stored as opcode 232 (cast spell on condition) on the .cre in your savegame, and (incorrectly) with a timing mode of permanent.
How to reproduce the hardcoded behavior: Attached is a modified viersion of chain contingency, where the duration is set to 60 (one turn). Simply unzip the file to the override folder and test it ingame. The chain contingency lasts permanent until triggered.

Expected behavior: Even if they are not triggered, the contingency spells expire after 1 day/level.
Expected hardcoded behavior: Opcode 234 transforms into opcode 232 correctly with the duration values kept. Then it would be possible to edit the spell files to enable durations.

EDIT: Forgot attachment of SPWI908.spl
Post edited by Gate70 on

Comments

  • IllydthIllydth Member, Developer Posts: 1,641
    Thanks @Galactygon: I'm actually unsure about the implementation here. You're correct about the spell description, I'm just wondering if it's worth fixing given that the initial contingency spell is 6th level - meaning a minimum of 16th level to cast...or 16 days of uptime. At a 10 to 1 reduction (about the timescale of the game) that's just over 38 straight hours of play (if I'm doing my math right) before you hit the timeout on the spell.

    16 Days * 24 Hours / Day * 60 Minutes / Hour = 23040 Minutes / 10 = 2304 Minutes in 16 Game Days (at a 10/1 reduction which is consistent with round and turn times).

    Now, if this spell is not going away at rest (which I think is what you're saying) that DOES become a time limit you can hit pretty easily.

    The Ctrl-T Option / Waiting it out, I believe makes this pretty irrelevant. However, if the spell doesn't disappear after a certain amount of resting hours as well that's probably something that needs fixed.
  • CrevsDaakCrevsDaak Member Posts: 7,155
    @Illydth‌ the game measures each round = 6 seconds and one turn = 10 rounds = 60 seconds, and it uses seconds for time-measuring stuff (UNLESS it's the SmallWait() action, which works timed with the AI's update time (roughly 15 times a second), anywhere else, seconds are used).

    Also, try pressing CTRL+T for a long time--it's time-advancing powers keep improving until it rate turns into a 1 day/seconds pressed.
  • Gate70Gate70 Member, Developer Posts: 3,871
    Does chain contingency say 1 day/level?
  • GalactygonGalactygon Member, Developer Posts: 412
    @Illydth

    I think 1 day/level is something that happens regardless how often you rest even though resting shouldn't force expiration. However if you travel often between worldmap areas then it does become noticeable. One thing is sure, the contingency opcode #234 ignores duration values attributed to it which seems like a bug.

    @Gate70

    Actually it's listed as "special". I think I overlooked it because BGIIEE Contingency is mentioned as "1 day/level" and both contingency spells in AD&D (Wizatd's Compendium vol1) have a duration of "1 day/level".
  • DeeDee Member Posts: 10,447
    We'll be updating the spell description's duration to list "Permanent", to be consistent with the Spell Sequencer spell (which does something similar).

    The engine doesn't play nicely with daily durations.
Sign In or Register to comment.