New Content - Implemented September IotM - bagged Cargo Cultist Shorts

Veracity

Developer
Staff member
Revision 20436 should fix that; I had to add the CargoCUltistShortsRequest to the set of other classes (like GenieRequest) that will automate when a choice redirects to a fight.
 

Veracity

Developer
Staff member
Good. I mean, I wish it had dropped the kneecapping stick, but since I have 275 of those in storage, shrug.
Good because it automated the fight, as expected.

Code:
[color=green]> ash pick_pocket( $monster[ Mob Penguin Thug ] )[/color]

Inspecting Cargo Cultist Shorts
picking pocket 428

[9221] Cargo Cultist Shorts
Encounter: Mob Penguin Thug
Round 0: Veracity wins initiative!
Round 1: Veracity executes a macro!
Round 1: Veracity tries to steal an item!
Round 2: Veracity attacks!
Round 3: Mob Penguin Thug takes 2000 damage.
Round 3: Veracity wins the fight!
After Battle: You look to the sky just in time to catch a glimpse of a falling star. Lucky! Well, not really lucky, because you totally knew it was going to be there.
After Battle: The little orphan girl frisks your fallen opponent for candy, and weirdly enough she finds some. Her dance of joy brings a smile to your face.
After Battle: You gain 36 hit points
After Battle: You gain 25 Mojo Points
You gain 201 Meat
You acquire an item: penguin skin
After Battle: You gain 13 Muscleboundness
After Battle: You gain 8 Mysteriousness
After Battle: You gain 28 Chutzpah
This combat did not cost a turn
Returned: true
 

Veracity

Developer
Staff member
I'm going to do some spading on the Stats pockets, since I don't believe all the numbers on the WIki.

These are believable:

Code:
The following group adds up to 300 total substats.
---
1	Stats	100	100	100
---

The following groups add up to 250 total substats.
---
161	Stats	250	0	0
37	Stats	0	250	0
277	Stats	0	0	250
---
52	Stats	200	50	0
183	Stats	0	200	50
606	Stats	50	0	200
---
468	Stats	150	50	50
133	Stats	50	150	50
378	Stats	50	50	150
---
515	Stats	140	40	70
291	Stats	140	70	40
283	Stats	40	140	70
103	Stats	70	140	40
205	Stats	40	70	140
421	Stats	70	40	140
---
These are curious. Why would they not be 250, like the above?

Code:
The following groups add up to 260 total substats.
---
545	Stats	200	30	30
210	Stats	30	200	30
182	Stats	30	30	200
---
194	Stats	0	130	130
358	Stats	130	130	0
454	Stats	130	0	130
---
The following almost certainly contain some errors:

Code:
What's up with the following?
---
40	Stats	200	30	25
176	Stats	30	200	25
89	Stats	25	25	200
---
225	Stats	120	90	80
69	Stats	120	80	90
459	Stats	80	120	80
585	Stats	90	120	90
12	Stats	80	80	120
500	Stats	90	80	120
"modtrace experience" tells me would (potentially) modifies my expected stats. I'll check out the suspicious pockets, one per day, and see what I find.
 

Veracity

Developer
Staff member
Code:
> cargo 40

Pockets loaded: 666
Pockets categorized: 666
Inspecting Cargo Cultist Shorts
picking pocket 40
You gain 200 Muscleboundness
You gain 25 Enchantedness
You gain 40 Sarcasm
Requests complete.
I am +60% Moxie Experience. That would make this pocket 200/25/25.

I bet that pocket #176 is 25/200/25, rather than 30/200/25, although I will still check it.
I still find it odd that 3 pockets have 200 and 30 and 30. I'll check those later.
 

Magus_Prime

Well-known member
With r20445 I am no longer able to choose a pocket from the shorts. As a test I logged into KoL without KoLmafia and was able to choose a pocket.

Here's what appears in the gCLI:

Code:
Using 1 Cargo Cultist Shorts.

Inspecting Cargo Cultist Shorts
Internal checkpoint created.

Recommended Combat Rate: +0 (now: -5)
Recommended Initiative: +0 (now: 75)
Recommended Item Drop: +0 (now: 200)
Recommended Monster Level: +0 (now: 10)

Visit to Town: The Skeleton Store in progress...

[1232] The Skeleton Store
Encounter:
Nothing more to do here.

Unable to invoke relay/choice.1420.ash
picking pocket 533
Internal checkpoint created.

