In Quest of the Quest System
Moderators: ALFA Administrators, Staff - Technical
In Quest of the Quest System
So I've spent the last week learning the quest system, which is extremely elegant and all-inclusive when one learns its (pretty simple) ins and outs.
I cannot figure one thing out, though. I have just adapted one non-quest system quest to the system, copying and writing over an extant quest. However, the new one is rewarding early, at nState 5, rather than nState 7 as I have specified in the journal. (The old one rewarded at nState 3, so it's not some sort of quest 'muscle memory.) The quest is to kill 5 critters, then return to get rewarded. The test PC can kill 3 before running up against this artificial end to the quest. After the quest rewards prematurely, the final 2 critters' deaths no longer update nState.
Anybody?
I cannot figure one thing out, though. I have just adapted one non-quest system quest to the system, copying and writing over an extant quest. However, the new one is rewarding early, at nState 5, rather than nState 7 as I have specified in the journal. (The old one rewarded at nState 3, so it's not some sort of quest 'muscle memory.) The quest is to kill 5 critters, then return to get rewarded. The test PC can kill 3 before running up against this artificial end to the quest. After the quest rewards prematurely, the final 2 critters' deaths no longer update nState.
Anybody?
Enjoy the game
Yeah, it's got to be that.
nState = 1 when you get the quest
nState = 2 when you spawn the mob
nState = 3 after you kill the first mob
nState = 4 when you spawn the 2nd mob
nState = 5 when the kill the second
nState = 6 when the 3rd is spawned
nState = 7 when the 3rd is killed (your current position)
nState = 8 when 4th spawns
nState = 9 4th killed
nState = 10 5th spawned
nState = 11 when 5th killed
This is if you've got a separate trigger for each mob. And I'm just guessing a little bit, as my toolset is not open.
nState = 1 when you get the quest
nState = 2 when you spawn the mob
nState = 3 after you kill the first mob
nState = 4 when you spawn the 2nd mob
nState = 5 when the kill the second
nState = 6 when the 3rd is spawned
nState = 7 when the 3rd is killed (your current position)
nState = 8 when 4th spawns
nState = 9 4th killed
nState = 10 5th spawned
nState = 11 when 5th killed
This is if you've got a separate trigger for each mob. And I'm just guessing a little bit, as my toolset is not open.

nState is not updated at mob spawn. I have five separate triggers, one for each critter, but the way the quest system works (at least now, dunno if it was different once?) is that a trigger is an either/or option. Either it spawns a critter and the critter's death bumps nState OR it doesn't spawn a critter and the trigger itself bumps nState. I've put in an artificial counter in the form of a separate debug trigger that tells me my nState every onenter, so I'm certain of this. It is bumping once at every critter death. It just stops and rewards at nState 5, after the fourth critter's death. (I misstated earlier when I said I could kill 3. I can kill 4, actually, which takes me to nState 5).
I've just tried retagging the quest and then rebuilding it completely with a new tag, that time not copying and overwriting an old quest but inputting each entry manually. Same result. Is there some way the Bounty quest system is hard-coded to stop at nState 5? I look through the journal and see no quest longer than 5 states except for one Explore quest called Fishy_tale that goes to 9 states and with which I'm not familiar. Does Fishy_tale work? Can a Bounty quest go further than nState5?
I've just tried retagging the quest and then rebuilding it completely with a new tag, that time not copying and overwriting an old quest but inputting each entry manually. Same result. Is there some way the Bounty quest system is hard-coded to stop at nState 5? I look through the journal and see no quest longer than 5 states except for one Explore quest called Fishy_tale that goes to 9 states and with which I'm not familiar. Does Fishy_tale work? Can a Bounty quest go further than nState5?
Enjoy the game
Fishy Tale was never fully tested by me, and ought to be rubbed out. Not did it involve any combat quest states. Silly quest anyway. But there's no state ceiling, so to speak, that I'm aware of, but now that you've identified this issue, maybe there is.
I was hoping 2 minutes ponderance would suffice...it's such a lazy afternoon after all. But I'll open up the toolset and poke about.
I should also tell you that I cannot currently test quests (this is not a surrepticious nudge for AL, either) because while my test server is connecting to the remote database fine, my quests are all failing to work on the SKullport mod, and I really don't know why.
I was hoping 2 minutes ponderance would suffice...it's such a lazy afternoon after all. But I'll open up the toolset and poke about.
I should also tell you that I cannot currently test quests (this is not a surrepticious nudge for AL, either) because while my test server is connecting to the remote database fine, my quests are all failing to work on the SKullport mod, and I really don't know why.

