New Content MONSTERID in fights.

lostcalpolydude

Developer
Staff member
You can find any tool-bearing gremlin, in its zone only, whether or not Yossarian has asked for it. I don't ever talk to Yossarian between getting the magnet and turning in the tools.

So I guess that means the tool should be pink if you don't have it yet and the quest is active to get tools.
 

Veracity

Developer
Staff member
Revision 20239 will pinkify the tool for any tool-bearing gremlin, identified by MONSTERID, unless you have the tool in inventory.

I guess we know the sidequest is active if you have a molybdenum magnet in inventory (you started) and sidequestJunkyardCompleted is "none" (you haven't finished); we don't track it like a usual Quest.

It also shouldn't be necessary to say "this gremlin doesn't have the tool" unless the quest is active.
 

Veracity

Developer
Staff member
Revision 20241 will not pinkify the tool unless the junkyard quest is active. It will also not tell you bad gremlins lack the tool unless the junkyard quest is active.
The quest is "active" if you have a molybdenum magnet - you have talked to Yossarian to start the quest, but have not turned in all the tools (and magnet) to finish it.
 

Veracity

Developer
Staff member
Revision 20246 tweaks twiddling a bit: when processing round data, after we reparse the MONSTERID (if you transformed a monster), if the response says "You twiddle your thumbs", do no further processing. In particular, the round does not advance. Also add twiddle() ASH combat function which will submit fight.php?action=twiddle which will force that.

I suppose that if we are automating, you transform a monster, and you are in OCRS, have dice gear, or have an Intergnat, we could force that as the next action to make sure the monster's modifiers are correct. Perhaps I will look at that tomorrow, after I can bring out my dice gear and Intergnat...
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Something about this change has broken run_combat() I think
 
Got stuck in a loop when running the following to automate witchess. Had to manually abort to stop. Attached session log excerpt. Reverted to prior build, ran fine.

Code:
while(get_property("_witchessFights").to_int() < 5) {visit_url("campground.php?action=witchess");run_choice(1);visit_url("choice.php?option=1&pwd="+my_hash()+"&whichchoice=1182&piece=1936",false);

The wrinkle here is the eldritch encounter following each fight.

Just prior to that automated bricko fights with no problem using:

Code:
while(get_property("_brickoFights").to_int() < 10) use( 1, $item[ BRICKO Elephant ] );

View attachment 20200714-excerpt.txt
 

Veracity

Developer
Staff member
So you use run_choice() to start a fight, which is automated, which leads to a "fight follows fight" situation, but the second fight is not automated.
Interesting.

Code:
This combat did not cost a turn

[163989] Your Witchess Set

[163989] null
Encounter: Eldritch Tentacle named Bbbbbbbblllrrggghblrg
Yup. It didn't detect the chained fight until it tried to go to Witchess again and was redirected to the fight.
That's a bug.

The bug was not caused by this change, but the change apparently disabled how the existing code accidentally recovered from the bug. :)

I'll look at it if I can get a DEBUG log. Perhaps I can eat an eldritch mushroom pizza tomorrow.
 

Veracity

Developer
Staff member
Actually, this is the call which automated the first fight but not the multifight:

Code:
visit_url("choice.php?option=1&pwd="+my_hash()+"&whichchoice=1182&piece=1936",false);
Perhaps you did not know that you could do this:

Code:
run_choice( 1, "piece=1936" )
I'll look at visit_url(). It submits a GenericRequest with the choice.php request, which redirects to fight.php, Near as I can tell, it follows the redirect but does not automate the fight.
 

Veracity

Developer
Staff member
Whoah. Looking at VMF, here is how I automate the Witchess fights:

Code:
	while ( fights-- > 0 ) {
	    monster fight = monsters[ index++ ];
	    between_battle_checks();
	    visit_url( "campground.php?action=witchess" );
	    run_choice( 1 );
	    visit_url( "choice.php?whichchoice=1182&option=1&piece=" + fight.id + "&pwd=" + my_hash(), false );
	    string filter = choose_combat_filter( NO_LOCATION );
	    run_combat( filter );

	    // If we detected paranormal activity after that fight, may as well bust the ghost now.
	    bust_ghost();
	}
Same thing your code does - except mine actually calls run_combat() after starting the fight, and yours does not. You are depending on the next iteration of your loop going to campground.php, which redirects to fight.php - with a twiddle - and automating the fight there.

I consider that to be a bug.

I'll see how my witchess fight function works tomorrow with eldritch free fights.
I bet run_combat() will do the correct thing.

Both you and I are submitting the choice via visit_url with a GET.
run_choice() doesn't do that, so, the simple method to submit extra fields may not work.
I'll experiment with that, too.
 

MCroft

Developer
Staff member
Also getting a loop with latest build.

I don't know if it's the same looping effect, but I'm also seeing a loop. I was using the Adventure tab of the main interface to automate the 3 items on the F'c'le and it went into a loop.
Log: View attachment Partial_DEBUG_LOG_20200715_MC.txt

Several Hundred of these gCLI entries before I declared World Peace. I wasn't scripting, just using the convenience buttons.

339] The F'c'le
Encounter: cleanly pirate

