New Content - Implemented New Challenge Path - KOLHS

Darzil

Developer
I used yearbook camera, then visited shop twice as my three today, with no turns between the last two visits.

Will look at adding some other stuff tomorrow. I'm on day three of my first KOLHS run, so still learning how it works. Not to mention being in run for the first time since Dread hit.

Would really help for people to get the ROW numbers and shop URL for the three shops, as I can't see more than one tomorrow. If you find yourself at the high school, can view source of the page and send it to me if you're not happy to parse it yourself.
 
Last edited:

Darzil

Developer
I suspect it will not let you visit without choice.php, but if it does, I fully expect it would dock you a visit.

Take a look at KoLConstants.CraftingType. Add CHEMCLASS, ARTCLASS, and SHOPCLASS.
Take a look at ConcoctionDatabase and add appropriate things for those new crafting methods.
Take a look at CreateItemRequest and add subclass delegation for the new methods.
Take a look at PixelRequest. In particular, registerRequest and parseResponse. You will want stubs for the constructor, run(), and processResults methods, since you will not be creating these items via internal requests.
Take a look at concoctions.txt and the PIXEL creation method.
Take a look at NPCPurchaseRequest.parseShopRequest and NPCPurchaseRequest.registerShopRequest.
Take a look at RequestLogger.doRegister.

If I'm not doing anything terribly stupid (which given it's midnight and I'm uncharted waters wouldn't be surprising) this patch should be close. The main thing totally missing is that only one ROW number is known. Should the others turn up and someone else wants to take over (or throw rocks at this patch) feel free.
 

Attachments

  • kolhs_classes.patch
    10.5 KB · Views: 15

Theraze

Active member
Third location is kolhs_art. So that's all 3 locations known. If not tested for multiple-crafting.
 

Darzil

Developer
The important thing is the ROW data.

I don't think we'll be supporting making things from concoctions the way things stand. By visiting a shop in the non-combat you can make several different items. To achieve the same with Mafia we'd have to create concoction queuing or we'd be wasting the three visits. Sounds to me like it's just getting too different to what we currently do. If you weren't limited in visits, you could possibly start to make a case.

Tracking and handling ingredients is another matter of course.
 

lostcalpolydude

Developer
Staff member
The URL check in CreateItemRequest isn't needed, as you can see from Veracity's cleanup of other stuff in 12608-12610 (after you posted your patch). Besides the missing row numbers, concoctions.txt also needs MANUAL added. I'm guessing you wrote KOLHSRequest, but it isn't in that patch.
 

Darzil

Developer
Shop Class:

ROW162 - Deathchucks
ROW158 - Miniature Suspension Bridge
ROW159 - Staff of the Lunch Lady
ROW160 - Universal Key
ROW161 - World's Most Dangerous Birdcage

If people can find them from the other locations that'd be great. I can visit them tomorrow and Monday if not (I'm away after tomorrow for a few days).

Am working on a patch for tracking whilst we're waiting for the ROW information for shops. What'd be the best function to add a high school check to count adventures in the high school with?

What automation would people actually want here, realistically? Given that there are several useful choices, and only three can be used, all of which must be different, that sounds an incredibly awkward number of options. The lunch one would be simple, take the one that gives you stats rather than costs you hp, but Saved by the Bell probably shouldn't be automated.
 

lostcalpolydude

Developer
Staff member
If you go a day without getting School Spirited, kolhsTotalSchoolSpirited needs to be reset to 0. I'm not sure what the best way to handle that is, but I don't see anything covering that.
 

Theraze

Active member
Yeah... if SbtB gets automation, it would probably be as 3 choices that need to be set individually. But since there's nothing that mafia can use to track how many you've done besides its own tracking, undoubtedly at some point people would complain that they didn't get their third adventure right and it went to their first location twice. Or something else similarly useless.
 

Darzil

Developer
If you go a day without getting School Spirited, kolhsTotalSchoolSpirited needs to be reset to 0. I'm not sure what the best way to handle that is, but I don't see anything covering that.

Thanks. I hadn't spotted that in the wiki.

