Skip to content

(BG1) Lack of item level limit development can crash game for modded animated items

BhryaenBhryaen Member Posts: 2,874
edited August 2012 in Fixed
This bugfix was mentioned by @Avenger_teambg on a public Bugs thread which read:

Problem: Level limits are unused in current items, but some mods might have wanted to use them. Sadly they work only limited, because any item with animation (like armors) would crash.

Cause: The animation modifier is 2 bytes string, but there is no room for the zero terminator. The level limit field acts as zero terminator.

Solution: Handle the animation string as a 2 bytes string, don't expect the zero terminator.

Expected: No crash, item has the correct animation AND level limit.
Post edited by Bhryaen on
AndreaColomboIgneous

Comments

  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    Problem: Level limits are unused in current items, but some mods might have wanted to use them. Sadly they work only limited, because any item with animation (like armors) would crash.

    Cause: The animation modifier is 2 bytes string, but there is no room for the zero terminator. The level limit field acts as zero terminator.

    Solution: Handle the animation string as a 2 bytes string, don't expect the zero terminator.

    Expected: No crash, item has the correct animation AND level limit.
  • AndreaColomboAndreaColombo Member Posts: 5,524
    I support this bugfix request 200%. Devs please take note.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    This bugfix request requires touching the engine code, not any items. It has no impact on any existing or future items, except that it would allow creating level limited armor/weapon without crash. There are no such items in the original dataset.
    IgneousBhryaenlolien
  • AndreaColomboAndreaColombo Member Posts: 5,524
    I'm totally in favor of this.

    I also admit to being biased as I'm totally in favor of any bugfix request put forth by modders.
  • BhryaenBhryaen Member Posts: 2,874
    Sorry, @Avenger_teambg- did the best I could to laymenize the title, but lamentably I can only grasp so much... I'll amend the OP later (busy at work now). Mostly I was trying to add the hook for devs to be able to grab and implement, but if I've misstated it, I'll have been counterproductive... Heh...
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Ok, i tested this, in BGEE. BGEE doesn't crash, but there is no weapon animation.
    Bhryaenlolien
  • SethDavisSethDavis Member Posts: 1,812
    Potentially fixed - The equipCode is now trimmed down to the first two characters. The item no longer causes an assertion failure and the animation is set properly.

    @Avenger_teambg - That item was very helpful, thank you ^^
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited August 2012
    Confirmed fixed. - level limit works, crash doesn't happen, animation works.
  • BhryaenBhryaen Member Posts: 2,874
    CLUAd in @Avenger_teambg's invalid item- no crash, though can't equip it (which is better anyway).
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited August 2012
    Yes, until @SethDavis implements the externalized item types (*nudge* *nudge*) you will not be able to equip new (invalid) item types. This feature could still be used to make Vai ignore books and furs by changing the bandit scalp to a new item type and setting vai's shop to accept only this new item type. 2 lines of Weidu code , well some more for naming the items and such, so formatted it takes more :)
    BhryaenAndreaColombocmorganlolien
Sign In or Register to comment.