Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 30

Thread: September IotM - bagged Cargo Cultist Shorts

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

    Default

    Interesting problem.

    The spreadsheet is helpful, although not everybody is entering useful information. Quite a few items just have the item name, but no link. Hopefully, that would be a desc_item link, but there are a few cases where people gave a link to a screen shot.

    Monster - leads to a fight (like some Deck or Numberology choices do)
    (Monster) - pocket drops an item which, when used, leads to a fight. The desk bells, in particular
    Item - lots of candy, chess pieces, Yeg Motel stuff, desk bells
    Effect 2 - An effect
    Effect 2 - (optional) An effect
    Meat
    Message - puzzle, or a joke - which also gives you Joke-Mad effect
    Stas - 1, 2, or 3 stats, not necessarily balanced

    Personally, I am focusing on getting the desk bells, first, so I can monster ids and my first factoids.

    Chess pieces say "You don't have a full chess set and you know no games which require less than 32 chess pieces", according to Wiki.
    That might imply you need 1 king and 1 queen, 2 rooks and bishops and knights, and 8 pawns of both colors before you cann use the set.
    And there is a cryptographic puzzle of some sort.

    Pretty interesting! There is ascension relevance, so we will want a "cargo" command (or something), like "cheat" or "numberology" or "teatree".

    inventory.php?action=pocket
    Location: choice.php?forceoption=0
    choice.php?forceoption=0
    What has it got in its pocketses?
    There appear to be 666 pockets on these shorts. Which one do you want to open today? (You've already opened 2 of them.)
    (Choice form lists only available pockets)
    Take something from a pocket: XXX = 1-666
    choice.php?whichchoice=1420&option=1&pocket=XXX
    => That's not a pocket. (If you give a non-number) (leaves you in choice)
    => (same message if you type in an invalid number?)
    => (same message if you type in an already used number?)
    => It seems like the power of the pockets has been exhausted for the day. (leaves you in a choice)
    => (response text) (no longer in choice)
    (Nevermind)
    choice.php?whichchoice=1420&option=2
    (You can walk away from it)

    I'll code up CargoShortsRequest to handle the plumbing - logging, property to track already used pockets this ascension, whatever.

    The database - text file, read into set of objects - as proposed by lost - should probably go into CargoShortsManager, and the command in CargoCommand.
    I'd happily leave the data stuff to lost.

    Items the spreadhsheet mentions with no descid:

    84 Yeg's Motel shower cap
    132 Yeg's Motel slippers
    587 frost-rimed desk bell

    Item number gaps:

    10612, 10614 - Yeg Motel items
    10618 - desk bell items
    10622 - unknown

    We have a hot, cold, sleaze, stench, and spooky desk bell. Seems like that could be the complete set.

  2. #12

    Default

    20341 adds cultshorts.txt. Most of the data isn't in there yet, because I'm adding things manually, partly so I can sanity check along the way. Capitalization in the spreadsheet often does not match KoL for item and monster names. I just discovered that a single pocket can have more than 1 item, so that's another thing to handle.

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

    Default

    Chess pieces say "You don't have a full chess set and you know no games which require less than 32 chess pieces", according to Wiki.
    That might imply you need 1 king and 1 queen, 2 rooks and bishops and knights, and 8 pawns of both colors before you cann use the set.
    ...
    10622 - unknown
    Originally Posted by Veracity View Post
    That item number immediately precedes the 6 onyx and 6 alabaster chess pieces, which are followed immediately by the bagged and unbagged shorts.

    Conjecture: once you collect the 32 chess pieces:

    1 (onyx, alabaster) king
    1 (onyx, alabaster) queen
    2 (onyx, alabaster) rook
    2 (onyx, alabaster) knight
    2 (onyx, alabaster) bishop
    8 (onyx, alabaster) pawn

    "using" a chess piece will give you a chess set as item 10622.
    Probably consuming the chest pieces, much as 52 lewd playing cards gives you a deck of lewd playing cards.

    It will take 8 ascensions to accomplish that.

    I'm lingering in aftercore a bit to finish getting my PVP Seasoning reward. I'll get that tommorrow, but no reason not to get a bit more Swagger while collecting 5 desk bells and 2 pawns.
    And then into a 7-ascension sequence to collect the rest of the chest set (and more desk bells, to finish my factoids).

    I'm on it.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  4. #14
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,497

    Default

    Revision 20349 is initial support for CargoCultistShortRequest. Sort of hard to test, since I can only make one request a day.

    - When you visit your shorts, it parses the page and detects which pockets are NOT there. It sets "cargoPocketsEmptied" to a string like this: "517,533,587,590".
    - When you take a choice to empty a pocket, it sets "_cargoPocketEmptied" to true. It probably does not do that if it redirects to a fight. I'll try to remember how to do that.
    - It should log in the gCLI and session log when you visit your shorts and select a pocket.

    With any luck, tomorrow I will see:

    [1361] Cargo Cultist Shorts
    picking pocket 653
    You acquire an item: nasty desk bell

    And it's a real Request class with two constructors:

    Code:
    	public CargoCultistShortsRequest()
    	{
    		super( "choice.php" );
    		this.addFormField( "whichchoice", "1420" );
    		this.addFormField( "option", "2" );
    		this.pocket = 0;
    	}
    
    	public CargoCultistShortsRequest( int pocket )
    	{
    		super( "choice.php" );
    		this.addFormField( "whichchoice", "1420" );
    		this.addFormField( "option", "1" );
    		this.addFormField( "pocket", String.valueOf( pocket ) );
    		this.pocket = pocket;
    	}
    In both cases, when you run() it, it will first go to "inventory.php?action=pocket" to fire off the choice adventure.

    This is the mechanism that will be needed for a "cargo" command. That command - and this request - will benefit from a good database of pockets. For example, which pockets redirect to monsters? Which of those monsters are free fights? And so on.

    I'll be tweaking this, one pocket at a time, day by day...

  5. #15
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,497

    Default

    Revision 20350 adds a trivial "cargo" command

    Code:
    > cargo
    
    [1361] Cargo Cultist Shorts
    You have picked the following pockets during this ascension:
    517
    533
    587
    590
    
    > get cargoPocketsEmptied
    
    517,533,587,590
    
    > get _cargoPocketEmptied
    
    true
    
    > cargo 653
    
    You've already looted a pocket from your Cargo Cultist Shorts today
    
    > set _cargoPocketEmptied=false
    
    _cargoPocketEmptied => false
    
    > cargo 590
    
    [1361] Cargo Cultist Shorts
    You've already emptied that pocket this ascension.
    
    [color]> cargo 653
    
    [1361] Cargo Cultist Shorts
    picking pocket 653
    
    > get _cargoPocketEmptied
    
    true
    It's really simple minded, but I can already see a few improvements:

    - The command (or request) could look at the list of emptied pockets and decide that you've already picked a pocket, before trying to visit and detecting it then.
    (although we do want to handle the property not being up to date, in case you pick a pocket outside of KoLmafia.)
    - If we try to pick a pocket and you already picked today, error message in red.

    I expect we'll eventually soup up this command to be able to request effects, items, monsters, ...

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

    Default

    Worked like a charm.

    Code:
    > cargo 653
    
    [1361] Cargo Cultist Shorts
    picking pocket 653
    You acquire an item: nasty desk bell
    I think the "plumbing" is wired up. There are sure to be tweaks needed to handle preferences when you pick a pocket that redirects to a fight. Does it require you to have a tuen available in order to use - because some fights caost trns? Or are all fights free? Or does it require you to have a turn available even though some fights are free? And is the logging Just As It Should Be?

    And there is always the design question of how much checking and error messages goes into the request's run() method, and how much is expected to be checked before calling. If the only caller is the "cargo" command, whatever, but if we added an ASH function which called the request, not through the command, then it's trickier.

    I am still hoping to find the descid for the Yeg's Hotel slippers. I will enter them into our database. At that point, we will have all the items and all the effects, and the spreadsheet has all the monsters, and, it will be up to lost's fine start of making a data file with all 666 pockets. Given that, we can improve the command, add commands to get effects in statuseffects.com, teach the maximizer to propose effects, now that we have sources for those effects, and so on.

    Speaking for myself, I'd think long and hard about accepting a maximizer suggestion for a once-per-ascension effect, but it's be nice to have it presented to me.

    In any case, I'm leaving the data file, the command, and the maximizer to lost. It should be a fun little software engineering design problem, And data entry.

    For me, I have what I need: get the bells (and factoids) and chess pieces. Linger a while in this aftercore, as long as I'm doing OK in PVP, picking up chess pieces. And then, dive in for X more ascensions to get the rest of the chess pieces and the fancy chess set. Maybe I will eventually buy some, if they are cheap, and stop ascending. But I think I am now a user, rather than a coder, for this IOTM.

  7. #17
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,497

    Default

    Minor improvements:

    When you log in, load cargoPocketsEmptied property into a set
    "cargo" prints the picked pockets from that set.
    "cargo inspect" looks at the shorts and refreshes the property and prints the picked pockets.
    When you pick a pocket, either via "cargo XXX" or in relay browser or a script, if successfully pick a pocket, updates set and property.

    Does not update thae set/property if picking a pocket redirects to a fight.
    I'll have to figure out/remember how to handle that situation.

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

    Default

    Revision 20355 should handle redirecting to a fight. This uses the same mechanism we use to log Genie and Science Tent fights, which are redirections from a choice.
    Untested.

  9. #19
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,497

    Default

    And revision 20356 should save the pocket in the set of picked pockets.

  10. #20
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,768

    Default

    Minor improvements:

    When you log in, load cargoPocketsEmptied property into a set
    Originally Posted by Veracity View Post
    If the Cargo pants are in the DC (or closet or Hagnks) does that still happen? If not, does it matter - i.e. it will happen when they are used?
    Well, thank you.
    Originally Posted by Veracity View Post

Posting Permissions

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