Feature - Implemented Jack charge counter

th3y

Member
OK, I've been starting to fiddle with the Jack-in-the-box in run.

It would be nice if Kolmafia could watch for the texts "You turn <name>'s crank for a while" and "The tension builds as you turn <name>'s crank some more" to maintain a charge counter. That would facilitate occasionally charging the jack when opportunity presented itself during a run (and then not having to worry about remembering later how many times you did so).

Super bonus points if the Jack icon in the main interface and relay browser were decorated with the charge counter, similar to Bandersnatch runaways.

This could also be used to more accurately calculate drop rates when a Jack, known to be fully charged, is equipped.

-Th3y thank you
 
Last edited:

slyz

Developer
If this gets implemented, I just wanted to point out that Jack charges reset at rollover.
 

PeKaJe

Member
Since I've been using the Jack-in-the-Box for Hobopolis boss killing, I've been disappointed that +item wasn't registering correctly for this familiar.
Figuring that this would be a good excuse to freshen up my Java skills, I went ahead and implemented this feature.

I'm not entirely sure how much can be done with the modifiers.txt coding, and I was unable to get it to set the "effectiveness" only when the charge tracker was exactly 2, so I ended up using two tracking variables. One for charge count, one for "ready". Another problem was that "effectiveness" seems to default to 0 for the generic familiars, but since this one actually can be a non-functioning fairy/volleyball, I made an exclusion in Modifiers.java. If ever there is introduced another familiar that can be 0-effectiveness under some conditions, this might need to be reworked.
 

Attachments

  • jitb.patch
    5.7 KB · Views: 43

roippi

Developer
A good start, but needs some work.

I'm not entirely sure how much can be done with the modifiers.txt coding, and I was unable to get it to set the "effectiveness" only when the charge tracker was exactly 2, so I ended up using two tracking variables.

How about 2*(floor(pref(_jitbCharge)/2))?
 
Top