Bug - Cannot Reproduce Quantum Terrarium - Wrong Next Familiar Displayed

Tokoeka

Member
Currently doing a 100% Familiar run in QT. As such, I have looped through the entire cycle of familiars at least twice by this point. In my current familiar cycle, I have noticed that the "Next Familiar" image that Mafia shows is seemingly incorrect a decent amount of the time, even after visiting the quantum terrarium manually. You can hover over the image, and it will tell you the correct name of the next familiar, but the image stays incorrect until the next familiar changes (at which point the image may be correct or incorrect for the new next familiar).

using r26280. First image attached showing the Feather Boa Constritcor as my Next Familiar on the terrarium page, whilst mafia image shows the "worm doctor" april fools fam. If you hover your mouse over the worm image, it does correctly state "Feather Boa Constrictor".
2nd Image attached showing terrarium page listing Scary Death Orb as my next fam, whilst mafia image shows the Hovering Skull.

Other familiars I can recall seeing display wrongly include "Pet Cheezling" (showed as a Grinning Turtle i think), and Jill-o-Lantern (showed as a Pet Cheezling)
 

Attachments

  • WoimvsBoa.png
    WoimvsBoa.png
    27.6 KB · Views: 5
  • SDOvaSkull.png
    SDOvaSkull.png
    26.5 KB · Views: 5
Last edited by a moderator:

Ryo_Sangnoir

Developer
Staff member
I think the right area of the code is "QuantumFamiliarLabel" under "CompactSidePane".

Code:
this.setText("<html><center>in " + turns + " turns</center></html>");
String nextFamiliarRace = Preferences.getString("nextQuantumFamiliar");
if (nextFamiliarRace == familiar) {
  return;
}
familiar = nextFamiliarRace;
this.setToolTipText(nextFamiliarRace);
ImageIcon icon = FamiliarDatabase.getFamiliarImage(nextFamiliarRace);
ImageIcon scaled =
    new ImageIcon(icon.getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));
this.setIcon(scaled);

so if the tooltip is right, but the image is wrong... either "get image by name" is narked, or there's something wrong with the cache I guess? Very odd.
 

Veracity

Developer
Staff member
I just finished my first QT run. I frequently saw a next familiar in the charpane and went to the green sidebar in the GUI to see what it was. It was always right; I never went to the Quantum Terrarium to check it out - although it’s pretty cool that it tells whose it is. I got somebody’s Hand Turkey today.

I’ll be starting a new QT run tomorrow morning and will see if I can reproduce this.
 

Veracity

Developer
Staff member
A Feather Boa Constrictor coming. No image issues.
Haven't seen any issues for any other coming familiars, either.

Screen Shot 2022-07-02 at 1.51.37 PM.png
 

Tokoeka

Member
Did you ever get past the first cycle of every familiar & into the next cycle? There's a part of me that wonders if the bug only occurs in cycles past the first, as I don't ever recall seeing it in my first cycle, but it may aso be an intermittent hard to find thing, or been solved since then. will keep and eye out next time I am doing a 100% april-fools fam run. Thanks for having a look though
 

Veracity

Developer
Staff member
Interesting that you mention a cycle of familiars. I did notice that there was no overlap between my first and second runs.

I completed my second QT run yesterday. I’m only going through about 60 familiars per, so it will take me a few more.

Looking at the code - as Ryo_Sangnoir did - I can’t see how it could fetch the wrong image. I’ll be doing some more runs (they are fast and easy) and will keep my eyes open for failures and will diagnose if I see one.
 

VladYvhuce

Member
Considering that the strategy is for a 100% familiar run in QT, that would require burning a lot of adventures at like bounty board, gym, etc. to force the familiars to cycle through the whole list and reset, so that you can select that familiar again before combat adventuring. And repeat the procedure many times. So, doing normal QT runs may not be what causes the bug. It could be something that happens if the cycle resets a few times in a run.
 

Veracity

Developer
Staff member
KoL does not tell us the image filename of the next familiar. It tells us the familiar ID of the next familiar.
We have "familiars.txt" which gives us the image filename of each familiar.
Given the familiar ID, we ask KoL for the appropriate image.

I would be shocked if KoL decided to send a bogus image just because you are at such and such a place in the Quantum Terrarium familiar cycle.

I am assuming this is a local issue. Perhaps something to do with the image cache, as Ryo_Sangnoir posited.
 

Tokoeka

Member
Yeah, i was spending an inordinate amoutn of turns beachcombing in order to (firstly) get out of ronin, and then burn through the full list until I could get to the next 11 turns with my chosen 100% familiar.

If it is to do with the image cache (or other local issue), would the suggested fix be to delete said image cache, and if so, are the familiar images stored in a specific folder?
 

Veracity

Developer
Staff member
(By the way, my thought that there might be a "cycle" across runs is false; I do not recall seeing any duplicates between run #1 and run #2, but on the first day of run #3, I saw Red Snapper (also in run #1) and Angry Jung Man and Stomping Boots (both also in run #2).

Your image cache is in your KoLmafia folder "images".

Code:
29    Feather Boa Constrictor    familiar29.gif    combat1,block,meat1    silk garter snake    velvet choker    2    3    1    1    animal,eyes,sleazy
168    Oily Woim    woim.gif    passive    woim    woimbook    2    1    3    1    animal,sleazy

images/itemimages/familiar29.gif is
familiar29.gif
images/itemimages/woim.gif is
woim.gif

I notice that the current familiar uses KoLCharacter.getFamiliarImage() to get the the file name and then downloads the image and makes an ImageIcon from that.
I notice that the next familiar uses FamiliarDatabase.getFamiliarImage(nextFamiliarRace) to get an ImageIcon.

I will study those to see what might differ.

Edit: Basically nothing differs; they both load the familiar image and make it into an ImageIcon in the same way.
 
Last edited:

Veracity

Developer
Staff member
I just completed my 6th Quantum Terrarium run. Considering that I now have 11 Quantum Points (the max), probably my last - unless/until KoL decides to implement quantum of familiar and I need more than 6. :)

I estimate that I saw 341 familiars. I made some improvements - animate the "next" familiar image, display the owner of both current and next, and reliably track the weight of the current familiar - but I didn't see a single example of the issue reported in this bug report. Every familiar image - current or next - was exactly correct for the type of familiar.

I'm going to mark this "Can't Reproduce". Sorry.
 
Top