Skip to content

fix: support script bundles from game patch 2.5 - #202

Merged
jac3km4 merged 3 commits into
jac3km4:0.5.xfrom
alphanin9:fix-2.5-bundle-header
Oct 22, 2026
Merged

jac3km4 merged 3 commits into
jac3km4:0.5.xfrom
alphanin9:fix-2.5-bundle-header

Conversation

@alphanin9

@alphanin9 alphanin9 commented Oct 22, 2026 •

Copy link
Copy Markdown

Slopped

Redscript on 2.5 seems to add some new table header that we don't really care about I guess? Not sure if le fix is correct but I can get ingame and nyancat works

Since patch 2.5 the game sets header flag 0x2 and stores a 7th table header
right after the regular 104-byte header (an extra table with one 12-byte
record per definition). The sequential reader didn't skip it, so every table
after the header was read 12 bytes early and loading failed with
'failed to fill whole buffer'.

Skip the extra table header when the flag is set, and clear the flag when
saving since the table isn't written back (matching redscript 1.0).
@alphanin9

Copy link
Copy Markdown
Author

Looks like the new table header has something to do with the new in-game mod support + reloading.

@alphanin9

Copy link
Copy Markdown
Author

In-game official mod reload support works with this patch alone (+ some RED4ext work) so it's fine

@flibdev

flibdev commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

LGTM, had to update modular-bitfield to 0.13 for those annoying unnecessary parentheses warnings.

Decompile ran clean, test scripts working

@jac3km4
jac3km4 merged commit 392ede4 into jac3km4:0.5.x Oct 22, 2026
8 checks passed
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.

3 participants