Larian Banner
Previous Thread
Next Thread
Print Thread
How to close quests? #648294
29/08/18 02:35 AM
29/08/18 02:35 AM
Joined: Aug 2018
Posts: 4
New Jersey, USA
D
Deionarrus Offline OP
stranger
Deionarrus  Offline OP
stranger
D

Joined: Aug 2018
Posts: 4
New Jersey, USA
Hi all! New to modding, using various wiki pages / tutorials / wonderful people in the Discord chat to slowly become less incompetent.

Today's struggle: closing quests. I've set up a quest that should have three journal updates:

1) Bonzo the Bull hires you to go kill Marvin the Malevolent, a pig who keeps casting Fireball into Bonzo's meadow (QuestUpdate_KillThePig_QuestGiven flag set through dialog; this works great)

2) Marvin the Malevolent dies (QuestUpdate_KillThePig_MarvinDead flag set after Marvin dies; this also works great)

3) You return to Bonzo to get a reward, everyone is happy (except for Marvin), the end (QuestUpdate_KillThePig_HappyEnding flag set through updated dialog branch)

...except No. 3, my intended close-quest event, registers as a quest update and not a quest close, the same as No. 2. I want to close the quest, not continue it.

Things I've tried:

--messing with the Act, Gain, and RewardTreasureTables entries for HappyEnding. No change

--Changing the INIT section:

DB_QuestDef_State("KillThePig","HappyEnding",1);

to

DB_QuestDef_CloseEvent("KillThePig","HappyEnding");

No idea if that would /should change anything. It hasn't.


So yeah, I can't find any tutorials that cover quest conclusion. How do I make the quest close / go inactive with a visible journal update to the player?

Thanks for your help!

Re: How to close quests? [Re: Deionarrus] #648297
29/08/18 06:15 AM
29/08/18 06:15 AM
Joined: Nov 2017
Posts: 129
L
LarIlya Offline
member
LarIlya  Offline
member
L

Joined: Nov 2017
Posts: 129
DB_QuestDef_CloseEvent (as as DB_QuestDef_AddEvent) takes the flag, not the quest update.
So you'd want something like DB_QuestDef_CloseEvent("KillThePig", "QuestUpdate_KillThePig_HappyEnging");

You may be able to use the index in DB_QuestDef_State:
DB_QuestDef_State("KillThePig","HappyEnding",1); means that HappyEnding opens the quest when set. If you want it to close the quest, use DB_QuestDef_State("KillThePig","HappyEnding",-1);
There is currently no index that would open and close the quest.

Re: How to close quests? [Re: LarIlya] #648305
29/08/18 12:17 PM
29/08/18 12:17 PM
Joined: Aug 2018
Posts: 4
New Jersey, USA
D
Deionarrus Offline OP
stranger
Deionarrus  Offline OP
stranger
D

Joined: Aug 2018
Posts: 4
New Jersey, USA
Yay! Thank you for the quick & helpful answer!


Moderated by  Larian_Koala, Larian_KVN 

Powered by UBB.threads™ PHP Forum Software 7.6.2