New Content - Implemented Hidden City revamp

Ah, okay then. Not a big deal - I just wanted to make sure this was out there. If it already is, then feel free to get rid of this.
 
This New Content was explicitly mentioned as not being implemented yet in the Hidden City "New Content" thread. If it will make you feel better, I will merge it into the existing New Content thread.
 
Tracking if you have access to the tavern is not implemented, I think.

This (incredibly simple) patch tracks access to hidden tavern (hiddenTavernUnlock set to number of ascensions), and determines access to the tavern based on that. It simply considers you have unlocked it if you use a box of matches (which doesn't consume them). I guess I'll look into also setting it if you visit there manually. The display in ItemManager Booze section doesn't update til you refresh.
 

Attachments

Last edited:
Am going to try to develop a hidden city patch over the weekend, with spoilers, quest tracking, choices for automation, hidden tavern tracking etc.

Step one, though, is to nuke the existing no longer needed hidden city mapping and sphere ID code, to get a nice clean slate.

The patch didn't seem to handle removing files, HiddenCityRequest.java and HiddenCityCommand.java are no longer required.
 

Attachments

Next step will be to create a patch for spoilers, quest tracking and some choice adventures / goals for limited automation (full automation being a script thing). Aim for the automation is to support some reasonable, not necessarily optimal actions, and to avoid things that'll burn adventures endlessly or repeatedly hit the same adventure without using turns and getting stuck.

Tracking:
For each of the four areas, we'll track, in one preference, area unlocked, boss encounter, boss defeat, stone triangle gained. Preference can be 0, 1, 6, 7, or 8, 8 being gaining triangle. We'll try to recover from unknown information a bit, so adventuring in an area will set preference to 1, if it was previously 0, in case unlock missed. not meeting boss will set to 7 if previously lower. Gaining amulet will set all to 8. 2-5 will be used to count bowling so it's known when boss appears for spoiler information in Hidden Bowling Alley.
State of hiddenTavern, set to ascension number, set by using book of matches or visiting tavern.
Whether Lawyers have been relocated to Hidden Park, set to ascension number, set by choosing choice adventure or meeting one in Park.
Whether Janitors have been relocated to Hidden Park, set to ascension number, set by choosing choice adventure or meeting one in Park.

Proposed automation :
Each shrine - Choice Manager options will be show in browser or unlock building / get stone triangle. Leave would endlessly repeat, buff is too niche (and isn't now blocked when you complete quest), would let you complete area by adventuring once before building area, once afterwards, with the same settings (and goal of 1 non combat).
Hidden Apartment - Choice Manager options will be show in browser, if thrice cursed fight boss else get cursed, banish lawyers then leave, leave. Choosing "if thrice cursed fight boss, else get cursed" should allow you to complete area with goal of appropriate stone sphere.
Hidden Hospital - Choice Manager options will be show in browser, fight boss. Leave would endlessly repeat. Will not support changing equipment to fight boss.
Hidden Office - If appropriate setting (a la Talisman of Nam) is set, autocreate McClusky File (complete) when you have file 5 and boring binder clip. Choice Manager options will be show in browser, fight boss with complete file or boss already unlocked if no binder clip get one else fight accountant, fight accountant, leave. Choosing the fight boss option will allow you to complete area with goal of appropriate stone sphere.
Hidden Bowling Alley - Choice Manager options will be show in browser, bowl. Leave would endlessly repeat. Choosing bowl will allow you to complete area with goal of appropriate stone sphere.
Hidden Ziggurat - Choice Manager options will be show in browser, fight boss. Leave would endlessly repeat. Choosing fight boss will allow you to complete area with goal of amulet.

Other :
Update location detail for presence of lawyers and janitors based on whether they've been relocated.
Only allow shopping in hidden tavern if unlocked.

Will start working on this in a few hours, so good time to say if I'm on the wrong track or there's more support you want!
 
Last edited:
Getting there, but I think I need some advice, have attached patch so far.

Stuff that doesn't seem to be working right yet :
Unlock hidden tavern by visiting it, trying using NPCPurchaseRequest.parseResponse, but when I visit in relay browser it doesn't update. Maybe I have to use it somewhere else, is this only hit with automation?
Recognise that I'm fighting lawyer or janitor in the park, trying using FightRequest.updateCombatData, but hitting in relay browser doesn't update. Again, somewhere else needed?
Probably would have the same issues with my fighting ancient spirits code in FightRequest.updateCombatData.

Stuff I'm not sure of the best place to add or best way to do yet :
How to update location detail to remove janitors/lawyers from locations as appropriate and add to park.
How best to identify when a location has been adventured in and then update unlocked zones quest info if inaccurate.
How best to identify when a McClusky file doesn't drop (if you don't have complete file, this will mean you have unlocked Office boss at least) from Accountant.
How best to identify when binder clip isn't found in non-combat.
How best to refresh booze list when Hidden Tavern unlocked.

Any advice welcomed, will work on this more tomorrow.
 

Attachments

Unlock hidden tavern by visiting it, trying using NPCPurchaseRequest.parseResponse, but when I visit in relay browser it doesn't update. Maybe I have to use it somewhere else, is this only hit with automation?
That method is called when visiting store.php. The Hidden Tavern uses shop.php. The method you need is NPCPurchaseRequest.parseShopResponse.

Recognise that I'm fighting lawyer or janitor in the park, trying using FightRequest.updateCombatData, but hitting in relay browser doesn't update. Again, somewhere else needed?

Probably would have the same issues with my fighting ancient spirits code in FightRequest.updateCombatData.
That method is called by GenericRequest.parseResponse. A RelayRequest is such. It is most certainly called in the Relay Browser. I suppose I will have to look at the patch to see if there's anything obvious.

How to update location detail to remove janitors/lawyers from locations as appropriate and add to park.
Tricky. Which monsters are in which location is initialized when combats.txt is read. If you log out and back in again without closing KoLmafia, it does not reload that file, currently.

How best to identify when a location has been adventured in and then update unlocked zones quest info if inaccurate.
Look at KoLAdventure.setNextLocation( KoLAdventure, String )

How best to identify when a McClusky file doesn't drop (if you don't have complete file, this will mean you have unlocked Office boss at least) from Accountant.
Look at QuestManager.updateQuestData( String responseText, String monster );

