New Content - Implemented September 26 - character-pane-slimming toggles

Catch-22

Active member
KoLmafia's charpane decorator (and possibly other things) do not currently fully support these new options.
 

Catch-22

Active member
The link in the relay browser to restore MP doesn't work, for instance. That's all I see after a cursory glance.

Yes, also true for the restore HP link. That's all I noticed, but I barely use the relay browser. So far nothing seems to have horribly broken from this change, which is nice, I like the new look :)
 

Bale

Minion
Confirmed. Restore links for HP and MP aren't working regardless of new options being enabled.

Next time, please report the specifics of the bug.
 

Catch-22

Active member
I figured someone who had more time could investigate further, didn't want to be too specific in case more than just what I noticed in 10 seconds wasn't working.

Also, the HP/MP restore links are working for me if I have the new options disabled, but I am not entirely familiar with the relay browser experience, so perhaps they are not working in the same way that they used to work.

Edit: The current matcher code used by the charpane decorator is a little funky, I should be able to come up with something that plays nice with the settings on and off.
 
Last edited:

Catch-22

Active member
I felt like the old way of handling the HP/MP restore links was a little bit scattered, so I've got a new method here. I'd like to give the same treatment to the compact character pane too, but at the moment I don't have time.

Posting what I have so far, in it's current form it will fix the problem, but I'd like to migrate the old code to use this method too and get rid of the legacy stuff. Hopefully a dev can give the thumbs up.
 
Last edited:

Catch-22

Active member
New patch, should bring everything back into line.

Uses a new method which is hopefully more robust, no comment from the devs last time so I'm not sure if they approve or not but oh well.
 
Last edited:

lostcalpolydude

Developer
Staff member
Using a full charpane, and without turning on slim HP/MP, I actually lose the MP restore link by applying the patch, and turning on slim HP/MP doesn't make it show up. My only guess is that the for loop isn't doing what it was meant to do.
 

Catch-22

Active member
The patch was working for me but I just noticed that I did make an incorrect change to the current >= threshold logic, so it's possible what you saw was the result of that. This patch fixes that, and adds a space between the for and ( for proper mafia formatting.

Try again? :)
 
Last edited:

lostcalpolydude

Developer
Staff member
I tried the previous patch with the current < threshold block commented out, actually (all it was really doing is checking if you have less than maximum HP/MP).
 

Catch-22

Active member
I tried the previous patch with the current < threshold block commented out, actually (all it was really doing is checking if you have less than maximum HP/MP).

Yeah, I didn't think the change I had made would've caused it not to appear, but I think it was making the restore link work even if you had max HP, so I changed it back. I have no idea why it's not working for you, perhaps the pattern is different? That's strange. What settings do you have in the sidepane for KoL? I will set them exactly the same and see if it works on mine.

I tried: Compact sidepanel on, compact off with both slim toggles turned on, compact off with slim effects on but slim stats off, they all worked for me. Silly question, but you don't have full HP/MP or anything like that, right?
 

lostcalpolydude

Developer
Staff member
Full charpane, any setup for the new settings. The HTML looked identical (other than "hp" versus "mp"). I made sure I didn't have full MP. To make sure there wasn't some mafia setting I was overlooking, I made sure the link showed up without that patch.
 

Catch-22

Active member
Honestly, I'm scratching my head. I can't get it to fail, I've tried enabling everything in the charpane options, it still works for me, I tried on a boriscore character too, worked fine.

If you, or anyone else following this thread has time to test out this build, it's the exact one I am using, it's built against the latest revision and only with the patch above applied. Just trying to figure out if my machine is the only one it works on.

Edit: The only option I can't properly test is "Display PvP Fights Remaining in the Character Pane", because I don't have a broken hippy stone. Maybe try turning that off, see if it works? At least then I'll know if that's what is causing the problem.
 
Last edited:

lostcalpolydude

Developer
Staff member
I tried using the build from that link and got this:

Exception in thread "main" java.lang.UnsupportedClassVersionError: net/java/dev/spellcast/utilities/ActionPanel : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:341)
 

Catch-22

Active member
No, I don't even have a broken stone on that character.

Well, I give up trying to figure out why what works in my JVM doesn't work in yours :(

Alternate logic flow for the matcher iteration, using a while loop instead of a for loop, I guess see if that behaves any differently for you? It's probably more readable, anyway.
 
Last edited:

lostcalpolydude

Developer
Staff member
In compact mode, everything is working great. In full mode (lots of variations on other settings tested), I get the MP restore link only when I don't have an HP restore link. Adding some print statements shows that when it gets to the MP part, it only runs one iteration of the while loop where stat.toUpperCase() is "HP", doesn't match "MP, and it does nothing. I wonder if the wildcard is matching too much.

Switching it around so that MP is done before HP seems to make everything work.
 
Top