Closed ralpha closed 4 years ago
The art_id
field does not refer to an artifact, but an art image - specifically, it refers to an art_image_chunk
object (loaded from art_image-<ID>.dat
), and art_subid
serves as an index into that object.
The actual problem is that history_event_masterpiece_created_item_improvementst
is misaligned - DFHack thinks the structure size is 0x68 bytes on 64-bit Windows, but it's actually only 0x60 bytes.
Edit: the unk_1
field isn't actually part of this class, but of the parent class history_event_masterpiece_createdst
(and its proper name is skill_at_time
); due to struct alignment rules, this was pushing all of the other fields down 4-8 bytes.
While testing I found another value that is incorrect. For a HE with type
masterpiece_created_item_improvement
there is a fieldart_id
. I think this refers to artifact id, but the value is 65535 with is the maximum value of a unsigned 16bit integer (2^16-1). So I think someone wanted to set this value to-1
but it warped around.I also don't know what
art_subid
is supposed to be? There are also someunk_1
andunk_2
tags. They are unknown values?unk_1
also looks odd-65524
maybe that should be 65535-65524=11?improvement_type
has a value ofunknown -1
maybe better to change it to-1
orunknown
?Related issue: https://gitlab.com/df_storyteller/df-storyteller/-/issues/88