Presumably there is somewhere in the code that detects it's a new day and resets all underscore prefix preferences. I'd suggest putting in some code just before that reset to set kolhsTotalSchoolSpirited to 0 if _kolhsSchoolSpirited is false. How does that sound?
 
Last edited:

Veracity

Developer
Staff member
this patch should be close.
Looks close. As lost pointed out, add nothing to CreateItemRequest. And I'd like to see KOLHSRequest.java. :)

Looking at ConcoctionDatabase, it looks like declaring concoctions to be MANUAL means they don't get entered into the ConcoctionPool which means you cannot retrieve the ingredients. So, don't do that. Instead, if you don't enter the crafting methods into ConcoctionDatabase.PERMIT_METHOD (which you are not doing), the concoctions will not be "creatable" - which is what you want.
 

Darzil

Developer
Ok, here is the patch, with the new function (about which I'm most hazy - I took out a lot of stuff I didn't truly understand, then put stuff back til it compiled ;) )attached.

Things needed before it could possibly go live, other than sanity checking - ROW numbers for the other two shops to be discovered.

Questions which I have :
Would like to add tracking for number of adventures spent, as requested. I could add this to Cafeteria non-combat in ChoiceManager (any option chosen) and FightRequest, but is there a sensible single location to put it instead ?
Presumably there is somewhere in the code that detects it's a new day and resets all underscore prefix preferences. I'd suggest putting in some code just before that reset to set kolhsTotalSchoolSpirited to 0 if _kolhsSchoolSpirited is false. If a good plan, where is that code located?
Is there any good reason to implement automation for Saved by the Bell, or shall I just default it to Show in Browser?
Is there any good reason not to implement automation for the Cafeteria to take the option for bonus stats and not loss of hp?
 

Attachments

  • kolhs_classes.patch
    16.1 KB · Views: 23

Veracity

Developer
Staff member
I would suggest using shopId.startsWith( "kolhs_" ) rather than shopId.contains( "kolhs_" ) in NPCPurchaseRequest.java. Other than that, once you have the ROW numbers for the other two shops, it looks good.
 
Last edited:

lostcalpolydude

Developer
Staff member
I can't really check from here, but I thought mafia wouldn't remove ingredients for a Concoction that isn't permitted. I seem to remember some bug report about GRANDMA recipes when I left that out, until you eventually fixed it.
 

Veracity

Developer
Staff member
The code to remove them is in the parseResponse method, which is called when a shop.php request completes.
 

Crowther

Active member
Other than that, once you have the ROW numbers for the other two shops, it looks good.
I have access to the art class, but it will have to wait until tomorrow. You can't visit the art shop drunk. At least not from the relay browser.
 

Cool12309

Member
The spoilers for saved have Poetically Licensed as the effect for 3 different choices, which obviously is not true. 12613.
 

Darzil

Developer
12619 has added tracking for _kolhsAdventures, resets kolhsTotalSchoolSpirited if buff not obtained the day before, and adds Automation for Cafeteria (also added KOLHSRequest.java, as one of the functions was in this file).
12620 fixed spoiler for Yearbook Camera if not equipped.

Attached is a patch for the shops, now with all row data (thanks to YojimboS_LAW for chemistry shop). I've not committed it as I've not tried it (I spent my turns getting the source for art shop instead). (Edit - added stuff to ConcoctionDatabase.java to prevent errors on load)

I'd suggest either someone test it and then commit it, or be more experienced and commit it based on the code. I'll not have a chance to test it til Monday at the earliest.
 

Attachments

  • kolhs_classes.patch
    11.1 KB · Views: 20
Last edited:

Crowther

