Skip to content

Instantly share code, notes, and snippets.

@glx22
Last active July 10, 2021 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glx22/d919fd83acea80a63624ad2e17fc9ca3 to your computer and use it in GitHub Desktop.
Save glx22/d919fd83acea80a63624ad2e17fc9ca3 to your computer and use it in GitHub Desktop.
Script savegame blob format

There are 6 data types saved for scripts. When saving, each data starts with the type marker saved as SLE_UINT8 followed by the actual data.

  • SQLS_INT:
    • an SLE_INT64 with the actual value
  • SQLS_STRING:
    • an SLE_UINT8 with the string length
    • string len SLE_CHAR
  • SQLS_ARRAY:
    • each element saved as a separate data (ie type then value)
    • an SQLS_ARRAY_TABLE_END marker (SLE_UINT8)
  • SQSL_TABLE:
    • for each element:
      • key saved as a separate data
      • value saved as a separate data
    • an SQLS_ARRAY_TABLE_END marker (SLE_UINT8)
  • SQSL_BOOL:
    • an SLE_UINT8 with 0/1 depending on value
  • SQSL_NULL:
    • nothing

The first data type is always a SQSL_TABLE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment