Skip to content

readUgc

readUgc(handle, buffer, offset, action): number | null

Reads part of a downloaded UGC file into buffer, starting at offset. Needs init(). The read length is the length of buffer, and the bytes are written into it in place. Files over 100 MB must be read in chunks (from the SDK header). offset is an unsigned 32-bit value, as in the SDK.

bigint

The UGC handle as a BigInt.

Buffer

The Buffer that receives the bytes. Its length is the read length.

number

The byte offset to start reading at.

UgcReadAction

How the handle is treated after the read.

number | null

the number of bytes read. null when Steam reports a negative count or the buffer is longer than 2^31 - 1 bytes; the SDK header does not define the failure value, so the null case is unverified.

Turn ideas into shipped software.

HagiCode is an agentic coding workspace. OpenSpec workflows plan the change, multi-agent execution carries it out, and Hero Scenario makes the long run visible, so ideas become shipped software.

Smart
OpenSpec workflows turn intent into a path from proposal to shipped change.
Efficient
Multi-agent execution runs research, build, and review in parallel.
Fun
Rich UI interactions make planning, agent work, and projects easier to follow.