Bug - Fixed Place update broke concert (NO IT DIDN'T)

Theraze

Active member
Well, the fails have all been HC Standard runs. Worked the first few days with my DB and... some of the AT runs, I think? Didn't work with any S or PM runs. Just worked with a PM run yesterday, like it hadn't been. BCA does a lot of questlog checks to see if zones are available, so as it decides if it needs to adventure or... whatever... it parses questlog automatically. So while whatever made the automatic non-relay parsing broken may still be broken, the bug is hidden for BCA users at least. :)
 

Veracity

Developer
Staff member
What does your session log say about your final fight with The Big Wisniewski or The Man for those runs that didn't update warProgress as expected?
 

Veracity

Developer
Staff member
I just went and looked at the 10 Island Wars I've won so far this year.

Code:
[1077] The Battlefield (Hippy Uniform)
Encounter: The Last Stand, Man
War finished: both sides defeated
You acquire an item: Order of the Silver Wossname

[1091] The Battlefield (Frat Uniform)
Encounter: The Last Stand, Bra
War finished: both sides defeated
You acquire an item: Order of the Silver Wossname

bigisland.php?action=bossfight&pwd=2d1ec8516ad1cf61210f86d853327ff1
Encounter: The Big Wisniewski
War finished: hippies defeated
You acquire an item: Iron Beta of Industry

bigisland.php?action=bossfight&pwd=8567635edc9d7e5a193f118909b7c386
Encounter: The Big Wisniewski
War finished: hippies defeated
You acquire an item: Nickel Gamma of Frugality

bigisland.php?action=bossfight&pwd=ff05b784d26db57c8e3b6beb732a6bd7
Encounter: The Big Wisniewski
War finished: hippies defeated
You acquire an item: Nickel Gamma of Frugality

(1/21/2015)
bigisland.php?action=bossfight&pwd=a7b649aefdf39669c9541e640cbeaf71
Encounter: The Big Wisniewski
War finished: hippies defeated
You gain 5 Soulsauce
You acquire an item: Nickel Gamma of Frugality

(1/23/2015)
bigisland.php?action=bossfight&pwd=2b03a97405d8a1ad680eea0f28b4ec64
Encounter: The Big Wisniewski
0 hippies defeated; 1000 down, 0 left.
You acquire an item: Nickel Gamma of Frugality

(1/26/2015)
bigisland.php?action=bossfight&pwd=d5032db607fa43052bb94361dc15254f
Encounter: The Big Wisniewski
War finished: hippies defeated
You acquire an item: Nickel Gamma of Frugality

bigisland.php?action=bossfight&pwd=8a229ea5805e1f2e2d7174284c6d1d96
Encounter: The Big Wisniewski
War finished: hippies defeated
You acquire an item: Nickel Gamma of Frugality

bigisland.php?action=bossfight&pwd=db20eb80f1ec46ffbc69e029213d84d1
Encounter: The Big Wisniewski
War finished: hippies defeated
You acquire an item: Nickel Gamma of Frugality
1) I am dissatisfied with how "bigisland.php?action=bossfight" logs. No turn number? no location?
2) Notice the boss defeat on 1/21, 1/23, and 1/26

Code:
(1/21/2015)
bigisland.php?action=bossfight&pwd=a7b649aefdf39669c9541e640cbeaf71
Encounter: The Big Wisniewski
War finished: hippies defeated
You gain 5 Soulsauce
You acquire an item: Nickel Gamma of Frugality

(1/23/2015)
bigisland.php?action=bossfight&pwd=2b03a97405d8a1ad680eea0f28b4ec64
Encounter: The Big Wisniewski
0 hippies defeated; 1000 down, 0 left.
You acquire an item: Nickel Gamma of Frugality

(1/26/2015)
bigisland.php?action=bossfight&pwd=d5032db607fa43052bb94361dc15254f
Encounter: The Big Wisniewski
War finished: hippies defeated
You acquire an item: Nickel Gamma of Frugality
The one on 1/23 did NOT recognize the end of the war correctly. So, something between 1/21 and 1/26 got broken and fixed.
 

Theraze

Active member
Here's one on 1/24.
bigisland.php?action=bossfight&pwd
Encounter: The Big Wisniewski
Round 0: Theraze loses initiative!
Round 1: The Big Wisniewski takes 3 damage.
You lose 43 hit points
> BCC: This isn't actually adventuring at the noob cave. Don't worry! (Myst)
> WHAM: Monster HP is 1997.0.
> WHAM: Running SmartStasis
> WHAM: Starting evaluation and performing of attack
> WHAM: Enqueuing a stun to help with the battle
> WHAM: We are going to 7-shot with Soul Bubble, Saucecicle, Saucecicle, Saucecicle, Stuffed Mortar Shell, Saucecicle and Saucecicle.
Round 2: Theraze executes a macro!

