Binary .EDT Injection Vectors
Unlike modern JSON or XML modding frameworks, Jagged Alliance 2 stores mercenary character biographies and "Additional Note" metadata inside compiled binary files (AIMBIOS.EDT, MERCBIOS.EDT, etc.).
The ASCII-Shift Encryption Loop
Text strings written to AIMBIOS.EDT utilize a basic obfuscation routine.
| Algorithm | Execution Logic |
|---|---|
ord(char) + 1 |
Standard ASCII characters written to the binary buffer must be shifted +1 integer value higher if their starting ASCII DEC value is greater than or equal to 33. This dictates that spaces (ASCII 32) remain spaces, but 'A' (ASCII 65) is written to the binary as 'B' (ASCII 66). |
Strict Array Offset Calculation
Each mercenary slot (defined by the uiIndex mapping in MercProfiles.xml) is pre-allocated exactly 1,120 bytes of linear space inside the binary file.
start_offset = uiIndex * 1120; // Explicit memory line allocation
This 1,120-byte payload is divided into explicit character limits:
| Coordinate Range | Entity Definition |
|---|---|
Bytes 000-800 |
The Core Biography Array. Cannot exceed 400 characters (2 bytes padded per character width). |
Bytes 800-1120 |
The Additional Info Array. Limits at 160 characters. |
Python Builder Override:
When passing JSON variables through the
When passing JSON variables through the
compile_merc.py handler, it automatically executes the string obfuscation logic and fills the remainder of the 1,120 offset block using \x00 empty hex padding to prevent engine instability.