Closed Anarcho-Bolshevik closed 1 year ago
Whaaaat. What trickery is this. I've never seen Dogmeat do that, presumably because I very rarely take him, but I can reproduce this. And he doesn't even have any combat floats scripted...
After you pick him up, you may have to progress through the story like normal for a bit before his monologues appear, but otherwise this peculiarity should be easy to trigger. Out of curiosity, I did a couple of searches to see if anybody else brought this up, but I found no relevant results. Nor could I find anything on the Fallout wiki mentioning this.
Honestly, for such an old and obvious glitch, it’s pretty hard to believe that nobody thought to report or even comment on it until now. That’s why I started wondering if it was intentional. I know that Dogmeat is one of the least accessible NPCs in Fallout 2, but twenty‐three years should be more than enough time for somebody to mention this online.
I’ll understand if you think that I must be playing some sort of prank on you; that sounds more probable to me than what I just described, too.
In your save, for some reason Dogmeat is using Elron(Hubologist) AI packet instead of his original one. If I start a new game and go get Dogmeat right away, he's using the correct AI packet. I have no idea how that happens since there's no AI packet reassignment in game scripts, and the setting in all his protos is correct.
Try taking Dogmeat to Vault 15 and clear out the Khans starting with Darion. I can do that myself, but it’ll take me longer.
The fastest way to check the AI packet in your game:
data\scripts\
folder.StartingMap=rndcafe.map
in ddraw.ini, start a new game to get Dogmeat right away.Gentlepeople, I have located the trigger. Here are your steps:
That’s it.
Switching between his disposition settings causes his AI packet value to keep decreasing, other dog type companions or other party members don't have such issue, weird. EDIT: something is wrong with his Berserk setting, if it's just switching between Aggressive and Custom, the AI packet is correct. But after clicking Berserk everything goes haywire.
EDIT 2: OK, the order of AI packet numbers for Dogmeat is wrong in ai.txt
, so after selecting Berserk, switching his disposition setting will cause his AI packet number to be lower than his supposed range (e.g. Khan, Hubologist, or even others with lower values). The catch is the real fix will cause crash on loading existing saves.
Why does order even matter? Is it something hardcoded? I don't see AI_PARTY_DOGMEAT
constants used anywhere.
And I don't quite understand what specifically causes the crash. Is is packet_num
shuffling?
The disposition presets for party members are defined with constants.
When the player selects a new preset, the engine calls ai_set_disposition(party_member_obj, disp)
, which has a calculation for new AI packet number like this:
new_ai_packet = curr_packet_num - (disp - curr_disposition)
So for Dogmeat's case, when you select "Berserk" (he's in Custom by default), it will be:
new_ai_packet = 167 - (4 - 0) = 163 (Tough Khan)
And further selection is just getting worse, if you switch to Aggressive, it's:
new_ai_packet = 163 - (3 - (-1, because packet 163 has disposition=none
)) = 162 (Ron Cruz, which you get Hubologist lines)
Hmm but still not clear why crash. I'm thinking about maybe 2-phasing the fix: first switch and lock Dogmeat to a single working AI packet, and next version release fixed files and re-enable packet selection. But it seems that any changes to ai.txt cause crashes, even in saves that don't have Dogmeat for some reason.
Hmm but still not clear why crash.
Not exactly sure, probably data block mismatch, because you can see "Missing AI Packet" in debug log if you use the "fixed" ai.txt to load existing saves.
I'm thinking about maybe 2-phasing the fix: first switch and lock Dogmeat to a single working AI packet, and next version release fixed files and re-enable packet selection. But it seems that any changes to ai.txt cause crashes, even in saves that don't have Dogmeat for some reason.
All party member protos are saved in the savegame, no matter one is in your party or not. Maybe with a global script fix which always (on game/map load) corrects Dogmeat's AI packet if it's out of range when he's in the party, and disable the "berserk" in party.txt (the relative position/difference between aggressive/coward/custom packet numbers is correct, so switching between them is OK, but one might argue having "coward" packet doesn't suit Dogmeat). Just call it a day if you want to keep compatibility of existing saves.
Let's do that for the time being, and keep the full fix for when we break backwards compatibility anyway:
Same goes the pariah dog (unused). The defines in
aipacket.h
:#define AI_PARTY_DOGMEAT_AGRESSIVE (164) #define AI_PARTY_DOGMEAT_BERSERK (165) #define AI_PARTY_DOGMEAT_COWARD (166) #define AI_PARTY_DOGMEAT_CUSTOM (167) #define AI_PARTY_DOGMEAT_DEFENSIVE (168) #define AI_PARTY_PARIADOG_AGRESSIVE (169) #define AI_PARTY_PARIADOG_BERSERK (170) #define AI_PARTY_PARIADOG_COWARD (171) #define AI_PARTY_PARIADOG_CUSTOM (172) #define AI_PARTY_PARIADOG_DEFENSIVE (173)
The correct order:
#define AI_PARTY_DOGMEAT_BERSERK (164) #define AI_PARTY_DOGMEAT_AGRESSIVE (165) #define AI_PARTY_DOGMEAT_DEFENSIVE (166) #define AI_PARTY_DOGMEAT_COWARD (167) #define AI_PARTY_DOGMEAT_CUSTOM (168) #define AI_PARTY_PARIADOG_BERSERK (169) #define AI_PARTY_PARIADOG_AGRESSIVE (170) #define AI_PARTY_PARIADOG_DEFENSIVE (171) #define AI_PARTY_PARIADOG_COWARD (172) #define AI_PARTY_PARIADOG_CUSTOM (173)
Here are the corrected
ai.txt
,aipacket.h
, and protos, but ai.txt will cause old saves broken.
What happened
Usually when I pick up Dogmeat, his monologues in combat are based on the Khans’. I’ve noticed this since patch 1.02(!) but I’m assuming that this obvious peculiarity must have been intentional (for some reason) seeing as how it’s gone untouched for so long. However, I’ve noticed that sometime after I wiped out the Hubologist HQ, he now talks like a Hubologist in combat.
What you expected to happen
I expected him to continue talking like a Khan (though I don’t think that he should be speaking at all).
Screenshot
Savegame
oh god somebody please end my suffering already.zip