New Content - Implemented Quest tracking for Primordial

zarqon

Well-known member
This content isn't new, but it's new to mafia, so I picked New Content. I've been revisiting this quest as I've been coding it for my omnibus script, and have found that the quest tracking has so far only been partially implemented. KoLmafia presently understands the "started" and "finished" steps of the Primordial quest, but there are a few intermediate steps it's missing (where the tracking property then erroneously contains "unstarted").

First, after you have swum up to unlock the combats in the zone, the quest log has this:

HTML:
<b>Primordial Fear</b><br>You remember finding your way to a higher, warmer, oranger part of the Primordial Soup.  You were hungry for adventure.  And for food.

If you encounter Cyrus, a second paragraph is added:

HTML:
<b>Primordial Fear</b><br>You remember finding your way to a higher, warmer, oranger part of the Primordial Soup.  You were hungry for adventure.  And for food.<p>Every time you tried to swim upward, you ran into a virus named Cyrus.  That guy was a real jerk.

And if you've thrown any base pairs at him, a third paragraph is added, with adjective(s) corresponding to the pairs you've thrown:

HTML:
<b>Primordial Fear</b><br>You remember finding your way to a higher, warmer, oranger part of the Primordial Soup.  You were hungry for adventure.  And for food.<p>Every time you tried to swim upward, you ran into a virus named Cyrus.  That guy was a real jerk.<p>You remember inadvertently making him stronger, smarter and more attractive.

I would like to suggest that if only the first paragraph appears, we are on step1. If there are any additional paragraphs, we're on step2. A bonus would be tracking the adjectives listed in a property so combat scripts would know which items you've already thrown at Cyrus.

Finally, when you meet Cyrus the final time, the quest is finished, but mafia doesn't recognize that the quest is finished until you see it in your quest log. Here's the HTML for the final meeting:

HTML:
You swam up into the yellowness, and sure enough, there was Cyrus.<p>"Hey jerkass," he said, his everpresent scowl still on his face.  "I was waiting for you to come back, so I could thank you.  You've fixed me all up, and now I can leave this dump behind and move on to bigger and better things.  Look out, world, 'cause here comes Cyrus!"<p>He turned away to leave, but abruptly turned back.<p>"Oh yeah, I almost forgot.  Here y'go." he said, as he smacked you in the face with his tail and swam upward, out of sight.<p>Infuriated, you sank back down into the orangeness.

Completing this tracking would also mostly implement this feature request.
 

Veracity

Developer
Staff member
I realize that nobody has responded to this. You might be the only one still doing the Cyrus quest any more.
I'll take a look. Thanks for providing the HTML. That should allow me to code it and then actually test it.
Once per aftercore.
 

zarqon

Well-known member
Excellent, thank you. I think perhaps Hyboria and Future are missing intermediate tracking as well -- I'll check after my current run (in a couple days).
 

Veracity

Developer
Staff member
Revision 19835 does this:

From quest log:

You remember floating aimlessly in the Primordial Soup. You wanted to do it some more.
=> started

You remember finding your way to a higher, warmer, oranger part of the Primordial Soup. You were hungry for adventure. And for food.
=> step1

Every time you tried to swim upward, you ran into a virus named Cyrus.
=> step2

You remember inadvertently making him stronger.
You remember inadvertently making him stronger and smarter.
You remember inadvertently making him stronger, smarter and more attractive.
=> still step 2, but property "cyrusAdjectives" will be "stronger", "stronger,smarter", "stronger,smarter,more attractive"

You remember creating an unstoppable supervirus. Congratulations!
=> finished

Additionally, property "aminoAcidsUsed" starts at 0, goes up by 1 for each you eat, pegging at 3, and is reset to zero when you swim up in Soupercharged

I also attempted to advance the quest steps correctly when you adventure and take choices and meet Cyrus and so on. I can't guarantee it's all perfect, since I am done with this until I ascend, but perhaps you'll do that sooner.

I track how Cyrus's adjectives change, both when you use the base pair and when you are defeated. I do that since you can use the Ed trick to actually defeat Cyrus. I don't know whether using base pairs before doing that improves him. If so, we're good. If not, I should remove that code. We'll probably never know. :)
 

zarqon

Well-known member
Seems perfect to me! I'll check it out in a day or probably two when I reach aftercore. This means I'll be able to remove base pairs tracking from BatBrain and some of my other scripts will not have to rely on BatBrain being used vs Cyrus. Thank you!
 

zarqon

Well-known member
Have just had a go at this quest after updating my scripts to make use of the new properties. All worked smoothly except for one hiccup where SS didn't throw a base pair despite having one in inventory, which may have been due to my guessing at what the adjectives were for the three other pairs. This ought to work right?

Code:
   boolean used_against_cyrus(item pair) {
      switch (pair) {
         case $item[memory of a CA base pair]: return get_property("cyrusAdjectives").contains_text("stronger");
         case $item[memory of a CG base pair]: return get_property("cyrusAdjectives").contains_text("smarter");
         case $item[memory of a CT base pair]: return get_property("cyrusAdjectives").contains_text("attractive");
         case $item[memory of a GT base pair]: return get_property("cyrusAdjectives").contains_text("resilien");
         case $item[memory of an AG base pair]: return get_property("cyrusAdjectives").contains_text("faster");
         case $item[memory of an AT base pair]: return get_property("cyrusAdjectives").contains_text("aggress");
      } return false;
   }

Anyway, that's not directly to do with the new tracking so much, which seemed to work admirably. Thanks very much; my handling of this quest is now a good bit more robust.
 

Veracity

Developer
Staff member
It would have worked, had I not misspelled "aggressive" as "aggresive". Oops. I'll fix that.
 

zarqon

Well-known member
Found an issue:

Performing step 3647 (obtain 1 choiceadv) in the 'iotm/memories/primordial' quest chain...
Conditions list cleared.
Condition added: Choices Left: 1

Using 1 memory of some delicious amino acids...
Finished using 1 memory of some delicious amino acids.

Request 1 of 108 (Memories: The Primordial Soup) in progress...

[6375] The Primordial Soup
Encounter: Soup For You
You gain 10 Muscleboundness

Conditions satisfied after 1 adventures.
Conditions list cleared.
Condition added: Choices Left: 1

<two more intro choiceadvs snipped>

Request 1 of 105 (Memories: The Primordial Soup) in progress...

[6378] The Primordial Soup
Encounter: The Primordial Directive

Conditions satisfied after 1 adventures.
Conditions list cleared.
Condition added: Choices Left: 1

Request 1 of 105 (Memories: The Primordial Soup) in progress...

[6378] The Primordial Soup
Encounter: hostile amoeba
Round 0: Zarqon's multi wins initiative!

<several turns of continuing to encounter combats looking for a choice>

KoLmafia declares world peace.

> prefref primord

Name Value Default Scope
questF01Primordial started unstarted user

> refresh quests

Retrieving quest data...
Requests complete.

> prefref primord

Name Value Default Scope
questF01Primordial step1 unstarted user

The script was configured to auto-adventure for 1 choiceadv until the quest property was updated to "step1", but the property didn't update until looking at the quest log. I can make my script also check the noncombat queue for Primordial Directive (what it was doing before tracking), but it would be more reliable if mafia updated the property when you successfully swim up to unlock the combats.
 

Veracity

Developer
Staff member
Sorry about that. Revision 19852 sets quest progress to step1 in The Primordial Directive if you successfully swim up.
 

zarqon

Well-known member
No problem, and thanks for the swift fix. The biggest headache with scripting this quest prior to your work here was tracking amino acid use, which is now handled wonderfully.
 
Top