Bug - Fixed The Wizard of Ego quest state is not tracked from guild text

canAdv visits the guild url "ocg" based only on the tracking of questG03Ego
so canAdv is expecting the property to be updated when visiting but it isn't, it seems only quest log visits update questG03Ego, so canAdv keeps visiting "guild.php?place=ocg" every time it is looking at guild zones,
is it correct for canAdv to expect mafia to update the tracking from guild text or is canAdv supposed to visit the quest log to update tracking after it makes these requests?


each guild has different text for The Wizard of Ego

https://kol.coldfront.net/thekolwiki/index.php/Grignr,_the_Seal_Clubber
https://kol.coldfront.net/thekolwiki/index.php/Terri,_the_Turtle_Tamer

https://kol.coldfront.net/thekolwiki/index.php/Asiago,_the_Pastamancer
https://kol.coldfront.net/thekolwiki/index.php/Edam,_the_Sauceror

https://kol.coldfront.net/thekolwiki/index.php/Duncan_Drisorderly,_the_Disco_Bandit
https://kol.coldfront.net/thekolwiki/index.php/Stradella,_the_Accordion_Thief
 
Last edited by a moderator:

Veracity

Developer
Staff member
There is essentially no support for this quest in KoLmafia.

QuestDatabase.java:

Code:
    MEATCAR("questG01Meatcar"),
    CITADEL("questG02Whitecastle"),
    NEMESIS("questG04Nemesis"),
    MYST("questG07Myst"),
    MOXIE("questG08Moxie"),
    MUSCLE("questG09Muscle"),

There are properties. defaults.txt:

Code:
user    questG01Meatcar    unstarted
user    questG02Whitecastle    unstarted
user    questG03Ego    unstarted
user    questG04Nemesis    unstarted
user    questG05Dark    unstarted
user    questG06Delivery    unstarted
user    questG07Myst    unstarted
user    questG08Moxie    unstarted
user    questG09Muscle    unstarted

But, considering it is not in the Quests enum, nothing references it.

There is code in QuestManager.handleGuildChange to look at the response text:

Code:
    } else if (location.startsWith("guild")) {
      handleGuildChange(responseText);
(Note that it doesn't pass in the URL, so you can't tell who you are visiting.)

There is code in GuildRequest.parseResponse which looks at the response text and handles inventory - like removing Fernswarthy's Key. Also some guild quest advancement.

Also, for reference, this is in GenericRequest.run, after the request has been submitted and the response text has been retrieved and results have been processed - including GuildRequest.parseResponse.

Code:
    if ((this.responseCode == 200 && this.responseText != null)
        || (this.responseCode == 302 && this.redirectLocation != null)) {
      // Call central dispatch method for locations that require
      // special handling

      QuestManager.handleQuestChange(this);
    }

Personally, I think it is unclean that GuildRequest.parseResponse does some Guild Quest processing and QuestManager.handleGuildChange does some other Guild Quest processing.

So, yes - there is literally no code in KoLmafia to look at what the guild's "ocg" says and advance questG03Ego.

A Project would include:

- For every Guild Quest in defaults.txt (which is updated from the Quest Log), ensure that the Quest enum in QuestDatabase includes it.
- Rationalize Guild Quest handling from guild visits to one method, not some in QuestManager and some in GuildRequest.
- Put quest handling for the questG03Ego quest in there.

This is not just a little "tweak".
 

Veracity

Developer
Staff member
I'm planning on ascending to make one leisurely run in Journeyman. Before I do so, I'll take a shot at refactoring how we handle Guild Quests. I'll be able to test most of them and get logs and verify (and write tests for) tracking them all by simply visiting the guild.
 

Veracity

Developer
Staff member
I have this coded up. I need to ascend (later today) and get logs every time I visit the guild - and notice how the quest setting change on subsequent visits. I'll be able to write tests for all the guild quests - for one of the six classes.
 
Top