New Content - Implemented Naughty Sorceress Quest Tracking

Veracity

Developer
Staff member
(This could be in the other New Content thread, but it's a self-contained set of changes, not all of which will be done by me, so I figured I'd start this here for some self-contained discussion. ;))

Having been through the new tower 5 times so far (#6 tomorrow), here are my thoughts on the various stages of the quest. They happen to match what you can see when you look at the Tower. Some stages have sub-stages. Each stage corresponds to a "place" that you visit: place.php?whichplace=nstower&action=ns_XX_something

0) Quest is unstarted; the door to the courtyard is closed. There is no registration booth. There is no "place" to visit yet.

1) The Registration Booth - ns_01_contestbooth

You have three contests available:

- Fastest Adventurer - unstarted, accepted, finished - ns_01_crowd1
- (Stat) Adventurer - unstarted, accepted, finished - ns_01_crowd2
- Elemental Adventurer - unstarted, accepted, finished - ns_01_crowd3

If you see Crowd #1, #2, or #3, the state of the respective contest is "accepted".
If you don't see a particular crowd, the contest is either unstarted or finished

For each contest, you are given a particular ranking when you accept it. We might be able to track that in a setting like "nsContestantsRemaining1", which is decremented each time you defeat an adventurer from that crowd. If so, rather than "accepted", perhaps we should simply have a number.

If all three contests are finished and you still see the registration both, you need to visit it again to collect your prize, at which point we advance to:

2) The Closing Ceremony - ns_02_coronation

This is a simple chain of three choice adventures. Set them all to "1" (the default), visit the location, and advance to:

3) The Hedge Maze - ns_03_hedgemaze

There are nine rooms. You have to go through them in order, although certain choices skip ahead more than one room, if you succeed. If you fail in a room - lose to a monster or a trap - you continue in the same room when you come back.

We could have a simple "currentHedgeMazeRoom" which starts at 0 and is set to the correct room number when you advance - and which remains at that number if you fail to advance.

4) The Tower Door - whichplace=nstower_door

Six keys - action=ns_lock1 - ns_lock6 - and a doorknob - ns_doorknob. You have to do all of these (keys first) before you can advance. We have a setting - nsTowerDoorKeysUsed - which is a comma-separated list of item names of the keys you've used. Boris's key, skeleton key, and so on.

5) Tower Level 1 - ns_05_monster1

The wall of skin. Stage advances when you defeat it.

6) Tower Level 2 - ns_06_monster2

The wall of meat. Stage advances when you defeat it.

7) Tower Level 3 - ns_07_monster3

The wall of bones. Stage advances when you defeat it.

8) Tower Level 4 - ns_08_monster4

The mirror. Stage advances when you take the choice.

9) Tower Level 5 - ns_09_monster5

Your Shadow. Stage advances when you defeat it.

10) The Sorceress' Chamber - ns_10_sorcfight

The Naughty Sorceress. Stage advances when you defeat her three times, as before.

11) The Prism - ns_11_prism

Freeing King Ralph.

---

Data to be gathered:

- Council text at each stage
- Quest log text at each stage
- (Quest nudge text at each stage)
- image.gif from the Sorceress Tower at each stage

1) Given the above, a standard Quest setting could be made. Perhaps.

2) For the three contests, add settings:

nsContest1
nsContest2
nsContest3

Above are "unstarted", "accepted" (or a number), or "finished"

Wiki says these are the messages when you enter a contest:

According to my evaluation, you qualify to start at rank #N in the Fastest Adventurer contest.
The man wraps a measuring tape around various parts of your body and declares that you are qualified to begin the contest at rank #N.
The man peers at you through a magnifying glass for a little while, then writes #N on his clipboard.

and when you've already entered a contest:

You already entered the <attribute> Adventurer contest. You should go get in line and wait for it to start. My clipboard here says that there are X Adventurers in the contest besides you.

(The above tells us how many fights remain)

You already entered the <attribute> Adventurer contest. You should go get in line and wait for it to start. Wait -- my clipboard says that you're the only Adventurer who entered. That can't be right, can it? Well, if it's true, then I guess you're definitely going to win!"

You already entered the <attribute> Adventurer contest. You should go wait in line with the other Adventurers. Actually, wait -- it says here on my clipboard that you're the only entrant, so I guess you win that one by default.

(the above two tell us we are finished with this contest)

- Add response text parsing to SorceressLairManager.parseContestBooth() for the above.

3) For the hedge maze, add "currentHedgeMazeRoom" setting, initialized to 0, and updated when you visit the appropriate choice.

4) In the hedge maze, if you see an Elemental trap, set nsChallenge3, nsChallenge4, or nsChallenge5 to the appropriate element. We already set those when we look through a "suitably powerful" telescope. Without a telescope, the only way you know what the trap is to experience it - and if you lose, it would be helpful to have that information saved in the appropriate setting.

I've never actually seen one of the traps, since I have been collecting nugglets and factoids. We need the text for each element for each trap.

---

Anything else we should track?
 

Darzil

Developer
Well, I'm sure you know, what we've done with all the other quests is to track each step where the quest log changes in questLXXName preference, and track anything else useful separately. I can't really comment much apart from that as I've not done it yet.
 

lostcalpolydude

Developer
Staff member
The message at the registration booth is a little different when there is only 1 Adventurer in front of you, but I didn't grab that when I noticed it.
 

Veracity

Developer
Staff member
The message at the registration booth is a little different when there is only 1 Adventurer in front of you, but I didn't grab that when I noticed it.
Here is what I got when I placed #2 in the Fastest Adventurer Contest:

Code:
The man pulls out a stopwatch and a pair of calipers, looks at you for a few seconds, and says "According to my evaluation, you qualify to start at rank <b>#2</b> in the Fastest Adventurer contest."
and here was a subsequent visit with no other entrants:

Code:
"You already entered the Fastest Adventurer contest.  You should go get in line and wait for it to start.  It says here that the contest is current you and one other Adventurer.  Hey, a 50/50 chance is pretty good, eh?"
Note the typo - "the contest is CURRENT you and one other".

Edit: I intentionally did badly for the Hottest Adventurer Contest, since I'd not said it before and - factoids!

Code:
The man peers at you through a magnifying glass for a little while, then writes <b>#11</b> on his clipboard.
and

Code:
"You already entered the Hottest Adventurer contest.  You should go wait with the other entrants.  According to my clipboard here, there are 10 other Adventurers waiting."
 
Last edited:

Veracity

Developer
Staff member
I notice that the Quest Log is being updated with finer resolution than I was paying attention to.

After being told by the Council to go to the tower:

Code:
Go investigate the weird contest taking place at the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

After entering all three contests:

Code:
<b>The Ultimate Final Epic Conflict of the Ages</b><br> Defeat the other entrants in the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Contests</b></a>.<br>   Contest #1: 1 competitor left<br>   Contest #2: 10 competitors left<br>   Contest #3: 10 competitors left<p>

Which makes me think that there would have been substeps in there before I'd entered all the contests. Presumably, it would say "You entered contest #1 but have not entered #2 or #3 yet".

It'll be 4 days before I'll be back here, but if someone else gets there first, let's find out what it says...
 

Veracity

Developer
Staff member
And, yes, indeed - as you defeat monsters, the number at the Registration desk and in the Quest Log (and Quest Nudge) decrements.
 

Veracity

Developer
Staff member
Here is what happens when you've won a contest. Contest Booth:

Code:
"You already entered the Hottest Adventurer contest. You should go wait with the other entrants. Although, hmm. Is this right? My clipboard says you're the only Adventurer who showed up for this one. So... I guess you win?"

Quest Log:
Code:
The Ultimate Final Epic Conflict of the Ages</b><br> Defeat the other entrants in the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Contests</b></a>.<br>   Contest #1: 1 competitor left<br>   Contest #2: 10 competitors left<br>   Contest #3: Won!
OK. I'll make a full report after I collect everything.
 

lostcalpolydude

Developer
Staff member
If you turn on the Quest Tracker, you can see that text updating without making an extra check. Quest Log and Quest Tracker text is identical (KoL code simplification) except for the log having a title. There's even a KoL setting to make Quest Tracker text smaller, so it doesn't hide as much other stuff when it's active.

Technically, parsing the Quest Tracker on every charpane load is a thing we could do, for people that have it enabled. But I don't know that adding all that string parsing is a great idea.
 

Veracity

Developer
Staff member
Step 1:

Council:

Code:
<p>Adventurer!  We've recently received word that the Naughty Sorceress is holding some sort of contest.  We don't know what it means, but we know it doesn't mean anything good, and as such, we have decided that it is time for you to embark upon your final quest.  Seek out and destroy the Naughty Sorceress, who has plagued these lands for so long, and rescue King Ralph XI, whom she has imprismed.<p>Go forth to her Lair, east of the Nearby Plains!  Beat her down!

