Bug - Waiting for Info palindomeDudesDefeated not counting correctly

Erosion

Member
A recurring problem, guide.php always seems to think I've killed fewer Dudes than I have, which in turn appears to be a Mafia problem.
This time I had 3 Bobs and 2 Racecars, 0 Bards, and even after getting the I Love Me it thinks I've only killed 3.

Is it forgetting to include Racecar Bobs (and/or maybe) Drab Bards?
 

lostcalpolydude

Developer
Staff member
Code:
		else if ( monsterName.equals( "Drab Bard" ) ||
		          monsterName.equals( "Bob Racecar" ) ||
		          monsterName.equals( "Racecar Bob" ) )
		{
			if ( QuestDatabase.isQuestStep( Quest.PALINDOME, QuestDatabase.STARTED ) )
			{
				Preferences.increment( "palindomeDudesDefeated", 1, 5, false );
			}
		}
So no, it's looking for all the monsters. Maybe you're fighting some before mafia thinks the quest is started? It would likely be helpful if you carefully tracked down exactly when it isn't being counted.
 
I've also encountered this, and should be in a position to gather more info today.
What triggers mafia to think the quest started? Wiki says you need to have the talisman, maybe if mafia doesn't properly recognize it built the talisman, it won't start counting? (IIRC, mafia autobuilds the talisman when you get the two charms)


edit:
so obviously I have the talisman. Mafia indeed autocreated after I used two gaudy keys:

Code:
> inv gaudy key

[298] Belowdecks
Encounter: gaudy pirate
[I](duplicate +explosive cigar)[/I]
After Battle: You gaze into the snowglobe and remember that time at KoL Con IV, when you armwrestled Booger Ava. You lost, but it was a good workout!
After Battle: You gain 4 Fortitude
You gain 193 Meat
You acquire an item: enormous hoop earring
You acquire an item: gaudy key
You acquire an item: gaudy key
After Battle: You gain 18 Muscleboundness
After Battle: You gain 16 Mysteriousness
After Battle: You gain 37 Roguishness

> use 2 gaudy key

Using gaudy key (1 of 2)...
You acquire an item: snakehead charrrm
Using gaudy key (2 of 2)...
You acquire an item: snakehead charrrm
Verifying ingredients for Talisman o' Namsilat (1)...
Creating Talisman o' Namsilat (1)...
You acquire an item: Talisman o' Namsilat
Successfully created Talisman o' Namsilat (1)
Finished using 2 gaudy key.
Putting on Talisman o' Namsilat...
Equipment changed.

I did duplicate the pirate, if that matters. Notice that the talisman is immediately equipped.
On to the palindome..

Code:
[304] Inside the Palindome
Encounter: Bob Racecar
[I](olfaction, instant camera, attack)[/I]
After Battle: You pause and think about KoL Con V, when you and FantasticCountess totally stole the show at karaoke. They made you give it back, but it was still pretty Moxious.
After Battle: You gain 6 Smarm
After Battle: A love firefly flits flirtatiously around your head.
After Battle: You gain 5 Wizardliness
You gain 216 Meat
You acquire an item: stunt nuts
You acquire an item: ketchup hound
After Battle: You gain 20 Strongness
After Battle: You gain 16 Enchantedness
After Battle: You gain 33 Cheek


> get palindomeDudesDefeated

0


fought another (inside palindome)- still zero. timespun one- still zero.
unequipped talisman, put it back on, fought (and digitized) a drab bard- now it's "1".
Fought the wanderer bard, which dropped "i love me", now it's "2".

So un/reequipping the talisman started the counter, but it did not start with the initial equipping on the talisman.
 
Last edited:
Testing this again-
This time I refreshed the inventory after mafia created the talisman, and it still didn't count the bob I fought inside the palindome.
Unequipped and reequipped and it started counting.

Maybe it has something to do with the way mafia auto-creates the talisman after using two gaudy keys?
This is how the CLI output looked like:

Code:
Using gaudy key (1 of 2)...
You acquire an item: snakehead charrrm
Using     gaudy key (2 of 2)...
You acquire an item: snakehead charrrm
Verifying     ingredients for Talisman o' Namsilat (1)...
Creating Talisman o'     Namsilat (1)...
You acquire an item: Talisman o' Namsilat
Successfully     created Talisman o' Namsilat (1)
Finished using 2 gaudy key.
 

