Skip to content

objects

lepelog edited this page Jun 21, 2020 · 7 revisions

objects

Objects are entries in bzs files to specify actor placements and their params. A few variants of objects exist:

  • OBJS
  • OBJ
  • DOOR
struct STAG {
  int params1;
  int params2;
  float posx;
  float posy;
  float posz;
  short anglex;
  short angley;
  short anglez;
  short id; // only last 10 bits are counting up, other bits are unknown, has to be unique for objects loaded at once
  char[8] name;
}

Notation

00 03 FC 00 represents the bit mask in hex, it's shifted to the right to get rid of all trailing zeros. So 00 03 FC 00 means (params1 & 0x0003FC00) >> 10 to get the actual value.

If not mentioned, the structure of params1 is given

OBJ

Note that not all bytes are documented yet.

Barrel

Barrel

0F F0 00 00    flag for breaking the barrel

BlsRock

Bombable rocks

00 00 00 FF   flag if rocks are blown up

FrmLand

Digging spots for the life tree seedling

00 00 FF 00   flag if seedling is planted/removed (depend on other params)

HrpHint

Gossip Stone you can summon

00 00 00 FF   flag if the gossip stone is summoned

Item

Represents an item laying around in the overworld: rupees, stamina fruits, gratitude crystals

00 03 FC 00   sceneflag, set when item collected and makes the item not spawn again
00 00 00 FF   item id

Log

Logs in faron woods, which you can push sometimes

00 FF 00 00   flag if log is pushed down, 0xFF means can't move log

Npc

There exist a lot of different Npc actors, this pattern has been observed for a lot of actors starting with Npc

FF E0 00 00   storyflag that makes this actor despawn, all bits set means the actor doesn't despawn
00 1F FC 00   storyflag that makes this actor spawn, all bits set means the actor is always spawned

note: the actors don't (de)spawn until the area is reloaded
anglez specifies the talk action in the event system

NpcTke

Not a visible Npc but interaction forcing and also triggered by asking fi in specific areas, inherits the (de)spawn behaviour from Npc except it doesn't need a stage reload.

first byte of anglex is the sceneflag that untriggers this event, also set after the talk action in some cases
second byte of anglex is the sceneflag that triggers this event
second byte of angley is the area index where this interaction triggers, 0xFF means it triggers everywhere

saveObj

Bird statue you can save at

00 FF 00 00   Index of the SCEN used when going to sky or leaving the dungeon
00 00 FF 00   Subtype: 0 are Statues to only save at, 1 have a "To the Sky" option and 2 have a Leave Dungeon option
00 00 00 FF   Flag if statue is checked, with exceptions

params2

00 00 00 FF   Index of the name of overworld bird statues, otherwise 0xFF

Soil

Digging spots

00 00 0F F0   flag for digging

SwWall

Wall switches you can hang on or activate with whip

00 00 00 FF   flag

TowerB

Watchtowers in Eldin

00 00 00 FF   flag if the tower has fallen down, 0xFF means it's already fallen down

trolley

Minecarts in Lanayru you can push down

00 FF 00 00   flag if trolley is pushed down

Tubo

Little pots

00 00 0F F0   flag for breaking pot, it still spawns but doesn't drop an item anymore

Clone this wiki locally