Commit Graph
6 Commits
Author SHA1 Message Date
MagicBotandClaude Opus 5.5 b2e38bdc06 Support all .wpak files with a wpak target
Replaces the config target with wpak, which handles every known pak or a
single one named on the command line. Map icon .tga entries are stored
unencrypted (sb.exe 0xAACA60).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 11:55:10 -04:00
MagicBotandClaude Opus 5.5 a312c9270a Add Config.wpak unpack, pack and test
A .wpak is a zip whose entries are each Blowfish CFB-64 encrypted with
a zero IV and the client's hardcoded key (sb.exe 0x54DEC0). Pure Python
Blowfish, no new dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 11:22:52 -04:00
MagicBotandClaude Opus 5.5 9005de76d9 Number output files and folders instead of overwriting
Pack now writes <Name>.cache, or <Name>.cache.1, .2, ... if that file
already exists (replaces the fixed .cache.new name). Unpack writes each
target folder under ARCANE_DUMP the same way, e.g. COBJECTS.1. The
output folder is created only after the cache loads, so a missing cache
does not leave an empty numbered folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:43:40 -04:00
MagicBotandClaude Opus 5.5 7bcbed08a8 Accept unsigned values in signed fields when packing
Dumps made before the signed-read change store values like -1 as
4294967295. write_long now converts 2147483648..4294967295 to the
signed equivalent (same bytes), so existing community dumps still
pack. Verified: all 10332 files of an older dump repack identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:09:05 -04:00
MagicBotandClaude Opus 5.5 0adbfe0d99 Read client signed int32 fields as signed
Add ResStream.read_long/write_long and use them for every CObjects
field the client loads with ResStream_ReadInt32 (sb.exe 0x7E1700)
as a value: rank info, attribute/skill/resource amounts, requirements,
door/deed/container/key fields, natural attacks, hardpoints, sound
event types and sparse VAL_LONG (LoadSaveBehavior<long>). Hash/enum
fields, list counts and flag words keep unsigned reads.

The binary is unchanged; JSON now shows e.g. -1 instead of 4294967295
(rank_hirelings, rank_rank) and -10 instead of 4294967286 (attr_adj).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:55:04 -04:00
MagicBot 942b33a252 mbEditorPro2.0 release 2022-12-25 08:47:00 -05:00