How best to identify when binder clip isn't found in non-combat.
I don't know what this means. You take a particular choice/decision which will get you the clip, but you don't get it for some reason? Because you already have it or already have the full file - or have already used the full file? Look At ChoiceManager.postChoice2

How best to refresh booze list when Hidden Tavern unlocked.
I'll have to think about that.
 
Thanks, that'll get me a good kick on tomorrow.

I suspect we never currently update monster location information, so there isn't anything else to use it. Was trying to think of other areas it might be useful, but I'm not sure there are any yet. I guess scripts which build monster queues and work out likelihood of monsters appearing can update it.
 
Recognise that I'm fighting lawyer or janitor in the park, trying using FightRequest.updateCombatData, but hitting in relay browser doesn't update. Again, somewhere else needed?
adventures.txt:
Code:
HiddenCity	adventure=345	false	outdoor	The Hidden Park
AdventurePool.java in your patch:
Code:
	public static final int HIDDEN_PARK = 348;
See the problem?
 
Well, other than changing the monsters in locations, which I think I'll think about and maybe start a feature request for, I think this is done.

Have tested everything I can bearing in mind I'd started testing this patch with the quest completed.
 

Attachments

Last edited:
I submitted it as revision 12553 (and 12554). I look forward to seeing how it works out in-run.
Thanks.
 
The blood-pressure cuff has been renamed.

Unknown item found: sphygmomanometer (6715, 604339447)
--------------------
6715 sphygmomanometer 604339447 bpcuff.gif accessory t,d 137
sphygmomanometer 160 Mys: 65
sphygmomanometer Maximum HP: +60, HP Regen Min: 5, HP Regen Max: 10
--------------------
Plural: sphygmomanomanomomemeters
 
The rename happened. The automation bits proposed in 47 aren't done currently... at least, last I tried, I was able to infinite-loop in the shrines...
 
The rename happened. The automation bits proposed in 47 aren't done currently... at least, last I tried, I was able to infinite-loop in the shrines...

What settings did you have, what stage were you at in the quest, etc ?

I should be back to being able to test in-run stuff shortly, got my last Dread stuff yesterday.
 
Beginning of the quest, choices unset, I told it to unlock the shrine and start adventuring there again. It kept trying to open the already opened-shrine. Or turn in the sphere. Lots of times. Didn't have any goals set, as I was adventuring using the gCLI rather than the Adventure tab and I knew that the choice was unset.

It's similar to the loop avoidance issues and bad manual choice-adv issue that came up a few weeks ago. If a user sets something that doesn't exist, should mafia keep trying in hopes that someday it will work, or should mafia abort or stop automation when it sees a problem?

From your question though, I'm guessing that the special automation is all done by having the right goal set to force mafia into its special automations? I did notice it automatically using the binder clip this run, though no other automation happened in my gCLI adventuring today.
 
Back
Top