[1475] Noob Cave
Round 2: Theraze casts SOUL BUBBLE!
Round 3: Theraze casts SAUCECICLE!
Round 4: The Big Wisniewski takes 340 damage.
Round 4: Theraze casts SAUCECICLE!
Round 5: The Big Wisniewski takes 598 damage.
Round 5: Trot coos softly, and nuzzles you with his beak.
You gain 37 hit points
You gain 37 Mana Points
Round 5: Theraze casts SAUCECICLE!
Round 6: The Big Wisniewski takes 350 damage.
Round 6: Theraze casts STUFFED MORTAR SHELL!
Round 7: The Big Wisniewski takes 2 damage.
You lose 29 hit points
Round 7: Theraze casts SAUCECICLE!
Round 8: The Big Wisniewski takes 344 damage.
Round 8: The Big Wisniewski takes 456 damage.
Round 8: Theraze wins the fight!
You acquire an item: solid gold bowling ball
You gain 60 Beefiness
You gain a Muscle point!
You gain 137 Wizardliness
You gain a Mysticality point!
You gain 78 Smarm
You gain a Moxie point!
You gain 5 Soulsauce
0 hippies defeated; 1000 down, 0 left.
> Look! You found 1 solid gold bowling ball (5,000μ)!
> BCC: Run_Combat() being used normally.
You acquire an item: Nickel Gamma of Frugality
> BCC: levelMe(148, true) called.
> Need to Level up a bit to get at least 148 base Primestat
On that day, here is part of the maximizer log.
summon Ze'Oofoo
You acquire an effect: Preternatural Greed (duration: 30 Adventures)

cast 1 The Polka of Plenty

concert 2

buy 1 Knob Goblin nasal spray for 142 each from The Knob Dispensary
You acquire an item: Knob Goblin nasal spray
You spent 142 Meat

use 1 Knob Goblin nasal spray
You acquire an effect: Wasabi Sinuses (duration: 10 Adventures)
You can see that while it lists concert 2, it doesn't actually get the effect.

Here is the same thing from today:
bigisland.php?action=bossfight&pwd
Encounter: The Big Wisniewski
Round 0: Theraze loses initiative!
You lose 73 hit points
> BCC: This isn't actually adventuring at the noob cave. Don't worry! (Myst)
> WHAM: Monster HP is 2000.0.
> WHAM: Running SmartStasis
> WHAM: Starting evaluation and performing of attack
> WHAM: Enqueuing a stun to help with the battle
> WHAM: We are going to 8-shot with Entangling Noodles, Saucegeyser, Stuffed Mortar Shell, Stuffed Mortar Shell, Stuffed Mortar Shell, Stuffed Mortar Shell, Stuffed Mortar Shell and Cannelloni Cannon.
Round 2: Theraze executes a macro!

[1549] Noob Cave
Round 2: Theraze casts ENTANGLING NOODLES!
Round 3: Theraze casts SAUCEGEYSER!
Round 4: The Big Wisniewski takes 494 damage.
Round 4: Theraze casts STUFFED MORTAR SHELL!
> WHAM: Current monster HP is calculated to 1506.0
> WHAM: Starting evaluation and performing of attack
> WHAM: Enqueuing a stun to help with the battle
> WHAM: We are going to 8-shot with gas balloon, Saucecicle, Cannelloni Cannon, Cannelloni Cannon, Cannelloni Cannon, Ravioli Shurikens, Ravioli Shurikens and Saucecicle.
Round 5: Theraze executes a macro!
Round 5: Theraze uses the gas balloon!
Round 6: The Big Wisniewski takes 458 damage.
Round 6: Theraze casts SAUCECICLE!
Round 7: The Big Wisniewski takes 366 damage.
Round 7: Theraze casts CANNELLONI CANNON!
Round 8: The Big Wisniewski takes 280 damage.
Round 8: Theraze casts CANNELLONI CANNON!
Round 9: The Big Wisniewski takes 280 damage.
Round 9: Trot coos softly, and nuzzles you with his beak.
You gain 42 hit points
You gain 42 Mana Points
Round 9: Theraze casts CANNELLONI CANNON!
Round 10: The Big Wisniewski takes 280 damage.
Round 10: Trot paws at the ground for a second, and then charges your opponent, bashing him for 36 damage.
Round 10: The Big Wisniewski takes 36 damage.
Round 10: Theraze wins the fight!
You acquire an item: solid gold bowling ball
You gain 70 Strengthliness
You gain 134 Magicalness
You gain 72 Roguishness
0 hippies defeated; 1000 down, 0 left.
> Look! You found 1 solid gold bowling ball (5,000μ)!
> BCC: Run_Combat() being used normally.
You acquire an item: Nickel Gamma of Frugality
> BCC: levelMe(148, true) called.
> Need to Level up a bit to get at least 148 base Primestat
And the maximizer:
summon Ze'Oofoo
You acquire an effect: Preternatural Greed (duration: 30 Adventures)

