Character Info Toolbox


Was that wrong? You could right-click if you don't want both. If someone would tell me how to get the picker for a right-click and still have the description for a left-click, maybe that would be better?

Feedback is very welcome. Also welcome is help implementing feedback. The two need not be linked.


I am getting (on Firefox, Chrome and IE) a blank Elements box. It appears to be displaying "/images/relayimages/chit/elements2.gif" which is a blank 30x30 square though the html says to render it at 190x190.


Are you saying that /images/relayimages/chit/elements2.gif is a blank 30x30 square or it is being displayed as a 30x30 square? If the former, then it was some sort of download issue. If the later, then I cannot replicate the problem...


Thanks. Deleted chit, reinstalled chit, cleared browser cache and then it worked fine, and the image was no longer blank, and was 9k rather than 1k.


New member
> svn update mafiachit

Validating repo...
Repo validated.
Updating mafiachit...
svn: E155004: There are unfinished work items in 'C:\Users\MiniPC\Dropbox\Mafia\svn\mafiachit'; run 'svn cleanup' first.
Requests complete.

When I run 'svn cleanup' NOTHING HAPPENS. No message. I try both 'svn cleanup' and 'svn cleanup mafiachit'. Nothing.
Then I svn update again, and this happens again.

Things otherwise seem to be working perfectly fine.


that is a message from the svn client, not mafia. Mafia doesn't have a hook to run that command (though it could).

Somehow you got svn into a state where it has some locked files. Either use an external svn client to do the cleanup operation, or delete/re-checkout the project. I'm out of the country until Sunday so I can't expose the "svn cleanup" command to the mafia cli until then.


New member
No idea how to find an external svn client.

But deleting and re-checkng out worked! Thanks!

Hope you get the cleanup working in future builds.


New member
Hi Bale, I've been having an annoying problem with CHiT recently (since just after the class skill revamps began). It keeps on displaying a blank space between My Stats and Effects. Resizing the left pane restores it but any data change (switching equipment, stat change, meat +/-) that refreshes the pane ends up with the blank space again. <-- here's a screen shot.

I'm using chrome (ver31 - up to date) and daily mafia builds. I've tried clean installing CHiT again but I end up with the same problem. I have not changed any of the default CHiT preferences except for showing avatar and title. In any case, the problem persisted even with those 2 options set to true.

Any ideas?

So looks like the "problem" is magnifying my browser window - no extra large space when I reset the window to 100%, and blank space starts appearing if I increase the magnification.


That's certainly interesting. Can anyone here who knows a lot about browsers suggest how to deal with that?


Don't know if anybody else mentioned if they've fixed the familiar favorites going off the page problem. I think I might have. I switched

chit.floor.layout update,familiar

so now it's "familiar,update" instead. I haven't tested super extensively but it seems to be acting fine now.

edit: nope nevermind still doesn't work.
Last edited:


I don't know how hard this would be to implement, but I've been trying to collect some factoids for the various blobs of gray goo lately, and so I was wondering if you could put in some kind of counter for how charged the nanorhino is in the familiar block? Considering that you already get the information at the end of the combat text it is not a huge deal, especially considering that I probably won't bother much with the rhino once I'm done collecting the factoids, but even so I figured it wouldn't hurt to ask.


You're requesting a mafia feature, not a ChIT feature. Unless mafia recognizes and compiles the information for charging the nanorhino I can't expose it with ChIT. Request new features HERE.

If your feature is implemented by KoLmafia and the information is displayed by KoLmafia in the same manner as other familiar spoilers, like grinder pie generation, then it will immediately be displayed by ChIT without my needing to update ChIT.


Ah, I figured it was already tracked, guess I should have tried searching for the pref first :p Sorry for cluttering up your thread, and thanks for the reply :)


Active member
I would like to add effect modifier details for all the effects and buffs in the Effects brick. This is mostly because I am getting old and this game keeps getting bigger, and I never remember what all this stuff does.

I wrote this as an addition to each buff, with the modifier pulled from string_modifier().
It would be easy to also add this as an option in the chit.vars

updated: record buff and buff parseBuff(string source)

