PDA

View Full Version : Character Info Toolbox



Chez
08-15-2011, 10:08 PM
Character Info Toolbox

CHIT is a (very experimental) charpane relay override that allows you to customize the layout and content displayed in your character pane. It also adds some extra functionality, like the ability to quickly change your familiar equipment. And progress bars. Lots and lots of progress bars. And cute little icons.

The script itself contains detailed instructions for setting up and customizing your charpane, so take a couple of minutes, read it, and play around.

CHIT does not currently support compact charpanes.

You will need the latest version of zlib (http://kolmafia.us/showthread.php?2072-ZLib-Zarqon-s-useful-function-library), and a recent mafia daily build (http://builds.kolmafia.us/) for everything to work.

Once you've downloaded the zip file in the following post, extract all the files to the following folders in your mafia directory:

charpane.ash: /relay
chit.js: /relay
chit.css: /relay
chit_effects.txt: /data
images: /images/relayimages/chit/

Note that the directory structure in the zip file is the same as this, so if you feel confident you can simply extract it to your mafia directory and let everything unzip into the proper places.

This is my first serious attempt at an ash script, so any feedback is greatly appreciated.

Changelog
2011/08/15 - Version 0.1 Initial Release
2011/08/16 - Version 0.2 Fixed bug with Kung-Fu Hustler (and probably other) intrinsic effects. Enabled daily version checking.
2011/08/19 - Version 0.3 Fixed some parsing errors when in Valhalla. Added Ronin information with a link to Hagnk's. Recognize Way of the Fist paths correctly. MCD changer now checks if the Gnomads camp is available. Changed the order of organs in the consumption toolbar popup. Added the "elements" tool (Displays the Elements chart fom the wiki)
Fixed a custom title parsing bug. Fixed some documentation errors. Added chit.stats.showbars preference. Added chit.effects.usermap preference
2011/08/25 - Version 0.4 Fixed a typo in 0.3 that prevented the semirare helper from popping up. Added "updates" brick. Quests brick now recognizes the new "This quest tracker is a work in progress" message. Fixed various bugs related to moods, effects and intrinsics. Added a "Burn extra MP" toolbar icon. Made layout changes so that the charpane doesn't look horrible when updated via AJAX. Various other small code and styling tweaks
2011/09/03 - Version 0.5 Fixed more documentation errors (update vs. updates, spelling mistakes). When no MCD is available (unascended characters), show only ML info. Add link to Hey Deze for characters in Bad Moon (untested)


DOWNLOAD from the following post!

lostcalpolydude
08-15-2011, 10:47 PM
Could you add a screenshot to that post? That's a lot of files to put in various folders, and the number of files makes it more daunting to go ahead and try it.

Not that it matters in my case since I'm attached to my compact charpane.

Bale
08-15-2011, 10:47 PM
Character Info Toolbox 0.6.6


Download charpane.ash to /relay
The zip file is numbered for the last version it was updated.
Any files newer than that version are attached separately.
Download all files to the correct directories (as listed in the above post and indicated by file structure in the zip file).

Chez
08-16-2011, 04:48 AM
Original post updated with screenshot. I've included 3 panels in the screenshot for comparison. The first is the vanilla kol charpane, the 2nd shows the override charpane with mostly default settings.

The 3rd panel moves a lot of information to the toolbar, where it can be accessed by clicking on various icons. It also illustrates some other settings that can be applied, and is probably as close as you're going to get to a "compact" look.

roippi
08-16-2011, 04:57 AM
Color me impressed.

Theraze
08-16-2011, 05:25 AM
Yeah... the addition of the screenshots moved this from "Meh, that looks like a lot of work" to the "but it might be worth it." area. :)

charred
08-16-2011, 12:41 PM
looks fantastic! looking forward to getting used to it. my gcli keeps printing out the following after everything i do though..

The string "∞" is not an integer; returning 0 (charpane.ash, line 629)

Chez
08-16-2011, 01:49 PM
Thanks! :)

I'll have a look at that error. Can you tell me which effects (specifically intrinsic effects) you have active when getting that message? And if the error goes away if you don't have any intrinsic effects?

charred
08-16-2011, 02:08 PM
my intrinsics are the 4 kung fu hustler skills, but i cant get rid of them because im doing a surprising fist run and cant equip any weapons

edit: i know you have axel for the little girl in space, are you able to put something in for the crypt evil counter?

Chez
08-16-2011, 02:39 PM
i know you have axel for the little girl in space, are you able to put something in for the crypt evil counter?
Already built in. Should be displayed if you have quest nudges enabled.

charred
08-16-2011, 02:49 PM
ah, gotcha. i turned them off

Chez
08-16-2011, 05:11 PM
Fixed bug with intrinsic effects (charred assured me it's working fine now, since I can't test the Kung-Fu skills myself). Also added daily version checking, now that I actually have a thread to check against.

IceColdFever
08-17-2011, 04:02 PM
I can't seem to get the consumption information to show up on the toolbar.

Chez
08-17-2011, 04:12 PM
I can't seem to get the consumption information to show up on the toolbar.
What's the value of your chit.toolbar.layout preference? (Typing 'zlib vars' in the cli should tell you)

Edit: Ugh, nevermind. The correct value to use should be "organs", not "consumption" as stated in the documentation.

IceColdFever
08-17-2011, 04:40 PM
That did it! Thanks!

I really like the looks and functionality of this relay script. The only thing that is missing (from my own custom charpane relay) is the element chart (http://kol.coldfront.net/thekolwiki/images/1/19/Elements2.gif). Any chance you could add this as an option for the toolbar?

edit: Also, Mafia's defaults are for Full, Drunk, Spleen in that order, but you put spleen first. I know I can change that for the stats.layout, but is there a way to change the order in the toolbar organs list?

Chez
08-17-2011, 05:01 PM
Also, Mafia's defaults are for Full, Drunk, Spleen in that order, but you put spleen first. I know I can change that for the stats.layout, but is there a way to change the order in the toolbar organs list?
I think adding an option to sort organs in the toolbar list will be overkill...I'm just going to change it to be consistent with mafia. And I like the idea of the element chart. Should be fairly straightforward to implement, so I'll add that in an upcoming release.

lostcalpolydude
08-18-2011, 01:49 PM
I think I'll be heavily modifying the Modifiers section to make it fit my needs (having things disappear once the value is high enough, removing some parts of it that just aren't useful (like DR with high DA)).

I have a custom title that includes my level, so the script thinks I don't have one.

I might be the only person, that thinks this, but progress bars generally seem useless to me (including the ones that KoL provides). Some of them from this script have identical information to the text right by them (and interfere with my desire to have things be compact). Others have information that I would prefer in text form. If it's just me then I'll figure out how to change it in my copy.

I think I would like a chit.effects.showname setting.

Winterbay
08-18-2011, 01:56 PM
I love progress bars. They show me how close I am to something and I have activated all of the ones in KoL :)
If the exact same information is given in text I think I'd rather have the bar and have the text as a mouseover than just the text.

lostcalpolydude
08-18-2011, 02:31 PM
I love progress bars. They show me how close I am to something and I have activated all of the ones in KoL :)
If the exact same information is given in text I think I'd rather have the bar and have the text as a mouseover than just the text.
Even for your HP and MP, and for organ usage? Knowing that I have 1 liver left instead of 2 is something that I don't want mouseover text to read.

I realize I might be the only person that sees "1203 needed" (substats to next level), looks at the 32 turn counter until my semi-rare, and determines in my head that 38 mainstat/turn is enough to reach the next level in time for ASCII.

Winterbay
08-18-2011, 02:43 PM
You got me on those I think... Those are values that are probably better off as numbers rather than as bars.

Chez
08-18-2011, 02:46 PM
I think I'll be heavily modifying the Modifiers section to make it fit my needs (having things disappear once the value is high enough, removing some parts of it that just aren't useful (like DR with high DA)).
I'll admit that modifiers were something I added in quite late, and not something I spent too much time thinking about. Due to the sheer number of modifiers available, and the fact that people likely have vastly differing opinions on which ones are useful, I'm not even sure it's possible to make them configurable in a meaningful, non-sucky way. I kinda figured some users would be happy with the set I included, and scripters would adapt it according to taste. Also, I assumed most people would stick it in the toolbar, where the amount of space it occupies isn't as crucial.


I have a custom title that includes my level, so the script thinks I don't have one.
Hah. I had some clannies with custom avatars/titles send me some html snippets to look at, since I don't have either of those myself. Obviously I missed something. If you can post (or kmail me in-game) the relevant bits of the (unmodified) charpane html I'll have a look.


I might be the only person, that thinks this, but progress bars generally seem useless to me (including the ones that KoL provides). Some of them from this script have identical information to the text right by them (and interfere with my desire to have things be compact). Others have information that I would prefer in text form. If it's just me then I'll figure out how to change it in my copy.
I actually agree with most of that, and it's something I considered. In the end I decided to keep the progress bars because
a) It looked kinda empty without them
b) removing them didn't save any vertical space, which is what most people care about

I'm going to include an option to remove all those progress bars. (Seeing only the stuff you care about is the whole point of this script)


I think I would like a chit.effects.showname setting.
I'm assuming you mean an option to not show the effect name, only the icon? I don't see why not.

lostcalpolydude
08-18-2011, 03:01 PM
HTML with and without the custom title.


<img src="/images/otherimages/accordionthief_f.gif" width=60 height=100 border=0></a></td><td valign=center><center><a class=nounder target=mainpane href="charsheet.php"><b>bmaher</b></a><br>autosold 13 dictionaries so far today<table title='5,175 / 8,025' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=5 width=64 bgcolor=#5A5A5A></td><td width=36 bgcolor=white></td></tr></table></td></tr></table><table align=center><tr><td align=right>Muscle:


<img src="/images/otherimages/accordionthief_f.gif" width=60 height=100 border=0></a></td><td valign=center><center><a class=nounder target=mainpane href="charsheet.php"><b>bmaher</b></a><br>Level 13<br>Accordion Thief<table title='5,718 / 8,025' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=5 width=71 bgcolor=#5A5A5A></td><td width=29 bgcolor=white></td></tr></table></td></tr></table><table align=center><tr><td align=right>Muscle:

My charpane override (posted somewhere around here) was a (possibly poorly done) attempt at configurable modifiers being displayed. The main issue with undesired modifiers was that it makes the ones you care about not stand out so much.

Chez
08-18-2011, 03:23 PM
Thanks, will be fixed in the next release. I'll have a look at your script again and give it some more thought.

Chez
08-19-2011, 08:00 AM
Version 0.3 uploaded


Fixed some parsing errors when in Valhalla
Added Ronin information with a link to Hagnk's
Recognize Way of the Fist paths correctly
MCD changer now checks if the Gnomads camp is available
Changed the order of organs in the consumption toolbar popup
Added the "elements" tool (Displays the Elements chart fom the wiki)
Fixed a custom title parsing bug
Fixed some documentation errors
Added chit.stats.showbars preference. Setting this to false will hide all progress bars in "My Stats"
Added chit.effects.usermap preference. Setting this to true will attempt to load chit_effects_<myname>.txt instead of chit_effect.txt
This will allow you to customize styling/renaming of effects on a per-character basis

charred
08-20-2011, 02:37 PM
Edit: was a mafia error. did a clean install of mafia and its all good ;)

roippi
08-20-2011, 07:06 PM
If I haven't mentioned it yet, I'm very impressed by this override. It's probably the most professional-feeling of any that I've tried.

Two functionality losses from vanilla that I miss:

-When an effect that is in your mood has zero turns, it loses the "up" arrow next to it. Clicking the mood execute button refills it, but occasionally I just want to re-up that individual buff in lieu of all of them.
-Maybe I just can't find it, but I can't find any "burn mana" button on the interface. Usually the mood execute button turns into that if (all mood buffs > trigger) && (mana > burn threshold).

Other than that, I'm very content with this mod. Good job.