cast 1 The Polka of Plenty

concert 2
You acquire an effect: Winklered (duration: 20 Adventures)

buy 1 Knob Goblin nasal spray for 142 each from The Knob Dispensary
You acquire an item: Knob Goblin nasal spray
You spent 142 Meat

use 1 Knob Goblin nasal spray
You acquire an effect: Wasabi Sinuses (duration: 10 Adventures)
So, BCA calls the quest log during its leveling up, since I wasn't already 13. With Darzil's patch, that makes it hide the issue, for BCA users who languish slowly through the levels. For users of other automated solutions, YMMV.

Edit: From my logs, it broke at some point on the 18th. I had two characters finish the war boss on that day and the first worked, the second didn't. Doesn't look like mafia saves its version numbers into the session log files, but I tend to play with whatever is the latest version at the time I launch mafia. If I reboot the computer, I recompile.
 
Last edited:

Theraze

Active member
Here is the interesting bit. Character 1:
You acquire an item: solid gold bowling ball
You gain 56 Fortitude
You gain 83 Wizardliness
You gain 137 Roguishness
You gain a Moxie point!
War finished: hippies defeated
> Look! You found 1 solid gold bowling ball (5000μ)!
You acquire an item: Nickel Gamma of Frugality
Character 2:
You acquire an item: solid gold bowling ball
You gain 63 Muscleboundness
You gain a Muscle point!
You gain 69 Wizardliness
You gain 147 Chutzpah
You gain a Moxie point!
0 hippies defeated; 1000 down, 0 left.
> Look! You found 1 solid gold bowling ball (5000μ)!
You acquire an item: Nickel Gamma of Frugality
It only detected the end of the war on the first character, before I compiled the 1/18 changes. It hasn't detected the end of the war since then.
 

Veracity

Developer
Staff member
OK, I can see what is happening.

For every case in which it worked for me, my last fight was on the Battlefield. For the one case in which it did not work:

Code:
[781] The Haunted Gallery
Encounter: Lights Out in the Gallery
Encounter: the ghost of Elizabeth Spookyraven
...
bigisland.php?action=bossfight&pwd=2b03a97405d8a1ad680eea0f28b4ec64
Encounter: The Big Wisniewski
The previous encounter was NOT on the battlefield. The method which handles the results of the battlefield - IslandManager.handleBattlefield - is called by FightRequest.updateRoundData if KoLAdventure.lastAdventureId() is either AdventurePool.FRAT_UNIFORM_BATTLEFIELD or AdventurePool.HIPPY_UNIFORM_BATTLEFIELD.

As I just noticed from the logging, going to the bossfight is neither of those.

Since BCA last went to the Noob Cave (at level 12? Huh?), it didn't recognize the bossfight as being a battlefield fight.

This has been broken for years. I am amused that you just noticed it.

I'll see what I can do; I'll be doing the battlefield after rollover.
 

Theraze

Active member
run_combat() doesn't allow passing in a consult script. Because of that, BCA calls noob cave adventuring to complete combat when it wants to use consults, since run_combat won't allow for that functionality. I believe there's an old FReq for that somewhere, but...

Unfortunately for that theory, however the 1/18 failure was with a run_combat, not adventuring at the noob cave. DB/AT BCA adventuring uses run_combat. It's only with non-moxie classes that it uses the noob cave consult override, and both the successful and failed boss slaying ending the war was with ATs.

Edit: Hmm... the failed 1/18 also crafted a potion before the boss fight. Maybe that screwed up the lastAdventure. But that's the only thing I could think of that would make sense.
 
Last edited:

Veracity

Developer
Staff member
*sigh*

I could not care less whether run_combat() was used.

What was the last actual adventuring location for each of the failed runs? Your session logs will tell you.

And by the way - this "theory" is based on inspecting the code. I KNOW that the "look at the result of the island battle" method is called ONLY if the saved last adventure id is one of the two island battle locations.
 

Veracity

Developer
Staff member
And something else you can check for me, since you are familiar with the source for BCC ascend: What URL does it submit to enter battle with the war boss? Does it visit the camp (and get redirected)? Or does it submit some other URL?
 

Theraze

Active member
Code:
		cli_execute("restore hp;restore mp");
		visit_url("bigisland.php?place=camp&whichcamp=1");
		visit_url("bigisland.php?place=camp&whichcamp=2");
		visit_url("bigisland.php?action=bossfight&pwd");
		if (index_of(bumRunCombat(), "WINWINWIN") == -1) abort("Failed to kill the boss!\n");
		visit_url("council.php");
		set_property("lastCouncilVisit", my_level());