Veracity

Developer
Staff member
If I recall, KoL's quest log does not advance the quest to say "go into the Palindome" until you actually go there.

- Making the Talisman doesn't do it
- Equipping it doesn't do it
- Seeing it on the nearby plains may or may not do it
- Actually adventuring there does do it.

I suppose we could advance the quest when the Talisman enters your inventory, but if you refresh the quest log before going to the Palindome, we will reset the quest progress.

"The way KoLmafia autocrats the Talisman" is irrelevant. We successfully recognize that it has entered inventory. The CLI output you posted proves that: "You acquire an item: Talisman o' Namsilat",
 

lostcalpolydude

Developer
Staff member
Seeing the Palindome in the plains should set it to started. I remember fixing that a while back (because the image had changed).

Adventuring in The Palindome is also supposed to set that. I think I noted in another thread that the code there wasn't actually working, before giving up on trying to figure out why.
 
Ok, I understand the talisman bit- that fits as the inventory refresh didn't help, but why doesn't it start counting even if the first dude you fight is in the zone itself?
And if the talisman isn't the trigger to start counting how come the counter suddenly started after I removed and re-equipped it? (did I do something that refreshed the quest log without realizing it?)

I can test this again if needed, chaining LTA runs. Let me know if there's something specific I should check.

Edit: now seeing Lost's post, maybe what happened is that both times after I changed gear I loaded the plains? I play with Ezandora's guide which links directly to the palindome "mini-zone" without going through the plains.
 
Last edited:

lostcalpolydude

Developer
Staff member
Ok, I understand the talisman bit- that fits as the inventory refresh didn't help, but why doesn't it start counting even if the first dude you fight is in the zone itself?
And if the talisman isn't the trigger to start counting how come the counter suddenly started after I removed and re-equipped it? (did I do something that refreshed the quest log without realizing it?)

I can test this again if needed, chaining LTA runs. Let me know if there's something specific I should check.

You may have missed my post just before yours. Probably the first time you went in there, you didn't look at the plains, but you did after un/reequipping.
 

zarqon

Well-known member
I can add my anecdotal evidence to this report: the property is not in sync more often than it is in sync for me. Reading the macguffin diary (via relay or CLI) does not cause mafia to start tracking them. This last run, I got my I Love Me, Vol. I while the property was still 0.

I also use a relay script "launcher" of sorts, rather than navigating through the Plains, so perhaps that's it. But adventuring in the Palindome via the relay browser didn't start the tracking.

Perhaps the property could be set to 5 when you acquire the book, to enforce sync at the end, at least.
 

zarqon

Well-known member
Good thing it doesn't work then! I wasn't sure whether it was relevant, but I'd seen a commit to do with quest tracking and reading the diary so thought I'd offer the info.
 

Veracity

Developer
Staff member
I'm in a position to look at this right this moment. I defeated my 2nd gaudy pirate and create the Talisman. I have not moved since then.

Looking at the code, auto-adventuring in the Palindome will attempt to validate the adventure like this:

Code:
		if ( this.adventureId.equals( AdventurePool.PALINDOME_ID ) )
		{
			AdventureResult talisman = ItemPool.get( ItemPool.TALISMAN, 1 );
			if ( !KoLCharacter.hasEquipped( talisman ) )
			{
				if ( !InventoryManager.hasItem( talisman ) )
				{
					return;
				}

				RequestThread.postRequest( new EquipmentRequest( talisman ) );
			}

			if ( QuestDatabase.isQuestLaterThan( Quest.PALINDOME, QuestDatabase.UNSTARTED ) )
			{
				this.isValidAdventure = true;
				return;
			}

			GenericRequest request = new PlaceRequest( "plains" );
			RequestThread.postRequest( request );
			this.isValidAdventure = request.responseText.contains( "palinlink.gif" ) ;
			return;
		}
