Skip to content

Add support for The Last Chieftains in the fast parser#139

Open
Kjir wants to merge 1 commit intohappyleavesaoc:masterfrom
Kjir:master
Open

Add support for The Last Chieftains in the fast parser#139
Kjir wants to merge 1 commit intohappyleavesaoc:masterfrom
Kjir:master

Conversation

@Kjir
Copy link
Copy Markdown
Contributor

@Kjir Kjir commented Feb 21, 2026

Make the necessary changes to support savegames from the Last Chieftains DLC. The full parser changes are not sufficient to make it work yet, more investigation is needed.

Comment thread mgz/header/de.py
"unknown_count"/If(lambda ctx: find_save_version(ctx) >= 66.3, Int32ul),
If(lambda ctx: find_save_version(ctx) >= 66.3, Bytes(12)),
If(lambda ctx: find_save_version(ctx) >= 66.3, Array(lambda ctx: ctx.unknown_count, Bytes(4))),
de_string,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's 2 more de strings in 67.2 saves before this DE String.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before or after? I put them after, I don't think it's possible to know which one comes first unless we know what they contain.

Comment thread mgz/header/de.py Outdated
Comment on lines +179 to +182
If(lambda ctx: find_save_version(ctx) >= 67.2, Struct(
Int32ul,
Int32ul,
)),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct.

Comment thread mgz/header/de.py
Int32ul,
)),
"ver37"/If(lambda ctx: find_save_version(ctx) >= 37, Struct(
Int32ul,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a timestamp. Value seems to be always the same as at the one declared above in the struct.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is a timestamp, I didn't change it here. I have it as a timestamp in my own Rust parser.

Make the necessary changes to support savegames from the Last Chieftains
DLC. The full parser changes are not sufficient to make it work yet,
more investigation is needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants