Skip to content

Adding a campaign record and reworking scenario from header - #126

Open
Shranar wants to merge 14 commits into
happyleavesaoc:masterfrom
Shranar:master
Open

Shranar wants to merge 14 commits into
happyleavesaoc:masterfrom
Shranar:master

Conversation

@Shranar

@Shranar Shranar commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

Using Saladin 3 (new record 64.3-campaign), I'm trying to fix the scenario part, what bother me is that those fixes are from the most recent version and might not be compatible with a previous one.

@Shranar Shranar closed this Jul 21, 2025
@Shranar Shranar reopened this Jul 24, 2025
Comment thread .gitignore
.tox/
*.pyc
*.sqlite
/.vs

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.

Using Visual Studio to work

Comment thread mgz/header/de.py
If(lambda ctx: find_save_version(ctx) >= 50, Bytes(8)),
If(lambda ctx: find_save_version(ctx) >= 61.5, Flag),
If(lambda ctx: find_save_version(ctx) >= 63, Bytes(5)),
If(lambda ctx: find_save_version(ctx) >= 64.3 and ctx.game_type == 5, Bytes(4)), # Campaign ?

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.

Crashed on the campaign replay parsing here, could use a check with previous version of the game

Comment thread mgz/header/lobby.py Outdated
#If(lambda ctx: find_save_version(ctx) >= 26.16, Bytes(5)),
#If(lambda ctx: find_save_version(ctx) >= 37, Bytes(8)),
#If(lambda ctx: find_save_version(ctx) >= 64.3, Bytes(16)),
# We ignore those previous data for now they were making the GoToLobbyStart more complex without being meaningfull

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.

I choose to ignore those bytes to make GoToLobbyStart easier to write but we are loosing some version knowledge, happy to hear feedback.

@Shranar

Shranar commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

@happyleavesaoc I'm open to feedback

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.

1 participant