Skip to content

[Bugfix] ToBEx fixes

AndreaColomboAndreaColombo Member Posts: 5,525
edited November 2012 in Original BG2 Bugs
Originally posted on /r/FriendsOfBaldursGate by Ascension64 (author of Throne of Bhaal Extender, or ToBEx for short).

If of any help at all, this is a complete list of things (mostly bugs) currently fixed by TobEx. I haven't included any of the modder features.

Action
-AddKit(), AddSuperKit(): cannot specifically set BARBARIAN (0x40000000) and WILDMAGE (0x80000000) kits since only the low short of the argument is used rather than the entire int
-Standard attack action: For X/2 attacks, the 1/2 attack uses rand(2) every single round rather than always making one attack every 2 rounds. For 3/2 attacks, the offhand is never used; better if the 1/2 attack uses the offhand if present
-EquipRanged(): if a shield is equipped, one-handed ranged weapons never get equipped
-JoinParty(): Players can re-use an NPC's class abilities infinitely by removing an NPC from party and getting them to rejoin again

Debugging
-The critical error message box during a crash does not always display because the window thread that the message box is sent to is suspended prior

Effects
-#182 Apply Effect Item: was not fully implemented
-#183 Apply Effect Itemtype: was not fully implemented
-#1 Attacks Per Round Modifier: multiple modifications to this opcode stack onto the key value (0-10) rather than the actual attacks per round (0-5)
-#2 Cure Sleep: tries to remove its own opcode rather than sleep opcode
-#74 Blindness: if multiple copies of this effects are applied, the target's -10 to hit penalty accumulates
-#191 Casting Level Modifier: did not fully implement the stats CASTINGLEVELBONUSMAGE and CASTINGLEVELBONUSCLERIC when casting spells
-#6 Charisma Modifier: A net negative value wraps to 25. This is exploited by using Rod of Terror (charisma penalty) together with Ring of Human Influence (holds charisma at a fixed value)
-#10 Constitution Modifier: A net negative value wraps to 25
-#177 Use EFF File: If used in a trap script for containers/doors, results in a crash because of a double delete
-#177 Use EFF File: if the target EFF file effect opcode stores information (such as in the Polymorph opcode), these are not saved because the Use EFF File effect itself is stored
-#164 Cure Drunkenness: tries to remove its own opcode rather than the drunk opcode
-#12 Damage: 1) killing someone with magic fire damage would cause a WEIRD damage assertion failure, 2) hitting someone with magic cold damage would not play a hit sound, and 3) there is a memory not deallocated when fist damage makes the target unconscious
-#15 Dexterity Modifier: A net negative value wraps to 25
-#78 Disease, #25 Poison, #235 Wing Buffet, #98 Regeneration, #272 Repeating Effect: for multiple instances of these opcodes, only the highest frequency instace would apply when using parameter 2 values of 0-3
-#238 Disintegrate: The death effect memory is not freed when the target does not match the effect parameters.
-#58 Dispel: the formula is incorrect because brackets were forgotten(i.e. WRONG: nDispelChance += pEff->nSourceCreLevel x 10 - nDispelLevel; CORRECT: nDispelChance += (pEff->nSourceCreLevel - cDispelLevel) x 10)
-#93 Fatigue Mod: a net negative value wraps to 100
-#150 Find Traps: the value can wrap around
-#181 Forbid Itemtype: the information gets placed in an unused list whenever parameter 2 is non-zero
-#19 Intelligence Modifier: A net negative value wraps to 25
-#94 Drunkenness Modifier: a net negative value wraps to 100
-#20 Invisibility: the improved invisibility should be set in derived stats rather than base stats when the timing is 1
-#96 Level Modifier: a net negative value wraps to 100
-#21 Lore Modifier: a net negative value wraps to 100
-#166 Magic Resistance Modifier: does not allow for permanent timing
-#106 Moral Break Modifier: the value can wrap around
-#90 Open Locks Modifier: the value can wrap around
-#92 Pick Pockets Modifier: the value can wrap around
-#135 Polymorph: When the polymorph is only in appearance, the color changes are lost when the creature is refreshed. When used in EFF file with Use EFF File opcode (such as in the Drow Transformation), the repetitive re-creation of the animation causes the creature to stutter
-#108 Reputation Modifier: the value can wrap around
-#33-37 Save Vs Breath/Death/Poly/Spells/Wands Modifier: when below -20, the value can wrap to 20
-#59 Stealth Modifier: the value can wrap around
-#97 Strength Extra Modifier: a net negative value wraps to 100
-#44 Strength Modifier: a net negative value wraps to 25
-#49 Wisdom Modifier: a net negative value wraps to 25

Rules
-Cleric-Ranger HLAs: cleric-ranger multi-class characters have the cleric and ranger HLA rules swapped around because the arrays are set up inconsistently when working out the number of HLAs available at level-up. The correct behaviour is cleric-rangers get their first HLA at Ranger level 13 (with cleric HLAs available due to level 7 spells being available), get one HLA for each Ranger level from level 13 and higher, and get one HLA for each Cleric level from level 15 and higher

Other
-Players can intend to initiate dialogue with a neutral creature, cancel their action, and then perform a hostile action instead, resulting in the creature wasting up to 10 seconds doing nothing before becoming hostile. This is due to the timer for the creature facing the talker not terminating if the creature is attacked/hit
-For large mods with lots of variables, the hash map for variables degenerates to O(n) and causes game stuttering as a result
-Fixed in beta 26499 patch: a creature that is moving between areas may have multiple requests to do so and thus creates multiple copies of the creature in the area and thus the saved game
-The delay timer to bounce a spell in the creature class is not zeroed on construction, resulting in spells being absorbed instead of bounced when the creature has spell turning on
-Fixed in beta 26499 patch: the summon count can increment permanently, preventing any further summoning
-Dead creatures of some animation groups are not transferred to the LIST-MIDDLE list, resulting in the AI, triggers and actions trying to target them. This applies to animations 0x6404 SAREVOK, 0x4XXX STATIC_ (SLEEPING_ are excluded based on STATE_SLEEPING) because the coding disallows use of LIST-MIDDLE
-Non-ammo-requiring launcher weapons (using ranged (2) ability) grant extra damage when ammo is equipped, because launcher weapons grant the damage and strength bonuses of non-launcher (4)-type abilities

Sound
-Sounds in the middle of animation soundset 2DA files never play
-PICKED_POCKET sounds can play when EXISTANCE sounds are called for
-Illusory female creatures (e.g. from Project Image) use male casting sounds because non-male/non-female genders are programmed to use male casting sounds
-Whether a casting sound is played does not take into account the MENTALSPEED stat, leaving a lingering casting sound if mental speed is faster

Items
-Rechargable items can be recharged by putting them into bags and taking them out again
-Rechargable items with depleted charges sell for a worthless amount of gold

Triggers
-Kit(): cannot specifically check for BARBARIAN (0x40000000) and WILDMAGE (0x80000000) kits since only the low short of the argument is used rather than the entire int
-There is a lot of overhead taking place when triggers check bags for the presence of items (i.e. HasItem() and variants) due to the loop repeating X times unecessarily for a stack of X items (e.g. 1000 stack of arrows is checked 1000 times, not once). This caused game stutter behaviour with 'bottomless' bags of holding
-PartyHasItemIdentified(): in single player, this behaved exactly the same as PartyHasItem()

Interface
-Scrolling the spell choices during the Select Spell screen when there are greater than 11 choices in a level doesn't quite work correctly

