All Starship assets — models, animations, audio, scripts, and more — are stored inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/HarbourMasters/Starship/llms.txt
Use this file to discover all available pages before exploring further.
.o2r or .otr archive files (sf64.o2r for base game data, starship.o2r for port enhancements). Every archived asset carries a 4-character type tag encoded as a 32-bit big-endian integer. The engine reads this tag during deserialization to select the correct resource factory and produce a typed in-memory object.
Resource types are defined as a C++ enum class in src/port/resource/type/ResourceType.h inside the SF64 namespace. You will encounter them whenever you implement a custom resource importer, query asset metadata, or call ResourceGetDataByName() and need to verify the result type.
Accessing Assets
ResourceGetDataByName()
path in the loaded archives and returns a pointer to the deserialized resource data. The pointer type depends on the resource’s type tag — you must cast it to the appropriate struct. Returns NULL if the asset is not found.
GameEngine_OTRSigCheck()
imgData is an archive path that exists in the loaded .o2r files. Use this to test whether a pointer is an archiveable path before calling ResourceGetDataByName(), which is exactly what LOAD_ASSET does internally.
GameEngine_GetTextureInfo()
custom is true when the texture was loaded from a player mod rather than the base archive — useful for conditional HUD overlays or debugging tools.
Archive-relative asset path.
Receives the texture width in pixels.
Receives the texture height in pixels.
Receives the stored scale factor (
1.0 for unscaled assets).Receives
true if the texture originates from a mod pack.Asset Loading Macros
Resource Type Reference
SF64 Game Resources
These types cover all gameplay assets: character skeletons, collision geometry, level settings, text, and scripting.| Type | Hex Value | 4-char Code | Description |
|---|---|---|---|
AnimData | 0x414E494D | ANIM | Skeletal animation keyframe data |
ColPoly | 0x43504C59 | CPLY | Collision polygon mesh |
Environment | 0x454E5653 | ENVS | Level environment settings (fog, lighting) |
Limb | 0x4C494D42 | LIMB | Individual skeleton limb / bone |
Message | 0x4D534720 | MSG | In-game dialog / text message |
MessageTable | 0x4D534754 | MSGT | Message lookup table |
Skeleton | 0x534B454C | SKEL | Full character skeleton |
Script | 0x53435250 | SCRP | Game behavior script |
ScriptCmd | 0x53434D44 | SCMD | Individual script command |
Hitbox | 0x48544258 | HTBX | Object hitbox definition |
ObjectInit | 0x4F42494E | OBIN | Object initialization parameters |
Vec3f | 0x56433346 | VC3F | Array of 32-bit float vectors |
Vec3s | 0x56433353 | VC3S | Array of 16-bit integer vectors |
GenericArray | 0x47415252 | GARR | Generic byte array |
Type Descriptions
AnimData — ANIM
Keyframe data for skeletal animations. Consumed by the animation system to drive limb transforms each tick. Pair with a Skeleton asset.
ColPoly — CPLY
A mesh of collision triangles used for ground, wall, and ceiling detection. Loaded per-level and queried by the physics system during actor movement.
Environment — ENVS
Level-wide rendering parameters: fog color, fog near/far distances, ambient light, and directional light settings. One environment block per scene zone.
Limb — LIMB
A single bone in a character hierarchy. Contains a display list pointer, pivot position, and child/sibling indices. Limbs are assembled into a Skeleton.
Message — MSG (note the trailing space in the 4-char code)
A single localized dialog string, including control codes for pausing, changing font, or triggering sounds. Looked up by index via a MessageTable.
MessageTable — MSGT
An indexed table mapping message IDs to Message asset paths. The dialog system resolves text by querying this table first.
Skeleton — SKEL
A complete character skeleton: root limb count, limb array, and dex count for flex limbs. Must be paired with matching AnimData and Limb assets.
Script — SCRP
A compiled sequence of ScriptCmd entries that drives AI, cutscenes, and level events. The script interpreter steps through commands each tick.
ScriptCmd — SCMD
A single decoded script command (opcode + arguments). Normally accessed through a parent Script rather than directly.
Hitbox — HTBX
A set of oriented bounding shapes defining the collision volume for an actor or projectile. The engine tests hitboxes during damage and pickup checks.
ObjectInit — OBIN
Per-object spawn parameters packed into a struct: initial position, rotation, scale, flags, and type ID. The level loader reads these to place actors in the scene.
Vec3f — VC3F
A raw array of Vec3f (3 × f32) structs. Used for path waypoints, effect emitter positions, and any other bulk float-vector data.
Vec3s — VC3S
A raw array of Vec3s (3 × s16) structs. Used for compact rotation tables and quantized position offsets.
GenericArray — GARR
An untyped byte buffer. Use when the data does not fit any structured type — for example, custom mod payloads or raw lookup tables.
NAudio v0 Resources
The original N64 audio format used by the base game ROM. These types are imported by the legacy audio pipeline.| Type | Hex Value | 4-char Code | Description |
|---|---|---|---|
Bank | 0x42414E4B | BANK | Audio bank (collection of samples and envelopes) |
Sample | 0x41554643 | AIFC | ADPCM-compressed audio sample (AIFC container) |
Sequence | 0x53455143 | SEQC | Music or SFX sequence |
Type Descriptions
Bank — BANK
Groups a set of instruments, drums, and envelopes into a single loadable unit. The audio engine loads banks on level entry and unloads them on exit.
Sample — AIFC
A single ADPCM-encoded waveform stored in an AIFC-like container. Shared across instruments and drums within a bank.
Sequence — SEQC
A MIDI-like event stream that drives the N64 music and sound-effect sequencer. Played back by the audio thread.
NAudio v1 Resources
The expanded audio format introduced by the port for higher-quality sound and more flexible instrument programming.| Type | Hex Value | 4-char Code | Description |
|---|---|---|---|
SoundFont | 0x53464E54 | SFNT | Sound font (instruments, drums, envelopes) |
Drum | 0x4452554D | DRUM | Drum instrument definition |
Instrument | 0x494E5354 | INST | Melodic instrument definition |
AdpcmLoop | 0x4150434C | APCL | ADPCM loop point data |
AdpcmBook | 0x41504342 | APCB | ADPCM codebook (predictor tables) |
Envelope | 0x45564C50 | EVLP | Audio amplitude envelope (ADSR) |
AudioTable | 0x4154424C | ATBL | Audio asset lookup table |
Type Descriptions
SoundFont — SFNT
A self-contained collection of Instrument, Drum, Envelope, AdpcmBook, and AdpcmLoop entries. Replaces the v0 Bank type in the NAudio v1 pipeline.
Drum — DRUM
Maps a MIDI note number to a sample with its own tuning, pan, envelope, and loop settings. Used for percussion tracks.
Instrument — INST
A melodic instrument with a sample for each of up to three pitch ranges, plus associated envelope and tuning data.
AdpcmLoop — APCL
Loop start/end sample indices and the ADPCM predictor state at the loop point. Required for seamlessly looping samples.
AdpcmBook — APCB
A set of ADPCM predictor coefficient vectors (the “codebook”) used by the ADPCM decoder to reconstruct the waveform. One book per sample.
Envelope — EVLP
An ADSR amplitude envelope expressed as a list of (rate, level) pairs. Applied to instrument and drum voices.
AudioTable — ATBL
An indexed lookup table mapping sequence IDs or sample IDs to archive paths. The audio system resolves assets through this table at runtime.
Enum Definition
For reference, the full C++ definition fromsrc/port/resource/type/ResourceType.h:
The 4-char codes are the ASCII string formed by the hex value’s four bytes in big-endian order. For example
0x414E494D → A N I M → ANIM. This makes it easy to identify asset type from a hex dump of the archive.