describe a few Ep4 objects

This commit is contained in:
Martin Michelsen
2025-03-24 22:17:50 -07:00
parent 07716fd301
commit 6467693df9
6 changed files with 88 additions and 51 deletions
+19 -16
View File
@@ -4292,25 +4292,26 @@ struct G_CreateInventoryItem_PC_V3_BB_6x2B : G_CreateInventoryItem_DC_6x2B {
parray<uint8_t, 2> unused2 = 0;
} __packed_ws__(G_CreateInventoryItem_PC_V3_BB_6x2B, 0x1C);
// 6x2C: Talk to NPC (protected on V3/V4)
// This updates G_6x70_NPCTalkState in the TObjPlayer struct, but the format is
// not the same. The names here match the fields in G_6x70_NPCTalkState, hence
// the unusual numbering.
// 6x2C: Impose hold (protected on V3/V4)
// This updates PlayerHoldState in the TObjPlayer struct, but the format is not
// the same. The names here match the fields in PlayerHoldState. A player hold
// prevents the player from moving further than the trigger radius from the
// given x/z coordinates.
struct G_TalkToNPC_6x2C {
struct G_ImposeHold_6x2C {
G_ClientIDHeader header;
le_uint16_t unknown_a1 = 0;
le_uint16_t unknown_a2 = 0;
le_float unknown_a5 = 0.0f;
le_float unknown_a6 = 0.0f;
le_float unknown_a4 = 0.0f;
} __packed_ws__(G_TalkToNPC_6x2C, 0x14);
le_float x = 0.0f;
le_float z = 0.0f;
le_float trigger_radius2 = 0.0f; // "2" here means "squared"
} __packed_ws__(G_ImposeHold_6x2C, 0x14);
// 6x2D: Done talking to NPC (protected on V3/V4)
// 6x2D: Release hold (protected on V3/V4)
struct G_EndTalkToNPC_6x2D {
struct G_ReleaseHold_6x2D {
G_ClientIDHeader header;
} __packed_ws__(G_EndTalkToNPC_6x2D, 4);
} __packed_ws__(G_ReleaseHold_6x2D, 4);
// 6x2E: Set and/or clear player flags (protected on V3/V4)
@@ -4979,7 +4980,7 @@ struct G_SyncPlayerDispAndInventory_DCNTE_6x70 {
/* 0034 */ le_uint32_t unknown_a6 = 0;
/* 0038 */ G_6x70_Sub_Telepipe telepipe;
/* 0054 */ le_uint32_t death_flags = 0;
/* 0058 */ NPCTalkState_DCProtos npc_talk_state;
/* 0058 */ PlayerHoldState_DCProtos hold_state;
/* 0068 */ le_uint32_t area = 0;
/* 006C */ le_uint32_t game_flags = 0;
/* 0070 */ PlayerVisualConfig visual;
@@ -4998,7 +4999,7 @@ struct G_SyncPlayerDispAndInventory_DC112000_6x70 {
/* 0034 */ parray<uint8_t, 0x10> unknown_a5;
/* 0044 */ G_6x70_Sub_Telepipe telepipe;
/* 0060 */ le_uint32_t death_flags = 0;
/* 0064 */ NPCTalkState_DCProtos npc_talk_state;
/* 0064 */ PlayerHoldState_DCProtos hold_state;
/* 0074 */ le_uint32_t area = 0;
/* 0078 */ le_uint32_t game_flags = 0;
/* 007C */ PlayerVisualConfig visual;
@@ -5024,7 +5025,7 @@ struct G_6x70_Base_V1 {
/* 0074 */ le_uint32_t battle_team_number = 0;
/* 0078 */ G_6x70_Sub_Telepipe telepipe;
/* 0094 */ le_uint32_t death_flags = 0; // Only a few bits are used. 4 = player is dead
/* 0098 */ NPCTalkState npc_talk_state;
/* 0098 */ PlayerHoldState hold_state;
/* 00AC */ le_uint32_t area = 0;
/* 00B0 */ le_uint32_t game_flags = 0;
/* 00B4 */ parray<uint8_t, 0x14> technique_levels_v1 = 0xFF; // Last byte is uninitialized
@@ -6174,7 +6175,9 @@ struct G_SetQuestCounter_BB_6xD2 {
struct G_Unknown_BB_6xD4 {
G_UnusedHeader header;
le_uint16_t action = 0; // Must be in [0, 5]
uint8_t unknown_a1 = 0; // Must be in [0, 15]
// object_identifier must be in [0, 15]; it should match param4 of the
// relevant object.
uint8_t object_identifier = 0;
uint8_t unused = 0;
} __packed_ws__(G_Unknown_BB_6xD4, 8);