Request 1 of 2 (Island: The F'c'le) in progress...

[339] The F'c'le
Encounter: cleanly pirate

Request 1 of 2 (Island: The F'c'le) in progress...

[339] The F'c'le
Encounter: cleanly pirate

Request 1 of 2 (Island: The F'c'le) in progress...
 
Wups, that was a bad cut-paste on my part. Corrected:
Code:
while(get_property("_witchessFights").to_int() < 5) {visit_url("campground.php?action=witchess");run_choice(1);visit_url("choice.php?option=1&pwd="+my_hash()+"&whichchoice=1182&piece=1936",false);run_combat();}run_combat();
I've gotten too used to having IDE's watch for balancing brackets for me.

So that uses the run_combat() after visit_choice() too. I can't remember now why I put one more run_combat() outside the loop. I think it handles one last eldritch fight that way. I've done the same thing for other areas (machine tunnels, neverending party). Those run later in the script.
 

Veracity

Developer
Staff member
Yes. run_combat() does a single fight. If you are in a multi-fight, you have to run it again to handle the next fight.
You script depends on visiting campground.php redirecting to a fight and, somehow, finishing it for you.
As it happens, visiting campground.php twiddles.

After eating an eldritch mushroom pizza and using a PYEC to end up with a total of 6 turns of Eldritch Attunement, I tested like this:

Code:
if ( get_property( "_witchessFights" ).to_int() < 5 ) {
    print( "Visiting Witchess Set in campground" );
    visit_url( "campground.php?action=witchess" );
    print( "Examining shrink ray" );
    run_choice( 1 );
    print( "Fighting a Witchess Knight" );
    visit_url( "choice.php?option=1&pwd="+my_hash()+"&whichchoice=1182&piece=1936", false );
    run_combat();
    while ( in_multi_fight() ) {
	print( "In a multi-fight" );
	run_combat();
    }
}
and got this:

Code:
> Visiting Witchess Set in campground

[3746] Your Witchess Set
> Examining shrink ray
Took choice 1181/1: Examine the shrink ray
Encounter: Play against the Witchess Pieces
> Fighting a Witchess Knight
Took choice 1182/1: Play against the Witchess pieces
Encounter: Witchess Knight
Round 0: Veracity wins initiative!
Round 1: Veracity executes a macro!
Round 1: Veracity attacks!
Round 2: You lose 8 hit points
Round 2: Witchess Knight takes 9 damage.
Round 2: Veracity attacks!
Round 3: Witchess Knight takes 7 damage.
Round 3: Veracity wins the fight!
After Battle: Hidden Edelweiss tiptoes out of her hiding place and gives you some meat.
You gain 13 Meat.
You acquire an item: jumping horseradish
After Battle: You gain 30 Strengthliness
After Battle: You gain 26 Magicalness
After Battle: You gain 50 Cheek
This combat did not cost a turn
> In a multi-fight

