(BG1) Lack of item level limit development can crash game for modded animated items
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.
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
2
Comments
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.
I also admit to being biased as I'm totally in favor of any bugfix request put forth by modders.
@Avenger_teambg - That item was very helpful, thank you ^^