If we care about it, here are 3 separate open identical requests for the overloaded run_combat() function from 2010, 2012, and 2014.
http://kolmafia.us/showthread.php?4454-run_combat()-with-a-combat-filter
http://kolmafia.us/showthread.php?11023-Using-combat-filters-with-monsters-spawning-from-items
http://kolmafia.us/showthread.php?15564-Overload-run_combat-to-use-a-combat-filter
 

Veracity

Developer
Staff member
OK, that is weird.

It visits the hippy camp.
It visits the frat house
It then enters the boss fight.

Why in the world would it visit both camps?
Visiting your own camp redirects to a coinmaster.
Visiting the enemy camp should redirect to the bossfight.

Since visit_url automatically follow redirects (it uses a GenericRequest), one of the two visits should enter the boss fight.

At least, that is my conjecture. Unfortunately, that code does not answer that question for me.

I'll look through my old session logs - like, pre-coinmaster - and see if I can figure it out.
 

Theraze

Active member
What was the last actual adventuring location for each of the failed runs? Your session logs will tell you.

Looks like it went to the ballroom for some reason. Not sure why it would have gone there... maybe for a bit more mainstat if I didn't have ingredients for buffs or... who knows. But yeah, that fits.

Regarding not noticing it until now, I'd pondered why sometimes the concert didn't work and sometimes it didn't, but it wasn't directly shaving off adventures in the tower, like it is currently, so it never really mattered. Now that I'm manually running the tower, my buffs not actually applying in the maximizer tab gets noticed.
 

Veracity

Developer
Staff member
OK, here is from July 2, 2007:

Code:
bigisland.php?place=camp&whichcamp=1
bigisland.php?action=turnin&pwd&whichcamp=1&whichitem=2066&quantity=2
bigisland.php?action=turnin&pwd&whichcamp=1&whichitem=2070&quantity=2
bigisland.php?action=turnin&pwd&whichcamp=1&whichitem=2382&quantity=1
bigisland.php?action=turnin&pwd&whichcamp=1&whichitem=2383&quantity=3
bigisland.php?action=turnin&pwd&whichcamp=1&whichitem=2387&quantity=1
bigisland.php?action=turnin&pwd&whichcamp=1&whichitem=2401&quantity=1
bigisland.php?action=getgear&pwd&whichcamp=1&whichitem=2512&quantity=2
You acquire  2 Hippy Army MPEs
bigisland.php?action=getgear&pwd&whichcamp=1&whichitem=2040&quantity=2
You acquire  2 patchouli oil bombs
bigisland.php?action=getgear&pwd&whichcamp=1&whichitem=2042&quantity=2
You acquire  2 exploding hackensacks
bigisland.php?place=camp&whichcamp=2
bigisland.php?action=bossfight&pwd
Encounter: Man
There is actually no redirect, now that I think about it: the first one is the "talk to the boss" page which has the "Commence the Sense Knocking" or "Oh, It's Already Been Broughten." link at the bottom which is bigisland.php?action=bossfight.
 

Veracity

Developer
Staff member
OK, revision 15239 should recognize bigisland.php?action=bossfight and log it better and - more important - remember that this is an Island War encounter, so we'll recognize the end of the war, even if you went to a non-island location just before.

I'll test it tonight.
 

Theraze

Active member
Will it still break for BCA non-moxie users whose mafia believes that it is adventuring at the noob cave?
 

lostcalpolydude

Developer
Staff member
In this post, Theraze shows mafia logging an encounter in the Noob Cave, when there was no adventure in the Noob Cave. There was an explanation of why, which involves run_combat() somehow.

I expect that there's another bug to fix there so mafia doesn't think it's actually an adventure at the Noob Cave, but I also think that fixing it might make run_combat() no longer work how the script uses it.
 

Veracity

Developer
Staff member
I just tested this. Yet again, it turned out that my Elizabeth Spookyraven fight was exactly the turn I otherwise would have taken down The Big Wisniewski, so I had to go somewhere else for a turn between the last fight on the Battlefield and the boss fight. (Fortunate; I was prepared to waste a turn going some place random, just to test this, so it was nice to have a reason to do it.) When I came back to him and took him down, it did correctly note "War finished: hippies defeated".

I guess I need to try to understand what is happening with this script and run_combat() and the Noob cave.
Grr.
 

Theraze

Active member
The run_combat() and noob cave thing is that adventure can be overloaded to use a custom combat filter, while run_combat() cannot be. This means that to use a custom combat set without wiping the users' settings, BCA overloads adventure in the noob cave when it wants to customize combat. Overloading run_combat() has been requested several times before... I linked 3 separate requests in post 30 which appear to be for the same thing.
 
Top