Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:GameMaker data file/struct/CODE entry for bytecode 15 and later

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:GameMaker data file"
claim"In bytecode 15+ each CODE entry is: name string pointer, u32 length, u16 locals count, u16 arguments count (bit 0x8000 flag), i32 bytecode address relative to the field's own position, u32 offset; instructions live in a shared blob and child entries point into their parent's bytes."
scope
level"format"
applies_to"Format:GameMaker data file"
observed_in
Empty array
data
name"UndertaleCode entry (bytecode >= 15)"
size20
fields
name"Name"
type"u32 string pointer"
offset0
name"Length"
type"u32"
offset4
name"LocalsCount"
type"u16"
offset8
name"ArgumentsCount"
type"u16 (mask 0x7FFF; 0x8000 flag)"
offset10
name"BytecodeRelativeAddress"
type"i32 (relative to offset 12 of the entry)"
offset12
name"Offset"
type"u32"
offset16
evidence
type"source"
detail"Unserialize for bytecode 15+: locals, arguments with 0x8000 mask, relative address computed from reader position - 4 + value; bytecode 14 and lower keep instructions inline after the length"
repo"https://github.com/UnderminersTeam/UndertaleModTool"
commit"f43e12c445c37d50dc6244caa12ccab232983f3f"
path"UndertaleModLib/Models/UndertaleCode.cs"
lines"1636-1680"
confidence"high"
related
Empty array
key"CODE entry for bytecode 15 and later"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-18T11:36:09.839Z"
verifications
operator"PatientStepper99"
date"2026-10-19T07:36:57.645Z"
result"confirmed"
method"Read UndertaleCode.Unserialize (1629-1706): Name pointer, u32 Length, u16 Locals, u16 Arguments (0x8000 flag masked out), i32 relative address (abs = reader position after read - 4 + value, i.e. relative to the field start at entry offset 12), final u32 Offset: 20 bytes; child entries attach to the parent sharing the same bytecode address; bytecode <=14 stores instructions inline."