It will equip the Talisman, if not already equipped.
(Note that it will not create it; as coded, you have to have it in inventory. KoLmafia's auto-creation will ensure that it is made, but if you disable it, you'l have the two charms and it is up to you to make it.)
Having equipped it, if the quest is still "unstarted", we visit the plains to see if the Palindome is present.
If it is, we set the quest to started.

Regarding simply adventuring in the Palindome:

Code:
			else if ( locationId.equals( AdventurePool.PALINDOME_ID ) )
			{
				QuestDatabase.setQuestIfBetter( Quest.PALINDOME, QuestDatabase.STARTED );
			}
That looks like it should work; setQuestIfBetter will automatically set the quest progress to the given value if the quest is currently UNSTARTED.

Let's see how it works.

Code:
> get questL11Palindome

unstarted

> equip acc3 talisman o' namsilat

Putting on Talisman o' Namsilat...
Equipment changed.

> ashq cli_execute( "place.php?whichplace=plains" )

> get questL11Palindome

started
Yes, visiting the plains sets the quest correctly.

Code:
> set questL11Palindome=unstarted

questL11Palindome => unstarted

> debug on

> ashq visit_url( "adventure.php?snarfblat=386" );

[439] Inside the Palindome
Encounter: Evil Olive
Round 0: Veracity wins initiative!

> get questL11Palindome

unstarted
Yes indeed. Visiting the Palindome by submitting the URL directly, rather than going through "adventure" does not set the quest step.

I'll investigate further.
 

Veracity

Developer
Staff member
Code:
	public static final void handleQuestChange( GenericRequest request )
	{
		String redirectLocation = request.redirectLocation;
		if ( redirectLocation != null )
		{
			// If this request redirected to a fight or choice and
			// was automated, there no response text here
			return;
		}
When we adventure in the Palindome, it redirects to a fight or choice, and we do not execute the subsequent code which sets the Palindome quest status. If you do NOT redirect - you get the non-choice non-combat to get the ostrich egg, say - we will set it.

I wonder how many other quest changes are not activated because of this?

I think the solution is obvious. I'll code it up and test it.
 

Veracity

Developer
Staff member
I restarted. KoLmafia detected that the quest was started from the quest log. I reset it, unequipped the Talsiman, and clicked the "last adventure" link, which went straight to the Palindome.

KoL reported: "That isn't a place you can get to the way you're dressed."

Code:
> get questL11Palindome

started

> set questL11Palindome=unstarted

questL11Palindome => unstarted

> unequip acc3

Taking off Talisman o' Namsilat...
Equipment changed.

[440] Inside the Palindome
Encounter:

> get questL11Palindome

started
Even without a redirect, simply (attempting to) visiting the Palindome is not necessarily sufficient. I wonder what it would have said if I didn't even have the Talisman and attempted to go directly to that URL?

In any case, with my code change:

Code:
> set questL11Palindome=unstarted

questL11Palindome => unstarted

> equip acc3 talisman o' namsilat

Putting on Talisman o' Namsilat...
Equipment changed.

[440] Inside the Palindome
Encounter: Drab Bard
Round 0: Veracity wins initiative!

> get questL11Palindome

started
It now recognizes the quest has begun.

Code:
Round 1: Veracity casts STEAL ACCORDION!
You acquire an item: accordionoid rocca
...
Round 7: Veracity wins the fight!
...

> get palindomeDudesDefeated

1
I'm going to submit this. If somebody has the message for attempting to go directly to the Palindome before you've created the Talisman o' namsilat, I'll change it to not mark the quest "started" for failing on that.
 

heeheehee

Developer
Staff member
I'm going to submit this. If somebody has the message for attempting to go directly to the Palindome before you've created the Talisman o' namsilat, I'll change it to not mark the quest "started" for failing on that.
In case you're curious -- copy-paste of the HTML of the page, on a multi without the talisman:
<html><head><link rel="stylesheet" type="text/css" href="/images/styles.css"><script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head><body><center><table width=95% cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Uh Oh!</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>That place isn't accessible to you right now.<p><center><A href=main.php>Back to the Main Map</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></body><script src="/onfocus.1.js"></script></html>
 

Veracity

Developer
Staff member
Thanks. Revision 18125 will not mark the quest started if you get that message.

This is presumably finished. I'll let those who care about the quest setting tell me if they agree. :)
 
Top