DarkestDungeonSaveEditor icon indicating copy to clipboard operation
DarkestDungeonSaveEditor copied to clipboard

What is the meaning of the first bit of `Meta2Entry`'s `FieldInfo`

Open thanhnguyen2187 opened this issue 1 year ago • 1 comments

Hi.

I followed your documentation on DSON format and managed to decode the files. However, on encoding JSON files to DSON files, I found a difference with my own Meta2Block and the original Meta2Block, which is further narrow downed to the 1st bit of FieldInfo. For example, from this file, Meta2Entry for base_root (the first field) looks like this:

{
  "name_hash": 1183861218,
  "offset": 0,
  "field_info": -2147483607,
  "inferences": {
    "index": 0,
    "is_object": true,
    "parent_index": -1,
    "field_name_length": 10,
    "meta_1_entry_index": 0,
    "num_direct_children": 2,
    "num_all_children": 109,
    "raw_data_length": 0
  }
}

While my own encoding looks like this:

{
  "name_hash": 1183861218,
  "offset": 0,
  "field_info": 41,
  "inferences": {
    "index": 0,
    "is_object": true,
    "parent_index": -1,
    "field_name_length": 10,
    "meta_1_entry_index": 0,
    "num_direct_children": 2,
    "num_all_children": 109,
    "raw_data_length": 0
  }
}

I managed to see that -2147483607 is equal to 2147483689 in uint32, which can be compared to 41 of my own encoding like this:

1st: 0b10000000000000000000000000101001
2nd: 0b00000000000000000000000000101001

What do you think is the meaning of those first bits?

Thanks!

thanhnguyen2187 avatar Sep 24 '22 08:09 thanhnguyen2187