ACR Quest System
Moderators: ALFA Administrators, Staff - Technical
- Teric neDhalir
- Githyanki
- Posts: 1495
- Joined: Mon Jan 05, 2004 10:04 pm
- Location: Manchester UK
It's automatically awarded when the task is completed. Cipher implemented this to ensure that only people in the current party doing the quest could be rewarded xp, and not anyone else who joined up after the fact just to get the reward. So it's not dependent on conversations for xp.
GP, however, is different. GP is rewarded from the conversation after the deed is done.
GP, however, is different. GP is rewarded from the conversation after the deed is done.
- Teric neDhalir
- Githyanki
- Posts: 1495
- Joined: Mon Jan 05, 2004 10:04 pm
- Location: Manchester UK
Yes, I see what it's doing, but not how. For example, a patrol might have 3 triggers to cross setting the quest state to 4, but the whole thing is not wrapped up until the quest state is set to 5 by the final convo. Where do you specify that the XP is awarded at state=4 (otherwise how does it know you've "finished" the quest? There might be another 6 triggers to find..?)indio wrote:It's automatically awarded when the task is completed. Cipher implemented this to ensure that only people in the current party doing the quest could be rewarded xp, and not anyone else who joined up after the fact just to get the reward. So it's not dependent on conversations for xp.
BTW my earlier optimistic post should be tempered by the fact that parts of Indio's quest lab and my experiments don't work. Things set by the convos are fine, but nothing is happening when entering triggers. Do you need to use any type of trigger in particular? (I'm using "New Generic" as a base) or is there any known issue with the acr_trigger scripts. I must admit to not adding them to triggers in the OAS because they stop transitions working.

Thanks for your patience,
Teric
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
The "broken AT" problem with acr triggers should also be sorted out by a recompile once the alfa_acr.hak gets updated by Worldgate- somehow we'd not included the code to manage Obsidian-style ATs, in part on the presumption that builders would be using doors and seamless ATs (I think we were all fairly repulsed by the showy, animated, glowing ATs NWN2 came with). In any case, it's a fix I've already got in place on my build machine, I've just fallen behind in propagating it out across the Worldgate.
re: quest triggers- two things. Make sure each quest trigger has a unique tag, as it checks the tag of the trigger to decide if you've already triggered it or not. With multi-trigger and/or multi-target kill quests, the system seems to award quest XP on each trigger/target dealt with, so you actually have to adjust the XP down in the module journal, lest it be multiplied for PCs performing the quest. (three-trigger scouting quest set for 25 xp would give 25 at trigger one, 25 at trigger 2, and 25 at trigger 3. I'd asked about a way to tie it to LowerState/UpperState, but I think I was misunderstood on the matter.
I'll let you know when the Quests/ATs fix is up on the worldgate. Should be soon, I'll give up on trying to patch the death system bugs before putting the rest up.
re: quest triggers- two things. Make sure each quest trigger has a unique tag, as it checks the tag of the trigger to decide if you've already triggered it or not. With multi-trigger and/or multi-target kill quests, the system seems to award quest XP on each trigger/target dealt with, so you actually have to adjust the XP down in the module journal, lest it be multiplied for PCs performing the quest. (three-trigger scouting quest set for 25 xp would give 25 at trigger one, 25 at trigger 2, and 25 at trigger 3. I'd asked about a way to tie it to LowerState/UpperState, but I think I was misunderstood on the matter.
I'll let you know when the Quests/ATs fix is up on the worldgate. Should be soon, I'll give up on trying to patch the death system bugs before putting the rest up.
- Teric neDhalir
- Githyanki
- Posts: 1495
- Joined: Mon Jan 05, 2004 10:04 pm
- Location: Manchester UK
- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
- Teric neDhalir
- Githyanki
- Posts: 1495
- Joined: Mon Jan 05, 2004 10:04 pm
- Location: Manchester UK
- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
It used to be required on all quest triggers, but you only need it on the trigger that will award the XP. For exploration quests or quests that are not sequential in nature (triggers activated in random order), you probably want it on all the triggers so the last trigger the PC activates (increments quest state) will grant the XP reward. You can put them on all triggers anyway, if it's easier for you.Teric neDhalir wrote:lol. Yes, but where do I define "the state at which XP should be awarded"?
XP will be awarded when the PC actually "completes" the quest, as Indio has described above.
- Teric neDhalir
- Githyanki
- Posts: 1495
- Joined: Mon Jan 05, 2004 10:04 pm
- Location: Manchester UK
lol x 2. Yeah I get this now, but only after reading the code in acr_quest_i. I'm afraid it's not made very clear anywhere that the xp is awarded when quest state >= upper state.
I don't know what I've done to get this working (re-compiled all the scripts, perhaps?) but finally the triggers seem to be working and xp is being awarded in the right place.
It's no wonder I don't have much hair left
I don't know what I've done to get this working (re-compiled all the scripts, perhaps?) but finally the triggers seem to be working and xp is being awarded in the right place.
It's no wonder I don't have much hair left

- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
- Teric neDhalir
- Githyanki
- Posts: 1495
- Joined: Mon Jan 05, 2004 10:04 pm
- Location: Manchester UK
Another question, I'm afraid.
I have an errand quest which uses acr_quest_errand and acr_quest_reward at the quest giver and the errand recipient. The giver recognises the PC as not having done the quest before, gives the quest, creates the quest item and the journal is updated. The recipient recognises that the PC has the quest, awards gold and marks the quest as completed in the journal (and may or may not delete the quest item, I forgot to check). Where's the XP? I can't see where or how it's awarded from the code..? Any ideas?
Teric
I have an errand quest which uses acr_quest_errand and acr_quest_reward at the quest giver and the errand recipient. The giver recognises the PC as not having done the quest before, gives the quest, creates the quest item and the journal is updated. The recipient recognises that the PC has the quest, awards gold and marks the quest as completed in the journal (and may or may not delete the quest item, I forgot to check). Where's the XP? I can't see where or how it's awarded from the code..? Any ideas?
Teric
- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
He did have Quest XP defined in the journal entry. As far as I can tell, the following function is the only way Quest XP is set up to be awarded for errand quests in acr_quest_i.nss :
acr_quest_errand creates the item in inventory, and acr_quest_reward cleans it up and gives gold. Neither have the capacity to grant XP.
It would appear, by the current configuration, that errand quests are only testing for completion (and quest state) OnAcquire of the quest item- perhaps some of this was intended for OnUnAcquire? Looks like some was pasted in from the bounty quest OnDeath event, so maybe it didn't quite get finished.
Code: Select all
411 void ACR_QuestItemOnAcquire(object oPC, object oItem)
412 {
413 string sQuest = GetLocalString(oItem, ACR_QST_NAME);
414
415 // exit if there is no bounty on this item
416 if (sQuest == "") { return; }
417
418 // ignore non player characters
419 if (GetIsPC(oPC))
420 {
421 int nUpper = GetLocalInt(oItem, ACR_QST_UPPER_STATE);
422 int nState = ACR_RetrieveQuestState(sQuest, oPC);
423
424 // determine if conditions for the bounty have been met
425 // lower boundary prevents a PC who hasn't taken the quest from earning quest XP
426 if (nState > 0 && nState <= nUpper)
427 {
428 int nXP = 0; nState++;
429
430 // award quest XP if the quest has reached its end state
431 if (nState >= nUpper) { nXP = GetJournalQuestExperience(sQuest); }
432
433 // update the quest state
434 ACR_AddPersistentJournalQuestEntry(sQuest, nState, oPC, TRUE, FALSE, FALSE, nXP);
435 }
436
437 // store an object reference on the PC for easy retrieval (avoids costly inventory loops)
438 SetLocalObject(oPC, sQuest + GetTag(oItem), oItem);
439 }
440 }
It would appear, by the current configuration, that errand quests are only testing for completion (and quest state) OnAcquire of the quest item- perhaps some of this was intended for OnUnAcquire? Looks like some was pasted in from the bounty quest OnDeath event, so maybe it didn't quite get finished.