Winterbay
08-20-2011, 08:22 PM
I tried setting the setting to have the icons show up as class icons for all my buffs but nothing happened. I then set it to do so for only AT buffs, and yet again nothing happened. Is this a) intentional, b) a bug or c) an error on my part? :)

Chez
08-20-2011, 09:28 PM
If I haven't mentioned it yet, I'm very impressed by this override. It's probably the most professional-feeling of any that I've tried.

Two functionality losses from vanilla that I miss:

-When an effect that is in your mood has zero turns, it loses the "up" arrow next to it. Clicking the mood execute button refills it, but occasionally I just want to re-up that individual buff in lieu of all of them.
-Maybe I just can't find it, but I can't find any "burn mana" button on the interface. Usually the mood execute button turns into that if (all mood buffs > trigger) && (mana > burn threshold).

Other than that, I'm very content with this mod. Good job.
Thank you, I'm glad you like it. I don't usually (or ever) run moods in the relay browser, which is probably why I missed that. I've never even seen the "burn mana" button. :D

I'll have a decent look at moods when I come out of my current HC run in a few days.

Chez
08-20-2011, 09:36 PM
I tried setting the setting to have the icons show up as class icons for all my buffs but nothing happened. I then set it to do so for only AT buffs, and yet again nothing happened. Is this a) intentional, b) a bug or c) an error on my part? :)
Not intentional. If you have chit.effects.classicons set to something like sc,tt,pm,sa,db,at it should work for all classes.

The script uses the chit_effects.txt (or chit_effects_yourname.txt) file to determine which class each buff belongs to. If it can't load that map for some reason it may explain why it's not working for you.

T_E
08-21-2011, 09:36 PM
This is really cool.
I have a question regarding the toolbar. I'm trying to get my setup to look more like the third image in your screenshot but additional icons aren't showing up even after I add them to zlib chit.toolbar.layout list via the cli. I'm sure I'm doing something wrong (I'm having a difficult time reading the documentation due to my laptop screwing up the spacing- I've had that trouble with other files so I'm sure it's my issue not yours) but if you could advise me that would be awesome. Thanks! =)

Chez
08-21-2011, 09:45 PM
What's your current value for chit.toolbar.layout? Are you not seeing any additional icons, only the refresh and mood icons?

T_E
08-21-2011, 09:56 PM
What's your current value for chit.toolbar.layout? Are you not seeing any additional icons, only the refresh and mood icons?

zlib chit.toolbar.layout = effects,modifiers

Appearing on my toolbar are the reload icon, modifier icon, and the save mood icon. I have quest set to false.
EDIT: and I've just noticed in your documentation that effects is not an option for the toolbar- my fault. The problem is that my laptop screen isn't tall enough for the scrollbar to show up in the effects area so I can't see them at the moment, unless I modify my screen setting to the point that I can't read the top text frame (I'm running Mr Script). I'll keep tweaking and trying to figure it out. =)

Chez
08-21-2011, 10:10 PM
A couple of bricks, including effects, are not available in the toolbar at the moment. Mostly because I didn't think anyone would not want to see that information at all times. Guess I was wrong... :o

The list of valid values for the toolbar is: trail,quests,helpers,organs,substats,modifiers,ele ments.

Edit: What might work for you is moving everything you currently have in your walls to the roof section. (So leave the walls completely blank). That will give you a much larger scrollable area. Alternatively, only keep the character info in the roof and move everything else to the walls.

T_E
08-21-2011, 11:12 PM
Thanks...doing that helped quite a bit. I now have a scrollbar along the whole side panel that works great.
The elements info in the toolbar is awesome- I'm always needing to look on the wiki for that so having it readily available is wonderful.

Rinn
08-22-2011, 11:43 PM
This is pretty cool, you might want to make a just build in a settings control to the toolbar to make modification easier. Having a visual notification that the script is out of date on the char pane might also be useful since anyone using this might not be watching the cli.

It also seems my fortune cookie counter isn't showing up anywhere with the default settings. I'm not sure though if I'd rather have a different brick for counters or just have them included with buffs, maybe at least allow ordering counters as a group like with intrinsics and songs? Edit: It seems it's only not showing up if I have no other active buffs? Also when I had a mood set where all the turns remaining were 0, the turn count showed up as ∞ and didn't show the arrow.

Additionally maybe an option to have clicking on your familiar open a quick familiar switcher pane instead of going to the terrarium.

Chez
08-23-2011, 05:47 AM
This is pretty cool, you might want to make a just build in a settings control to the toolbar to make modification easier.
I'll probably do that eventually, once all of the functionality is bedded down. In the meantime you can try FN Ninja's Zlib Manager (http://kolmafia.us/showthread.php?4537-Zlib-Variable-Manager). That's what I usually end up using myself when making changes.


Having a visual notification that the script is out of date on the char pane might also be useful since anyone using this might not be watching the cli.
Good idea! Since I modified zlib's check_version() to only show the update message once per day, instead of every time the the charpane is loaded, I was a bit worried that people might miss it. This will be a great solution.


It also seems my fortune cookie counter isn't showing up anywhere with the default settings. I'm not sure though if I'd rather have a different brick for counters or just have them included with buffs, maybe at least allow ordering counters as a group like with intrinsics and songs? Edit: It seems it's only not showing up if I have no other active buffs?
Correct. When there's no other active effects, mafia sticks the counters in some unexpected places (as far as I can tell it appends them to the last table it finds in the charpane). There's a related bug report here (http://kolmafia.us/showthread.php?7626-Relay-charpane-rearranges-with-no-effects). In any case, it's almost impossible for me to correctly parse that information, so it usually just gets ignored.


Also when I had a mood set where all the turns remaining were 0, the turn count showed up as ∞ and didn't show the arrow.
I'm going to play around with moods in the next few days. I'll add that to my list of things to look out for.


Additionally maybe an option to have clicking on your familiar open a quick familiar switcher pane instead of going to the terrarium.
Right-clicking on the familiar image should still work. I haven't removed that functionality from the vanilla charpane.

Thanks for all the great feedback. :)

caphector
08-24-2011, 05:43 PM
I'm having an odd issue with this; stuff in Walls slides up to the top of the charpane, covering the Roof. If I move stuff in Walls to the Floor, it stops doing it. Also, if I pull basics.js from the Relay folder the issue stops until Mafia recreates the file on next launch. I'm seeing this in Safari 5.0.5 in 10.6.8 and Safari 5.1 on 10.7.1. Running Mafia 9738.

Winterbay
08-24-2011, 07:38 PM
An interesting bug has come up for me. WHen using an item in-line (using it without reloading the page, just adding the result at the top) the floor (I guess it is, where I have my effects, the part at the bottom) moves ontop of the roof. Picture attached.

Edit: That image is perhaps not the best as I only had one effect on then, it gets a lot more interesting when you have 10-15 effects on...

Also, I love the fact that the sugar counter was displayed when I had a sugar shield on :)

Chez
08-24-2011, 07:41 PM
I'm having an odd issue with this; stuff in Walls slides up to the top of the charpane, covering the Roof. If I move stuff in Walls to the Floor, it stops doing it. Also, if I pull basics.js from the Relay folder the issue stops until Mafia recreates the file on next launch. I'm seeing this in Safari 5.0.5 in 10.6.8 and Safari 5.1 on 10.7.1. Running Mafia 9738.
I was wondering when somebody was going to mention that. I usually see it after using clicking on an inline [use] link. I should have a new version up some time tomorrow that addresses that. Unless your talking about every charpane load, in which case it's something I haven't seen yet.

Edit: @Winterbray...I think your bug is the same one mentioned by caphector. The inline use links trigger some javascript code (in basics.js) that uses an ajax request to update the body of the charpane, instead of a full charpane refresh. That means my own onLoad JS code (which positions all the different boxes) never fires. As soon as you resize the charpane frame everything jumps back into place. Hopefully the next update will sort it out.

IceColdFever
08-24-2011, 07:59 PM
I'm not sure if it's the effect of something else, but A Little Bit of Evil seemed to do weird things to my effects list. It didn't show how many turns I had remaining and it almost completely removed Go Get 'Em, Tiger! effect from showing (only showed the icon, in the wrong place).

5221

Chez
08-24-2011, 08:09 PM
Huh, that is weird. I'll have a look at it tomorrow when I have some turns to play with.

Veracity
08-24-2011, 08:19 PM
There are six different "A Little Bit Evil" effects - one per char class. KoLmafia distinguishes them in its data files, but KoL displays all of them as "A Little Bit Evil". If you want to query effect duration using have_effect(), you have to use the KoLmafia name.


597 A Little Bit Evil (Seal Clubber) skull.gif 3752badd13725a3e76aae40087a24509 use 1 seal eyeball
598 A Little Bit Evil (Turtle Tamer) skull.gif cb1df415b4274825c10c80a20cdfcfde eat 1 turtle soup
599 A Little Bit Evil (Pastamancer) skull.gif 244072381f75d26792bd945329b35b90 #any evil pasta
600 A Little Bit Evil (Sauceror) skull.gif 6450d9bde9246da079328b6344e6ea0c #any evil potion
601 A Little Bit Evil (Disco Bandit) skull.gif 87edab42bf74d77afabd67fb3ceefc00 #any evil mixed drink
602 A Little Bit Evil (Accordion Thief) skull.gif 736bcf0d80c5fdc9bcd0624e00056922 use 1 evil vihuela

Chez
08-24-2011, 08:27 PM
Thanks! I've learned so many new things about mafia since starting this script.

I'm not querying effect durations at all, merely trying to parse and make sense of the html I get from KoL/mafia. I'll pick up some evil vihuelas tomorrow and see what the html looks like for the effect.

caphector
08-24-2011, 08:31 PM
I was wondering when somebody was going to mention that. I usually see it after using clicking on an inline [use] link. I should have a new version up some time tomorrow that addresses that. Unless your talking about every charpane load, in which case it's something I haven't seen yet.

Every charpane load when I have the browser chat open. If I close kol chat, then it doesn't collapse. If I open chat then it does.

lostcalpolydude
08-24-2011, 10:10 PM
Every charpane load when I have the browser chat open. If I close kol chat, then it doesn't collapse. If I open chat then it does.
Someone mentioned the same thing in my charpane override thread, with it not loading properly if chat is open. That was years ago with a completely different script, and I never saw it, so I think it's going to be difficult to track down.

Chez
08-24-2011, 11:22 PM
I'm pretty sure it can be fixed by changing the refreshSidebar function in basics.js to not use ajax to update the content of the charpane, but simply do a top.charpane.location.reload() instead. When I wrote the gCLI integration for ActiveChat a long time ago I copied some code from basics.js and cli.html, and ran into similar problems. Resolved it by bypassing refreshSidebar and just doing a normal refresh of the charpane.

As far as I recall GM scripts also doesn't trigger when using ajax to update the charpane, so maybe it's worth having another look at it.

In any case, I've re-jigged my layout a bit to at least look semi-decent when the content is updated via ajax, so hopefully it won't be as much of an issue after I upload the next version.

Chez
08-25-2011, 12:40 PM
Version 0.4 uploaded


Fixed a typo in 0.3 that prevented the semirare helper from popping up
Added "updates" brick. This adds a notification to the charpane when new versions are available. Can be included either in the toolbar or any of the other containers. (only triggers when chit.checkversion = true)
Quests brick now recognizes the new "This quest tracker is a work in progress" message
Fixed various bugs related to moods, effects and intrinsics
Added a "Burn extra MP" toolbar icon
Made layout changes so that the charpane doesn't look horrible when updated via AJAX
Various other small code and styling tweaks


I hope this version addresses most of the issues mentioned. I'll be in aftercore for a while to inflict more tweaking if anybody spots anything that's still not displaying correctly.

sfwarlock
08-28-2011, 06:05 AM
(disregard, zlib versioning conflict)