Quest Log:

Code:
Go investigate the weird contest taking place at the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"Contest Registration Desk"
otherimages/nstower/nstower_regdesk.gif

Quest Log (after entering 3 contests):

Code:
<b>The Ultimate Final Epic Conflict of the Ages</b><br> Defeat the other entrants in the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Contests</b></a>.<br>   Contest #1: 1 competitor left<br>   Contest #2: 10 competitors left<br>   Contest #3: 10 competitors left<p>

Images:

A Crowd of Adventurers (1)
otherimages/nstower/crowd1.gif

A Crowd of Adventurers (1)
otherimages/nstower/crowd2.gif

A Crowd of Adventurers (1)
otherimages/nstower/crowd3.gif

Quest Log (after winning 3 contests):

Code:
Go talk to the contest official at the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Step 2:

Quest Log (after claiming sash):

Code:
You're the big winner!  Attend your coronation in the courtyard of the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"Coronation Courtyard"
otherimages/nstower/nstower_courtyard.gif

Step 3:

Quest Log:

Code:
The Ultimate Final Epic Conflict of the Ages</b><br> Make your way through the treacherous hedge maze at the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"The Hedge Maze"
nstower_hedgemaze.gif

Step 4:

Quest Log:

Code:
Get through the door at the base of the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"A Perplexing Door"
otherimages/nstower/nstower_towerdoor.gif

Step 5:

Quest Log:

Code:
Ascend the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"Tower Level 1 (1)"
otherimages/nstower/nstower_tower1.gif

Step 6:

Quest Log:

Code:
Ascend the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"Tower Level 2 (1)"
otherimages/nstower/nstower_tower2.gif

Step 7:

Quest Log:

Code:
Ascend the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"Tower Level 3 (1)"
otherimages/nstower/nstower_tower3.gif

Step 8:

Quest Log:

Code:
Ascend the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"Tower Level 4 (1)"
otherimages/nstower/nstower_tower4.gif

Step 9:

Quest Log:

Code:
Continue your ascent of the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>.

Image:

"Tower Level 5 (1)"
otherimages/nstower/nstower_tower5.gif

Step 10:

Quest Log:

Code:
Confront the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress</b></a>.

Image:

"The Sorceress' Chamber (1)"
otherimages/nstower/chamberlabel.gif

Step 11:

Quest Log:

Code:
Free King Ralph from his prism prison atop the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Tower</b></a>!

Image:

"The Imprismed King Ralph"
otherimages/nstower/../lair/kingprismanim.gif

"Ruined Chamber"
otherimages/nstower/towerbusted.gif

Finished:

div id=ns_12_gash

"The Astral Gash"
otherimages/nstower/../gash.gif
 

Veracity

Developer
Staff member
If you turn on the Quest Tracker, you can see that text updating without making an extra check. Quest Log and Quest Tracker text is identical (KoL code simplification) except for the log having a title. There's even a KoL setting to make Quest Tracker text smaller, so it doesn't hide as much other stuff when it's active.
Yes, I noticed this.

Technically, parsing the Quest Tracker on every charpane load is a thing we could do, for people that have it enabled. But I don't know that adding all that string parsing is a great idea.
It's also unnecessary, since we read the quest log at startup and (in theory) update our data every time we notice something happen that would make KoL change the text. I.e., unless we are missing an event that changes the quest state, we should be in synch with the Quest Tracker - and if we miss an event, that's a bug we should fix. Look at the scores of Bugs reporting exactly that kind of thing. :)
 

Veracity

Developer
Staff member
Here's the scheme, stored in questL13Final

unstarted - lair is closed
step1 - contest booth
step2 - coronation ceremony
step3 - hedge maze
step4 - tower door
step5 - wall of skin
step6 - wall of meat
step7 - wall of bone
step8 - mirror
step9 - Your Shadow
step10 - Naughty Sorceress (possibly preceded by Clancy?)
step11 - prism
finished - gash

When you visit the tower, we examine the image and set the step based on where you can click.
When you finally defeat a monster (walls, Shadow, NS or equivalent), we advance the step.

The above is done in Revision 15262.

Should be a simple matter to set the quest step when you take a choice (or turn the doorknob) and advance it. That is coming soon.

At which point, it will just be a matter of parsing the quest log (based on what I posted above) to figure out your current step when you log in.
 

Veracity

Developer
Staff member
Revision 15268 does the following:

- Add settings nsContestants1, nsContestants2, and nsContestants3, which are the number of contestants left to fight in each crowd. These start at -1 (when you have not entered the contest), are initialized from 1-10 when you enter the contest (and are updated/checked any time you visit the booth), and decremented when you beat a monster. So:

-1 = haven't entered the contest
0 = won the contest
>0 = number of monsters left to fight

I also update the questL13Final setting from step1 through step11 as you do whatever is necessary to advance the quest, and set it to finished when you free the king.

The only glitch with that was when I beat Naughty Sorceress (3) and it left it at step10, rather than advancing to step11. Hmm.

Encounter: The Naughty Sorceress (3)

and the check is:

Code:
		else if ( monster.equalsIgnoreCase( "The Naughty Sorceress (3)" ) ||
			  monster.equalsIgnoreCase( "The Avatar of Sneaky Pete" ) ||
			  monster.equalsIgnoreCase( "The Avatar of Boris" ) ||
			  monster.equalsIgnoreCase( "Principal Mooney" ) ||
			  monster.equalsIgnoreCase( "Rene C. Corman" ) ||
			  monster.equalsIgnoreCase( "The Avatar of Jarlsberg" ) ||
			  monster.equalsIgnoreCase( "The Rain King" ) ||
			  responseText.contains( "Thwaitgold bee statuette" ) )
		{
			QuestDatabase.setQuestProgress( Quest.FINAL, "step11" );
		}
I don't see the problem. I'll try it with a debugger next time I'm there.

Other than that, we do not update this quest from the Quest Log. I gave all the strings, up in this thread, except what it looks like when you have entered some (but not all) of the contests. Here's an example.

Code:
Defeat the other entrants in the <a href=place.php?whichplace=nstower class=nounder target=mainpane><b>Naughty Sorceress' Contests</b></a>.<br>   Contest #1: 1 competitor left<br>   Contest #2: (not yet entered)<br>   Contest #3: (not yet entered)
I think I will leave the Quest Log to somebody who has actually worked with it before.
Which is to say, not me.
Signing out of this thread. :)
 

Theraze

Active member
Before when you told mafia to automate adventuring for more adventures than there were contestants, it would get stuck and keep trying to adventure in an empty zone. If it hasn't already been done, FReq to not continue automated adventuring in the empty contests. :)
 

Veracity

Developer
Staff member
Actually, I tried it with a multi. It just shows the tower, rather than redirecting to a fight.
I'll see what I can come up with.
 

Veracity

Developer
Staff member
OK, revision 15276 detects the failure, says "You can't adventure there", and stops automation.

Once we read the Quest Log and determine the state of this quest, we could validate adventure locations in the NS Lair and not even try going there if the location is not available.
 

Theraze

Active member
Yeah, ninja-ed again. It just redirects you back to the tower. And you already got the quest log info back in post 7, so no reason for me to clog the thread and re-post that. Thanks for the speedy fix! :)
 

Darzil

Developer
I started looking at adding the messages you added for the quest log. However, I noticed a slight issue, in that all the other quests go unstarted, started, step 1, . . .step N, finished. I presume I should tweak all the step updates in the code down 1 and make contest booth started? (I've not actually done the tower since it came in)

I think I found all the relevant bits in this patch for quest tracking (from council, quest log, and adding started in and reshuffling the rest), but I haven't so much as had a chance to see if it'll compile, far less test it!
View attachment NS_Quest_Tracking.patch
 
Last edited:

Veracity

Developer
Staff member
I see that revision 15310 on Jan 30 says this:

Most quest log entries for Naughty Sorceress quest now update quest tracking. Steps changed to bring them in line with other quests (step1 now started, stepN now stepN-1). Untested. Remove more Daily Deeds in Limitmode that cannot be accessed in Spelunky. Link to Altar when discovered (untested).
I assume that is the patch you posted above.

I'm curious about the "most" in that comment. I assume this has all the "steps". I also assume it does not have all the "There are 10 other people in contest #2" messages. Other than testing, is that it? 'cause, yeah - we'd like to update nsContestants1 - nsContestants3 from the Quest Log when we log in.
 

Darzil

Developer
I see that revision 15310 on Jan 30 says this:


I assume that is the patch you posted above.

I'm curious about the "most" in that comment. I assume this has all the "steps". I also assume it does not have all the "There are 10 other people in contest #2" messages. Other than testing, is that it? 'cause, yeah - we'd like to update nsContestants1 - nsContestants3 from the Quest Log when we log in.
I meant we can't distinguish between the three identical ascend the tower messages, so don't update the quest based on those.
 
Top