New Content - Implemented Spring 2020 Challenge Path - Path of the Plumber

taltamir

Member
No, we can simply equip the fancy boots in the same slot as the work boots.
Do you mean to say that people should manually make sure to use the command with the right slot?
Or do you mean that you are going to make a mafia update thingie that overrules the acc number provided by the player and switches it to match the currently equipped work boots?
btw, it needs to also work in reverse when switching from fancy boots to work boots
 

Veracity

Developer
Staff member
The reason this never occurred to me was that every time I have ever bought fancy boots, I immediately equipped them in place of work boots and never looked back.
I think I will not bother with this. Put on your fancy boots when you buy them and the maximizer will forever more favor them.
 

Veracity

Developer
Staff member
I actually did that in revision 19985; I changed EquipmentRequest.chooseEqupmentSlot to pick the same slot as your other boots, when you have both work boots and fancy boots and want to equip the other. If you say "equip fancy boot", it calls that method. If you say "equip acc2 fancy boots", we do not enforce that. Don't do that.

Revision 19984 puts the two boots into a Mutex group for the maximizer. That means if you maximize for "plumber" and it decides to suggest fancy boots, it will put them into the same slot as your work boots are, if you are wearing them.
 

taltamir

Member
I actually did that in revision 19985; I changed EquipmentRequest.chooseEqupmentSlot to pick the same slot as your other boots, when you have both work boots and fancy boots and want to equip the other. If you say "equip fancy boot", it calls that method. If you say "equip acc2 fancy boots", we do not enforce that. Don't do that.

Revision 19984 puts the two boots into a Mutex group for the maximizer. That means if you maximize for "plumber" and it decides to suggest fancy boots, it will put them into the same slot as your work boots are, if you are wearing them.
thank you
 

Veracity

Developer
Staff member
Revision 19995 updates the red coin,, adds the red plumber's boots, and adds the Plumber Jump conditional combat skill
 

Malibu Stacey

Active member
Apparently questL04Bat isn't being set to step4 when Plumber defeats the Boss Bat replacement. refresh quests is also not helping as apparently the only way to force it to update is to visit the bat hole.

Just passing on the information, I haven't run Plumber myself so I haven't seen it happen personally hence no page HTML etc.
 

Magus_Prime

Well-known member
Hopefully this has the needed information. I enabled debug, fought through everything in the Boss Bat Chamber as a plumber, went to the council and the quest log, then disabled debug.

The file is too large to upload to the forum so I put it on PasteBin
 

Veracity

Developer
Staff member
Normally, we recognize quest completion for bat hole, knob goblin, cyrpt, and trapper quests by your getting an item.
Some paths - Heavy Rains, for example - give you a different item, which we recognize.
Dark Gyffte and Path of the Plumber do not give you items.

Revision 20017 recognizes the appropriate bosses for all four in Path of the Plumber - and for the cyrpt and trapper in Dark Gyffte (It was already recognizing bat and goblin bosses).

If "refresh quests" is not working for the boss bat, perhaps we don't have the correct quest log text in Path of the Plumber, for some reason. I wouldn't have expected that, since I thought only the council text was different.
 

Veracity

Developer
Staff member
mafia does not seem identify waname (final boss in plumber) as a boss monster
I don't know what you mean by "does not seem [to] identify". It doesn't annotate it correctly in the Relay Browser? A consult script doesn't have the right data? What?

That said, although we DO define aliases for Wa%playername/lowercase% (and %alucard%), apparently we didn't make said alias accessible to ASH.
(Aliases worked fine until I added support for duplicate monster names, so this is a new bug.)

With revision 20078 you get:

Code:
[color=green]> ash to_monster( "Wa%playername/lowercase%" )[/color]

Returned: Wa%playername/lowercase%
name => Wa%playername/lowercase%
id => 2174
...
attributes => NOCOPY BOSS Atk: 300 Def: 300 HP: 1000 Init: 10000 P: dude

[color=green]> ash to_monster( "Waveracity" )[/color]

Returned: Waveracity
name => Wa%playername/lowercase%
id => 2174
...
attributes => NOCOPY BOSS Atk: 300 Def: 300 HP: 1000 Init: 10000 P: dude
and

Code:
[color=green]> ash to_monster( "%alucard%" )[/color]

Returned: %alucard%
name => %alucard%
id => 2114
...
attributes => NOCOPY BOSS Atk: 300 Def: 300 HP: 1000 Init: 10000 P: dude

[color=green]> ash to_monster( "yticareV" )[/color]

Returned: yticareV
name => %alucard%
id => 2114
...
attributes => NOCOPY BOSS Atk: 300 Def: 300 HP: 1000 Init: 10000 P: dude
If you mean something else, you'll have to be specific about what isn't working for you.
 

taltamir

Member
I don't know what you mean by "does not seem [to] identify". It doesn't annotate it correctly in the Relay Browser? A consult script doesn't have the right data? What?

That said, although we DO define aliases for Wa%playername/lowercase% (and %alucard%), apparently we didn't make said alias accessible to ASH.
(Aliases worked fine until I added support for duplicate monster names, so this is a new bug.)

With revision 20078 you get:
Thank you, this fixed the issue.
The issue is that run_combat is sending a string with the monster name, it does not send Wa%playername/lowercase% nor %alucard%
instead it sends Wataltamir and rimatlat (or Waveracity, etc)
This made it impossible for combat handling scripts to actually recognize those boss monsters, instead thinking you are fighting $monster[none]