Winterbay
08-28-2011, 12:00 PM
EHmm... No idea why this is happening but I have been getting printouts fo the following "CHIT: Compact Character Pane not supported" from time to time. During login (when looting the hermit), and intermittently during fights (when in the relay browser). I do not use the compact side pane even though I am using the compact top-menu (drop-downs instead of links).
r9755, latest CHIT.

Chez
08-28-2011, 01:02 PM
Hmm, that's really strange, and not something I've seen before. I check for compact charpanes by looking for "Familiar:" somewhere in the source. I'm sure there are better ways to do it, but that seemed as good as anything else at the time. The fact that it only happens intermittently makes me wonder if something else is going on. Like another script/process modifying the charpane before the override is called, or my script being triggered on a non-charpane page. Both of those seem unlikely, though.

Commenting out line 3169:
isCompact = true;should temporarily fix it, until I can figure it out. (or until someone hits me with a clue-stick, because honestly, I'm stumped as well)

charred
08-28-2011, 01:41 PM
i was getting the same error, wasnt using compact charpane either. commented out that line and now im getting
CHIT: Error parsing header
and in the relay browser the charpane is blank whenever it happens

Chez
08-28-2011, 01:52 PM
OK, that's starting to sound more like it's related to this bug report (http://kolmafia.us/showthread.php?7223-Relay-Browser-has-old-content/page5), where some people have reported getting blank charpanes (which would cause both of those CHIT error messages). I'm going to assume for now that's the case, and hopefully get some more feedback once that issue is resolved.

Winterbay
08-30-2011, 06:39 AM
Feature request: If you are in a run where you don't have access ot an MCD (i.e. a never ascended character) would it be possible to remove the link on the MCD and perhaps change it to just ML? Clicking on it now loads the charpane in the middle frame, a really huge charpane :)

Edit: Also, no longer having the odd issues with the script complaining about the compact pane thingie.

Chez
08-30-2011, 11:00 AM
Yup, I forgot about unascended characters not having moon signs. (So it's more of a bug report than a feature request) :D
Will be all fixed up in the next version.

T_E
08-30-2011, 10:28 PM
Is there an easy way to disable this when it starts misbehaving (besides deleting all of the files)?

lostcalpolydude
08-30-2011, 10:46 PM
Is there an easy way to disable this when it starts misbehaving (besides deleting all of the files)?
Rename charpane.ash to something else (like charpane2.ash, or maybe charpaneCHIT.ash if you want a reminder of what the file is).

Chez
08-31-2011, 05:55 AM
Yup, what lost said.

Also, if the script is misbehaving, please post a bug report here. Maybe it's something I can fix for those still using the script.

Sentrion
09-02-2011, 07:03 PM
I'm a little late to the party, but...awesome. Awesome, awesome, awesome.

Winterbay
09-02-2011, 07:04 PM
Under which circumstances would this not load? I have had it happen a few times that the "normal" charpane is loaded instead of the override, reloading the charpane gives the orveridden page again. Any idea why this might be happening?

Sentrion
09-02-2011, 07:13 PM
Just noticed one very tiny thing: One of your bricks is called "update" but is referred to in several places as "updates" (singular vs plural).

Also, one line in charpane.ash reads "Comma-seperated list of hats to include wit a Hatrack as your current familiar" - you misspelled "with" and "separated" (the latter is misspelled elsewhere as well). Not trying to be nit-picky here, just something I wanted to pass along in case you cared.

Chez
09-02-2011, 07:36 PM
Under which circumstances would this not load? I have had it happen a few times that the "normal" charpane is loaded instead of the override, reloading the charpane gives the orveridden page again. Any idea why this might be happening?
I see that too from time to time, usually when I'm adventuring quickly in the relay browser. I've also seen it happen when something puts mafia into a red state while I'm manually adventuring (like sugar items breaking, me getting beating up, etc). As to why it's happening...no idea. That's probably something that can be better answered by Veracity or Hola or someone equally clever.


Just noticed one very tiny thing: One of your bricks is called "update" but is referred to in several places as "updates" (singular vs plural).

Also, one line in charpane.ash reads "Comma-seperated list of hats to include wit a Hatrack as your current familiar" - you misspelled "with" and "separated" (the latter is misspelled elsewhere as well). Not trying to be nit-picky here, just something I wanted to pass along in case you cared.
Well spotted, and nope, I don't mind nit-picking at all. Those will all be fixed in the next version. The correct name of the brick is indeed "update" (singular)

Chez
09-03-2011, 05:07 PM
Version 0.5 Uploaded


Fixed more documentation errors (update vs. updates, spelling mistakes)
When no MCD is available (unascended characters), show only ML info
Add link to Hey Deze for characters in Bad Moon (untested).

So not much new in this release, but I wanted an excuse to get feedback on the "update" brick that was implemented in the previous version. :D

Winterbay
09-03-2011, 06:59 PM
Now you had me go and add it just because. Works nicely and looks nice as well :)

Edit: Allthough I got the following interesting error:


Missing password hash
Path: "/KoLmafia/chit.css"
Missing password hash
Path: "/KoLmafia/chit.js"

Chez
09-03-2011, 07:29 PM
Now you had me go and add it just because. Works nicely and looks nice as well :)

Edit: Allthough I got the following interesting error:


Missing password hash
Path: "/KoLmafia/chit.css"
Missing password hash
Path: "/KoLmafia/chit.js"

That is indeed an interesting error. ;)

I've seen this happen a couple of times (going back to version 0.1), usually after hitting a NC choice button in the relay browser that causes mafia to perform several steps. Like solving the word puzzle in the hidden temple, solving the volcano island maze, and some others that escape me now. Hitting one of the Goal buttons in the Louvre NC would probably work too.

I don't think it's my script *causing* it, although I don't know enough about the mafia internals to be sure.

Winterbay
09-03-2011, 07:35 PM
SOlving the temple puzzle was indeed what I had done just before that :)

Chez
09-03-2011, 08:07 PM
Great, so we know how to reproduce the problem! Doesn't bring us any closer to a solution though.

Script-wise, the only thing I can think of is hosting the javascript and css files off-site, but I'm not keen on doing that. Filing a mafia bug report might be the way to go, but the problem seems obscure enough and infrequent enough that I'm not convinced it would be worth chasing.

Sentrion
09-04-2011, 04:02 AM
Confirmed, updating works.

Feature requests:

An additional layout value which allows certain buffs to be displayed separately (identical to the "songs" value, but for different effects) - if this could be for any user-defined effect, that'd be cool, but if there needs to be a specific list, I'd vote for effects such as SR windows, other timers/counters, On the Trail, and Wanged.
Give us a preference over what to do when clicking on buff maintenance links (the up arrows) - for example, in aftercore, I would love to get my buffs from a bot rather than waste my own MP.


Totally trivial requests, and quite possibly too much work to be worth it, so feel free to ignore them, or put them way down on the to-do list. I'm pretty sure I can live without them.

Winterbay
09-04-2011, 05:30 AM
Question: Sometimes my sidepane is a scrollable page and sometimes the scrollbar is only on the effects. Is this intentional or an oddity with my browser (FF5)?
When the scrollbar is on the effects only and the "recent areas visited"-list gets a bit long, such as when you visit all four parts of the haunted wine cellar (2 lines for each entry in my setup), the effects box gets so small that it only shows 1 entry at a time, which makes it hard to read...

bordemstirs
09-04-2011, 06:11 AM
An additional layout value which allows certain buffs to be displayed separately (identical to the "songs" value, but for different effects) - if this could be for any user-defined effect, that'd be cool, but if there needs to be a specific list, I'd vote for effects such as SR windows, other timers/counters, On the Trail, and Wanged.
I'm not sure, but I think that might be what chit.effects.usermap is for.

Question: Sometimes my sidepane is a scrollable page and sometimes the scrollbar is only on the effects. Is this intentional or an oddity with my browser (FF5)?
When the scrollbar is on the effects only and the "recent areas visited"-list gets a bit long, such as when you visit all four parts of the haunted wine cellar (2 lines for each entry in my setup), the effects box gets so small that it only shows 1 entry at a time, which makes it hard to read...
Well, by design, it tries to show the Roof, Floor, and Toolbar at all times, only scrolling the walls; I think when your roof/floor/toolbar together get too big for one screen, it makes the whole thing scrollable.

Anyway, I LOVE THIS.
Would it be too much trouble to add adventures and meat to the options for the Stats section (and likewise similar options to have them removed from the Character section, though really it wouldn't bother me too much to have them appear in both)?

Sentrion
09-04-2011, 08:25 AM
I'm not sure, but I think that might be what chit.effects.usermap is for.You're probably right. I haven't looked into that one yet.

Chez
09-04-2011, 09:14 AM
Question: Sometimes my sidepane is a scrollable page and sometimes the scrollbar is only on the effects. Is this intentional or an oddity with my browser (FF5)?
When the scrollbar is on the effects only and the "recent areas visited"-list gets a bit long, such as when you visit all four parts of the haunted wine cellar (2 lines for each entry in my setup), the effects box gets so small that it only shows 1 entry at a time, which makes it hard to read...
bordemstirs hit the nail on the head. If vertical space is an issue you want to move bricks out of the fixed areas (roof and floor), and move them into either the walls or the toolbar. (the "trail" brick works well in the toolbar, especially if you also add the last adv link to the stats section for quick access). You can also try moving everything to the roof (leaving the walls blank).


An additional layout value which allows certain buffs to be displayed separately (identical to the "songs" value, but for different effects) - if this could be for any user-defined effect, that'd be cool, but if there needs to be a specific list, I'd vote for effects such as SR windows, other timers/counters, On the Trail, and Wanged.

If you want them displayed in a separate section, like songs and intrinsics, that's not possible at the moment. I toyed around with the idea of user-defined groups for a while, but it never quite came together. Having the effects split up into more sections and displayed out-of-order seemed more distracting than useful. I might have another look at this some time in the future, but probably not soon.

If you only want them to be styled differently (to make it easier to spot them in a list of effects), then chit_effects.txt is where you should look. You can specify custom styling for any effect there, and the effects listed there already should provide enough examples to get you started.

if chit.effects.usermap = true it will attempt to load chit_effects_yourname.txt instead. (useful if you play with multiple characters on the same PC)


Give us a preference over what to do when clicking on buff maintenance links (the up arrows) - for example, in aftercore, I would love to get my buffs from a bot rather than waste my own MP.
That's something I'm very unlikely to implement. Your best bet is to file a FR for this to be implemented in mafia itself.


Anyway, I LOVE THIS.
Would it be too much trouble to add adventures and meat to the options for the Stats section (and likewise similar options to have them removed from the Character section, though really it wouldn't bother me too much to have them appear in both)?
I'm gonna put this on the back-burner for now. It's not really something I want to do, but if enough people want the feature I'll reconsider.

bordemstirs
09-04-2011, 06:32 PM
Also, a clannie pointed out the play on words with your name. Clever. Very clever. ;)

roippi
09-04-2011, 06:35 PM
Here's a "fun" little bug that I'm having issues tracking down further.

After combats with the hipster as my familiar, I'm getting an error after combats that are resolved with a macro. What error, you may ask? Well.. a different error each combat, it seems.


Round 3: roippi wins the fight!
You gain 20 Muscleboundness
You gain 32 Enchantedness
You gain a Mysticality point!
You gain 64 Cheek
[trueform] does not match anything in the status effect database.

You gain 9 Strongness
You gain 7 Magicalness
You gain a Mysticality point!
You gain 29 Cheek
[ant pitchforkform] does not match anything in the status effect database.
Evaluator syntax error: can't understand fweight+1.2

Round 6: roippi wins the fight!
You gain 6 Fortitude
You gain 14 Enchantedness
You gain 26 Smarm
[ant pitchforkform] does not match anything in the status effect database.

You gain 9 Beefiness
You gain 16 Enchantedness
You gain 20 Sarcasm
Evaluator syntax error: can't understand <uparrow.png>

You gain 31 Beefiness
You gain 28 Magicalness
You gain 57 Sarcasm
Unexpected error, debug log printed.
Script execution aborted
Evaluator syntax error: can't understand <footsteps.png>

You gain 8 Fortitude
You gain 8 Enchantedness
You gain 28 Roguishness
Look! You found 1 spangly sombrero (400µ)!
ZLib setting chit.quests.hide normalized: 'false' => 'false'

etc. etc. Sometimes this results in the charpane reverting to its un-overridden form until refreshed; sometimes one status effect gets replaced with "oops". Fun, huh? This is specific to macrofied hipster combats. I can provide more info if you need :)

