Feature - Implemented Count hipster combats

Bale

Minion
Now that the hipster has a finite amount of goodness, like the bandersnatch or a spleen familiar. It would be very helpful if mafia would count the number of hipster combats in a day.

Maximum number of hipster combats in a day: 7

Hipster Enemies:
angry bassist
blue-haired girl
evil ex-girlfriend
peeved roommate
random scenester​

Thank you for considering this.
 

Theraze

Active member
So... are there spleen familiars Kirkpatrick mentioned that do something similar to this? If there's something similar that already exists, I should be able to whip together a patch fairly quickly...
 

lostcalpolydude

Developer
Staff member
So... are there spleen familiars Kirkpatrick mentioned that do something similar to this? If there's something similar that already exists, I should be able to whip together a patch fairly quickly...

The astral bader, llama lama, green pixie, baby sandworm, and rogue program all drop items that mafia tracks. In this case it's tracking fights started against the monsters listed in the first post, so it probably isn't the same block of code. Also, if the fights are started by using spooky putty or a shaking 4-d camera, they shouldn't be counted (probably).
 

Grotfang

Developer
The setup works on two fronts. When an agua is dropped/hipster combat is encountered, mafia needs to add one to the daily setting.

Then mafia uses CharPaneDecorator.java (webui) getFamiliarAnnotation() to match the preference to a familiar and add the detail. Read that file and you will get the gist. Hope that helps.
 

Theraze

Active member
Distracted right now, but just for anyone who wonders, the current familiar special bits are named things like _astraldrops (badger), _aguadrops (sandworm), _gongdrops (llama), and extraRolloverAdventures (hare)... Guessing that the hare's fails to auto-wipe because it's needed for calculation/guessing how many adventures tomorrow gets, but that seems to contradict the wiki's point on that you only get extras based on the prior day's adventures with the hare...? Ah well. The badger drops are tracked in session/ResultProcessor, swingui/panel/DailyDeedsPanel, webui/BasementDecorator, and webui/CharPaneDecorator. Not sure where exactly we'll want the hipster to show... Daily Deeds? Where else?

A question for you, the people that use a hipster:
Is the hipster usage set on beginning or end of combat? If you flee/tatter out of a hipster fight, do you get another, or is that it? This will affect whether the count is incremented at beginning or end of battle...
 

Veracity

Developer
Staff member
extraRolloverAdventures is used for both the hare and the gibberer. That variable was introduced before the "_" convention was created to indicate that the variable is reset on rollover and, therefore, is manually reset each rollover in KoLmafia.resetCounters() along with a bunch of other variables that similarly preceded "autowiping", as you put it.

Hipster special monster counter should probably appear on charpane and sidepane, just like the "daily drop" familiars.
 
Last edited:

Theraze

Active member
Okay, I'll work out the hipster combat as soon as I know if it's start or end of combat that it gets tagged...

Unrelated to that, here's a patch that should make the Gibberer adventures actually display. Veracity just said it's supposed to display the same as Wild Hare (and uses that same field), but it wasn't set to show before... Added it to the charpanel and basement display (whatever that is)...
 

Attachments

  • Gibberer-Hare.patch
    1.1 KB · Views: 32

Theraze

Active member
Hmm... Looking at the code right now and it seems that it's missing the data on the 5 monster fights... someone have an updated version of monsters.txt? The items exist, but the monsters (the important part for this) don't... Really hard to match finding specific monsters if I can't find their numbers. :)

Edit: Once I have that, looks like the 'start of combat' check is going to go into the wonInitiative function (around line 415, because that's before the first function escape) in FightRequest, because that's the only place I find that actually checks on it being Round 1... everything else goes based on end of fight. If someone knows why that's a bad idea, let me know and I'll look for a better place to insert this. :D
 
Last edited:

Veracity

Developer
Staff member
Monsters don't have numbers. They have names. All you need to do is add the monsters - with HP of 0, since there has to be SOME data for them - into monsters.txt.

And no,. I really do not like adding this kind of code to wonInitiative. FightRequuest.updateCurrentRound has a section for curentRound == 0 which already does "start of round" stuff - like counting stinky cheese counter and registering the monster you are fighting.
 
Last edited:

Theraze

Active member
Ah, excellent... Sorry, wonInitiative was the only place that has CurrentRound == 1, so that's why I was pondering there, but it definitely seemed cludgey, hence asing for a better place (actually updateCombatData), which you supplied. Thanks! :D I'll dump it there instead.

And I'll put in the semi-placeholder (I'll use as much info as I can from the wiki) monsters into monsters.txt... just wasn't sure what needed to happen to enable those. This is definitely going to be more complicated than the previous 6 patches.

Edit: Wiki doesn't say how often the items drop. I'll say 100 for now, if it's not, let me know.

Edit2: Patch is done... all I need is verification regarding camera/putty fights... do they count towards hipster limit, and is there a variable that tracks if a fight is started by them.
 
Last edited:

Theraze

Active member
New post, new patch. This one uses KoLmafia.ignoreSemirare to (try to) detect putty/camera usage. If you enter combat with one of the 5 unique monsters, and ignoreSemirare isn't set, it should increment the _hipsterAdv count by one (FightRequest). It should also consider the hipster to be a useful familiar (BasementDecorator), display in daily deeds in the adventure section (DailyDeedsPanel), and have a mouseover for how many more are possible (CharPaneDecorator).

This patch also has the 2 fixes for Gibberers I found after Veracity mentioned how they're supposed to be similar to Wild Hares, namely adding them to BasementDecorator as a useful familiar, and giving them a mouseover in CharPaneDecorator.

Edit: Also needed to make ignoreSemirare into a public boolean instead of private in KoLmafia file. This does mean that other coders can also call it to see if the combat is puttied or camera-ed, since that's the only spot where it returns true. Any other spots where putty or camera monsters aren't handled besides semirares?
 
Last edited:

Theraze

Active member
Or conditional? I see that the top collection in the wiki is 4... Maybe it's a "only if not in inventory" kind of drop?
 

lostcalpolydude

Developer
Staff member
I don't think the hipster belongs as a useful familiar for the basement. adventure.php isn't used, so you can't get hipster fights there.
 

Theraze

Active member
Ah, will remove it from usefulness then. If it never triggers there, then it's not a good random-entry familiar. As you mention that, I'm noting that a lot of the other 'useful' familiars there have limited usefulness that isn't being checked currently... Specifically, the Sandworm is always listed as useful instead of just until the 5th drop. Is that supposed to be the case, or should it stop being considered useful after, like the Badger, Pixie, Llama, and Tron?

Also set the hipster drops to 10%, so that drop-boosting skills will still activate... anyone have more information on gaining the items? Are they 100% for one? Are they no-pickpocket? Are they multiple gain, pickpocket, but low chance? Where do we put these settings...? Anyways, new patch together with lower drop chance and non-basementing on the hipster.

And yes, I'm not sure if it's clear from my questions, but I don't have a mini-hipster myself. So I'm in the same level of questioning as the Golgafrinchams wondering if fire needs to be nasally applicable. :)
 

Attachments

  • HipsterTracking.patch
    4.7 KB · Views: 31

lidden

Member
Specifically, the Sandworm is always listed as useful instead of just until the 5th drop. Is that supposed to be the case, or should it stop being considered useful after, like the Badger, Pixie, Llama, and Tron?

Sandworm is the best statfamiliar in the basement, that is always useful.
 
Top