Animations
-If IWD animations (0xE###) use the 3rd attack animation (A3), they would display the 2nd attack animation in northeast and east orientations when 'Sprite Mirror' is disabled
-Somewhere between builds 22941 and 23037 of Shadows of Amn, the playing of the specific spell bouncing animation (SPSTURNI.VVC) became broken
-An assertion prevents the use of the 3d acceleration-only alpha mask animation RLE-encoded BAMs of VVC files
-In VVC files, the use of the 'Translucent shadow' display flag would use the normal animation Resref (0x8) for the shadow animation rather than the 'Shadow Animation ResRef' field (0x10)

Things not yet fixed by TobEx (some of these may need confirming)
-EscapeArea(), EscapeAreaMove(), etc.: on many occassions the creature just disappears rather than walks off the screen
-Dialog: ActionOverride() seems to work setting GLOBAL, but fails on setting LOCALS.
-#107 Portrait Change, #71 Sex, #51 Alignment opcodes: are always permanent
-Script actions don't work in rumor DLGs (in taverns for example).
-The action "AmbientActivate()" (which is for animations...) is a little bit buggy because it doesn't start at the first Frame.
-#214 Select Spell can be exploited if you open a submenu on the command bar before it kicks in. Once a spell is selected, you return to the previous menu (Special Ability or whatever). Press ESC to exit the menu and you return to the spell selection menu, from which you can cast another free spell. And so forth. In the Kelsey NPC mod, Kelsey's wild magic amulet is easily abused this way
-67 Weather(I:Weather) fog type in weather.ids does not work
-For spells with target of 7 (cast instantly during pause), spells cast via trigger/contingency/effect 232, the graphics and sounds are played normally so they linger when the character moves away
-When fighting Islanne in Durlag's Tower in Tales of the Sword Coast, killing Islanne at certain times results in Islanne being highlighted as Dead, but the creature remains alive and remains unkillable
-Trigger 0x00A7 SpellCastInnateRES(S:Spell,O:Object) is broken. The spell field is never actually checked so casting any innate spell will return true.
-CLUAConsole:StartStore("") currently crashes the game because of a NULL pointer
-Poison and disease damage remove a mirror image AND do damage at same time
-BG1 animations (e.g. SKELETON) cannot be made to dual-wield due to missing animations, resulting in a crash
-With the pre-made ToB character as an example (TOBFIGHT.CHR). The hasted character attacks with 3/2 attacks, but without haste attacks with 3 attacks. This seems to be incorrect.
-TakePartyItem(): if you have two of same item, one inventory and one in bag of another player, and bag item is found first, you lose both!
-#18 Max HP Modifier: items with this effect can be re-equipped to repetitively heal the creature. When a game is loaded with a creature wearing an item with this effect, the max HP bonus is applied, but the current HP never gets updated. Hence a creature with 100% HP will be loaded with < 100% HP
Post edited by Balquo on

Comments

  • BhryaenBhryaen Member Posts: 2,874
    Um, excuse me, but this great thread about ToBex has already been posted (and probably will be again), so... so there. :-P
  • BhryaenBhryaen Member Posts: 2,874
    Is there some way this can be broken down into categories? Is it mostly about one sort of fixes? If it can be divvied up, I might even be able to take a section to run with as far as I can, asking where necessary.
  • BhryaenBhryaen Member Posts: 2,874
    edited June 2012
    Mind you, William_Imm had the good idea to put a link to ToBEx in his OP- or at least a link to the ToBEx forum. There I found this file that downloads an html list of a bunch of ToBEx fixes- a reference guide that was receiving a lot of gratitude from modders a year ago. That's the best set of info on ToBEx that I found other than Ascension64's reddit post itself...
  • AndreaColomboAndreaColombo Member Posts: 5,525
    edited June 2012
    @Bhryaen

    Thanks for posting that link :-) As I wrote in @William_Imm 's thread, I have already asked Ascension64 to break this request down into several separate threads, once for each bug, complying with @CameronTofer 's bug reporting guidelines ("current behavior" / "desired behavior"). I also suggested that since he (Ascension64) has already fixed those bugs in his mod, he could actually add a "proposed solution" header to his threads. He hasn't read my PM yet, though, so I'm still waiting for his answer.
  • BhryaenBhryaen Member Posts: 2,874
    edited June 2012
    Regarding the breaking down of this rather lengthy list into individual threads, there is this comment I found from Phil in the "Helm and Cloak Inn Guards" thread by Balquo:
    I have no problems with you reposting bugs from the bg1fixpack. We're actively implementing bugfixes that span many of these packs, and these threads are handy reminders. The only thing I would suggest is that you post batches of similar bugs, as you did with the lockpick skill being too high bug.
    This is what I was driving at in terms of qualifying the sort of fixes these are- like obviously the section headings are a great start, but then maybe subdividing, say, the "Effects" section into separate threads for "Attribute Modifiers," "Skill Modifiers," "Condition Modifiers..." Seems like that would also help the devs, but I suppose that's something we could try to do if Ascension64 just does the decrypting of his post for us. :-)

    Incidentally it is quite nice to know what the devs need this way. The communication just makes it that much easier to get it for them. hehe
  • BhryaenBhryaen Member Posts: 2,874
    @CameronTofer
    If you haven't seen it already, you might want to check out this post by @Ascension64 above. Looks like a rather fantabulous bugfix list to keep you guys busy! ;-)
  • AndreaColomboAndreaColombo Member Posts: 5,525
    @Ascension64 THANKS!!

    @CameronTofer Pretty please? *misty-eyed emoticon*

    :-)
  • lansounetlansounet Member Posts: 1,182
    Excitement~
    Even the "spell-turning not bouncing every spell" bug that was missing from this post is in that pdf :D
    Good luck @ScottBrooks
  • ScottBrooksScottBrooks Member Posts: 687
    Here is a combat log with fixed half attack(get extra attack ever second round), and rotating between left and right hands

    : Chr Roll:13 +Right-3
    : Chr Roll:16 +Left-7
    : Chr Roll:14 +Left-7
    : Fuller Roll:18 +Right1
    : Chr Roll:14 +Right-3
    : Chr Roll:13 +Left-7
    : Fuller Roll:20 +Right1
    : Chr Roll:6 +Right-3
    : Chr Roll:3 +Left-7
    : Chr Roll:7 +Right-3
    : Fuller Roll:6 +Right1
    : Chr Roll:10 +Right-3
    : Chr Roll:14 +Left-7
    : Fuller Roll:4 +Right1
    : Chr Roll:2 +Right-3
    : Chr Roll:10 +Left-7
    : Chr Roll:10 +Left-7
    : Fuller Roll:9 +Right1
    : Chr Roll:4 +Right-3
    : Chr Roll:15 +Left-7
    : Fuller Roll:16 +Right1
    : Chr Roll:4 +Right-3
    : Chr Roll:2 +Left-7
    : Chr Roll:10 +Right-3
    : Fuller Roll:8 +Right1
    : Chr Roll:12 +Right-3
    : Chr Roll:11 +Left-7
    : Fuller Roll:2 +Right1
    : Chr Roll:10 +Right-3
    : Chr Roll:10 +Left-7
    : Fuller Roll:9 +Right1
    : Chr Roll:8 +Left-7
    : Chr Roll:1 +Right-3
    : Chr Roll:11 +Left-7
    : Fuller Roll:20 +Right1
    : Chr Roll:19 +Right-3
    : Chr Roll:5 +Left-7
    : Chr Roll:14 +Right-3
    : Fuller Roll:8 +Right1
    : Chr Roll:4 +Right-3
    : Chr Roll:6 +Left-7
    : Fuller Roll:12 +Right1
  • lansounetlansounet Member Posts: 1,182
    edited June 2012
    Specialized fighter dual wielding, so 5/2 attacks/round right? That looks great, but I think in case of uneven number of attacks in a round the main (right) hand should prevail always? Using your format with 7/2 attacks/round:

    : Chr    Roll:20  +Right-3
    : Chr Roll:20 +Left-7
    : Chr Roll:20 +Right-3
    : Chr Roll:20 +Left-7
    : Fuller Roll:0 +Right1
    : Chr Roll:20 +Right-3
    : Chr Roll:20 +Left-7
    : Chr Roll:20 +Right-3
    : Fuller Roll:0 +Right1
    : Chr Roll:20 +Right-3
    : Chr Roll:20 +Left-7
    : Chr Roll:20 +Right-3
    : Chr Roll:20 +Left-7
    : Fuller Roll:0 +Right1
    : Chr Roll:20 +Right-3
    : Chr Roll:20 +Left-7
    : Chr Roll:20 +Right-3
    : Fuller Roll:0 +Right1


    My char has the critical strike HLA up for those 4 rounds and Fuller is just an unlucky weakling.
  • Ascension64Ascension64 Member Posts: 560
    @Ascension64 that looks great, thank you. Scott's going through your pdf right now and fixing them. Would you be so kind as to add a column to number the bugs. If we don't number them it will be chaos when we go to confirm the fixes.
    @CameronTofer: here we are. I had no idea the list counted up to 84. Yep, definitely needs tracking...
    https://github.com/downloads/Ascension64/TobEx/120613_BUGS_TobEx_BGEE.pdf

Sign In or Register to comment.