Chez
09-04-2011, 08:36 PM
Also, a clannie pointed out the play on words with your name. Clever. Very clever. ;)
It also complements my only other script nicely...Chit & Chat! :D


Here's a "fun" little bug...
Hmm. Wow. Hmmm.

Time to play with the hipster a bit, I guess.
I'll probably bug you over the next couple of days for more info if I can't reproduce it on my side.

roippi
09-04-2011, 09:39 PM
Hm. I can replicate it with my mimic, too. It seems like there's some sort of interaction between combats macroified by smartstasis and chit?

Chez
09-04-2011, 10:17 PM
Yeah, looks like some weird interaction between chit and...something. I'll have a quick look tomorrow when I'm not tired and overdrunk and out of adventures. :)

Winterbay
09-05-2011, 12:23 PM
I've seen this happen a couple of times (going back to version 0.1), usually after hitting a NC choice button in the relay browser that causes mafia to perform several steps. Like solving the word puzzle in the hidden temple, solving the volcano island maze, and some others that escape me now. Hitting one of the Goal buttons in the Louvre NC would probably work too.

Found another one for you: Handing in all four bandmember items in Pandamonium with the Mafia link gives that effect as well :)

Chez
09-05-2011, 02:23 PM
@Winterbray: I'm sure there are many such examples. I have no idea why mafia is expecting password hashes for files in the /relay folder. I'll file a mafia bug report and see if anyone can shed some light on it. (as soon as I think of a way to word the report that doesn't make me sound like a crazy person) ;)

@roippi: Damn, you have me stumped as well. I played some turns with the hipster and smartstasis, without being able to reproduce the bug. <footsteps.png> and <uparrow.png> aren't even used/referenced by my script, so I have no idea where that's coming from. Maybe a different script entirely?
I assume you're not getting the errors when chit is disabled?

A status effect being replaced by "oops" is something that CHIT should only do if it can't correctly parse an effect name. This may or may not be related to the hipster/smartstasis bug, I dunno. If you can figure out a way to reproduce it, I'm sure we can get to the bottom of at least that aspect of the problem.

roippi
09-05-2011, 03:44 PM
Those .png names were edited in by me, actually; it was literally a picture of the up arrow used to increase buffs, and the little footsteps icon next to smooth movements.

As far as I can tell, it only happens when a combat finishes with a macro submitted by smartstasis. It's almost certainly a problem with a parsing boundary not being detected properly, and I'm not even sure if it's a chit bug. I'll keep trying to debug. Worse comes to worse, I'll provide a dump of the html when it happens.

Chez
09-05-2011, 04:50 PM
I'm still not able to reproduce the bug. I'm adventuring with a L32 character in the pantry, so every combat finishes with a smartstasis macro. Haven't seen anything funny, not even once. This is my first time using smartstasis, so I'm sure my setup is a lot different than yours. Are you running any other scripts too that I can throw into the mix?

roippi
09-05-2011, 05:36 PM
My only GM script is Inline Descriptions Improved, but turning that off doesn't fix the problem.

I dunno, some html is misbehaving somewhere:

5277

Chez
09-05-2011, 08:49 PM
No other mafia scripts? BetweenBattle/recovery/etc? Moods?

I'm quickly running out of ideas. The fact that the buff listed in your screenie had 0 turns remaining maybe points to something mood-related.

roippi
09-05-2011, 09:05 PM
I did have smooth/sneakiness in my mood at the time. Hence why that was still showing up with 0 turns remaining. I do run UR. Can't think of much else than that :-/

ETA: I think this might be related to a SS/mafia bug I've reported elsewhere? Sometimes SS will submit a macro after a fight is over, which can have odd results. This is really annoying to debug...

Captain Kirk
09-29-2011, 04:23 AM
Does this still work at all with revision 9849?

I installed the zip file in the proper place, fired up KoLMafia. Even put in some settings in the data/vars_playername file, and I didn't
see any changes to the charpane at all.

Do you need to have any specific browser settings? (Like cacheing images?)
Is there something I need to do to activate the script?

Winterbay
09-29-2011, 05:04 AM
You need to allow relay override scripts via a setting, but other than that it should just work. Mine seems to works still at least.

Bale
09-29-2011, 06:29 AM
I installed the zip file in the proper place

You unzipped the files, right? (Just checking.)

Captain Kirk
09-29-2011, 05:19 PM
You need to allow relay override scripts via a setting, but other than that it should just work. Mine seems to works still at least.

Holy crap! Winterbay, I love you.

It was the setting I didn't know about.

Captain Kirk
09-29-2011, 05:46 PM
Ok, so I got this working on one computer, but I turned up a problem on a computer with a smaller screen.
If the browser window is too short all of the "effects" disappear, even if it is defined in the walls setting.

To show this on any computer, just shorten the vertical width of the browser until the charpane is too short to
show the effects and then do a refresh.

Is there a way you can fix this for computers with short vertical resolution?

Thanks!

Captain Kirk
09-29-2011, 05:59 PM
Also one more problem, on one of my accounts I have the Gnomish camp unlocked but it says in the charpane "Camp not available" even when I am actively visiting the camp.
Any way to fix this too?

Strangely, the AOT5K link works though.

Chez
10-01-2011, 11:06 AM
Hi Kirk

If you're short on vertical space, you can try one of 2 approaches:

1) Move more bricks into the walls section, and out of the "fixed" areas (roof and floor).
2) Leave the walls completely blank, and move everything into the roof. This should get you pretty close to the default KoL layout, with everything in a big scrollable area and the toolbar fixed to the bottom of the screen.

I haven't ascended under a moxie sign for a while, so some of the MCD stuff is still untested. It seems that I'm incorrectly testing for a bus pass in inventory instead of desert bus pass. I'll upload a fix as soon as I can test this myself. In the meantime you can try changing $item[bus pass] to $item[desert bus pass] (line 2044 in charpane.ash) and see if that works. I'm assuming you don't have a meat car or pumpkin carriage in inventory, right?

bordemstirs
10-04-2011, 12:48 AM
I might be -way- wrong here, but doesn't ash have a beach_available() or something similar? It may have been a user script like canadv.ash though, just throwing it out.

Winterbay
10-04-2011, 11:28 AM
One problem with putting everything in the roof is that for some reason you get two scrollbars. Resizing the sidebar removes the second one (no matter in which direction you resize it) but it will come back as soon as the sidepane reloads.
This using FF 6.0.2. Do you have any idea why it may be doing this?

johngnash
10-07-2011, 03:03 AM
I love the new sidebar, but it's lacking one thing. Before I used "DrEvil1s Clan Changer" GM script. Since the new sidebar anchors to the top of the menu I cant any longer use this GM script. Do you think you could code a whitelist changer, or a zlib true/false setting to anchor a little below where that would appear?

Paragon
10-07-2011, 09:35 PM
I love how the new char pane looks. I have one request though, could you make it so that clicking on your meat, hp, mp, and adventures link to the respective doc.ash?topic= ?

bordemstirs
10-11-2011, 05:05 AM
So, not sure what -exactly- determines this, but from my cursory observations it seems that if I don't have any "real" effects going, then the Effects section won't appear at all, even if I have active Mafia timers (like, for instance, Bee and SR windows)

IceColdFever
10-12-2011, 08:53 PM
Something has changed that has removed the counters by the familiars that needs counters for things like runaways, drops, etc. I don't think I've changed anything except for adding my fullness counter to my character pane, but removing it didn't seem to make the familiar counter appear again.

Winterbay
10-12-2011, 09:28 PM
Ahh, so it wasnt just me being crazy and remembering features that weren't there then, in other words I'm also seeing this lack of familiar info.

Chez
10-13-2011, 06:51 AM
Sorry for the late response, I've barely had time to log into KoL recently. I'll have some time to look at all of the issues over the weekend.

Winterbay
10-13-2011, 07:57 AM
I'm guessing some part of the KoL sidepane code changed as a result of the non-funny update to make it possible to show your fullness counter.

bleary
11-16-2011, 01:21 AM
Something has changed that has removed the counters by the familiars that needs counters for things like runaways, drops, etc. I don't think I've changed anything except for adding my fullness counter to my character pane, but removing it didn't seem to make the familiar counter appear again.

Here's a patch (that also adds stomping boot support!)



1327c1327
< matcher dropMatcher = create_matcher("<b\>Familiar:</b\> \\((.*?)\\)</font\>", source);
---
> matcher dropMatcher = create_matcher("<b\>Familiar:</b\><br\>\\((.*?)\\)</font\>", source);
1333a1334,1336
> case $familiar[pair of stomping boots]:
> info = info;
> break;

bleary
11-16-2011, 03:35 AM
Oh, also:



1173a1174,1196
> void pickPants() {
> string pref = vars["chit.familiar.pants"];
> if (pref != "") {
> string [int] pantsmap = split_string(pref, ",");
> item pants;
> foreach i in pantsmap {
> pants = to_item(pantsmap[i]);
> if ( allmystuff contains pants) {
> addEquipment(pants, "inventory");
> } else if ( available_amount(pants) > 0 ) {
> addEquipment(pants, "retrieve");
> } else {
> foreach foldable in get_related(pants, "fold") {
> if ( allmystuff contains foldable) {
> addEquipment(pants, "fold");
> }
> }
> }
> }
> }
> }
>
>
1266a1290,1294
> case $familiar[fancypants scarecrow]:
> addLoader("Changing Pants...");
> pickPants();
> addSadFace("You don't have any pants for your " + myfam + ".");
> break;
3155a3187
> setvar("chit.familiar.pants", "spangly mariachi pants,BRICKO pants");