[3746] Eldritch Attunement
Encounter: Eldritch Tentacle named Sssshhsssssssblrghblrg
Round 0: Veracity wins initiative!
Round 1: Veracity executes a macro!
Round 1: Veracity tries to steal an item!
You acquire an item: eldritch effluvium
You gain 26 Meat.
Round 2: Eldritch Tentacle takes 5 damage.
Round 2: You lose 6 hit points
Round 2: Veracity attacks!
Round 3: Eldritch Tentacle takes 6 damage.
Round 3: You lose 7 hit points
Round 3: Veracity attacks!
Round 4: Eldritch Tentacle takes 113 damage.
Round 4: Eldritch Tentacle takes 6 damage.
Round 4: Veracity wins the fight!
After Battle: You glance in the direction of an inspiring meteor as it arcs across the sky, just as you predicted.
After Battle: You gain 4 Beefiness
After Battle: Hidden Edelweiss gives you some meat under the table.
You gain 12 Meat.
You acquire an item: eldritch effluvium
After Battle: You gain 28 Fortitude
After Battle: You gain 21 Mysteriousness
After Battle: You gain 58 Smarm
This combat did not cost a turn
Fix your script; the previous version depended on a bug which the recent revision fixed.
 

Veracity

Developer
Staff member
I don't know if it's the same looping effect, but I'm also seeing a loop. I was using the Adventure tab of the main interface to automate the 3 items on the F'c'le and it went into a loop.
...Several Hundred of these gCLI entries before I declared World Peace. I wasn't scripting, just using the convenience buttons.
I looked at your log and see the adventure.php request redirecting to a twiddle.
I cannot reproduce that; I did multiple automations through the GUI today and it always worked.

Can you look in your session log, please, and find the combat just before the loop? Somehow it didn’t complete, or something. (I’d like the DEBUG log for that, but you certainly don’t have it. :))
 

Malibu Stacey

Active member
Perhaps you did not know that you could do this:

Code:
run_choice( 1, "piece=1936" )
I'll look at visit_url(). It submits a GenericRequest with the choice.php request, which redirects to fight.php, Near as I can tell, it follows the redirect but does not automate the fight.

Probably because it's not documented anywhere (see https://wiki.kolmafia.us/index.php?title=Run_choice which only lists the 1 parameter version while ashref run_choice lists 3 more variants).
If there was some method of find out what the arguments for functions such as this are, I would happily update the wiki.
 

MCroft

Developer
Staff member
I looked at your log and see the adventure.php request redirecting to a twiddle.
I cannot reproduce that; I did multiple automations through the GUI today and it always worked.

Can you look in your session log, please, and find the combat just before the loop?


Code:
[338] Barrrney's Barrr
Encounter: Arrr You Man Enough?
Took choice 187/1: 62.50% chance of winning
choice.php?pwd&whichchoice=187&option=1
Insult: The streets will run red with yer blood when I'm through with ye!
Retort: I'd've thought yellow would be more your color.
Insult: Suck on <i>this</i>, ye miserable, pestilent wretch!
Retort: That reminds me, tell your wife and sister I had a lovely time last night.
Insult: Do ye hear that, ye craven blackguard?  It be the sound of yer doom!
Retort: It can't be any worse than the smell of your breath!

[339] The F'c'le
Encounter: cleanly pirate
Round 0: Darwinlet wins initiative!
Round 1: Cubert slurps up some of your opponent's armor. He doesn't look nearly as impressive without pants. (Or pants-analogues.)
Round 1: cleanly pirate drops 15 attack power.
Round 1: cleanly pirate drops 15 defense.
Round 1: Darwinlet attacks!
Round 2: cleanly pirate takes 100 damage.
Encounter: cleanly pirate

[339] The F'c'le
Encounter: cleanly pirate
(repeat last 2 lines 600 times).

Somehow it didn’t complete, or something. (I’d like the DEBUG log for that, but you certainly don’t have it. :))

Yep, I didn't presciently turn on the debug log until after the problem happened...

Looking at the steps, it's entirely possible that I did something like finish the bar in the relay browser and then attempted to automate the f'c's'le without looking at the flavor text, but I can't be sure that was the sequence of events. In any case, it did seem to fight round 1 at least.
 
Top