I'll get rid of Fishy_tale for you. (-: If there are any others that should go, just let me know and I'll take them out of the next journal update.
FYI, I copy/overwrote Fishy_tale just now and used it as a template, too. I removed two middle states and renamed its nState 9 to nState 7 then retagged it to a new version of my test. Same result. Rewards at nState 5. Trust a female scripter to bump into a glass ceiling nobody else knows about.
I guess in this quest we'll be killing 3 critters instead of 5 and rewarding at nState 5 instead of 7. Thanks for your help, though, Indio!
FYI, I copy/overwrote Fishy_tale just now and used it as a template, too. I removed two middle states and renamed its nState 9 to nState 7 then retagged it to a new version of my test. Same result. Rewards at nState 5. Trust a female scripter to bump into a glass ceiling nobody else knows about.
I guess in this quest we'll be killing 3 critters instead of 5 and rewarding at nState 5 instead of 7. Thanks for your help, though, Indio!
Enjoy the game
lmaoWynna wrote:Trust a female scripter to bump into a glass ceiling nobody else knows about.
Cipher's insidious plans are finally being realised.
I actually like your solution a lot. If you can't kill 5, 3 will do just fine.
You might try (I've not done this) spawning multiple instances from the one trigger. Of course, this might mean too high an EL for the encounter.

- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
The upper boundry of the quest should be defined in the local integers set on the spawning triggers. For example...
//! typically defines the target state for quest assignment
ACR_QST_LOWER_STATE = 1
//! typically defines the target state for quest completion
ACR_QST_UPPER_STATE = 5
On a set of 4 scouting triggers (each trigger entry bumps the queststate, no trigger will activate more than once for a PC/party, all 4 must be found to complete the quest, no order requirements). This way none of the triggers will function unless someone has the quest (QuestState=1), but any of the triggers (1-4) are potentially activatable.
1. PC accepts the quest from an NPC (Queststate moves to "1")
2. PC finds a scouting trigger, tagged 03_scout_01 (Queststate moves to "2")
3. PC finds a scouting trigger, tagged 03_scout_04 (Queststate moves to "3")
4. PC finds a scouting trigger, tagged 03_scout_03 (Queststate moves to "4")
5. PC finds a scouting trigger, tagged 03_scout_02 (Queststate moves to "5", which matches ACR_QST_UPPER_STATE, so XP is awarded.)
6. PC returns to report in (NPC set to look for Queststate=5) and gets gold reward (Queststate moves to 6, "Completed" in the journal)
Alternatively, if we wanted to get more complex, say the triggers must be found in a particular order (say, 4,3,2,1), we'd just change the ACR_QST_LOWER_STATE on each as follows:
tag: 03_scout_01
ACR_QST_LOWER_STATE = 4
ACR_QST_UPPER_STATE = 5
tag: 03_scout_02
ACR_QST_LOWER_STATE = 3
ACR_QST_UPPER_STATE = 5
tag: 03_scout_03
ACR_QST_LOWER_STATE = 2
ACR_QST_UPPER_STATE = 5
tag: 03_scout_04
ACR_QST_LOWER_STATE = 1
ACR_QST_UPPER_STATE = 5
This way, at QuestState 1, only trigger 4 will activate for a quest advancement. Finding trigger 4 unlocks trigger 3, and so on. Theoretically we can also put a ACR_QST_MESSAGE on each in this case that nudges the player towards the next in the series, ex "You see a glint of light just up the hill" or "Next stop: High Hold Legion tower".
I would guess in your case described above, that the UpperState on those triggers is set for 5, when you'd rather it be set for 7.
//! typically defines the target state for quest assignment
ACR_QST_LOWER_STATE = 1
//! typically defines the target state for quest completion
ACR_QST_UPPER_STATE = 5
On a set of 4 scouting triggers (each trigger entry bumps the queststate, no trigger will activate more than once for a PC/party, all 4 must be found to complete the quest, no order requirements). This way none of the triggers will function unless someone has the quest (QuestState=1), but any of the triggers (1-4) are potentially activatable.
1. PC accepts the quest from an NPC (Queststate moves to "1")
2. PC finds a scouting trigger, tagged 03_scout_01 (Queststate moves to "2")
3. PC finds a scouting trigger, tagged 03_scout_04 (Queststate moves to "3")
4. PC finds a scouting trigger, tagged 03_scout_03 (Queststate moves to "4")
5. PC finds a scouting trigger, tagged 03_scout_02 (Queststate moves to "5", which matches ACR_QST_UPPER_STATE, so XP is awarded.)
6. PC returns to report in (NPC set to look for Queststate=5) and gets gold reward (Queststate moves to 6, "Completed" in the journal)
Alternatively, if we wanted to get more complex, say the triggers must be found in a particular order (say, 4,3,2,1), we'd just change the ACR_QST_LOWER_STATE on each as follows:
tag: 03_scout_01
ACR_QST_LOWER_STATE = 4
ACR_QST_UPPER_STATE = 5
tag: 03_scout_02
ACR_QST_LOWER_STATE = 3
ACR_QST_UPPER_STATE = 5
tag: 03_scout_03
ACR_QST_LOWER_STATE = 2
ACR_QST_UPPER_STATE = 5
tag: 03_scout_04
ACR_QST_LOWER_STATE = 1
ACR_QST_UPPER_STATE = 5
This way, at QuestState 1, only trigger 4 will activate for a quest advancement. Finding trigger 4 unlocks trigger 3, and so on. Theoretically we can also put a ACR_QST_MESSAGE on each in this case that nudges the player towards the next in the series, ex "You see a glint of light just up the hill" or "Next stop: High Hold Legion tower".
I would guess in your case described above, that the UpperState on those triggers is set for 5, when you'd rather it be set for 7.
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Spawning groups: While this is definitely do-able with the ACR spawn system, it's not currently coded into the Quest system. Right now, bounty/kill quests are simple, in that if you or someone in your immediately present party kills the quest creature, the queststate advances. If it were instead spawning 3 quest creatures from a single trigger, there would be no way to measure the intermediate levels of success (one killed, 2 killed), and it would be difficult to track when the Queststate should be advancing (it would have to know how many there were, and also how many are left at the moment of any OnDeath event, in order to decide whether to advance the queststate... just gets a bit convoluted (in the midst of an already tangled framework). One way it's been handled for some quests like Swamp Barroness and Sculptor, is to lay down normal spawn points for the "support" foes, and just make the leader(s) bounty-type creatures.
Yes, the upper/lower variables were set to 1/5 on each of the 5 bounty triggers. They could hit them in any order. Correct me if I'm wrong, but in a bounty quest the trigger doesn't bump the state. The state is bumped at death of mob. That's certainly what appeared to be happening. It just kept rewarding at nState 5. Killing the last critter provided no further bump, though it should have taken it to nState 6 (which the quest giver was looking for in his dialog to trigger the "reward and bump to nState 7 to complete" branch)
Enjoy the game
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
The UpperState variable (5, in this case) gets transferred from the trigger to the spawned creature by the Quest system, so it will award the XP as soon as the queststate is advanced to the upperstate set on the trigger. So, if you don't want it giving XP till step 7, raise the UpperState on each of your triggers to 7.