record buff {
	string effectName;
	string effectHTML;
	string effectImage;
	string effectType;
	string effectMod;
	int effectTurns;
	boolean isIntrinsic;

buff parseBuff(string source) {
	buff myBuff;

	boolean doArrows = get_property("relayAddsUpArrowLinks").to_boolean();
	boolean showIcons = (vars["chit.effects.showicons"]=="false" || isCompact)? false: true;

	string columnIcon, columnTurns, columnArrow;
	string spoiler, style;

	matcher parse = create_matcher('(?:<td[^>]*>(.*?)</td>)?<td[^>]*>(<.*?itemimages/([^"]*).*?)</td><td[^>]*>[^>]*>(.*?) \\((?:(.*?), )?((?:<a[^>]*>)?(\\d+||∞)(?:</a>)?)\\)(?:(?:</font>)? (<a.*?</a>))?.*?</td>', source);
	// The ? stuff at the end is because those arrows are a mafia option that might not be present
	if(parse.find()) {
		columnIcon =;	// This is full html for the icon
		myBuff.effectImage =;
		myBuff.effectName =;
		spoiler =;		// This appears for "Form of...Bird!" and "On the Trail"
		columnTurns =;
		if( == "∞") {	// Is it intrinsic?
			myBuff.effectTurns = -1;
			myBuff.isIntrinsic = true;
		} else
			myBuff.effectTurns =;
		// There are various problems with KoL's native uparrows. Only use them if KoL's uparrows are missing
		if( != "")
			columnArrow ="/images/", imagePath).replace_string("up.gif", "up.png");
		else if( != "" ) {
			doArrows = true;			// In case they were disabled in KoLmafia. Make a column for it.
			columnArrow =;
	string effectAlias = myBuff.effectName;
	//ckb: Get effect modifier for current buff
	myBuff.effectMod = string_modifier(myBuff.effectName,"modifiers");
	//Apply any styling/renaming as specified in effects map
	if(chitEffectsMap contains myBuff.effectName) {
		matcher pattern = create_matcher('(type|alias|style|href|image):"([^"]*)', chitEffectsMap[myBuff.effectName]);
		while(pattern.find()) {
			switch( {
			case "type":
				myBuff.effectType =;
			case "alias":
				// "href" might come before alias, so...
				effectAlias = effectAlias.replace_string(myBuff.effectName,;
			case "style":
				style =;
			case "href":
				effectAlias = '<a href="''" target=mainpane>' + effectAlias + "</a>";
			case "image":
				if(vars["chit.effects.modicons"].to_boolean()) {
					string image =;
					if(image == "corpsetini" && gameday_to_string() == "Boozember 7")
						image = "turkeyleg";
					columnIcon = columnIcon.replace_string(myBuff.effectImage, image);
					myBuff.effectImage = image;
	// Flavour of Magic picker!
	if($strings[Spirit of Cayenne, Spirit of Peppermint, Spirit of Garlic, Spirit of Wormwood, Spirit of Bacon Grease] contains myBuff.effectName) {
		columnIcon = '<a class="chit_launcher" rel="chit_pickerflavour" href="#">' + columnIcon + '</a>';
		columnTurns = '<a class="chit_launcher" rel="chit_pickerflavour" href="#">∞</a>';

	//Add spoiler info
	if(length(spoiler) > 0)
		effectAlias += " "+spoiler;
	// Fix for blank "On the Trail" problem.
	if(length(effectAlias) == 0)
		effectAlias = myBuff.effectName;
	//Replace effect icons, if enabled
	string [string] classmap;
		classmap["at"] = "accordion.gif";
		classmap["sc"] = "club.gif";
		classmap["tt"] = "turtle.gif";
		classmap["sa"] = "saucepan.gif";
		classmap["pm"] = "pastaspoon.gif";
		classmap["db"] = "discoball.gif";

	if ((index_of(vars["chit.effects.classicons"], myBuff.effectType) > -1) && (classmap contains myBuff.effectType)) {
		columnIcon = columnIcon.replace_string(myBuff.effectImage, classmap[myBuff.effectType]);
		myBuff.effectImage = classmap[myBuff.effectType];

	buffer result;
	result.append('<tr class="effect"');
	if(length(style) > 0)
		result.append(' style="' + style + '"');
		result.append('<td class="icon">' + columnIcon + '</td>');
	result.append('<td class="info"');
	if(doArrows && myBuff.isIntrinsic)
		result.append(' colspan="2"');
	//ckb: Add modification details for buffs and effects
	if (length(myBuff.effectMod)>0) {
		result.append('<br><small style="color:gray">');
	if(myBuff.isIntrinsic) {
		result.append('<td class="infinity');
			result.append(' right');
	} else {
			result.append('<td class="right">');
		else if (columnTurns != "")
			result.append('<td class="shrug">');
			result.append('<td class="noshrug">');
	if(doArrows && !myBuff.isIntrinsic) {
		if(columnArrow == "")
			result.append('<td> </td>');
		else {
			result.append('<td class="powerup">');
	myBuff.effectHTML = result.to_string();
	return myBuff;



That's interesting. Although you probably wanted to use string_modifier(myBuff.effectName,"Evaluated Modifiers") so that instead of
Smithsness: +25, Muscle Percent: [K], Mysticality Percent: [K], Moxie Percent: [K]

you'd see
Smithsness: +25, Muscle Percent: +30, Mysticality Percent: +30, Moxie Percent: +30
Much better, eh?

I'll add it for you. I simplified the code a lot which is going to leave some of your changes unconflicted, but useless -- be careful when you resolve the differences. Also, you will need to zlib chit.effects.describe = true, because a lot of people will be troubled by all the clutter.

It would be a lot more effective if you wrote an interpreter for effectMod which would combine effects into "all res," "prismatic dmg" and "all stats" since there are a lot of modifiers that effect all 5 elements or all 3 stats. That way instead of "Cold Resistance: +2, Hot Resistance: +2, Sleaze Resistance: +2, Spooky Resistance: +2, Stench Resistance: +2" we'd see "All Resistance: +2" which is so much more readable. I'll leave that to you if you want it.
Last edited:


Active member
Thanks bale. I put this together somewhat quickly as a proof-of-concept. Your implementation looks slick.
We can probably steal a lot of this modifier code interpretation from Enhanced Inventory Spoilers... we may even be able to re-use the exact code with some dependency (if it helps). I will look into it.


I don't use Enhanced Inventory Spoilers, so I did not know that it would do that. The screenshots certainly suggest that it doesn't do that. I guess the feature was added after the screenshots were posted?

See if you can make a version that does not add dependencies to this script. I really don't want to have Enhanced Inventory Spoilers added to everyone's relay browser because they want to use ChIT.


Even if you don't use a defective gg token there are some pretty big blocks. Testing it out revealed large complicated blocks. That's why I'm not enabling it by default. This script already has enough options though that I can't see denying it another, especially since ckb has contributed some nice stuff in the past.