New Content - Implemented Card Sleeve

roippi

Developer
Took a look at this. Haven't tested it, but it looks like it would work. Some formatting issues, but no big deal there.

I don't think we need a preference for this, we can just set a session variable somewhere when we see the item on login.
 

slyz

Developer
I don't have a card sleeve, so I can't see for myself, but wouldn't that mean hitting a special URL, like bedazzle.php for the sticker sword?

Speaking of which, I didn't see anything about the card sleave in api.php?what=status, but it does have a "stickers" entry. Maybe we can use that info instead of hitting bedazzle.php. That I can add and test :)
 

roippi

Developer
I don't have a card sleeve either, I just assumed it would be somewhere we normally looked. Ass u me, etc

I think they're relatively cheap now so I should probably just pick one up for messing around with.
 

Veracity

Developer
Staff member
I submitted a bug report asking for card sleeve info in api.php

Edit:

Comments on the patch:

- We don't use numeric constants for item IDs. We define constants in ItemPool, so you can tell what's what by just looking at the code.
- Would it be useful to support inserting or removing cards from the sleeve easily? Perhaps a "sleeve" command. With no argument, show what's currently inserted. "sleeve remove" to take it out. "sleeve insert <card>" to slide one in.

Or something.

Edit 2:

Or, perhaps, on the Gear Changer, just as we have stickers on the Gear Changer.

If only it were easy to dynamically add or remove controls to that frame. I tried and failed, with Containers, but I can envision dynamically adding a "card" dropdown when you select the card sleeve as your offhand and removing it when you select something else.
 
Last edited:

Veracity

Developer
Staff member
From CDMoyer (#599619) [reply] [quoted]
Date: Thursday, June 20, 2013, 09:28PM

Should be a cardsleeve field in the equipment array now.

-CDM

> The "card sleeve" is an offhand item which can hold - surprise - a card. It's analogous to a sticker weapon which can have one or more stickers in it.
>
> It would be nice if we could see what was in your card sleeve via api.php, just as we can tell what stickers are on your sticker weapon.
>
> Thanks.
Here is my current equipment array:

Code:
"equipment":{"hat":"2337","shirt":"5041","pants":"2032","acc1":"3033","acc2":"5909","acc3":"5237","container":"6048","fakehands":0,"cardsleeve":"4968"}
As you can see, I have a card sleeve. It's in storage. And I have long since forgotten what is in it. Now I know: it is an Alice's Army Spearsman.

I saw people using card sleeves back when I did PVP; there were various uses for doing so - equipment verbosity, rollover PVP adventures, whatever.

I don't think we support it at all. If you look at the Wiki page for the card sleeve, you can see that the card sleeve is an off-hand item with a user-selectable enchantment that is analogous to a sticker weapon.

In any case, now that it is in api.php, it's now possible for KoLmafia to know what's in it at login time, track what happens when you manipulate it, take the contents into account when displaying modifiers, and have the maximizer use it, if available.

It's a whole content vector we are missing. :)
 

Veracity

Developer
Staff member
Thanks!

(That's a little embarrassing. I was prompted to write this because CDM finally got back to me and I had long since forgotten the original thread, where I even said "I'm going to ask CDM for an api.php change" - on 6/11/2012. :))

I'll take a look at this, by and by.
 

Darzil

Developer
I haven't got a card sleeve, but the attached patch (totally untested) should do for the card sleeve what the tested folder holder changes did for maximizer. ie. Make it work with maximizer.

Edit - thinking about it, I guess this does differ from stickers and folder in that you don't lose the existing items if you swap them, so people might want to be recommended to swap in different cards. Or indeed another familiar in Crown of thrones. Not planning to think about those any time soon!
 

Attachments

  • card_sleeve_maximiser.patch
    3.4 KB · Views: 20
Last edited:

Veracity

Developer
Staff member
Thanks. Revision 12867 has that, as well as initial support for configuring card sleeve via gear changer (or, we assume, the CLI, although I didn't try that yet.)

card sleeve is weird for several reasons:

- it uses "inv_use.php" to slide a card in or out of it
- it must be in inventory, not equipped, to be able to do that.

So EquipmentRequest for the CARD_SLEEVE slot will unequip, manipulate, and equip, if it is not in inventory.

Here is a sample session log:

- start with empty card sleeve, equipped in off-hand
- slide in Alchemist
- slide in Bowman (which will put Alchemist into inventory with a "You acquire" message)
- slide out Bowman (puts into inventory with "You acquire")

unequip offhand

inv_use.php?whichitem=5009&sleevecard=4973

equip off-hand card sleeve

unequip offhand

inv_use.php?whichitem=5009&sleevecard=4979
You acquire an item: Alice's Army Alchemist

equip off-hand card sleeve

unequip offhand

inv_use.php?whichitem=5009&removecard=1
You acquire an item: Alice's Army Bowman

equip off-hand card sleeve
Note that it does not log the "inv_use.php" the way I'd like to see them:

equip card-sleeve Alice's Army Alchemist
equip card-sleeve Alice's Army Bowman
unequip card-sleeve

I am also not happy that when a card moves from being equipped into inventory, it appears in your session tally - unlike normal equipment changes.

There is clearly some more "cosmetic" work to do, although it is otherwise working well.
 

Veracity

Developer
Staff member
Revision 12869 seems to log equip and unequip correctly, either from the Gear Changer or the Relay Browser, and keeps the inventory accurate when cards enter and leave it.

I declare this Implemented.
 

Bale

Minion
Card sleeve was added to KoL in March of 2011. It took a little over 2 and a half years until full implementation. Not a criticism, just a sigh about how long it sometimes takes to finish implementing something. Personally I blame the fact that we didn't have a place in the GUI for customizable gear until now. Not having a place to put a feature creates a psychological disincentive to look too closely at its lack.

Yay!
 
Top