soolar / sl_ascend

An ascension script for kolmafia
11 stars 5 forks source link

Broken Talisman use for Palindrome #271

Open Phate4569 opened 5 years ago

Phate4569 commented 5 years ago

Mafia updated the script this morning and it keeps derping in the palindrome (I walked away, I estimate it has spent 30 min headbutting the wall). As you can see it keeps equipping then unequipping the Talisman.

> Pre Adventure at Inside the Palindome done, beep.
> Turn(471): Starting with 81 left at Level: 11
> Encounter: -25.0   Exp Bonus: 4.666666666666667
> Meat Drop: 225.0   Item Drop: 246.749371855331
> HP: 760/888, MP: 321/341
> Tummy: 15/15 Liver: 14/14 Spleen: 6/15
> ML: 10 control: 10
> Delay between adventures... beep boop... 

equip weapon Fourth of May Cosplay Saber
> Not eating or drinking anything, since we don't know what's good...
> In the palindome : emodnilap eht nI

equip acc3 Talisman o' Namsilat
> Starting preadventure script...

equip weapon spiked femur

equip acc3 astral bracer
jaspercb commented 5 years ago

So you're running with https://github.com/soolar/sl_ascend/commit/e913a5f39bf3544b602f60b32dcffdbbe6cf8566 and it's still not working?

Phate4569 commented 5 years ago

No idea, mafia automatically svn checks out the newest version on startup, so whatever was recent at 8:37AM EST which is the timestamp on the new files.

If you can point me to a place where I can find a version number I can provide it.

Phate4569 commented 5 years ago

Still happening, had to add Talisman to the required Accessory variable to get the script to adv there.

soolar commented 5 years ago

I have yet to be able to figure out the cause for this, but a solution in the meantime is to set sl_maximize_baseline=default to enable to new maximizer based equipment system, where this doesn't occur. I'm still investigating though, with the maximizer based equipment system disabled on my end.

soolar commented 5 years ago

Well, I just got to the palindome with maximizer based equipment disabled and... no repro here. So now I'm even more confused...

Phate4569 commented 5 years ago

Were you in 2CRS? Might that cause issues in maximizer?

I was SC/Opossum w/ astral bracer.

If you want me to put in any debug lines I still have 1 more ascension under this combo.

soolar commented 5 years ago

It's not an issue with the maximizer, since it only happens when maximizer based equipment isn't enabled, as far as I can tell. But I can't repro it when I turn off maximizer based equipment for myself...

Phate4569 commented 5 years ago

I actually misread my ascension plan, I ascended into AT/Packrat with Astral Shirt. I can see if it does it again.

Would it be...acceptable in pre and post adventure to prepend and remove the Talisman (and any other "Required" gear like the aforementioned transfunctioner, G.E.M, Pirate Patch. etc.) to the accessory over ride list? This way it will also work around anyone who mucks that up, while bruteforcing the problem.

Phate4569 commented 5 years ago

Ok, TCRS/AT/Packrat with Astral Shirt, this problem does not happen. It seems confined to SC/Opossum with Astral Bracer, because it wants that Bracer.

5031 ghostly censurious healthy brawny astral bracer 0 Muscle Percent: +20, Maximum HP Percent: +20, Sleaze Resistance: +3

Phate4569 commented 5 years ago

Tried using slForceEquip on both transunctioner and Talisman. It didn't break anything, and it worked perfectly (though I don't know if this path would have had the problem anyways.....)

Phate4569 commented 5 years ago

Ok, I FOUND soumething. I don't know WHY it is doing what it is doing, but I know where.

equip acc3 Talisman o' Namsilat
> Starting preadventure script...
> DEBUG - I MADE IT HERE: 1
> DEBUG - I MADE IT HERE: 2
> DEBUG - I MADE IT HERE: 3
> DEBUG - I MADE IT HERE: 4
> DEBUG - I MADE IT HERE: 5
> DEBUG - I MADE IT HERE: 6
> DEBUG - I MADE IT HERE: 7
> DEBUG - I MADE IT HERE: 8
> DEBUG - I MADE IT HERE: 9
> DEBUG - I MADE IT HERE: 10
> DEBUG - I MADE IT HERE: 11
> DEBUG - I MADE IT HERE: 12
> DEBUG - I MADE IT HERE: 13
> DEBUG - I MADE IT HERE: 14
> DEBUG - I MADE IT HERE: 15
> DEBUG - I MADE IT HERE: 16
> DEBUG - I MADE IT HERE: 17
> DEBUG - I MADE IT HERE: 18
> DEBUG - I MADE IT HERE: 19
> DEBUG - I MADE IT HERE: 20
> DEBUG - I MADE IT HERE: 21
> DEBUG - I MADE IT HERE: 22
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3

equip acc3 Brutal brogues
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3
> Current Maximize String: -equip makeshift garbage shirt,-equip broken champagne bottle,-equip Snow Suit,-acc3
> DEBUG - I MADE IT HERE: 23

This means it is something in this section of presool.ash

        print("DEBUG - I MADE IT HERE: 22");

        foreach i,mon in get_monsters(place)
        {
                if(sl_wantToYellowRay(mon, place))
                {
                        adjustForYellowRayIfPossible(mon);
                }

                if(sl_wantToBanish(mon, place))
                {
                        adjustForBanishIfPossible(mon, place);
                }
        }
        print("DEBUG - I MADE IT HERE: 23");
Phate4569 commented 5 years ago

I moved this section right below the "Starting preadventure" line and it fixed the problem.

Phate4569 commented 5 years ago

Granted it unequips then reequips due to the location section of the script. :/

Phate4569 commented 5 years ago

I think it has something to do with the Banishers....

Phate4569 commented 5 years ago

Possibly using acc3 as a reserved slot for required equips, then force equipping acc1 and acc2 with other equips than may be wanted like banishers?

Phate4569 commented 5 years ago

Or maybe set a property "sl_reservedSlotActive=true" that won't use the acc3 slot when true?

Dunno spitballing.

soolar commented 5 years ago

That's odd and I'll experiment with it more this evening when I'm free. That section should never touch acc3, only acc1, so something's definitely odd there. I'm pretty sure the adjustFor____IfPossible functions only equip right to the default slot anyway, which is acc1 for accessories...

Actually wait, is this with maximizer based equipment disabled? Because now that I think about it the adjust functions should only be using slEquip, which should add to the maximizer statement, not happen afterwards...

Well regardless, something must be terribly wrong with the adjust functions for this to be happening.

Phate4569 commented 5 years ago

The weirdest part to me is the placement of that logic. I'd think the flow should be more like:

  1. General Equips (general addition of +/- item, combat, resist, item, etc.)
  2. Utility Equips (YRs, Banishers, pseudo-olfacts, etc.
  3. Required Equips (Talisman, transfunctioner, Fantasy/Pirate items, Cold at Misty Peak, etc.)

That way you are always ensured to have the item you need.