Norbyte / bg3se

Baldur's Gate 3 Script Extender
Other
1.02k stars 63 forks source link

LoadStatsFile crashes when loading file that includes a negative DamageBonus #401

Closed mazina closed 1 month ago

mazina commented 1 month ago

I have attempted solutions to common problems

Yes

I have checked that my game version is supported

Yes

OS

Windows 10

Platform

Steam

Description

I was trying to use LoadStatFile to reload one of my mod files, and I found that SE will consistently crash if I add a status that gives a negative damage boost, like this one:

data "Boosts" "Resistance(Cold,Immune);DamageBonus(-10,Fire)"

The game seems to handle a negative damage bonus just fine (so far), so I'm assuming it's a legal call.

Indications

The game crashes immediately upon issuing the command from the SE Console, and the crash window explicitly said ScriptExtender, and I could see it was reading in a file from my mod.

Diagnostic Files

No response

Steps to Reproduce

Add data "Boosts" "Resistance(Cold,Immune);DamageBonus(-10,Fire)" to a status and use LoadStatsFile to load the file.

Expected Behavior

It should parse the file correctly and reload it.

Actual Behavior

Crash.

mazina commented 1 month ago

I added some more negative damage bonuses to the same status, and it stopped crashing when loading the file from SE. Weird.