Commit bb9d193
Convert to long FormIDs before patching Stats
This _properly_ fixes the crashes and the ITMs caused by the 'Critical
Effect' field of the CRDT subrecord of the WEAP record.
The cause was that the record definitions define criticalEffect to be a
FID, but to properly initialize FormIDs, convertToLongFids() must first
be called. Otherwise, they remain as integers. Later on in the patch
building process, we make a copy of each record from the source mods, to
be included in the final BP, but this copy procedure
(MreRecord.getTypeCopy, if you're curious) converts FormIDs when
copying. This resulted in us having cached mod data where criticalEffect
was an int, and a copy of that data where criticalEffect was a FormID.
Long FormIDs are tuples of a string and an integer, while short FormIDs
are just integers. Obviously, a comparison between the two will show
them as different - causing the BP to think that _every_ record that
occurs in a source mod had changes that needed to be preserved - hence
the ITMs.
I haven't figured out how this was responsible for the crashes, but I
can confirm that they're fixed as of this commit.
Supersedes 'Fix Duplicate Records In Stats Parsing' (73be14f).1 parent 44ea5ff commit bb9d193
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17071 | 17071 | | |
17072 | 17072 | | |
17073 | 17073 | | |
17074 | | - | |
| 17074 | + | |
17075 | 17075 | | |
17076 | 17076 | | |
17077 | 17077 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1397 | 1397 | | |
1398 | 1398 | | |
1399 | 1399 | | |
1400 | | - | |
| 1400 | + | |
| 1401 | + | |
1401 | 1402 | | |
1402 | 1403 | | |
1403 | 1404 | | |
| |||
0 commit comments