Bug AutoCreate when combats don't end

PeKaJe

Member
McClusky file (complete) is not created when page 5 drops from a clingy accountant

"inv" shows none of the components, and also not the completed binder, until I "refresh inv". Presumably the auto-creation code fails because you're forced into a new combat by the clingy modifier.
 

Veracity

Developer
Staff member
clingy monsters are multi-fights. We reset everything - including our memory of items found in the preceding fight - when we start the new fight. (You can see that when you defeat the clingy monster and the "found in this fight" section of items does not include the items dropped by the first monster.)

Obviously, auto-create should not fire if you are in a multi-fight. That will fix the inventory issues you mention.

Fixing the "found in this fight" - and deferring auto-create until the multifight is over - would be nice, but far from easy.
 

PeKaJe

Member
Hmm, maybe if the auto-creation fires like the f'c'le item usage in KoLAdventure.prepareToAdventure, instead? Would prepareToAdventure even attempt to run on a multi-fight?
 

PeKaJe

Member
Hmm, maybe if the auto-creation fires like the f'c'le item usage in KoLAdventure.prepareToAdventure, instead? Would prepareToAdventure even attempt to run on a multi-fight?

So I happened to be at that part of the quest again today, and decided to do some experimenting/coding.
Clingy monsters don't trigger prepareToAdventure, so this should work, though I didn't test the exact circumstances originally encountered.
The attached patch moves the "McClusky file (complete)" creation, and testing shows that it properly creates the file when you go to adventure in the zone and have all the ingredients.
 

Attachments

  • mcclusky_file.patch
    1.7 KB · Views: 23

Theraze

Active member
Does moving it, rather than having it in both, mean that adventuring with the goal will waste a turn adventuring when it already has it, or will it abort since you already have the item after it creates it?
 

PeKaJe

Member
That's a good question. I might be able to do a bit of test code when I get back from work, to see what would happen.
But then the goal could just be having page 5 (and maybe the binder clip, though that does not appear to be tested for in the current code), and I believe you'd stop at the same spot.
Also, I'm not sure I would call it wasting and adventure, per se, given that you do need to continue adventuring there to find the scheduled non-combat for the boss fight.
Having the goal could of course be somewhat useful for doing some specific boss prep work, like switching familiars or something.

At any rate, having it in both places won't work as it is now, because the clingy multi-fight removes the items from mafia's inventory, even though they're still there.
So either it would need to detect creation failure and handle that properly, or it would need to detect being in a multi-fight and deferring item creation.
I just went with deferring always, since it would also handle future situations where you might for some reason or another not be able to create an item right after that fight.
 

Theraze

Active member
Yes, and no. If you're farming it from the apartment, then you don't necessarily need another adventure there when done. You might, if you haven't beaten the boss there yet, but it's not a guarantee.

It would be a nice feature for mafia to know that clingy fights mean that it shouldn't try to run AAS/BBS and process end-of-fight actions like crafting items which will not succeed. It would mean less aborts for me.
 

Darzil

Developer
Also if it knew clingy fights were not in the current location, and didn't count it as a turn spent in them
 

lostcalpolydude

Developer
Staff member
Also if it knew clingy fights were not in the current location, and didn't count it as a turn spent in them

As far as I know, they count as turns in that location. Lovebugs can give location-specific benefits for clingy fights. You do not get desert exploration, and I think you also don't get black forest progress. I don't know if there's anything to update in general for that.
 

Darzil

Developer
As far as I know, they count as turns in that location. Lovebugs can give location-specific benefits for clingy fights. You do not get desert exploration, and I think you also don't get black forest progress. I don't know if there's anything to update in general for that.
Are you sure? The only benefits I see are on monsters like the cyrpt ones, where it's a monster benefit rather than a location one.
 

PeKaJe

Member
As far as I know, they count as turns in that location. Lovebugs can give location-specific benefits for clingy fights. You do not get desert exploration, and I think you also don't get black forest progress. I don't know if there's anything to update in general for that.

I believe I got a black forest landmark in a clingy-initiated fight a couple days ago.
 

PeKaJe

Member
Yes, and no. If you're farming it from the apartment, then you don't necessarily need another adventure there when done. You might, if you haven't beaten the boss there yet, but it's not a guarantee.

Ah, that makes sense. Didn't occur to me, because I usually do things in a different order. Still, the attached patch would only create the complete folder if adventuring in the office building, so having the 5th page as a goal would be the way to go. It would also work no matter where you adventured for it.
 

heeheehee

Developer
Staff member
For what it's worth, filtered session log from May 18:
Code:
[239] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: Putting Off Is Off-Putting

[239] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: untouchable, pixellated Procrastination Giant

[240] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: Huzzah!

[240] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: clingy Renaissance Giant
Round 4: heeheehee wins the fight!

[241] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: stinky Renaissance Giant

[242] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: huge Renaissance Giant

[243] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: Home on the Free Range

[243] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: 1337 P0551b1117y G14n7

[244] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: There's No Ability Like Possibility

[244] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: solid gold Foodie Giant

[245] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: annoying Foodie Giant

[246] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: tie-dyed Foodie Giant

[247] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: restless Possibility Giant

[248] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: drunk Renaissance Giant

[249] The Castle in the Clouds in the Sky (Ground Floor)
Encounter: Top of the Castle, Ma
 

PeKaJe

Member
Well, the talisman isn't the biggest deal, unless you've got it as an adventuring goal, but missing the blackbird could make the woods take longer if you're not using a blackbird as actual familiar.
 

PeKaJe

Member
So it turns out that if you have a creatable item as a goal, mafia will apparently make it when it has the ingredients. So even with the patch I attached, a goal of "McClusky file (complete)" will make the file and *not* spend an extra adventure.
 

Darzil

Developer
In various paths and niche situations, a fight can be followed by a non-combat or by another combat. If an item drops in that combat that would trigger autoCreation, it needs to be postponed until it will work.

I think what should be necessary is to set up, somewhere (ResultProcessor?), an autoCrafting queue, which gets added to when ResultProcessor.autoCreate is triggered, and actioned when FightRequest.inMultiFight and FightRequest.choiceFollowsFight are checked and found false in FightRequest, and somewhere in ChoiceManager (maybe postChoice2, which ends with two PostChoiceActions, maybe we add a third).

I think that would cover the issues I'm aware of so far :
Random summer clingy monsters, when the first one drops an autoCreate item.
Source Agents, when the original monster drops an autoCreate item.
Ed, when the monster drops an autoCreate item, then defeats you.

Edit - I'm sure there is already a report of this, but I struggled to find it.
 
Top