Page 12 of 13 FirstFirst ... 2 10 11 12 13 LastLast
Results 111 to 120 of 122

Thread: Spring 2020 Challenge Path - Path of the Plumber

  1. #111
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    mafia does not seem identify waname (final boss in plumber) as a boss monster
    Originally Posted by taltamir View Post
    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:
    > ash to_monster( "Wa%playername/lowercase%" )
    
    Returned: Wa%playername/lowercase%
    name => Wa%playername/lowercase%
    id => 2174
    ...
    attributes => NOCOPY BOSS Atk: 300 Def: 300 HP: 1000 Init: 10000 P: dude
    
    > ash to_monster( "Waveracity" )
    
    Returned: Waveracity
    name => Wa%playername/lowercase%
    id => 2174
    ...
    attributes => NOCOPY BOSS Atk: 300 Def: 300 HP: 1000 Init: 10000 P: dude
    and

    Code:
    > ash to_monster( "%alucard%" )
    
    Returned: %alucard%
    name => %alucard%
    id => 2114
    ...
    attributes => NOCOPY BOSS Atk: 300 Def: 300 HP: 1000 Init: 10000 P: dude
    
    > ash to_monster( "yticareV" )
    
    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.

  2. #112
    Senior Member
    Join Date
    Oct 2017
    Posts
    523

    Default

    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:
    Originally Posted by Veracity View Post
    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?
    Originally Posted by fronobulax View Post
    it breaks inside CODE tags too, found the cause. I had javascript blocker on. my bad there.
    Last edited by taltamir; 05-12-2020 at 02:39 PM.

  3. #113
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    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%
    Originally Posted by taltamir View Post
    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.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  4. #114
    Senior Member
    Join Date
    Oct 2017
    Posts
    523

    Default

    @veracity thank you for all those clarifications.

  5. #115
    Senior Member
    Join Date
    Oct 2017
    Posts
    523

    Default

    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.

  6. #116
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    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.

  7. #117
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    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.

  8. #118
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    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.
    Originally Posted by fronobulax View Post
    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.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  9. #119
    Junior Member
    Join Date
    Apr 2020
    Posts
    3

    Default

    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.
    Originally Posted by Veracity View Post
    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.

  10. #120
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,167

    Default

    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.
    Originally Posted by kazgar View Post
    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.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •