We now have a summoning skill in which you can specify exactly what you want to get. In the Browser, it takes two steps to do that:
campground.php?preaction=summoncliparts (or via Skill menu, which redirects to that)
displays the screen of clip arts you can select from, the section of previous successful combos for quickly selecting three appropriate clips, and, once three clips have been selected, a "Say BALUNGO BALUÑO" button. Pressing that button will submit the following URL:
campground.php?action=bookshelf&preaction=combinecliparts&clip1=05&clip2=05&clip3=03&pwd
where clip1, clip2, and clip3 are (non-uniquely) selected from the following list:
01 = DONUT
02 = BOMB
03 = KITTEN
04 = WINE
05 = CHEESE
06 = LIGHT BULB
07 = SNOWFLAKE
08 = SKULL
09 = CLOCK
10 = HAMMER
The "action=bookshelf" results in the bookshelf being shown again after the summon.
I have not tried this, yet, but I suspect that for KoLmafia to use this internally, we can omit the initial call to campground.php?preaction=summoncliparts (since we don't need to look at the browser page to select clips) and can omit the action=bookshelf from the second call, making the whole action of summoning an item be:
campground.php?preaction=combinecliparts&clip1=05&clip2=05&clip3=03&pwd
We should implement the summonable items as creations, so that they appear on the Create/Food/Booze tabs of the Item Manager, are gettable via "acquire" or "retrieve_item()", and are automatically created, as needed, by "eat" and "drink" and such. This is how I think it could be done
- Add KoLConstants.CLIP_ART as a creation method.
- Create ClipArtRequest as a CreateItemRequest that uses campground.php?preaction=combinecliparts
- CampgroundRequest.registerRequest delegates to ClipArtRequest.registerRequest to log the creation, for preaction=combinecliparts
- CreateItem.createInstance generates a ClipArtRequest for the CLIP_ART mixing method
- ConcoctionDatabase recognizes CLIP_ART as a permitted method if you know the skill (KoLCharacter.canSummonClipArt) and the tomeSummons setting is < 3.
- concoctions.txt contains all clip art items with the CLIP_ART mixing method and NO ingredients (since the clips are not real items).
- ClipArtRequest internally maps each item to clip1, clip2, and clip3
- The concoctions for clip art items, although they have no ingredients, have a dynamically changing "creatable" amount which is the number of tome summons remaining today. Therefore, every time you summon from a Tome, if you canSummonClipArt, we need to update all clip art concoctions and refresh concoctions so that all the lists of creatables (Food, Booze, etc.) update
That's all that comes to mind, for the moment. The "fun" code is the new ClipArtRequest which converts a request to create an item into the appropriate URL, and which recognizes such a URL and logs it as a creation of the appropriate item. The rest is just hooking the class into the appropriate places such that scripts and the GUI can seamlessly use the clip art tome to create/summon the desired items.
campground.php?preaction=summoncliparts (or via Skill menu, which redirects to that)
displays the screen of clip arts you can select from, the section of previous successful combos for quickly selecting three appropriate clips, and, once three clips have been selected, a "Say BALUNGO BALUÑO" button. Pressing that button will submit the following URL:
campground.php?action=bookshelf&preaction=combinecliparts&clip1=05&clip2=05&clip3=03&pwd
where clip1, clip2, and clip3 are (non-uniquely) selected from the following list:
01 = DONUT
02 = BOMB
03 = KITTEN
04 = WINE
05 = CHEESE
06 = LIGHT BULB
07 = SNOWFLAKE
08 = SKULL
09 = CLOCK
10 = HAMMER
The "action=bookshelf" results in the bookshelf being shown again after the summon.
I have not tried this, yet, but I suspect that for KoLmafia to use this internally, we can omit the initial call to campground.php?preaction=summoncliparts (since we don't need to look at the browser page to select clips) and can omit the action=bookshelf from the second call, making the whole action of summoning an item be:
campground.php?preaction=combinecliparts&clip1=05&clip2=05&clip3=03&pwd
We should implement the summonable items as creations, so that they appear on the Create/Food/Booze tabs of the Item Manager, are gettable via "acquire" or "retrieve_item()", and are automatically created, as needed, by "eat" and "drink" and such. This is how I think it could be done
- Add KoLConstants.CLIP_ART as a creation method.
- Create ClipArtRequest as a CreateItemRequest that uses campground.php?preaction=combinecliparts
- CampgroundRequest.registerRequest delegates to ClipArtRequest.registerRequest to log the creation, for preaction=combinecliparts
- CreateItem.createInstance generates a ClipArtRequest for the CLIP_ART mixing method
- ConcoctionDatabase recognizes CLIP_ART as a permitted method if you know the skill (KoLCharacter.canSummonClipArt) and the tomeSummons setting is < 3.
- concoctions.txt contains all clip art items with the CLIP_ART mixing method and NO ingredients (since the clips are not real items).
- ClipArtRequest internally maps each item to clip1, clip2, and clip3
- The concoctions for clip art items, although they have no ingredients, have a dynamically changing "creatable" amount which is the number of tome summons remaining today. Therefore, every time you summon from a Tome, if you canSummonClipArt, we need to update all clip art concoctions and refresh concoctions so that all the lists of creatables (Food, Booze, etc.) update
That's all that comes to mind, for the moment. The "fun" code is the new ClipArtRequest which converts a request to create an item into the appropriate URL, and which recognizes such a URL and logs it as a creation of the appropriate item. The rest is just hooking the class into the appropriate places such that scripts and the GUI can seamlessly use the clip art tome to create/summon the desired items.