Mutagen-Modding / Spriggit

A tool to facilitate converting Bethesda plugin files to a text based format that can be stored in Git
GNU General Public License v3.0
88 stars 10 forks source link

NavmeshGeometry GridCell array serialized as single unparsed GridCell #44

Open JMPZ11 opened 5 months ago

JMPZ11 commented 5 months ago

When exporting a STAT record containing a navmesh from a Starfield .esm, the gridcells sub-container is not split into separate gridcells, but rather contains a single gridcell with the unparsed data for all the gridcells.

Spriggit 0.18; SF1Edit 4.1.5d

It gives the impression that gridcells are parsed, but they are not. My suggestion would be to either parse them, or not include the gridcell object at all (as what is labeled a "GridCell" is in fact an "UnparsedGridCellArray"

testnavmesh.zip

The attached esm has an example of a static with a navmesh that should contain 4 gridcells according to SF1edit, but in the spriggit yaml it is stored as one.

Made up example:

Current output (non-data commented)

  GridArrays:
  - GridCell:
    - 2    # Length
    - 0    # Delimiter
    - 13
    - 14
    - 6    # Length
    - 0    # delimiter
    - 12
    - 13
    - 14
    - 18
    - 20
    - 0
    - 0    # Length
    - 0    # delimiter

Expected Output:

  GridArrays:
  - GridCell:
    - 13
    - 14
  - GridCell:
    - 12
    - 13
    - 14
    - 18
    - 20
    - 0

Alternatively if such parsing is undesired, the structure is inaccurate - the GridCell node should be collapsed into parent:

Non-ideal alternative

  GridArrays:
  - 2
  - 0
  - 13
  - 14
  - 6
  - 0
  - 12
  - 13
  - 14
  - 18
  - 20
  - 0
  - 0
  - 0

(I have yet to see if Mutagen has the same issue)