icon315
11-19-2011, 01:10 PM
Great Script (Yeah i know i'm late)

bordemstirs
11-22-2011, 02:07 AM
Chez isn't around enough, so I thought I'd go ahead and toss this out there for those that want pantsrack support. Some minor code changes as well (just because I'm OCD) and you can put familiar in your stats section (felt the familiar brick was just too big and I wanted more space to see my effects)

EDIT:
Added a second familiar stat type for those that like pictures: "famicon"
Fixed my bug report re: counters not appearing with no active effects (though I couldn't do a complete fix, as I don't know how mafia gets its hashes for counters)
Option to condense cookie counters to a single effect implemented.

Pantsless
01-05-2012, 05:10 AM
Holy crap this script is amazing. Thank you!

bumcheekcity
02-04-2012, 04:40 PM
What with chez' last post being in October I was going to include this into bUMRATSv0.9 but in principle would like to ask before I do that.

In anticipation of no reply being given, I'm going to start the work needed, but it'll be probably another week before it comes out so if it's not OK (I would of course give full credit) then let me know.

Chez
02-08-2012, 11:51 AM
What with chez' last post being in October I was going to include this into bUMRATSv0.9 but in principle would like to ask before I do that.

In anticipation of no reply being given, I'm going to start the work needed, but it'll be probably another week before it comes out so if it's not OK (I would of course give full credit) then let me know.

Hi! Absolutely, please feel free to use any part of the script in any way you want.

FWIW, I'll also attach the latest copies of all my files. As far as I remember everything I was working on at the time was done, I just never got around to uploading it. It was a while back though, so consider this an "unofficial" release.

- Added links for HP/MP/Meat/Adv documentation
- Fixed Familiar annotations
- Add configurable margins to the top and bottom of the charpane (to make space for content added by GM scripts)
- Added support for the new Moveable Feast usage tracking preferences (_feastUsed, _feastedFamiliars) (mostly untested, since I don't have a Feast)
- Added support for bootsCharged preference

I'm not actively developing this script, or playing KoL for that matter, at the moment, but I'd be happy to answer any questions, or try to explain what the hell I was thinking/doing.

Thanks for picking this up in my absence. It's good to know people are still finding the script helpful.

Chez

Bale
02-09-2012, 07:41 AM
I checked this out for the first time today. I'd just like to say, "Holy crap! This is unbelievably amazing!"

You have notably increased the game's playability for me. I added the pantsrack to my version since your familiar gear switcher is amazing.

Bale
02-16-2012, 10:17 AM
Since I swiftly became addicted to this script I found it rather troubling that it didn't work when I became an Avatar of Boris. I fixed that.

Since Chez says he is not currently supporting this script I'm attaching my fixed version to this post for the sake of everyone else who likes it. My unofficial version is 0.6.1

I've also added support for Fancypants Scarecrow, 'cause I thought that this script's hatrack support was awesome. Some of these fixes are kinda hacked in since I'm still getting used to how this script works.

Note: I might have changed around a few things to suit myself so if something is different from Chez's official version it was just my preferences. Mostly little things like removing the links from meat and adventures remaining since those links were kinda useless and annoying if clicked on. If you want my unofficial "Avatar of Boris" support, you'll have to deal with my unofficial mods.

AlbinoRhino
02-17-2012, 05:44 AM
Wow. This thing is sweet and definitely shouldn't be an orphan. I'm glad it's been adopted.

Also, mcd 6 = Horoscope of the Hermit .... nice touch.

Bale
02-17-2012, 08:20 AM
Yeah, I also thought that was pretty funny. I figured though that it was best to leave that little easter egg to be be discovered by the user since it would be funniest when it is a surprise.

Winterbay
02-17-2012, 10:23 AM
I notice that even though you removed the links from meat and so forth the mouse still turn into a hand when hovering over them indicating that I could click something. I feel that if you remove teh link then removing the indication of a link is probably also a good idea.

lostcalpolydude
02-17-2012, 10:51 AM
I hacked together a 2 column layout for buffs. I had to make so many CSS changes that I don't really remember most of what I changed. I suppose once bale and bumcheekcity are done restructuring things then I can see about starting over with a sane implementation (at least for the case of not displaying buff names), if other people care about it.

bumcheekcity
02-17-2012, 11:51 AM
That sounds quite interesting. Does it not get a bit crowded, can you post a screenshot?

lostcalpolydude
02-17-2012, 01:37 PM
http://lostcalpolydude.dyndns.org/images/chit1.png

I have it set to separate songs and intrinsics, with the 2 column stuff only for other effects. I split it into buffs1 and buffs2, and had it alternate which one the buffs are put in. And then I spent forever messing with stuff to get the tables to look sane enough to be acceptable (though not all that good).

ereinion
02-19-2012, 06:56 PM
The script seems to have some trouble parsing intrinsics (I get "CHIT: Error parsing intrinsics" in the gcli), dunno if this has always been an issue, or if it's something that's popped up recently, with AoB or something. I'm using Bale's revision of the script, r10522 of mafia, and the intrinsic in question is "1337p4n7Z (∞)". I know this script strictly isn't maintained anymore, but it seems there still are a few people using/revising it, so if any of you wouldn't mind too much having a look at what could be causing it, I'd be very grateful :) Feel free to contact me if there was some info I forgot to include :)

When looking at the html for the page, I assume this is the part the script has trouble parsing:


<center><p><b><font size=2>Intrinsics:</font></b><br></center><center><table><tr><td><img src="/images/itemimages/whitepants.gif (http://kolmafia.us/view-source:http://127.0.0.1:60080/images/itemimages/whitepants.gif)" class=hand onClick='eff("70679877d6ac73627d6576ca7cb72f62");'></td><td valign=center><font size=2>1337p4n7Z (&infin;)</font><br></td></tr></table><center><font size=2><p>

Bale
02-20-2012, 06:04 AM
This is because of a change in KoLmafia r10538. It's a very good change since it allows counters to appear properly when there are no effects present. Anyway, I've fixed the problem. I noticed it as soon as I put on my 1337 pants today.

It's kinda interesting that I got hooked on this script just a few days before the new challenge path was released. If it wasn't for that timing I wouldn't be supporting this script now.


Here's my unofficial 0.6.2

Stardock
02-20-2012, 06:21 AM
This is because of a change in KoLmafia r10538. It's a very good change since it allows counters to appear properly when there are no effects present. Anyway, I've fixed the problem. I noticed it as soon as I put on my 1337 pants today.

It's kinda interesting that I got hooked on this script just a few days before the new challenge path was released. If it wasn't for that timing I wouldn't be supporting this script now.


Here's my unofficial 0.6.2

This version isn't working for me with a juju mask on and gaze of the volcano god.

Bale
02-20-2012, 08:02 AM
I cannot test that, but perhaps if you copy/pasted the html I might have a clue why it doesn't work. Or maybe someone else will be able to fix it.

lostcalpolydude
02-20-2012, 08:36 AM
I changed line 3009 to
endwith = "</td></tr></table></center>"; and it works both with and without an intrinsic effect active (tested with leather chaps).

Bale
02-20-2012, 09:01 AM
Stardock and lost, are you in an Avatar of Boris run? My guess is that you are not. lost's code does not work for me in a Boris run and I suspect that must be the difference.

Try changing line 3009 to


endwith = "</td></tr></table>";

I think that should work for all cases.

lostcalpolydude
02-20-2012, 09:10 AM
I am not in a boris run, and that works for me.

Bale
02-20-2012, 10:04 AM
I am not in a boris run, and that works for me.

Great. Then I'll hope it fixes Stardock's problem also.


Here's my unofficial 0.6.2.1

Paragon
02-20-2012, 02:31 PM
How did you get the AT Songs to be shown seperatly from all other effects?

Winterbay
02-20-2012, 03:10 PM
Set chit.effects.layout to contain "songs" and it should do that.

Stardock
02-20-2012, 04:00 PM
I am in a boris run, I assumed the issue had something to do with the juju masks intrinsics being colored. I won't know if your fix works until tomorrow when I'm able to get an intrinsic effect with it again.

exxyle
02-22-2012, 10:24 PM
Today when starting up the relay browser I got an error message in the gCLI: Array index out of bounds (charpane.ash, line 3190). It didn't happen again when I closed and restarted the browser, and everything seems to be working fine, but I figured I'd pass it along just in case.

Bale
02-23-2012, 03:54 AM
Here's my unofficial 0.6.2.2

Fixed a non-Boris familiar bug after breaking the prism and discovering it did not work right.

Bale
02-25-2012, 04:32 AM
Here's my unofficial 0.6.2.3

Move Avatar of Boris songs to special "song" section if you set it. Because you are only allowed to have 1 song at a time and should keep track of it, just like you'd keep track of AT songs.
Shorten names of most Boris songs so that they fit on one line.
Improved tooltip for leveling up progress bar
Fix check for Annoy-O-Tron 5K



This version also requires you to download my revised chit_effects.txt and put it in your /data directory. Please download that or else some of the new changes won't work.

Erich
03-12-2012, 07:58 PM
So, I'm having some trouble with this. I installed all the files into their proper directory, and zlib vars is showing that they're there, but I'm seeing no change to my relay browser. Even after changing the variables, such as turning the avatar off. Can someone walk me through what I might be doing wrong?

Theraze
03-12-2012, 08:23 PM
Have you turned on the property to enable relay overrides?

Erich
03-12-2012, 08:42 PM
Have you turned on the property to enable relay overrides?

Thank you. It's little things like that that are the hardest thing about mafia, honestly.

Theraze
03-12-2012, 09:33 PM
Not a problem. Happy that it's working for you now. :)

Bale
03-14-2012, 04:59 AM
Chez, if you're reading this thread I have a question. I respect all the work you did on this script a lot, but since you are no longer supporting it would you mind if I took over official support until you return to working on it? I feel that this would be beneficial to help people who feel confused about the value of downloading third person support from a somewhere near the end of a thread. This becomes increasing relevant now that I am altering one of the supporting files.

If you choose to allow this I'd remove your old version from the first post and replace it with my own in a new second post, along with a note about how I am supporting it in your absence. Of course, even if you decide to hand off the script to me for now, you may return to full control of this script at any time that you choose to resume supporting it.

Chez
03-14-2012, 12:04 PM
Hi Bale, not only would I not mind, I would welcome it. I won't be able to work on the script for the foreseeable future, so handing over official support makes a lot of sense.
Feel free to make any changes you see fit to the first post, and whatever needs to be done to make the script's auto-update pick up your new versions.

I'm still subscribed to this thread, so if you have any questions I'll do my best to reply promptly. Otherwise have fun with it and please post some screenshots of all the new features I'm missing out on. :)

Chez

Paragon
03-14-2012, 04:29 PM
@Bale: Thanks for taking over, i like the script and am glad that it isn't fading away, where are you keeping the newest versions?

Bale
03-15-2012, 12:27 AM
@Bale: Thanks for taking over, i like the script and am glad that it isn't fading away, where are you keeping the newest versions?

As of this moment the script is HERE (http://kolmafia.us/showthread.php?7594-Character-Info-Toolbox&p=57981&viewfull=1#post57981) in this thread's second post.

In a few hours I'll take time to clean things up and make version checking work.

My most recent change was to include the elements table in relay images because the KoLwiki was not loading the other day and that kept my charpane from loading perfectly.

caphector
03-15-2012, 04:43 PM
The 0.6.2.4 download still reports it's version as 0.6.2.3 in charpane.ash

Bale
03-15-2012, 06:07 PM
My bad. Fixed it. Re-download.

IceColdFever
03-15-2012, 08:14 PM
Bale, did you remove the links for HP and MP also? I seem to think the old version allowed you to click on them to restore HP/MP.

Bale
03-15-2012, 08:19 PM
I didn't touch that at all and in my browser that still does work.

xKiv
03-16-2012, 01:19 AM
Here are a few things I noticed:

1) the familiar dropMatcher thing with trying one regex and if that fails trying another seems wasteful; I have the following regex there and it seems to work:


matcher dropMatcher = create_matcher("<b\>Familiar:</b\>\s*(\?:<br\>)?\s*\\((.*?)\\)</font\>", source);

Note the \s* for any amount of whitespace and (\?: ) for a non-capturing group

2) the following switch ( myfam ) doesn't seem to have an option for blavious kloop (that should be info = "Folio: " + info

3) the script doesn't seem observe familiar weight cap (makes difference for hatrack and pantsrack); I have this at the end of the famWeight block:


int fwcap = numeric_modifier("Familiar Weight Cap");
if (fwcap > 0 && fwcap < to_int(famweight)) {
famweight = to_string(fwcap);
}
famweight = famweight + " (" + to_string((familiar_weight(my_effective_familiar() ))) + ")";

Bale
03-16-2012, 08:05 AM
1 and 2 are now in my code. Thank you. With respect to 3... It seems that it would require a good bit more work to make it good. (And I'm unsure why the proper weight cannot be read from the character sheet including cap.) In the following code...




matcher weightMatcher = create_matcher("</a\></b\>, the <b\>(.*?)</b\> pound ", source);
matcher feastMatcher = create_matcher("the <i\>extremely</i\> well-fed", source);

//Is the familiar Well Fed?
if (find(feastMatcher)) {
weightMatcher = create_matcher("</a\></b\>, the <i\>extremely</i\> well-fed <b\>(.*?)</b\> pound ", source);
isFed = true;
}

//Get Familiar Weight
if (find(weightMatcher)) {
famweight = group(weightMatcher, 1);
} else if (myfam != $familiar[none]) {
famweight = to_string(familiar_weight(myfam) + weight_adjustment());
}


Note that two different matchers are used, then based on the second matcher, the first is altered... It would be nicer to have a single matcher and set isFed if "<i\>extremely</i\> well-fed" is present in a capturing group. Could you take that on?

I appreciate all collaborators who want to improve this script and I'm happy to include your work. Thank you!

Theraze
03-16-2012, 02:22 PM
Could you just use:
> pref feasted

_feastedFamiliars (user, now '', default )mafia's preferences to tell who's feasted instead of trying to read it yourself again?

lostcalpolydude
03-16-2012, 02:50 PM
That wouldn't tell you if it has run out.

xKiv
03-16-2012, 10:23 PM
1 and 2 are now in my code. Thank you. With respect to 3... It seems that it would require a good bit more work to make it good. (And I'm unsure why the proper weight cannot be read from the character sheet including cap.)

I don't know, for some reason I had problems with it ... so I added a failsafe to never show a weight greater than the maximum possible ... and as a "bonus" started showing naked/unbuffed weight too.
It's possible that the matcher simply doesn't match at all? Lately, I have seen several scripts (not ASH - greasemonkey, but still), where the authors were apparently getting different HTML than I am getting ..



In the following code...




matcher weightMatcher = create_matcher("</a\></b\>, the <b\>(.*?)</b\> pound ", source);
matcher feastMatcher = create_matcher("the <i\>extremely</i\> well-fed", source);

//Is the familiar Well Fed?
if (find(feastMatcher)) {
weightMatcher = create_matcher("</a\></b\>, the <i\>extremely</i\> well-fed <b\>(.*?)</b\> pound ", source);
isFed = true;
}

//Get Familiar Weight
if (find(weightMatcher)) {
famweight = group(weightMatcher, 1);
} else if (myfam != $familiar[none]) {
famweight = to_string(familiar_weight(myfam) + weight_adjustment());
}


Note that two different matchers are used, then based on the second matcher, the first is altered... It would be nicer to have a single matcher and set isFed if "<i\>extremely</i\> well-fed" is present in a capturing group. Could you take that on?


I think you want something like


matcher weightMatcher = create_matcher("</a\></b\>, the (<i\>extremely</i\> well-fed )?<b\>(.*?)</b\> pound ", source);

and then check if group(weightMatcher,1) is "" for non-well-fed, and group(weightMatcher,2) for current weight.


umm ... why are the ">" escaped but not the "<", again?

Bale
03-17-2012, 06:57 AM
It turns out that the matcher never really worked properly for an unfed familiar due to a white space issue. And there was no reason at all to escape those angle brackets. Thanks for your help. I've fixed it and it works now:



//Get Familiar Weight
matcher weightMatcher = create_matcher("</a></b>, the (<i>extremely</i> well-fed)? <b>(.*?)</b> pound ", source);
if (find(weightMatcher)) {
isFed = weightMatcher.group(1) != "";
famweight = weightMatcher.group(2);
} else if (myfam != $familiar[none]) {
famweight = to_string(familiar_weight(myfam) + weight_adjustment());
}


Updated to 0.6.2.5

Several fixes for familiars

charred
03-17-2012, 03:55 PM
the attached file in the second post still shows 0.6.2.4

lostcalpolydude
03-17-2012, 03:59 PM
The zip is 0.6.2.4, charpane.ash is used to update to 0.6.2.5. At least that's what I assumed.

xKiv
03-17-2012, 04:51 PM
I don't see either of my 1) or 2) in that file ...

Bale
03-17-2012, 07:51 PM
That's really weird because I remember making those changes. Anyway, fixed. 1 and 2 are in it now.


The zip is 0.6.2.4, charpane.ash is used to update to 0.6.2.5. At least that's what I assumed.

No reason to assume. I stated it straight out:

The zip file is numbered for the last version it was updated.

Updated to 0.6.2.5

The rest of the familiar fixes

Bale
03-22-2012, 10:21 PM
Updated to 0.6.3

Shortened some messages
Made Clancy's image smaller. (He's now 80% size since any smaller made him ugly.)
Added the new Hidden Temple semi-rare to the semi-rare advisor
Use zversions for update checking
Code tidying


I think I'm pretty happy with this script now.

hesuchia
03-23-2012, 06:52 AM
I've been doing my Bad Moon loop and have noticed the charpane doesn't work until I get a terrarium.

Bale
03-23-2012, 07:12 AM
I've been doing my Bad Moon loop and have noticed the charpane doesn't work until I get a terrarium.

That's interesting, but since I'm not doing Bad Moon these days I can only fix it if you were to post the html from your character pane before you get a terrarium. Please show it to me so that I can fix it.

lostcalpolydude
03-23-2012, 07:36 AM
It looks like pickSlot("weapons") and pickSlot("pants") are switched around in switch (myfam).

Bale
03-23-2012, 07:50 AM
It definitely looks that way.

Updated to 0.6.3.1

Bug, bug, go away.

hesuchia
03-24-2012, 05:01 AM
Well I'm past that point, but I also noticed it does the same thing during the special bad moon adventures too. Here's when I got the torso adventure.

6081

Edited out pwdhash just in case it's sensitive data >.>.

Bale
03-24-2012, 06:18 AM
pwdhash is not sensitive data. It ceases to be relevant when you log out since KoL generates a new one for you every time you log in.

hesuchia, I've noticed that for the last few weeks charpane relay scripts will cease to change text after autostop adventures. I think that is a KoL bug, but it is infrequent enough that I haven't been bothered to write it up. That's what you're seeing. If there is no error message in the CLI about something like "CHIT: Compact Character Pane not supported" then it probably wasn't chit's error.

As a result, the html you attached to your post is useless to me. Merely refreshing the charpane would fix that problem.

lostcalpolydude
03-24-2012, 06:30 AM
hesuchia, I've noticed that for the last few weeks charpane relay scripts will cease to change text after autostop adventures. I think that is a KoL bug, but it is infrequent enough that I haven't been bothered to write it up. That's what you're seeing. If there is no error message in the CLI about something like "CHIT: Compact Character Pane not supported" then it probably wasn't chit's error.

As a result, the html you attached to your post is useless to me. Merely refreshing the charpane would fix that problem.

I've seen the same mafia behavior recently. It's actually a case of mafia going gray for me (I think PENDING_STATE), which requires doing something with mafia and isn't reset by reloading the charpane. I've added some stuff to mafia to try tracking it down before filing a bug report, but I might be out of autostop stuff to test with for a while.

Bale
03-24-2012, 07:53 AM
I hadn't quite put that together. I'm gonna go make a proper bug report now. Fortunately it isn't hard to get a completely predictable autostop when ascending with Clancy so I started a debug log right before one.

IceColdFever
03-26-2012, 05:12 PM
It's looking good Bale.

Three minor bugs. When you only have one instrument for Clancy, when clicking on the instrument to change it, it shows this:


You don't have any equipment for your none.

Poor

You don't have any equipment for your none.

Poor


The fact that it shows it twice is a bug, the fact that is says "for your none" is a bug and the fact that it says Poor without a name is a bug.

Minor stuff, but thought I'd at least report them.

Bale
03-26-2012, 11:31 PM
Thanks for reporting it. I'll work on that when I have some time. :)

Low priority stuff, but it is bad for it to look like sh*t.

rlbond86
03-28-2012, 02:54 PM
I noticed a bug after I just ascended. When I click on my HP to autorecover, if autorecovery fails, the character info pane reverts to the standard one and I have to reload game.php. I use Universal_Autorecovery, so I'm not sure if it has to do with that.

lostcalpolydude
03-28-2012, 02:58 PM
I noticed a bug after I just ascended. When I click on my HP to autorecover, if autorecovery fails, the character info pane reverts to the standard one and I have to reload game.php. I use Universal_Autorecovery, so I'm not sure if it has to do with that.

Autorecovery failing puts mafia into an abort state, which prevents relay override scripts from running. If there is something to be changed, it's with mafia.

Bale
03-28-2012, 07:36 PM
Recently improved chit's handling of not having a familiar. (A state I briefly occupy at the end of each Boris run.) I'll roll that out soon, so if it the cosmetic bug has been bothering anyone they can relay about it. First though I'm trying to fix the below report. If anyone can find the source of the bug (and if possible, offer a fix) I would be grateful.



Three minor bugs. When you only have one instrument for Clancy, when clicking on the instrument to change it, it shows this:


You don't have any equipment for your none.

Poor

You don't have any equipment for your none.

Poor


The fact that it shows it twice is a bug, the fact that is says "for your none" is a bug and the fact that it says Poor without a name is a bug.

IceColdFever
03-28-2012, 08:22 PM
Around line 1324, should be changed to this (I think, I can't test it because I have all the instruments)


if(myPath == "Avatar of Boris") {
addLoader("Changing Instrument...");
pickClancy();
addSadFace("You don't have any extra instruments for Clancy.");
}
else
{

switch (myfam) {
case $familiar[Mad Hatrack]:
addLoader("Changing Hats...");
pickSlot("hats");
addSadFace("You don't have any hats for your " + myfam + ".");
break;
case $familiar[Fancypants Scarecrow]:
addLoader("Changing Pants...");
pickSlot("pants");
addSadFace("You don't have any pants for your " + myfam + ".");
break;
case $familiar[disembodied hand]:
addLoader("Changing Weapons...");
pickSlot("weapons");
addSadFace("You don't have any weapons for your " + myfam + ".");
break;
case $familiar[comma chameleon]:
addLoader("Changing Equipment...");
pickChameleon();
addSadFace("You don't have any equipment for your " + myfam + ".");
break;
default:
addLoader("Changing Equipment...");
pickEquipment();
addSadFace("You don't have any equipment for your " + myfam + ".");
}
}

Bale
03-28-2012, 08:29 PM
AH! Of course! How dumb of me. I'll test that tomorrow.

IceColdFever
03-28-2012, 08:45 PM
And it looks like you need to fix the Poor ____ message too. That's part of addSadFace function.

Bale
03-28-2012, 10:28 PM
Good spot! I'll update those fixes tomorrow after I've had a chance to ascend and test it.

Bale
03-29-2012, 06:52 AM
Updated to 0.6.3.2

Fixed cosmetic bug when you don't have an instrument for Clancy.
Fixed cosmetic bug when you aren't using any familiar.
Code cleanup in Aisle 5.

Captain Kirk
04-02-2012, 07:54 PM
I love CHIT, but one thing that bothers me is that there is no mini icon near the number of turns left or near the meat, or alternatively any kind of label to indicate what the values are. I am constantly spending too much time seeking on the panel for the number of turns left.

Do you think it might be possible to add a small modification or configuration setting to add something in for that?

Bale
04-02-2012, 08:02 PM
The hover text informs you of their purpose, but it did confuse me also when I stated to use Chit. I agree that would be a nice improvement for new users or old users that think things should be labeled clearly.

I'll probably add that. Thanks for the suggestion.

Bale
04-02-2012, 10:29 PM
Updated to 0.6.3.3

Icons added for meat and turns.



Captain Kirk's suggestion has been implemented. I am happy with the results, though uncertain if my implementation is ideal. My lack of CSS/HTML experience shows. (lines 2611-2617)

Bale
04-02-2012, 11:25 PM
I wasn't 100% happy with my last update so I altered the stylesheet and fixed the code a bit. Also fixed some awkwardness with the space under the character's level.

You'll need to download the entire zip file for the changes since I also changed the stylesheet. Changed files are chit.css and charpane.ash


Updated to 0.6.4

Improvements to last change
Changes to stylesheet

rlbond86
04-03-2012, 04:01 AM
Looks great, Bale!

hesuchia
04-03-2012, 07:45 AM
Here's the HTML from pre-terrarium Bad Moon.

6177

Anytime I change pages within the browser, the gCLI tells me "CHIT: Compact Character Pane not supported"

Bale
04-03-2012, 08:19 AM
Okay, I fixed the problem with not recognizing your character pane in Bad Moon. I also fixed a few other formatting issues, especially a bug where a long name for your last visited location caused progress bars to get cut off. Some of these fixes have made the charpane load a lot more smoothly.

You'll need to download the entire zip file for the changes since I also changed the stylesheet. Changed files are chit.css and charpane.ash


Updated to 0.6.5

Fix for not having a terrarium
Fix for long names of last location
More tidying of code
Changes to stylesheet

Captain Kirk
04-03-2012, 03:37 PM
I love the implementation of the meat and time icons.

Thanks Bale!

Bale
04-03-2012, 10:38 PM
I'm glad that it pleases.

hesuchia
04-04-2012, 04:02 AM
Thanks Bale. Love all the shiny updates. :)

Bale
04-04-2012, 04:27 AM
I am glad people like my updates. This is a tough script for me to maintain/improve since I have very little experience with html/css. As a result I need to reference often for even small changes. I'm currently working on small CSS improvements, moving more of the table styling into the stylesheet. I'm learning a lot from that and improving rendering speed as a result.

If anyone notices a better way to do anything in this script, please let me know so that I can improve both the script and my own understanding. For instance in the following code:



result.append('<td colspan="2"><table class="resource"><tr>');
result.append('<td title="Meat">' + formatInt(my_meat()) + '</td>');
result.append('<td title="Meat"><img src="/images/itemimages/meat.gif"></td>');
result.append('<td style="width:100%">&nbsp;</td>');
result.append('<td title="Adventures remaining">' + my_adventures() + '</td>');
result.append('<td title="Adventures remaining"><img src="/images/itemimages/hourglass.gif"></td>');
result.append('</tr></table></td>');


Is there a better way to space out meat and remaining adventures to the far ends of the row? The method I found works, but I feel it is a little kludgy to stick an empty cell between meat and adventures.

lostcalpolydude
04-04-2012, 04:42 AM
The alternative to an empty <td> is to use colspan="2" in the previous <td>.

Bale
04-04-2012, 04:55 AM
Ummm... no. Not the problem. The entire mini-table is occupying a single cell (it is bracketed in with <td>...</td>). I was using the empty cell in the middle at width:100% to push the meat and adventure values to either side. See what I mean by kludgy?

Theraze
04-04-2012, 05:35 AM
Maybe td align=left on the left and td align=right on the right, so that the text on the left cell bounds the left wall, and the right cell bounds the right wall?

lostcalpolydude
04-04-2012, 05:42 AM
Here is what I came up with to get rid of the empty <td> and <table>.


result.append('<tr>');
result.append('<td title="Meat" style="text-align:left" class="resource">' + formatInt(my_meat()) + ' <img src="/images/itemimages/meat.gif"></td>');
result.append('<td title="Adventures remaining" style="text-align:right" class="resource">' + my_adventures() + ' <img src="/images/itemimages/hourglass.gif"></td>');

The css block with
table.chit_brick td {
border: 0px;
text-align:center;
vertical-align:middle;
} was forcing them to be centered (and would override align=left/right), so now that is overridden by style=text-align. In the css file, I changed
table.resource img to
td.resource img to account for the removal of the extraneous table.

Bale
04-04-2012, 06:07 AM
Nice try. I'll tell you at least one thing I don't like about that solution. By putting adventures into the same column as level (when you have a lot of adventures) you are stretching that column wider than I like, crowding the middle column. That's why I put meat and adventures into the same cell, stretched across those two columns.

Still, you did just teach me something valuable about priorities and how to work with them.

lostcalpolydude
04-04-2012, 06:12 AM
I must have changed something in my version that makes the issue not apparent. Probably the part where I replaced the substats to next level progress bar with "X needed" text.

rlbond86
04-04-2012, 02:25 PM
I'm having a problem with the newest version. The stats window gets even more messed up when the last location has a long name, see the attached screenshot. 6192

Bale
04-04-2012, 06:12 PM
I'm trying, but failing to duplicate that bug. I checked it in Firefox, IE and Opera. Perhaps that is because my current version is different. I'm attaching my current version of charpane.ash and chit.css so please put those in your relay directory and then tell me if you are still getting the bug. If you are, then what browser are you using? Is that chrome? (I haven't bothered to install chrome.)

eegee
04-04-2012, 07:36 PM
Is there a better way to space out meat and remaining adventures to the far ends of the row? The method I found works, but I feel it is a little kludgy to stick an empty cell between meat and adventures.
I can suggest a different way, maybe you like it more:

result.append('<td colspan="2"><div class="resource">');
result.append('<div title="Meat" style="float:left"><span>' + formatInt(my_meat()) + '</span><img src="/images/itemimages/meat.gif"></div>');
result.append('<div title="Adventures remaining" style="float:right"><span>' + my_adventures() + '</span><img src="/images/itemimages/hourglass.gif"></div>');
result.append('</div><div style="clear:both"></div></td>');

.resource {
color:darkred;
font-weight:bold;
background-color:#F8F8F8;
padding: 0px 2px;
}
.resource div span, .resource div img {
vertical-align: middle;
}
.resource div img {
max-width:12px;
max-height:12px;
padding-left:3px;
}

Another thing I noticed, was an error in calling a non-existent javascript function updateSafetyText(). It's probably KoLmafia's problem it can be "fixed" by using the following line:

result = result.replace_string('<body onload="updateSafetyText();"', '\n<script type="text/javascript" src="chit.js"></script>\n<body');

Bale
04-04-2012, 07:58 PM
Another thing I noticed, was an error in calling a non-existent javascript function updateSafetyText(). It's probably KoLmafia's problem it can be "fixed" by using the following line:

result = result.replace_string('<body onload="updateSafetyText();"', '\n<script type="text/javascript" src="chit.js"></script>\n<body');

Something is seriously strange there. Vanilla KoL (without mafia) does not have that function! It only appears in KoLmafia. Maybe that is actually a Mafia bug?! If so it should be reported.

Hmmm... CharPaneDecorator.java contains the line StringUtilities.singleStringReplace( buffer, "<body", "<body onload=\"updateSafetyText();\"" );

Can you tell me what sort of error calling a non-existent javascript function produces?

Your other suggestion looks real nice. I might use it.

eegee
04-04-2012, 08:21 PM
It's not a serious error, Chrome just says "Uncaught ReferenceError: updateSafetyText is not defined" in the console. Shouldn't really affect the rest of the frame.

You're right, updateSafetyText() is only used in CharPaneDecorator.java. I could've been less lazy and checked :p. I think it's just an oversight and basics.js can be included in that frame to remedy the missing function. Maybe one of the svn commiters can add it in?

rlbond86
04-04-2012, 08:21 PM
I'm trying, but failing to duplicate that bug. I checked it in Firefox, IE and Opera. Perhaps that is because my current version is different. I'm attaching my current version of charpane.ash and chit.css so please put those in your relay directory and then tell me if you are still getting the bug. If you are, then what browser are you using? Is that chrome? (I haven't bothered to install chrome.)

That didn't do anything. It is chrome but I get the same bug in IE as well.

Bale
04-04-2012, 09:46 PM
You're right, updateSafetyText() is only used in CharPaneDecorator.java. I could've been less lazy and checked :p. I think it's just an oversight and basics.js can be included in that frame to remedy the missing function. Maybe one of the svn commiters can add it in?

You lost me. Sorry. What is it that you are suggesting?



That didn't do anything. It is chrome but I get the same bug in IE as well.

I don't get that bug in IE 8. I also don't get it with Firefox 11.0 or Opera 11.62. Maybe someone else will have a clue why that is happening, but I cannot even replicate it on Windows XP and I don't know css to take a good guess without experimentation.

eegee
04-04-2012, 10:01 PM
@Bale Sorry, I just meant that the error comes from KoLmafia itself, and that one of the developers can fix it by adding a reference to the "basic.js" file they have in the relay folder.

@rlbond86 Could you out type zlib chit into the CLI and post the output? Maybe I can try reproduce the error.

Bale
04-04-2012, 10:29 PM
eegee, I think I really like the way you fixed the resource display. I've got two questions about how it actually works.

First, what is the purpose of <div style="clear:both"></div>?

Second, why isn't vertical-align: middle; included in .resource instead of .resource div span and img?

Thanks for the help. Please continue to make any other suggestions you like.



@Bale Sorry, I just meant that the error comes from KoLmafia itself, and that one of the developers can fix it by adding a reference to the "basic.js" file they have in the relay folder.

Thanks. I made a bug report HERE (http://kolmafia.us/showthread.php?9900-updateSafetyText()-badly-implemented-in-charpane&p=72453#post72453). Add any additional commentary there. If I missed mentioning something relevant please post it there.

eegee
04-04-2012, 10:58 PM
Thanks for posting the bug report :D


..what is the purpose of <div style="clear:both"></div>?

Second, why isn't vertical-align: middle; included in .resource instead of .resource div span and img?..
For style="clear:both" : is a good practice to place that in an empty div or span after using a combination of floats (or clear:left / clear:right respectively) so that the subsequent html elements are not accidentally affected.

For vertical-align: middle : it involved a bit of hacking and I haven't yet verified why it has to be applied to each child element, instead of just the parent div. I suspect that it has something to do with the flexible functionality of vertical-align with block vs. inline elements.

rlbond86
04-04-2012, 11:42 PM
@rlbond86 Could you out type zlib chit into the CLI and post the output? Maybe I can try reproduce the error.


> zlib chit

Running ZLib version: r35 (current)
Copy/paste/modify/enter any of the following lines in the CLI to edit settings:

zlib chit.character.avatar = true
zlib chit.character.title = true
zlib chit.checkversion = true
zlib chit.effects.classicons = none
zlib chit.effects.layout = intrinsics,songs,buffs
zlib chit.effects.showicons = true
zlib chit.effects.usermap = false
zlib chit.familiar.hats = spangly sombrero,sugar chapeau
zlib chit.familiar.pants = spangly mariachi pants,double-ice britches,BRICKO pants,pin-stripe slacks,Studded leather boxer shorts,Monster pants,Sugar shorts
zlib chit.familiar.protect = false
zlib chit.familiar.weapons = time sword
zlib chit.floor.layout = update
zlib chit.helpers.dancecard = true
zlib chit.helpers.semirare = false
zlib chit.helpers.wormwood = stats,reward
zlib chit.quests.hide = false
zlib chit.roof.layout = character,stats,familiar,modifiers
zlib chit.stats.layout = hp,mp,axel|muscle,myst,moxie|stomach,liver,spleen| mcd|trail
zlib chit.stats.showbars = true
zlib chit.toolbar.layout = elements,update,quests,trail,helpers
zlib chit.toolbar.moods = true
zlib chit.walls.layout = effects
(If no values were shown, no settings or values matched your input text. Type "zlib vars" to see all.)

Erich
04-05-2012, 06:43 AM
This is what my fullness counter looks like:

http://i57.photobucket.com/albums/g221/Erichwanh/Screenshot2012-04-05at23714AM.png

last version of CHIT released, Firefox 11.0

Am I doing anything wrong?

Bale
04-05-2012, 06:47 AM
Tell me why you think that is wrong and I'll try to help. Personally I have it in chit.toolbar.layout so it doesn't look quite like that for me. Your picture is why too cropped for me to figure out where you put it so I'm really lacking helpful details.

I suppose the thing for you to note is that this script is very configurable as to what your charpane can look like.

eegee
04-05-2012, 04:51 PM
I'm having a problem with the newest version. The stats window gets even more messed up when the last location has a long name, see the attached screenshot.
Ok, I've looked at your settings and it seems that Character Info Toolbox might not have intended for the last adventure to be added to the stats pane. I could be mistaken though.

I have a suggestion for two of your settings that will prevent the stats window from being distorted. Type the following into your CLI and let me know what you think:

zlib chit.roof.layout = character,stats,trail,familiar,modifiers
zlib chit.stats.layout = hp,mp,axel|muscle,myst,moxie|stomach,liver,spleen| mcd

eegee
04-05-2012, 04:55 PM
This is what my fullness counter looks like.. Am I doing anything wrong?
If you are referring to the numbers looking a little wacky, maybe you can try widen the frame (the vertical gray line) more to the right and see if that helps?

rlbond86
04-05-2012, 10:08 PM
Ok, I've looked at your settings and it seems that Character Info Toolbox might not have intended for the last adventure to be added to the stats pane. I could be mistaken though.

I have a suggestion for two of your settings that will prevent the stats window from being distorted. Type the following into your CLI and let me know what you think:

zlib chit.roof.layout = character,stats,trail,familiar,modifiers
zlib chit.stats.layout = hp,mp,axel|muscle,myst,moxie|stomach,liver,spleen| mcd

This certainly fixes the problem, but of course I don't like the full trail there like that.

Chez
04-05-2012, 11:19 PM
This certainly fixes the problem, but of course I don't like the full trail there like that.
A couple of things you can try:

1) On line 2270 of charpane.ash, remove the style="display:block;". So it should become:

result.append('<td class="info" colspan="2"><a class="visit" target="mainpane" href="' + group(target, 1) + '">' + group(target, 2) + '</a></td>');

2) Change line 184 of chit.css from

white-space:nowrap;to

white-space:default;(or delete the line completely)

This should allow the text to wrap if it can't fit into a single line.

Erich
04-13-2012, 05:07 AM
Tell me why you think that is wrong and I'll try to help. Personally I have it in chit.toolbar.layout so it doesn't look quite like that for me. Your picture is [way] too cropped for me to figure out where you put it so I'm really lacking helpful details.

I suppose the thing for you to note is that this script is very configurable as to what your charpane can look like.


If you are referring to the numbers looking a little wacky, maybe you can try widen the frame (the vertical gray line) more to the right and see if that helps?

Sorry for the delayed reaction. My issue is that it looks like this:

10
/
30

instead of this:

10/30

I tried widening the frame, but that didn't work either. Is there an older version I can check out? that way I can see what may or may not be causing my organs box to be that big. I think it may be the .css, honestly.

All the best,
~E

Bale
04-13-2012, 05:50 AM
OH! I have that also, but it didn't bother me since it was a pop-up on the toolbar at the bottom. Now that I know what you're talking about it is bothering me also. I definitely want to fix that.

I don't have time right now, but I'll tend to it soon. Unless someone shows me a good fix first.


Edit: I was wrong about not having the time. I found a good way to fix it. I'll spin a release later after I've had time to properly test it.

Bale
04-13-2012, 07:30 AM
Updated to 0.6.5.1

Fixed a few styling issues
Changes to stylesheet


Once again, both charpane.ash and chit.css need to be updated, so I updated the zip file. I also attached the two files separately to save people the trouble of unzipping them.

lazy_fire
04-25-2012, 08:47 PM
Effects with parentheses in the name like "Educated (Kinda) (http://kol.coldfront.net/thekolwiki/index.php/Educated_(Kinda))" show up incorrectly in the list. The text in parentheses shows as the turns remaining instead of the actual number.
It also throws an error in the cli: "The string "Kinda" is not an integer; returning 0 (charpane.ash, line 784)"

6304

Bale
04-25-2012, 09:46 PM
That is not as easy to debug as you might think. I'd give it a serious try if it was more convenient to get an effect with parenthesis in the title, but I cannot find any that don't require me to adventure in the Hobo Marketplace. Maybe if you copy/pasted the HTML for your charpane I could find the problem.

Obviously the problem is in here:


} else {
pattern = create_matcher("\\((<a .*?</a\>)\\)", column2);
if (find(pattern)) {
turns = group(pattern, 1);
} else {
pattern = create_matcher("\\((.*?)\\)", column2);
if (find(pattern)) {
turns = group(pattern, 1);
}
}
}

canShrug = false;
if (isIntrinsic) {
myBuff.effectTurns = 0;
} else {
pattern = create_matcher("\>(.*?)<", turns);
if (find(pattern)) {
myBuff.effectTurns = to_int(group(pattern, 1));


However it already seems to be accounting for the issue of incidental parenthesis by checking to see if the parenthesis include a mafia included link to debuff the effect.

lazy_fire
04-26-2012, 07:43 PM
I randomly got the effect from the hookah, but if I remember next time I see it I'll grab the html source from the vanilla character pane. Since there are only two effects with parentheses which are not very common it could be a problem with mafia's relay and CHIT is just passing through the data as is, and no one's noticed it before. I did hover over the "Kinda" text and the debuff link appeared to be correct, but I didn't test it out.

eegee
04-26-2012, 09:07 PM
That's some funky use of regex, but maybe I'm missing something :). Here's my patch that should work for effects with brackets:

Bale
04-26-2012, 09:36 PM
Wow. You rewrote the entirety of parseBuff()! Looks pretty nice. I'll include that in my release.


That's some funky use of regex

Chez's regex often looks like that. He has this technique of searching for a regex and if it fails, trying another regex instead of trying to come up with a regex that will include all possibilities. I don't favor that approach, but it does work so I'm not scouring the script to remove all instances of it.



Updated to 0.6.5.2

Fixed a bug with effects that contains parenthesis

Erich
04-27-2012, 02:02 PM
Edit: ok, few things.

1> It still has problems. You can test it with /timer 1 Mongolian (Clusterfuck)

1b> Want to really have fun, try /timer 1 Oh Fuck ( ).

2> I think it's a problem with mafia itself. In the regular relay browser, it would look like "Mongolian (Clusterfuck) (1)", but you shrug it by clicking Clusterfuck, as (1) is without a link.

Edit: is ChIT formatting the effect based on what it sees mafia using as the shrug link? If that's the case, what about doing a regex summat like this:

([\w\s()]+) \((\d+)\)

... where, if the effect were "Let me see you (1) (2) step (50)", it would return just the value of the remaining turns as the second array (/2), and that can be used as the shrug link.

3> If you're too full to eat something, CHIT disappears and is replaced by the default relay charpane. I don't know if that happens to everybody, but I tested it with the wedding cake to make sure. As well, as long as "You're too full to eat that." is displayed, [refresh]ing the charpane doesn't bring CHIT back.

edit: oh why not:

http://i57.photobucket.com/albums/g221/Erichwanh/Screenshot2012-04-27at111822AM.png

eegee
04-28-2012, 01:18 PM
There's always a way to break regex using custom input :)

Can you provide any motivation for wanting to use round brackets (like this and break KoLmafia) instead of square or angle brackets with timers? Otherwise, if it is actually breaking with a standard KoL effect please show me and I can fix it.

Theraze
04-28-2012, 01:30 PM
If you did
([\w\s\(\)]+) \((\d+)\)it shouldn't break mafia, since you've escaped out of considering it as a useful item and told it to consider it only as a single character...

lostcalpolydude
04-28-2012, 02:59 PM
Otherwise, if it is actually breaking with a standard KoL effect please show me and I can fix it.

Based on testing with the sample timer, I'm pretty sure mafia would improperly handle Educated (Kinda) regardless of a relay override being used. There's too much going on in that function for me to figure out how to have it look for the last ( and ) instead of the first ( and ).

Erich
05-03-2012, 06:44 AM
Ok, so, every now and again, all the zlib Chit vars seem to reset on me, and I have no idea why. I'm just going on and adventuring as normal, and out of nowhere, all the vars that I set for Chit get replaced by defaults. So, tonight it happened to me again, and here's what was going on in my G-Cli:

[437] F'c'le
Encounter: A Fledgling Pirate Is You!
You gain 3,000 Meat
You acquire an item: pirate fledges
Invalid line in data file: "chit.character.title true" (zlib.ash, line 244)
<script>function FavItFunc(){$.ajax({url: 'inventory.php?action=faveit&ajax=1&whichitem=3033&pwd=a79b81527b51078c938e8d1d2b289f6d',success: function(a){$("#res").html(a);}});;}</script><a id='ADDFAV' href=javascript:FavItFunc(); >[f]</a>

Is this my fault, or a product of different scripts colliding?

Bale
05-03-2012, 06:55 AM
I have no idea what you did wrong, but it probably isn't chit's fault.

Bale
05-14-2012, 09:28 PM
Based on testing with the sample timer, I'm pretty sure mafia would improperly handle Educated (Kinda) regardless of a relay override being used. There's too much going on in that function for me to figure out how to have it look for the last ( and ) instead of the first ( and ).

It seems that there is already a bug report about this problem. Read about it HERE (http://kolmafia.us/showthread.php?5504-Educated-(Kinda)-has-a-misplaced-uneffect-link).

chef noodleman
05-15-2012, 06:56 PM
This is strange. My 'effects' brick appears, but is empty, despite me having quite a few buffs running (according to mafia, and the compact charpane).

I've reinstalled the latest version of everything I can think of that would matter (zlib, chit, latest daily build) and I reset all my chit zlib vars to default. Chit isn't reporting any errors to the CLI either, verbosity = 10. Any ideas what could be causing this?

Edit: Multi's appear to be unaffected, so a perhaps a weird preference must have gotten screwed up somewhere?

Edit2: Nevermind, I just backed-up and then reinstalled mafia from scratch, and am selectively re-adding my scripts and preference data (huge pain) but this has fixed the issue. Still no idea what could have caused it though.

Erich
05-18-2012, 04:09 AM
Fixed!


I have no idea what you did wrong, but it probably isn't chit's fault.

What I did wrong: my MacBook Pro was alive.

Now that it can't turn on, this problem no longer occurs, so I'm pretty good now.

:)<3

Bale
05-18-2012, 04:42 AM
Uh. Is that a good thing? Why was that a problem?

Sentrion
05-22-2012, 02:16 AM
As pointed out in this thread (http://forums.kingdomofloathing.com/vb/showthread.php?t=193126), you can show remaining PvP fights in your charpane now. I'd be super-appreciative if you could get this on CHIT next!

Bale
05-22-2012, 04:21 AM
As pointed out in this thread (http://forums.kingdomofloathing.com/vb/showthread.php?t=193126), you can show remaining PvP fights in your charpane now. I'd be super-appreciative if you could get this on CHIT next!

Where and how do you think it should be displayed. I'm taking suggestions.

Bale
05-22-2012, 06:09 AM
At the moment I'm putting it here:

http://i.imgur.com/cGzhx.png
(The tiny crossed sword image is a link to the Huggler Colosseum as you'd expect)

Does that seem to be the correct decision?

Erich
05-22-2012, 06:55 AM
If it only shows when you have the option checked, then yeah, that's a good place. Otherwise, it could have it's own strip that can be tacked to the ceiling, or something like that.

Cool, I was just coming round to asking about this 8^) One way or another, thanks kindly.


Uh. Is that a good thing? Why was that a problem?

It was me being an ass, really. I was pretty irritated that my computer decided to fry out of nowhere. Ah well, that's all cleared up now :p

Bale
05-22-2012, 07:18 AM
If it only shows when you have the option checked, then yeah, that's a good place.

Hmmm... I was thinking that it is always nice to have the link to Huggler there so if the stone was broken, but the display is off, then it puts a little icon in that space without any number. Was that a bad idea?


PS. I finally got around to fixing the MCD so that it won't change the main panel every time I change the mcd. Yay!

Edit: On second thought, Erich is right. There's a pvp link in the top pane, so if someone doesn't enable the option, that space should remain blank.

Bale
05-22-2012, 09:56 PM
Updated to 0.6.6

Changes to stylesheet, so that's a second file to download.
Added PvP Fights if they are enabled in KoL Options.
No longer reload main panel when changing MCD.
When KoLmafia started updating familiar images for medium, it broke chit's display of base familiar image for scarecrow, hand and hatrack. Fixed.
Add equipment information for scarecrow so it properly displays like the hatrack.
Added non-breaking space to "Bugbear Invasion" because the line wrap was ugly.
Improved some mouse-over text in several places. Most significantly, during an ascension, the title for Adventures Remaining.

icon315
05-23-2012, 08:21 PM
Could you add something that shows the amount of "Evil" left in the Cyrpt? Thanks for the script by the way.