test function:
Code:
void test(monster mon)
{
    string result = "The monster named " + mon + " is being tested for boss status... result = ";
    print(result + mon.boss);
}


string test_combat(int round, string opp, string text)
{
    print("you are facing the monster called = " + opp);
    print("checking mafia recognition... function to_monster(opp)");
    test(to_monster( opp ));
    abort();
    return "needed after abort or it will not run";
}


string page = visit_url("fight.php");
if(contains_text(page, "Combat")) run_combat("test_combat");

fails in r20077
Code:
you are facing the monster called = Wataltamir
checking mafia recognition... function to_monster(opp)
The monster named none is being tested for boss status... result = false

works in r20086
Code:
you are facing the monster called = Wataltamir
checking mafia recognition... function to_monster(opp)
The monster named Wataltamir is being tested for boss status... result = true

======

What are you trying to do? Does pasting inside CODE tags make a difference?
it breaks inside CODE tags too, found the cause. I had javascript blocker on. my bad there.
 
Last edited:

Veracity

Developer
Staff member
Thank you, this fixed the issue.
The issue is that run_combat is sending a string with the monster name, it does not send Wa%playername/lowercase% nor %alucard%
When you say "run_combat", I assume you mean "the filter function I gave to run_combat to be called for each round of combat".

If you are saying that that function is called with a monster name as a sting, that is incorrect. The filter function, like a consult script, is given a monster object, not a string.

Here is how a consut script is called:

Code:
				Object[] parameters = new Object[3];
				parameters[0] = new Integer( FightRequest.currentRound );
				parameters[1] = MonsterStatusTracker.getLastMonster();
				parameters[2] = FightRequest.lastResponseText;
...
				consultInterpreter.execute( "main", parameters );
Here is how a filter function is called:

Code:
			Object[] parameters = new Object[ 3 ];
			parameters[ 0 ] = new Integer( FightRequest.getRoundIndex() );
			parameters[ 1 ] = monster;
			parameters[ 2 ] = FightRequest.lastResponseText;
...
			Value returnValue = Macrofier.macroInterpreter.execute( macroOverride, parameters, false );
Your test function:
Code:
string test_combat(int round, string opp, string text)
{
    print("you are facing the monster called = " + opp);
    print("checking mafia recognition... function to_monster(opp)");
    test(to_monster( opp ));
    abort();
    return "needed after abort or it will not run";
}
Is incorrect.

The parameter "opp" should be a monster.
When you specify that it is a string, KoLmafia coerces the monster to a string - the monster name - and gives it to your function.
Your function then turns it back in to a monster via to_monster().

Aside from being inefficient - why look up a monster by name when you already have a monster? - it is buggy. The monster object you are given is the specific monster you are actually fighting. So, for example, in OCRS, the monster your function is given has the specific random modifiers that your specific opponent has, in the opp.random_modifiers proxy record field. When you use to_monster on a monster name, you get a generic monster with no random modifiers.

Code:
string test_combat(int round, monster opp, string text)
{
    print("you are facing the monster called = " + opp);
    print("checking mafia recognition...");
    test(opp);
    abort();
    return "needed after abort or it will not run";
}
will work.
 

taltamir

Member
BTW, plumber shows booze in item manager as if you can consume it. it will craft, ask you to confirm over drinking, then think it drank it (deducting the booze from tracked inventory) when in fact it was not drank because plumbers can't drink at all.
 

Veracity

Developer
Staff member
Revision 20087 should suppress showing booze in the Item Manager booze consumption panel.
It should still show up in the creatable panels, should you with to create some, for some reason.
 

fronobulax

Developer
Staff member
This post seemed to suggest plumbers could overdrink. I expect that they can't but that may explain why this was the way it was.
 

Veracity

Developer
Staff member
This post seemed to suggest plumbers could overdrink. I expect that they can't but that may explain why this was the way it was.
Since I did the bulk of the Plumber support, I assure you, that post did not influence me. I knew it was incorrect.
I didn't hide booze because I knew that Plumbers could not drink, so why would I even go to that panel while I was a Plumber?
In other words, the response could have been "don't do that".
There is precedent, though: you can't eat in Bondcore and we suppress showing you foods.
So I did the equivalent for Path of the Plumber.
 

kazgar

New member
Revision 20087 should suppress showing booze in the Item Manager booze consumption panel.
It should still show up in the creatable panels, should you with to create some, for some reason.

Damned if you do, damned if you don't. I used the panel to sort booze by size to feed into the diabolic pizza oven for moxie stats. (Since the booze filter on equipment doesn't show those things)

Probably makes sense from a normal level of play though.
 

Veracity

Developer
Staff member
Damned if you do, damned if you don't. I used the panel to sort booze by size to feed into the diabolic pizza oven for moxie stats. (Since the booze filter on equipment doesn't show those things)

Probably makes sense from a normal level of play though.
I think you mean the "General" panel, since Booze is not equipment.
We have some fancy UI features you are probably not aware of.

Go to General
Unclick everything except booze.
On the line of column headers which has Item name/autosell/quantity, click on the little box above the scroll bar on the right.
Check "Fill".
You now have size for all booze displayed in its own column.
Click on the column header labeled "fill" and it will sort on that column. Low to high.
Click on the triangle in that column header and it will sort high to low.
 
Top