Active member
I have access to the art class, but it will have to wait until tomorrow. You can't visit the art shop drunk. At least not from the relay browser.
I think this has the row numbers needed:
Code:
Oh, very well, I suppose, if it keeps you from rotting your brains with video games, I can attempt to teach you something. I don't hold out much hope that you'll produce something great, or even acceptable, but perhaps you'll benefit from my guidance. What have you brought with you? Let's see what we can make.</td></tr></table><form name=bigform action=shop.php method=post><input type=hidden name=pwd value=bbb428063aac82a532a94d9482c27137><input type=hidden name=whichshop value="kolhs_art"><input type=hidden name=action value=buyitem><center><table cellpadding=2><tr><td></td><td colspan=2 align=center><b>Item:</b> (click for description)</td><td colspan=10 align=center><b>Price:</b></td></tr><tr><td valign=center><input type=radio name=whichrow value=163></td><td><img src="http://images.kingdomofloathing.com/itemimages/bigeraser.gif" class=hand onClick='javascript:descitem(530310946)'></td><td valign=center><a onClick='javascript:descitem(530310946)'><b>giant eraser</b>    </a></td><td><img src=http://images.kingdomofloathing.com/itemimages/nubbin.gif width=30 height=30 onClick='javascript:descitem(191091237)' alt="eraser nubbin" title="eraser nubbin"></td><td><b>4</b> &nbsp</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td valign=center><input class=button type=button onClick='javascript:parent.mainpane.location="shop.php?whichshop=kolhs_art&action=buyitem&quantity=1&whichrow=163";' value='Make'></td></tr><tr><td valign=center><input type=radio name=whichrow value=165></td><td><img src="http://images.kingdomofloathing.com/itemimages/faraday.gif" class=hand onClick='javascript:descitem(646917799)'></td><td valign=center><a onClick='javascript:descitem(646917799)'><b>giant Faraday cage</b>    </a></td><td><img src=http://images.kingdomofloathing.com/itemimages/wiretwist.gif width=30 height=30 onClick='javascript:descitem(562580616)' alt="twisted piece of wire" title="twisted piece of wire"></td><td><b>8</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/angryinch.gif width=30 height=30 onClick='javascript:descitem(834940676)' alt="angry inch" title="angry inch"></td><td><b>2</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/nubbin.gif width=30 height=30 onClick='javascript:descitem(191091237)' alt="eraser nubbin" title="eraser nubbin"></td><td><b>2</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/soda.gif width=30 height=30 onClick='javascript:descitem(357261157)' alt="Mountain Stream Code Black Alert" title="Mountain Stream Code Black Alert"></td><td><b>1</b> &nbsp</td><td></td><td></td><td valign=center><input class=button type=button onClick='javascript:parent.mainpane.location="shop.php?whichshop=kolhs_art&action=buyitem&quantity=1&whichrow=165";' value='Make'></td></tr><tr><td valign=center><input type=radio name=whichrow value=166></td><td><img src="http://images.kingdomofloathing.com/itemimages/claymoremine.gif" class=hand onClick='javascript:descitem(283407190)'></td><td valign=center><a onClick='javascript:descitem(283407190)'><b>modeling claymore</b>    </a></td><td><img src=http://images.kingdomofloathing.com/itemimages/clayglob.gif width=30 height=30 onClick='javascript:descitem(224876067)' alt="lump of clay" title="lump of clay"></td><td><b>6</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/wiretwist.gif width=30 height=30 onClick='javascript:descitem(562580616)' alt="twisted piece of wire" title="twisted piece of wire"></td><td><b>2</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/angryinch.gif width=30 height=30 onClick='javascript:descitem(834940676)' alt="angry inch" title="angry inch"></td><td><b>4</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/nubbin.gif width=30 height=30 onClick='javascript:descitem(191091237)' alt="eraser nubbin" title="eraser nubbin"></td><td><b>2</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/bigfirecracker.gif width=30 height=30 onClick='javascript:descitem(236206665)' alt="illegal firecracker" title="illegal firecracker"></td><td><b>2</b> &nbsp</td><td valign=center><input class=button type=button onClick='javascript:parent.mainpane.location="shop.php?whichshop=kolhs_art&action=buyitem&quantity=1&whichrow=166";' value='Make'></td></tr><tr><td valign=center><input type=radio name=whichrow value=164></td><td><img src="http://images.kingdomofloathing.com/itemimages/religious.gif" class=hand onClick='javascript:descitem(521435379)'></td><td valign=center><a onClick='javascript:descitem(521435379)'><b>quasireligious sculpture</b>    </a></td><td><img src=http://images.kingdomofloathing.com/itemimages/clayglob.gif width=30 height=30 onClick='javascript:descitem(224876067)' alt="lump of clay" title="lump of clay"></td><td><b>2</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/wiretwist.gif width=30 height=30 onClick='javascript:descitem(562580616)' alt="twisted piece of wire" title="twisted piece of wire"></td><td><b>6</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/angryinch.gif width=30 height=30 onClick='javascript:descitem(834940676)' alt="angry inch" title="angry inch"></td><td><b>4</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/soda.gif width=30 height=30 onClick='javascript:descitem(357261157)' alt="Mountain Stream Code Black Alert" title="Mountain Stream Code Black Alert"></td><td><b>1</b> &nbsp</td><td></td><td></td><td valign=center><input class=button type=button onClick='javascript:parent.mainpane.location="shop.php?whichshop=kolhs_art&action=buyitem&quantity=1&whichrow=164";' value='Make'></td></tr><tr><td valign=center><input type=radio name=whichrow value=167></td><td><img src="http://images.kingdomofloathing.com/itemimages/clayhomunc.gif" class=hand onClick='javascript:descitem(476523278)'></td><td valign=center><a onClick='javascript:descitem(476523278)'><b>sticky clay homunculus</b>    </a></td><td><img src=http://images.kingdomofloathing.com/itemimages/clayglob.gif width=30 height=30 onClick='javascript:descitem(224876067)' alt="lump of clay" title="lump of clay"></td><td><b>4</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/wiretwist.gif width=30 height=30 onClick='javascript:descitem(562580616)' alt="twisted piece of wire" title="twisted piece of wire"></td><td><b>2</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/angryinch.gif width=30 height=30 onClick='javascript:descitem(834940676)' alt="angry inch" title="angry inch"></td><td><b>2</b> &nbsp</td><td><img src=http://images.kingdomofloathing.com/itemimages/soda.gif width=30 height=30 onClick='javascript:descitem(357261157)' alt="Mountain Stream Code Black Alert" title="Mountain Stream Code Black Alert"></td><td><b>1</b> &nbsp</td><td></td><td></td><td valign=center><input class=button type=button onClick='javascript:parent.mainpane.location="shop.php?whichshop=kolhs_art&action=buyitem&quantity=1&whichrow=167";' value='Make'></td></tr></table><center><input class=button type=submit value="Make Item"> <input class=text type=text name=quantity size=2 value=1><input type=checkbox name=buymax> <font size=2>(as many as possible)</font></center></form></form><p><b>You have:</b><table><tr><td><img src=http://images.kingdomofloathing.com/itemimages/nubbin.gif width=30 height=30 onClick='javascript:descitem(191091237)' alt="eraser nubbin" title="eraser nubbin"></td><td>27 eraser nubbins</td></tr><tr><td><img src=http://images.kingdomofloathing.com/itemimages/wiretwist.gif width=30 height=30 onClick='javascript:descitem(562580616)' alt="twisted piece of wire" title="twisted piece of wire"></td><td>16 twisted pieces of wire</td></tr><tr><td><img src=http://images.kingdomofloathing.com/itemimages/angryinch.gif width=30 height=30 onClick='javascript:descitem(834940676)' alt="angry inch" title="angry inch"></td><td>24 angry inches</td></tr><tr><td><img src=http://images.kingdomofloathing.com/itemimages/soda.gif width=30 height=30 onClick='javascript:descitem(357261157)' alt="Mountain Stream Code Black Alert" title="Mountain Stream Code Black Alert"></td><td>1 Mountain Stream Code Black Alert</td></tr><tr><td><img src=http://images.kingdomofloathing.com/itemimages/clayglob.gif width=30 height=30 onClick='javascript:descitem(224876067)' alt="lump of clay" title="lump of clay"></td><td>19 lumps of clay</td></tr><tr><td><img src=http://images.kingdomofloathing.com/itemimages/bigfirecracker.gif width=30 height=30 onClick='javascript:descitem(236206665)' alt="illegal firecracker" title="illegal firecracker"></td><td>no illegal firecrackers</td></tr></table><p><a href=place.php?whichplace=KOLHS>Back to KoL High School</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></body></html>
 

Cool12309

Member
How about when you receive School Spirited, it updates what mafia thinks the buff will be? (For example, it said 10 turns and I got 170, then the next day it said 20 even though it should say 180).
 
Top