Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Dec 2013
old hand
OP Offline
old hand
Joined: Dec 2013
So this took me some time to find but it appears that if you add some NPCs to your party and do not add them to the DB_IsPlayer() database, any attempt to read your journal will crash the game.

Steps to Reproduce:
1. Create a quest with shared journal entries. It doesn't seem to matter whether the broadcast level is character, party, or user.

2. Use the DB_QuestDef_State() API and then advance the state of the quest by setting the associated QuestUpdate_Quest_State flag.

3. Recruit an NPC into your party. Easiest thing is to use CharacterRecruitCharacter(), but I also tried permutations with CharacterMakePlayer()/CharacterAssignToUser()/CharacterAddToParty.

4. Open Journal

*boom*

This can be resolved by simply adding DB_IsPlayer() for the NPC when it gets recruited. This seems like a bug as it should not be strictly necessary to rely on DB_IsPlayer(), but that seems to be an unwritten rule in a lot of the Osiris APIs.

We should at least get this documented somewhere in relevant portions of the wiki if it can't be fixed easily.

thankyou in advance.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Joined: Sep 2017
member
Offline
member
Joined: Sep 2017
Hi Windemere,

This is likely because the journal uses player data, which is only assigned to characters which have the "Is Player" flag. I will make sure this bug gets reported but it will likely be low-priority.

Thanks for the report!

Joined: Dec 2013
old hand
OP Offline
old hand
Joined: Dec 2013
That makes sense.

Might be good to add some notes for CharacterMakePlayer about adding the character to DB_IsPlayer() for other systems to work properly, including journals and crimes. There may be other places in the wiki where it's good to highlight as well, maybe on the DB QuestDef State page.

Thanks again.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods

Moderated by  Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5