Recommended Combat Rate: +0 (now: -5)
Recommended Initiative: +0 (now: 75)
Recommended Item Drop: +0 (now: 200)
Recommended Monster Level: +0 (now: 10)

Visit to Town: The Skeleton Store in progress...

[1232] The Skeleton Store
Encounter:
Nothing more to do here.

Here's a debug log: View attachment DEBUG_20201008.txt

I wasn't in a choice adventure or anything and choosing a pocket was the first action I took after logging in.
 
Last edited:

Veracity

Developer
Staff member
You sure have a bunch of relay scripts installed.

Code:
GET /inventory.php?action=pocket HTTP/1.1
Starting relay script: inventory.ash

Inspecting Cargo Cultist Shorts
Connecting to inventory.php...

Requesting: https://www.kingdomofloathing.com/inventory.php?action=pocket
Retrieved: https://www.kingdomofloathing.com/inventory.php?action=pocket
Field: Location = [choice.php?forceoption=0]

Starting relay script: choice.ash
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to choice.php...

Requesting: https://www.kingdomofloathing.com/choice.php?forceoption=0
Retrieved: https://www.kingdomofloathing.com/choice.php?forceoption=0
ResponseText has 255971 characters.

Starting spading script: excavator.ash
Finished spading script: excavator.ash

Starting ASH script: BestBetweenBattle.ash
Internal checkpoint created.
Starting ASH script: MercenaryMood.ash
Finished ASH script: MercenaryMood.ash
Starting recovery script: Universal_recovery.ash
Finished recovery script: Universal_recovery.ash
Starting recovery script: Universal_recovery.ash
Finished recovery script: Universal_recovery.ash

Visit to Town: The Skeleton Store in progress...
Requesting: https://www.kingdomofloathing.com/adventure.php?snarfblat=439
Retrieved: https://www.kingdomofloathing.com/adventure.php?snarfblat=439
That isn't a place you know about.

[1232] The Skeleton Store
Encounter:
Nothing more to do here.

Starting recovery script: Universal_recovery.ash
Finished recovery script: Universal_recovery.ash
Finished ASH script: BestBetweenBattle.ash
Unable to invoke relay/choice.1420.ash
Finished relay script: choice.ash (257087 bytes)
Finished relay script: inventory.ash (257182 bytes)
What is choice.ash?

When you went to the cargo shorts, KoL redirected to choice.php, that script was started.
It fetched the choice - and then decides to adventure in the Skelton Store.
That ended up invoking BestBetweenBattle and MercenaryMood and then actually submitting a request to adventure.php.
Which means you were not actually in a choice anymore, since you can walk away from the cargo shorts.

This does not appear to have anything to do with KoLmafia, except insofar as choice.ash was doing funky stuff.
 
Last edited:

Veracity

Developer
Staff member
[ bet that pocket #176 is 25/200/25, rather than 30/200/25, although I will still check it.
Yes indeed. So, here is another block of 250 total substats:

Code:
40	Stats	200	25	25
176	Stats	25	200	25
89	Stats	25	25	200
 

Magus_Prime

Well-known member
Choice.ash is Ezandora's framework for handling choice adventures in relay scripts. Here's part of the comment from the script header: "Allows for generic choice adventure overrides. Will load scripts named choice.choice_adventure_id.ash."

That script has been working as expected for several years. I'm out of turns for today but will perform more testing tomorrow. Thanks for the lead and here's a link to the script: https://github.com/Ezandora/Choice-Override

Edit: Okay...that was very strange. I logged in today with r20440 as I knew I didn't see this issue the day before on that version. No problems encountered.
I then loaded r20445 again and no problems there either.

I have no idea what happened or why. :confused:
 
Last edited:

Magus_Prime

Well-known member
I don't see a way to do this but thought I'd ask: is there a way, with the cargo list command, to have it exclude pockets/items that have already been used/taken in the current ascension? It would, essentially, combine the information gleaned from both cargo list TYPE <value> and cargo? Something like:
Code:
cargo list type available yeg
 

Veracity

Developer
Staff member
Revision 20462 adds:

cargo (list or count) unpicked TYPE

Code:
[color=green]> cargo count type chess[/color]

There are 12 chess pockets.

[color=green]> cargo count unpicked chess[/color]

There are 4 unpicked chess pockets.

[color=green]> cargo list unpicked chess[/color]

There are 4 unpicked chess pockets.
Pocket #523: a chess piece: alabaster king (1)
Pocket #651: a chess piece: alabaster queen (1)
Pocket #88: a chess piece: onyx king (1)
Pocket #506: a chess piece: onyx queen (1)
 

Ryo_Sangnoir

Developer
Staff member
By GoldS on the wiki, pocket 603 is 20-20 Second Sight, not 20/20 Vision. This makes more sense than having two sources of the same effect with different durations.
 

Veracity

Developer
Staff member
By GoldS on the wiki, pocket 603 is 20-20 Second Sight, not 20/20 Vision. This makes more sense than having two sources of the same effect with different durations.
Thanks. By the way - I have been spading the Stats pockets, since there are anomalies.

The following are errors on the Wiki:

12 is 80/90/120 (not 80/80/120)

The following match the Wiki, but I submitted a bug report to KoL:

459 is 80/120/80
585 is 90/120/90

(Both Muscle and Moxie have 120 + 80/90 and 120 + 90/80)
 

fronobulax

Developer
Staff member
Not sure what to do with this. Appeared with r20499

Copy from GCLI. I can go to session log if it is there and formatting is better preserved.


Inspecting Cargo Cultist Shorts
picking pocket 665
--------------------
1659 The Strength... of the Future strboost.gif 332e06d519892d99db38ab7f918b1edf neutral none
Effect The Strength... of the Future Muscle Percent: +50, Muscle: +15, Experience (Muscle): +3
--------------------
You acquire an effect: Discomfited (30)
You acquire an effect: The Strength... of the Future (20)
 

Veracity

Developer
Staff member
That effect either does or does not have two spaces following the ellipses, depending on desc_effect.php or on "You acquire an effect" text.
I thought we had code in the place where we parse the gained effect to adjust to that error and give you the actual effect.
Actually, I thought we recognized the effect from the descid in the result text.

I'll try that tomorrow and get a DEBUG log.
 

philmasterplus

Active member
A couple of bugs:

1. It seems that pocket_meat(), pocket_poem(), and pocket_scrap() are effectively the same functions. I can use pocket_meat() to examine a waterlogged poem pocket, or pocket_scrap() to examine a meat puzzle pocket.

This is the code from RuntimeLibrary.java:
Java:
// indexed_text pocket_scrap( pocket p );
public static Value pocket_scrap( ScriptRuntime controller, final Value pocket )
{
       return makeIndexedText( (int) pocket.intValue() );
}

// indexed_text pocket_poem( pocket p );
public static Value pocket_poem( ScriptRuntime controller, final Value pocket )
{
       return makeIndexedText( (int) pocket.intValue() );
}

// int pocket_meat( pocket p );
public static Value pocket_meat( ScriptRuntime controller, final Value pocket )
{
       return makeIndexedText( (int) pocket.intValue() );
}

This could be waved as "won't fix".

2. The type signatures of pick_pocket(effect), pick_pocket(item) and pick_pocket(stat) indicate that they return maps.
Code:
 > ashref pick_pocket
boolean pick_pocket( monster )
int [effect] pick_pocket( effect )
int [item] pick_pocket( item )
int [stat] pick_pocket( stat )
boolean pick_pocket( int )

However, their implementations attempt to return boolean values:
Java:
// boolean pick_pocket( int p );
// boolean pick_pocket( monster m );
// boolean pick_pocket( effect e );
// boolean pick_pocket( item i );
// boolean pick_pocket( stat s );
public static Value pick_pocket( ScriptRuntime controller, final Value arg )
{
       Type type = arg.getType();
       Pocket pocket =
              type.equals( DataTypes.TYPE_INT ) ?
              PocketDatabase.pocketByNumber( (int)arg.intValue() ):
              PocketDatabase.firstUnpickedPocket( RuntimeLibrary.sortedPockets( type, arg.toString() ) );

       if ( pocket == null )
       {
              return DataTypes.FALSE_VALUE;
       }

       CargoCultistShortsRequest pick = new CargoCultistShortsRequest( pocket.getPocket() );
       pick.run();

       return RuntimeLibrary.continueValue();
}

I can call them, but cannot use their return values:
Code:
item it = $item[ sizzling desk bell ];
pick_pocket(it);  // OK

boolean result = pick_pocket(it);    // Cannot store int [item] in f of type boolean ()
int [item] result = pick_pocket(it); // Internal error: Cannot assign boolean to int [item] ()
if (pick_pocket(it)) print('yes');   // "if" requires a boolean conditional expression ()
 
Top