New Content - Implemented VYKEA Companions

Veracity

Developer
Staff member
I suppose this is part of The Glaciest - but it is a substantial new mechanic all by itself and I'd like to collect info and discuss and track it separately.

A VYKEA Companion is an entity which fights at your side during combats, much like a familiar or pasta thrall.
You can create one a day by using VYKEA instructions. Having made one, it appears in your charpane as "BOYEKOQE the level 5 bookshelf" or "CHEBLI the level 5 lamp", complete with image. The description does not mention the (optional) rune you built it with.

If you try to make a second one, you are told:

You don't want to make your existing piece of furniture jealous. It might turn on you.

(For what it's worth, it'll probably be broken by tomorrow. And it'll probably turn on you anyway.)
Companions have a type - bookcase, lamp, dishrack, dresser, ...
Companions have a level - 1-5?
Companions have a rune - none, blood, lightning, frenzy
Companions have a name - BOYEKOQE, CHEBLI, ...

I noticed combat messages like "you opponent doesn't know that looking into a CHEBLI lamp is dangerous. ... hot damage ...". Does this imply that every "level 5 lamp with a blood rune" is CHEBLI? What is a "level 5 lamp with no rune"? It would be very convenient if {type, level, rune} <-> {name}.

It would also be very convenient if api.php had something in it to tell you about your current VYKEA companion.

In any case, I see a VYKEACompanionData object here.

How do you create one of these?

You use VYKEA instructions with at least 5 VYKEA plank, 5 VYKEA rail, 5 VYKEA bracket, and a VYKEA hex key in inventory.
It redirects to:

choice 1120 - Some Assembly Required.
1 - Start with 5 planks -> choice 1121 (if you have a rune) or choice 1122 (if you don't)
2 - Start with 5 rails -> 1121 (if you have a rune) or choice 1122 (if you don't)
6 - don't build anything

choice 1121 - Some Assembly Required
(X - Add a frenzy rune -> choice 1122 (if you have at least 1 dowel) or 1123 (if you don't)
2 - Add a blood rune -> choice 1122 (if you have at least 1 dowel) or 1123 (if you don't)
3 - Add a lightning rune -> choice 1122 (if you have at least 1 dowel) or 1123 (if you don't)
(X - Don't add any runes -> choice 1122) (if you have at least 1 dowel) or 1123 (if you don't)

choice 1122 - Some Assembly Required
1 - Add 1 dowel -> choice 1123
2 - Add 11 dowels -> choice 1123
3 - Add 23 dowels -> choice 1123
4 - Add 37 dowels -> choice 1123
(X - Don't add any dowels -> choice 1123)

choice 1123 - Some Assembly Required
1 - Add 5 planks
2 - Add 5 rails
3 - Add 5 brackets

Voila! You now have a companion.

{planks, rails} -> {none, frenzy, blood, lightning} -> {0, 1, 11, 23, 37 dowels} -> {planks, rails, brackets}

Looks like 120 paths through the choices.

Is it deterministic? It would be really disappointing if doing the same thing two days in a row gave you two different pieces of furniture.

If it IS deterministic, then this is a creation method, like sushi.

I'm going to watch with interest what we learn about this over the coming days before diving into implementation.

Here are the companions I have built so far.

5 rails + blood rune + 37 dowels + 5 rails -> CHEBLI the level 5 lamp
5 planks + lightning rune + 37 dowels + 5 planks -> BOYEKOQE the level 5 bookshelf
 

Veracity

Developer
Staff member
So, today,

5 rails + blood rune + 37 dowels + 5 rails -> ÅVOBÉ the level 5 lamp

Unsurprisingly, the same recipe got me the same furniture.
Unsurprisingly, a different random name was assigned.

This does mean that there is no indication in the charpane what kind of rune your furniture may or may not have.

I conjecture that {planks, rails} x {planks, rails, brackets} yields 6 kinds of furniture.
I conjecture that {0, 1, 11, 23, 37} dowels yields a {1, 2, 3, 4, 5} level companion.

We can/should track the creation of a companion while you build it - and we can save type, level, rune, name in _ settings - but it would be nice if we could pull that info out of api.php, say; as I said, the charpane does not have the rune.
 

Bale

Minion
I don't think we should hold our breaths waiting for this to get added to api.php. That's all the more reason for mafia to save the rune info to make up for KoL's lack.
 

Veracity

Developer
Staff member
Revision 16432 adds VYKEARequest.java as a subclass of CreateItemRequest and defines a new creation method - VYKEA. This method requires that you have a VYKEA instructions and a VYKEA hex key in inventory. All 120 possible companions are listed in concoctions.txt with the required ingredients.

I have verified that the available companions now appear in the Creatables tab of the Item Manager - and become available or unavailable depending on when you closet or uncloset ingredients (with autoSatisfyWIthCloset set to false). So, all the infrastructure seems to be there.

If you tell it to actually create a companion, it will fail with an error message: "VYKEA companion creation not yet implemented."

Actual removal of used ingredients will happen in ChoiceManager, as you select each choice.
And actually setting the _ settings I also added:

user _VYKEACompanionType
user _VYKEACompanionRune
user _VYKEACompanionLevel 0
user _VYKEACompanionName

will happen there too.

Creation of the actual VYKEACompanion object is also unstarted.

I named the pseudo-items like this:

level 1 lamp
level 2 blood couch
level 3 lightning ceiling fan
level 4 frenzy dresser
level 5 bookshelf
level 4 dishrack

... and so on, 120 in all. I'm not married to those specific names. We could do something like "level 3 VYKEA lamp with a blood rune", for example, although that has no additional information over the more compact names I implemented.

What do you think?
 

Darzil

Developer
I think it all looks very good and am looking forward to it. Will be interesting to see what spading ends up saying for the values of +item and +meat.
 

heeheehee

Developer
Staff member
I spaded the Level 1 Couch to be 10% meat. I think someone said on GD that Level 5 was 50%, so linear 10% per level sounds plausible there. I haven't bothered to check the lamp yet.

edit: I deduced this from the spade alerts:
Spade Alert - possible unknown meat bonus: -1 +2 +3 -3 -4 +6 -6 +7 -8 +10 +11 -11 -13 -14
Spade Alert - possible unknown meat bonus: +1 -1 +2 -2 -4 +5 -5 +6 -7 +9 -9 +10 -10 +11 -11
Spade Alert - possible unknown meat bonus: -1 +2 +3 -3 -4 +5 +6 -6 -8 +9 +10 -10 -12 +14 -14
Spade Alert - possible unknown meat bonus: -1 +2 +3 -3 -4 +6 -6 +7 -8 +10 +11 -11 -13 -14
Spade Alert - possible unknown meat bonus: -1 +2 -3 +4 -5 -6 +7 -8 +9 +10 -10 +12 +13 -13

intersection:
-1 +2 +10
 
Re pseudo-item naming, perhaps consider the order in which they will appear? My preference would be for grouping by type (lamp, couch, etc.) first, then level, then rune. Also, to get the VYKEA companions to show, filtering by "level" is counterintuitive.

So, suggested:
VYKEA bookshelf 1
VYKEA bookshelf 1 blood
...
VYKEA lamp 5 frenzy
VYKEA lamp 5 lightning

Thoughts?
 

heeheehee

Developer
Staff member
Tentatively level 1 lamp also looks like 10% items (missed a bunny liver at +22%, haven't missed one yet at +23% for > 50 trials).
 

Veracity

Developer
Staff member
Revision 16442 parses your VYKEA Companion from the charpane and sets preferences:

_VYKEACompanionType
_VYKEACompanionRune
_VYKEACompanionLevel
_VYKEACompanionName

The couch and lamp affect Meat Drop and Item Drop.

Tomorrow I'll hook this in with the choice adventures, watching as you build a companion and setting those preferences appropriately, as well as removing consumed ingredients from inventory.
 

Veracity

Developer
Staff member
Revision 16443 handles the choice adventures. It removes consumed items from inventory, sets preferences appropriately, and remembers the created companion.

I think that all that remains it to complete the creation method so that you can create a companion from the CLI or Item Manager, "using" the instructions and following the choice chain with the appropriate options to get the desired result.

Re pseudo-item naming, perhaps consider the order in which they will appear? My preference would be for grouping by type (lamp, couch, etc.) first, then level, then rune. Also, to get the VYKEA companions to show, filtering by "level" is counterintuitive.

So, suggested:
VYKEA bookshelf 1
VYKEA bookshelf 1 blood
...
VYKEA lamp 5 frenzy
VYKEA lamp 5 lightning

Thoughts?
1) After you create a few of these, you get used to seeing "level 5 couch" or "level 1 lamp" or whatever in the charpane. They seem like the "natural" names for them, given that KoL itself uses those names.

2) Of course filtering by "level" is counterintuitive. I expect that you will filter by "couch" or "lamp", once you learn what the various types of furniture do. Until you learn that, what are you going to do? Ask "What kind of furniture can I create given the parts I currently have" followed by "pick one at random"?

I'm still open to other thoughts on this; changing the pseudo names is easy enough.

I just noticed that in addition to instructions and a hex key, you need 5 planks, 5 rails, and 5 brackets to start assembling - even if your desired recipe needs 10 planks, for example. Have to adjust ConcoctionDatabase.cachePermitted to add more conditions to the VYKEA mixing method...
 

Veracity

Developer
Staff member
Revision 16448 lets you create VYKEA companions through the Item Manager.

Remaining:

- Allow the "create" command to find VYKEA companions even without an item number. This is the same issue that sushi currently has.
- Since we now save the companion's name, log its actions in fights, just as we log familiars and pasta thralls.

It would be nice if your companion's type, rune, level, and name appeared in api.php. We save those if we watch you create it or if we see it in the charpane, but if you create it outside of KoLmafia, until you open the Relay Browser and see the charpane, we have no idea that you have one.
 

Veracity

Developer
Staff member
And revision 16449 now makes the only things that disable the VYKEA companion creation method be "already have one today" and "don't have a hex key accessible". Every other ingredient will be "acquired" using the usual rules - including pulling from closet and, I assume, buying from mall, if necessary.

I'll find out tomorrow if that works as expected when my multi, who has a hex key and nothing else, currently, tries to make another companion with autosatisfyWithMall set to true.

Edit: well, it depends if I make "create" work with VYKEA companions; the Item Manager will not show creations you don't already have the ingredients for, as always, but you can "create" such an item as long as the creation method is not disabled.
 
Last edited:

Veracity

Developer
Staff member
With revision 16454, you should be able to "create level 5 couch" from the gCLI now. Not to mention "create 5 magical giant dragon roll".

I notice that if I have ingredients enough to make 17 couches, if I select one in the Item Manager, it asks me "how many?" with 1 as the default and 17 as the max. For VYKEA companions, 1 should always be the max, regardless of whether you have ingredients to make more than 1.
 

Bale

Minion
Something odd in my CLI today with r16455:

Logging in with KoLmafia said:
Installing default certificate validation...
Validating login server (www.kingdomofloathing.com)...
Unknown ingredient (VYKEA plank (5) dowel (1)) for concoction: level 2 dresser
Using data override: data/mallprices.txt
389 players online.
Sending login request...
Initializing session for bale...
 

Veracity

Developer
Staff member
I think this is finished for now.

- If KoL ever adds your companion to api.php, we should set your current companion (and appropriate settings) with that info.
- We could have an ASH data type for this, just as we do for familiar, thrall, and Ed servant - but not for Jarlsberg companion.
-- given that, we could have current_vykea_companion() to return the object and have proxy fields to get the type, level, rune, name, image
- And, yes - if we ever assign negative item numbers to pseudo-items, we'd do that for these things too so you could create() them - but that is absolutely not going to happen as part of THIS feature request.

Did I miss anything?

Would anybody actually use a "vykea" ASH object? We have settings - and until/unless KoL adds the companion to api.php, we will continue to need them - but it is a real internal KoLmafia object, like the familiar, thrall, ed servant, and companion.

Heck. I think I just talked myself into doing it. Drat.
 

Veracity

Developer
Staff member
Revision 16481 makes it so.

> ash my_vykea_companion()

Returned: STUSGÅWSNOWSNE, the level 5 couch
id => 4
name => STUSGÅWSNOWSNE
type => couch
rune => none
level => 5
image => vykfurn4.gif
modifiers => Meat Drop: +50
attack_element => none

> ash ( my_vykea_companion() == $vykea[ level 5 couch ] )

Returned: true

> ash $vykea[ level 3 frenzy lamp ]

Returned: level 3 frenzy lamp
id => 5
name =>
type => lamp
rune => VYKEA frenzy rune
level => 3
image => vykfurn5.gif
modifiers => Item Drop: +30
attack_element => hot
 

Bale

Minion
What is wrong with the following code?

Code:
> ash if( my_vykea_companion() == $vykea[none] ) print("No VYKEA Companion");

Unexpected     error, debug log printed.
[COLOR="#FF0000"]Script execution aborted     (null): ()[/COLOR]
Returned: void

That code verifies, and I do have a vykea companion which is correctly identified by the my_vykea_companion() command.

Here's the short debug log that resulted:

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v17.1 r16481, Windows 7, Java 1.8.0_40
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Sun Nov 22 02:09:07 EST 2015
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.VYKEACompanionData.compareTo(VYKEACompanionData.java:558)
	at net.sourceforge.kolmafia.textui.parsetree.Operator.compareValues(Operator.java:268)
	at net.sourceforge.kolmafia.textui.parsetree.Operator.applyTo(Operator.java:686)
	at net.sourceforge.kolmafia.textui.parsetree.Operation.execute(Operation.java:113)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:80)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:68)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:377)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:325)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:318)
	at net.sourceforge.kolmafia.textui.command.AshSingleLineCommand.run(AshSingleLineCommand.java:73)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:596)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:187)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:163)
 
Last edited:

Bale

Minion
Forgot to mention. I did already verify that $vykea[none] exists, though of course I would have gotten a verification error if that didn't work. Yet for some reason I cannot compare my_vykea_companion() to $vykea[none].
 
Top