Act 5 quest objects can't be clicked: altar, Ancients' stairs, frozen Anya, Baal's portals, last portal (OperateFns 65-72 not in quest_object)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
Research direction
Start with World::quest_object in components/game/world.hpp, which decides whether a click reaches act5_operate in components/game/world/quests/act5.cpp, then check the mode setup in components/game/gamedata/gamedata.cpp that sets which objects start selectable and named. Work through the OperateFn values the issue lists (65-72) and the object IDs (546-569), tracing each against the game.exe InitFn notes. Done when the altar, stairs, frozen Anya and portals respond to a mouse click and show their hover names in a headless save.
Written by the indexing model from the issue text.
Description
Version: v0.12.3 (macOS arm64). World::quest_object and operable in main at c5c3edda83 (2026-11-22) are the same. Follow-up to #684 (same family).
What happens
Act 5's quest objects can't be used with the mouse:
- the Ancients' altar on Arreat Summit (546; Rite of Passage can't start);
- the stairs to the Worldstone Keep (547);
- frozen Anya (558);
- the Ancients' farewell (561);
- Baal's portals (563 / 569);
- the last portal home (565).
act5_operate has code for all of them, but a click never reaches it. Several of them also get no hover name.
Causes
- Not operable.
commands.cppsetsinteract_npc, andtick.cppcallsoperate, only foroperable(...)/quest_object(...)OperateFns. Neither list has 65, 66, 67, 69, 70 or 72 (73, Tyrael's portal, is there). - The altar starts unselectable. Its row has Lit2 19, so
add_objectstarts it ON, but only Selectable0 is 1. game.exe's InitFn 72 (0x58d240, table 0x731bc0) sets its mode from the a5q5 record +0x4c, which is 0 in a new game. - The portals start in mode 0, where they can't be selected. 563 / 569 (InitFn 75, 0x58e670) and 565 (InitFn 77, 0x58e710) set their mode from the a5q6 record +0x94 / +0x9c, then write 2. The quest's init (0x58e5e0) sets both fields to 1, so the first portal starts in mode 1 and later ones in mode 2. Both modes are selectable (Selectable1/2 = 1); Selectable0 is 0.
- 569 does nothing.
act5_operatechecksobject_id == kChamberPortal(563) only, although 569 is OperateFn 70 too.
Fix that worked here
The diff is against v0.12.3 and sits on top of the #684 one, which is why its context shows those lines. It:
- adds those OperateFns to
quest_object; - leaves the altar out of the lit start;
- starts InitFn 75/77 objects ON. This is my choice: the first portal's opening frames are skipped, where game.exe plays mode 1;
- names OperateFn 70/72 like the hellgate in #684;
- accepts 569 in the portal branch.
Checked headless on a real save:
- release build: the altar has no name, and
cmd interactdoes nothing; - patched: hover shows "Altar of the Heavens", and a click logs "Rite of Passage: the Ancients speak";
- the stairs answer "the stairs stay shut", which is correct while the Rite isn't won;
- Baal's portal in the Throne shows "The Worldstone Chamber".
Not checked by click in play: frozen Anya, Baal's portals and the last portal.
diff
--- a/components/game/gamedata/gamedata.cpp
+++ b/components/game/gamedata/gamedata.cpp
@@ -658,7 +658,12 @@
&& oid != d2d::rules::object_ids::kHellgate // the hellgate: a3q6's mode, 0 till Mephisto's dead (InitFn 44)
&& npc.operate_fn != d2d::rules::operate_fn::kHellforge // the Hellforge: a4q3's mode, 0 till the soulstone's set (InitFn 48)
&& npc.operate_fn != d2d::rules::operate_fn::kSeal && npc.operate_fn != d2d::rules::operate_fn::kSealInfector // the seals: shut (InitFn 56)
- && npc.operate_fn != d2d::rules::operate_fn::kSealDeSeis && npc.operate_fn != d2d::rules::operate_fn::kSealVizier);
+ && npc.operate_fn != d2d::rules::operate_fn::kSealDeSeis && npc.operate_fn != d2d::rules::operate_fn::kSealVizier
+ && npc.operate_fn != 65); // LOCAL PATCH (act5 objects): the Ancients' altar (546): a5q5's mode, record +0x4c, 0 at a new game (InitFn 72, 0x58d240); ON had it unselectable
+ // LOCAL PATCH (act5 objects): Baal's portals (563 / 569, InitFn 75 0x58e670) and the last portal (565, InitFn 77 0x58e710)
+ // take a5q6's record +0x94 / +0x9c, which its init sets to 1 (0x58e5e0), then 2: mode 1 or 2, both selectable. Mode 0 had
+ // them unselectable and nameless. Mode 2 here (the open loop; the first one's opening frames are skipped).
+ if (objects.get(row, "InitFn") == "75" || objects.get(row, "InitFn") == "77") init_mode = "ON";
npc.mode = init_mode && !npc.preoperated ? init_mode : lit_mode ? "ON" : "NU";
// Hover name when selectable in its start mode (Selectable0 = NU,
// 2 = ON): objects.txt Name through the string tables.
@@ -678,7 +683,8 @@
// Its own Name for then (ingame.cpp hides it while it is shut).
// LOCAL PATCH (last portal): Tyrael's portal to Harrogath (566, OperateFn 73) the same: Selectable0 0, its InitFn 78
// (0x5b5840) puts it in mode 1 or 2 (act4.cpp sets that), so it shows as "Harrogath".
- if (npc.name.empty() && (npc.operate_fn == d2d::rules::operate_fn::kHellgate || npc.operate_fn == 73)) {
+ if (npc.name.empty() && (npc.operate_fn == d2d::rules::operate_fn::kHellgate || npc.operate_fn == 73
+ || npc.operate_fn == 70 || npc.operate_fn == 72)) { // LOCAL PATCH (act5 objects): 563 / 569, 565
bool selectable_later = false;
for (int mode = 1; mode < 8; ++mode) selectable_later |= objects.get(row, "Selectable" + std::to_string(mode)) == "1";
if (selectable_later) {
--- a/components/game/world/quests/act5.cpp
+++ b/components/game/world/quests/act5.cpp
@@ -567,7 +567,7 @@
// The Throne's portal (563, OperateFn 70, FUN_0058e6a0): with Baal gone
// in, to the Chamber (FUN_0053aec0(0x84, 11): its town-portal tile);
// elsewhere back to the Throne.
- if (object.object_id == d2d::rules::EveQuest::kChamberPortal) {
+ if (object.object_id == d2d::rules::EveQuest::kChamberPortal || object.object_id == 569) { // LOCAL PATCH (act5 objects): 569 is OperateFn 70 too
const bool on_throne = level->id == d2d::rules::EveQuest::kThrone;
if (on_throne && !eve.baal_in) return true;
const Level* dest = game_data->level(on_throne ? d2d::rules::EveQuest::kChamber : d2d::rules::EveQuest::kThrone);
--- a/components/game/world.hpp
+++ b/components/game/world.hpp
@@ (quest_object) @@
static bool quest_object(int operate_fn) {
using namespace d2d::rules::operate_fn;
- return std::ranges::contains(std::array{ kCairnStone, kGibbet, kInifussTree, kSunAltar, kOrifice, kJournal, kSanctuaryPortal }, operate_fn);
+ return std::ranges::contains(std::array{ kCairnStone, kGibbet, kInifussTree, kSunAltar, kOrifice, kJournal, kSanctuaryPortal }, operate_fn)
+ // Act 5's quest objects act5_operate handles: the Ancients' altar (65), their stairs (66), frozen Anya (67),
+ // the Ancients' farewell (69), Baal's portals (70), the last portal (72).
+ || operate_fn == 65 || operate_fn == 66 || operate_fn == 67 || operate_fn == 69 || operate_fn == 70 || operate_fn == 72;
}
- Dominant language
- C++
- Stars
- 17
- Forks
- 6
- Avg merge
- 6h 14m
- Merged PRs (30d)
- 570
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from psi29a/d2decomped
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
psi29a/d2decomped#691 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 45/100
psi29a/d2decomped#689 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
psi29a/d2decomped#687 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
psi29a/d2decomped#686 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 48/100
psi29a/d2decomped#685 ·
Maintainers usually reply within 1 day
All issues in psi29a/d2decomped
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CachyOS/packageinstaller#144 ·
Maintainers usually reply within 1 day
-
prio:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NatronGitHub/Natron#1638 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 82/100
TomerAberbach/profiler-md#951 ·
Maintainers usually reply within 1 day
-
area:readers low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NatronGitHub/openfx-arena#214 ·
Maintainers usually reply within 1 day