Character Info Toolbox

At present I have sixty-five buffalo dimes but they don't display. Hmm.... there seems to be limit to the display area. Here is my setup:

Code:
zlib chit.currencies = source essence, BACON, Coinspiracy, Beach Buck, Volcoino, FunFunds, buffalo dime, Wal-Mart gift certificate

With the above as chit.currencies the Wal-Mart gift certificates do not display in the list. If I flip the position of the last two values then buffalo dimes don't display and the Wal-Mart gift certificates display.

The bricks I have displayed in that area are:

Character
Stats
Effects

The currency display opens from the Character brick and extends over the stats brick but stops at the boundary between the Stats brick and Effects brick. In fact, looking closely, it seems to extend under the effects brick. Is that possible?
 
Last edited:
That is possible. It makes sense to me. I think that I'll need to fix the z-index to get it on top of that brick. I'll play with it later when I have time. ETA is some time after rollover.
 
The currency display opens from the Character brick and extends over the stats brick but stops at the boundary between the Stats brick and Effects brick. In fact, looking closely, it seems to extend under the effects brick. Is that possible?

I have fixed what I believe to be the problem, please confirm that everything is good for you now.
 
With Sourceforge misbehaving it seems that CHiT is experiencing a similar issue to Universal recovery. It hangs on load while trying to check Sourceforge. For anyone else that hits this before Sourceforge comes back type this in the gCLI and reload the relay browser:

Code:
zlib chit.checkversion = false
 
Last edited:
I think a much better solution is to simply turn on automatic svn updating. If mafia has tried to update svn already today then this script won't bother to check. This has the added bonus of all your scripts always being up to date.

Preferences -> SVN -> Update installed SVN projects at login.

As for the bug in my script... Once again, it is fixed locally. Will update when svn works.
 
Hi Bale,

I had to turn off automatic updating today. It's normally on but after fifteen minutes of waiting during login it still hadn't finished checking and timing out.
 
Just relaying a concern and feature request from /hc. Whenever the charpane refreshes (e.g. when reapplying effects via arrows in the charpane or really any other means), the list of active effects returns to its default position (i.e. the top of the list). I'd prefer it if ChIT stored the current position of the scroll bar immediately prior to the reapplication of effects and returned to stored position after the next charpane refresh (or had this option available as a setting). Judging from some responses of knowledgeable scripting folk when this came up, it seems like a pretty nontrivial thing to add, so I'd be willing to offer up a mr. accessory's worth of gratitude if you're interested in implementing it.
 
You want ChIT to remember the position of the scroll bar?! I haven't a clue how to do that.

If someone else wants to write the code for it and collect your bounty, I'll be glad to apply their patch.
 
Appending this to chit.js seems to do the trick:
Code:
$(window).unload(function () {
	var scrolls = {};
	$('div').each(function () {
		var scroll = $(this).scrollTop();
		if (scroll !== 0) {
			scrolls[$(this).attr('id')] = $(this).scrollTop();
		}
	});
	if (Object.keys(scrolls).length !== 0) {
		localStorage.setItem('chit.scroll', JSON.stringify(scrolls));
	}
});

$(document).ready(function () {
	if (localStorage.getItem('chit.scroll') !== '') {
		var scrolls = JSON.parse(localStorage.getItem('chit.scroll'));
		console.log("scrolls", scrolls);
		for (var key in scrolls) {
			$('#' + key).scrollTop(scrolls[key])
		}
	}
});
 
You want ChIT to remember the position of the scroll bar?! I haven't a clue how to do that.

If someone else wants to write the code for it and collect your bounty, I'll be glad to apply their patch.

Sounds good! I'm happy to throw the mr. a at whomever you credit with the change after it's implemented.
 
heeheehee's patch has been committed to svn.

An interesting quirk is that it will keep the scrollbar position constant while adventuring. I'm not 100% sure if that is good or bad, but I think I like it.

Do you want to pester heeheehee to modify it so that adventuring will allow the scrollbars to return to start, or should I leave it like this? If you're happy, then throw heeheehee that Mr. Accessory.
 
Do you want to pester heeheehee to modify it so that adventuring will allow the scrollbars to return to start, or should I leave it like this? If you're happy, then throw heeheehee that Mr. Accessory.
Nah, I think I kind of like that aspect of it; Hee³ has been awarded the promised mr. a. Thanks for facilitating this, Bale! :)
 
I have no idea what's been changing in the latest update here but the autoscrolling change is driving me *bonkers*. Is there any way I can turn it off or change it back?
 
I have no idea what's been changing in the latest update here but the autoscrolling change is driving me *bonkers*. Is there any way I can turn it off or change it back?

You might want to describe what you are seeing, since it probably isn't what other people are seeing. Your problem is much less likely to be resolved without doing that, I expect.
 
Also, note that I've only tested on Chrome / Firefox; presumably, Bale tested on Opera. I can't promise that other browsers support it, since window.unload isn't a standardized event. But if the window.unload block doesn't run (and/or localStorage doesn't exist), then it *should* do nothing.
 
I have no idea what's been changing in the latest update here but the autoscrolling change is driving me *bonkers*. Is there any way I can turn it off or change it back?

I do not know why it is driving you bonkers. Perhaps you are experiencing something that we are not. The best way to figure this out would be to tell us WHY it is driving you bonkers.

There is a way for you to change it back, but I'd rather hear the details of your problem before I describe the procedure for altering the script to your liking.

heeheehee: Is there a way to make this optional?
 
Uh, sure. You could instead create a script tag in charpane.ash containing those function calls, conditional on vars["chit.fixScrollbars"] == "true". It doesn't really matter whether it's in chit.js or not; I just didn't feel like editing ASH to add configurability at the time.

e.g. something like
Code:
writeln("<script>$(window).unload ...</script>");
 
Back
Top