Bug - Fixed MacGuffin Quest: Using black forest map in relay doesn't switch back to old familiar

[1706] Black Forest
Encounter: A Man in Black
You acquire an item: black market map
Verifying ingredients for reassembled blackbird (1)...
Creating 1 meat paste...
You acquire an item: meat paste
You lose 10 Meat
Successfully created meat paste (1)
Creating reassembled blackbird (1)...
You acquire an item: reassembled blackbird
Successfully created reassembled blackbird (1)
Using 1 reassembled blackbird...
Finished using 1 reassembled blackbird.
Putting Tonald the Baby Gravy Fairy back into terrarium...
Taking Grort the Reassembled Blackbird out of terrarium...
Putting Grort the Reassembled Blackbird back into terrarium...
Requests complete.

Silly KoLmafia, you used to work perfectly at doing this when the blackbird disappeared. Now you don't. (Had to manually take Tonald, the Baby Gravy Fairy back out of the terrarium.)

EDIT: Forgot to mention that I'm using KoLmafia r10896, on OS X 10.7.3 with Java 6u31.
 
Last edited:

slyz

Developer
Do you have a gCLI output or a session log of when this happened?
Out of curiosity, what does "get preBlackbirdFamiliar" return when you type it in the gCLI?
 

fronobulax

Developer
Staff member
I've seen this happening for several weeks and have failed at 100% runs since various scripts were not detecting it. But since I was running scripts I wasn't sure it was a mafia issue. I'll get the map manually in a couple of days and see if I can help gather data (or test a fix)
 

Veracity

Developer
Staff member
Putting Tonald the Baby Gravy Fairy back into terrarium...
Taking Grort the Reassembled Blackbird out of terrarium...

Note that the above is printed by a single call to "familiar reassembled blackbird"; we don't actually make a request to unequip the old familiar and a different call to equip the new one.

Putting Grort the Reassembled Blackbird back into terrarium...

... is missing the second half - the "take the new familiar out" part.

Can I see your session log, please? Thanks.
 

Veracity

Developer
Staff member
So. You are a Level 11 Seal Clubber. You are in Softcore, out of Ronin. This is your first ascension since they changed the game to make the Blackbird NOT fly away when you use it; I see you making a Reassembled Blackbird and using it.

Code:
[1698] Black Forest
Encounter: black adder
Round 0: miniwrld loses initiative!
Round 1: miniwrld casts LUNGING THRUST-SMACK!
Round 2: black adder takes 238 damage.
Round 2: miniwrld wins the fight!
You gain 114 Meat
After Battle: Tonald does a little fairy dance.
You acquire an item: sunken eyes
You gain 17 Strengthliness
You gain 11 Mysteriousness
You gain 4 Sarcasm
...
[1700] Black Forest
Encounter: black panther
Round 0: miniwrld wins initiative!
Round 1: miniwrld casts LUNGING THRUST-SMACK!
Round 2: black panther takes 423 damage.
Round 2: miniwrld wins the fight!
You gain 132 Meat
After Battle: Tonald does a little fairy dance.
You acquire an item: broken wings
You gain 17 Muscleboundness
You gain 9 Enchantedness
...
[1706] Black Forest
Encounter: A Man in Black
You acquire an item: black market map

Create 1 meat paste
You acquire an item: meat paste
You lose 10 Meat

Combine 1 broken wings + 1 sunken eyes
You acquire an item: reassembled blackbird
Crafting used 1 each of broken wings and sunken eyes

use 1 reassembled blackbird

familiar Reassembled Blackbird (6 lbs)

use 1 black market map

familiar none

familiar Baby Gravy Fairy (26 lbs)
Used to be, when you changed the Reassembled Blackbird to be your familiar, we remembered the previous familiar and changed back to it later. I see no change in the code to do that. I will have to look a little closer and see if I can understand what happened to you.

Considering that I am doing Boris for the rest of the challenge path, I will be unable to observe this myself for more than a month.
 

Veracity

Developer
Staff member
I'll get the map manually in a couple of days and see if I can help gather data (or test a fix)
I see no change in the code that saves & restores your familiar - other than short-circuiting it in Axecore, which did not happen in this case, as we can see by the session log. I hope you can figure this out. Good luck!
 

AlbinoRhino

Active member
I have been having the same issue. Today, when I got the black market map adventure, I started a debug log. I clicked the "map" link in the relay browser. I waited for the "requests complete" message and then stopped the debug log.

Not sure if this is helpful in any way, but thought I would try it. If not, then please ignore this post.

EDIT: Also "get preBlackbirdFamiliar" in the cli returns nothing.
 

Attachments

  • DEBUG_20120411.zip
    463 KB · Views: 49
Last edited:

Veracity

Developer
Staff member
Fascinating.

Code:
Putting Ned (it-atk-r-s) the Pair of Stomping Boots back into terrarium...
Taking John Lennon the Reassembled Blackbird out of terrarium...
Requesting: http://www.kingdomofloathing.com/familiar.php?action=newfam&newfam=59&ajax=1
Requesting: http://www.kingdomofloathing.com/inv_use.php?which=3&whichitem=2054&pwd&ajax=1
Processing results...
Processing result: black market map (-1)
Putting John Lennon the Reassembled Blackbird back into terrarium...
Requesting: http://www.kingdomofloathing.com/familiar.php?action=putback&ajax=1

It really did put back your familiar - as if it executed a "familiar none" in the CLI. (Having swapped familiars, KoLmafia resets the "preBlackbirdFamiliar" setting. That's only active between the time you switch to a blackbird and the time you use the map.)
 

fronobulax

Developer
Staff member
I managed to use the map with breakpoints set. The preBlackbird preference is definitely being set and it is definitely not set when the test to restore it is made. I am clueless unless there is something happening with the set/get preference code which is not obvious. I guess I'll set different breakpoints for next week which is about what my (suboptimal) runs are taking...
 

fronobulax

Developer
Staff member
The preference being saved is familiar.getRace() which is none. familiar is set from KolCharacter.getFamiliar() and it appears that by the time that is called the old familiar has already been unequipped. Not sure what I am going to do about that but at least the cause can be related to changes in request processing and sequencing.
 

Veracity

Developer
Staff member
Well, something has changed. This is the first time I've had a familiar in the Black Forest since Boris, and it failed. Unfortunately, I forgot that this report existed until after I saw it fail to equip my old familiar.

Hmm. Ever since the blackbird started staying in your terrarium. we don't make a blackbird if you already have one. I just noticed I have the broken wings & sunken eyes in my inventory. I wonder if we recognize that you can use the map right away if you already have the familiar?
 
Last edited:

fronobulax

Developer
Staff member
I wonder if we recognize that you can use the map right away if you already have the familiar?

Dunno, but if I get an answer and it is not yes - we do recognize, then I will consider fixing.

I think I am going to move setting of the pre-blackbird familiar to the point where we are trying to use the map and submit the request to equip the blackbird. I think that will work but I am a day or two away from being able to test so have not done anything yet.
 

fronobulax

Developer
Staff member
r10998

I think it is fixed or at least worked once for me. I moved the setting of the preBlackbirdFamiliar to the a spot where we know we are trying to use the map but have not issued the request to use the blackbird. (The previous test occurred after the old familiar had been unequipped. This change in timing was a side effect of some request refactoring, I believe).

If I am reading the code right, in answer to the question above, mafia will detect that there is a blackbird equivalent in the terrarium and use it.
 
Top