Character Info Toolbox

Well, I do use that pane to add the CLI from time to time so I don't have to switch back to the main window when using things and so on.

The script is already opt-in for that behavior. I think Bale is curious to know how people feel about the panels being rearranged in the first place. I can definitely see some people being bothered by it (it's a bit startling at first, only because it's so different) but I think most people would be okay with it.
Again, it's not all that difficult to make it opt-in, so I don't see any reason why we couldn't go the way of making it up for each user to decide.

Also, just throwing it out there, zlib variables don't really get in anybody's way... you don't have to change them if you don't want to, so as long as the default values give you default behavior, I don't see any reason why we couldn't add more customization: Namely, border thickness between frames. I had it at 0, which looks a bit off, but setting it to 1 gives KoL a refreshing sleek look (especially with the pretty tables you get from ChIT). I think the default is 6, but really we could just make blank be default just-in-casies.
 
Disclaimer: I don't use any relay scripts except for Bale's "manor unlock info".

Philosophically, I don't understand why a "Character Info" relay script would modify anything other than the charpane - which is the only part of KoL (that is always displayed) that has "Character Info" in it.
 
July 17 - CDMoyer strikes again with WEDNESDAY INTERFACE MADNESS!

Effects from items and skills now get an arrow next to them that can be clicked to re-use the item or skill.

Also, if you have anti-anti-antidotes or soft green echo whatever drops in inventory, you can right click on any effect for the option to use the appropriate item to dispel it.

If you are a hating hater who hates everything, these features can be turned off in your Options menu.

Yes, I know I have to fix ChIT again. Good update, but a pita for me.

I'm sure everyone will be patient while I do other things since ChIT isn't unusable, just weird.

PS. I was logged in at the time and the first I knew was my charpane going wonky for no apparent reason.

PPS. I think that this needs a mafia update also.
 
Last edited:
Disclaimer: I don't use any relay scripts except for Bale's "manor unlock info".

Philosophically, I don't understand why a "Character Info" relay script would modify anything other than the charpane - which is the only part of KoL (that is always displayed) that has "Character Info" in it.

Well, resizing the charpane from within itself would be a bit tricky. A little javascript could easily adjust the width, but I'm not sure it'd be feasible to restructure the layout of KoL itself. So, game.php comes into play to handle that. I would definitely still consider this change under the ChIT jurisdiction, as the change is strictly for the charpane.

I'll agree with you on the chatpane changes, but I think the line of thinking there was "since we're already modifying game.php, why not". (I won't be using this feature, as I like to scan the updates before logging into chat anyway)
 
Last edited:
Yes, I know I have to fix ChIT again. Good update, but a pita for me.

I'm sure everyone will be patient while I do other things since ChIT isn't unusable, just weird.

Until then, this code patches things up quite nicely.
Code:
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('(<img.*?itemimages/([^"]*)).*?(onCl.+?;)?.*?<font[^>]*>(.*?) \\((?:(.*?), )?(<a.*?>(\\d+)</a>|∞|\\d+)\\)(?:.*?(<a .*?</a>))?', source);
	# <td>(.*?itemimages/([^"]*)[^<]*).*?<font[^>]*>(.*?) \((?:(.*?), )?(<a.*?>(\d+)</a>|∞|\d+)\)(?:.*?(<a .*?</a>))?
	// The ? stuff at the end is because those arrows are a mafia option that might not be present
	if(parse.find()) {
		columnIcon = parse.group(1)+'" '+parse.group(3)+'\'>';
		myBuff.effectImage = parse.group(2);
		myBuff.effectName = parse.group(4);
		spoiler = parse.group(5);  // This appears for "Form of...Bird!" and "On the Trail"
		columnTurns = parse.group(6);
		if(columnTurns == "∞") { // Is it intrinsic?
			myBuff.effectTurns = -1;
			myBuff.isIntrinsic = true;
		} else
			myBuff.effectTurns = parse.group(7).to_int();
		if(parse.group(8) != "")
			columnArrow = parse.group(8).replace_string("/images/up.gif", imagePath + "up.png").replace_string("/images/redup.gif", imagePath + "upred.png");
	}

EDIT: just noticed that this no longer catches intrinsics. Will fix.

Ah! Down in parsePage():
Code:
	// Mood, Buffs, Intrinsic Effects
	#parse = create_matcher('<center><p><b><font size=2>Effects:(.+?)?(<table><tr><td>.+?</td></tr></table>)(.*?<center><b><font size=2>Intrinsics:.*?</td></tr></table>)?', source);
	parse = create_matcher('<center><p><b><font size=2>(?:Intrinsics|Effects):(.+?)?(<table><tr><td>.+?</td></tr></table>)(.*?<center><b><font size=2>Intrinsics:.*?</td></tr></table>)?', source);

Note that the <p> tag is missing from Intrinsics but not Effects. I have no idea if it will appear when there are no regular effects active, I'll change it then.
 
Last edited:
It's a little ugly and it doesn't save intrinsics, but it is better than nothing so I'll use it until I have time to work on this. Thanks.

svn update
 
Okay. I fixed it properly now. Everything now looks and works exactly the same way that it always did.

svn update

That was tricky enough that I decided to commit a new update. Next I'm going to have to decide what I want to do with KoL's new update. I suppose if KoL offers and arrow I can use that instead of mafia's arrow because KoL's arrow is better. I really like the right-click to multi-cast a spell.

Also, should I put the arrows in the first column to mimic KoL's behavior or is it just better to put the arrow last, after remaining turns? Like it has always been for us.
 
Last edited:
Actually, it wasn't that hard to make ChIT prefer KoL's upeffect arrows to KoLmafia's old upeffect arrows. So I made it happen.

svn update

Now, whenever KoL has a native upeffect arrow, it will use that instead of the arrows provided by KoLmafia.

Is it actually good to place these arrows after the effect name or should I mimic KoL's new appearance. Honestly I think the arrow looks cluttery on the left side, competing for my attention with the effect image and name which should really be more important. On the other hand, maybe I'm just used to seeing it that way.
 
Afterward definitely works better. ?The important part is the effect itself, not the "cast more" button, which is completely irrelevant if you don't have the effect. Since this game is designed for left-to-right readers, important details first. Icon followed by name followed by anything else.
 
I'm impressed with the sub-one-day fix on this! Loving the new multi-cast from ChIT.

I'm also glad to see that the outfit selection list scrolls... I guess I'll retire my outfit brick, as the functionality is in ChIT itself.
 
InfiniusDev and jbouzanquet, glad to have impressed you. I would have been even faster if I had the time when it happened. Fortunately bordemstirs gave me something to tide us over until I could make a proper fix.

I just made another fix to work with work with rr12316.


After a good deal of deliberation and listening to the feedback here, I have decided to remove game.ash from ChIT. If anyone wants to keep the rearranged frames, save the following as game.ash in your /relay directory.
Code:
void main() {		
	writeln('<html><head><title>The Kingdom of Loathing</title><script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.css" /></head>');
	writeln('<frameset id=rootset cols="200,3*,*">');
	writeln('  <frame name=charpane src="charpane.php"></frame>');
	writeln('  <frameset id=mainset rows="50,*">');
	writeln('    <frame name=menupane src="topmenu.php" scrolling=no></frame>');
	writeln('    <frame name=mainpane src="main.php"></frame>');
	writeln('  </frameset>');
	writeln('  <frame name=chatpane src="chatlaunch.php"></frame>');
	writeln('</frameset>');
	writeln('<script src="/onfocus.js"></script></html>');
}

I'll be keeping ChIT strictly to alterations of the charpane. I'm going to keep using it myself, I just won't add it to the script to make everyone reconcile their versions with mine. I apologize to anyone that might feel disappointed by this. You'll just have to install game.ash separately from ChIT.

svn update
 
Last edited:
Could always offer it up as the GIT (Game Improvement Toolkit) script. Which would have CHIT as a dependency, but also allow for modifying game.ash and any other interface page which might need to get tweaked along the way. :)
 
Could always offer it up as the GIT (Game Improvement Toolkit) script. Which would have CHIT as a dependency, but also allow for modifying game.ash and any other interface page which might need to get tweaked along the way. :)

LoL! That'd be fine. I'll let someone else take over the GIT project and cooperate with helping them to import ChIT.
 
LoL! That'd be fine. I'll let someone else take over the GIT project and cooperate with helping them to import ChIT.

/em taps his fingers ponderously.

Just curious, is there a web interface for viewing the files/revisions/diffs/whatnot of repositories at the site hosting ChIT?

EDIT: Also, is it possible for a project to alter a file from one of its dependencies?
 
Just curious, is there a web interface for viewing the files/revisions/diffs/whatnot of repositories at the site hosting ChIT?

Here.


EDIT: Also, is it possible for a project to alter a file from one of its dependencies?

Nope. You could make a feature request... I'm not sure if that is reasonably or ridiculously difficult to implement.
 
What I don't know there is if the scripts would merge the changes or overwrite the files and fight for supremacy on every update. If it's merge, then as long as you install the modified version second, you should be fine. If it's fight, then it's not likely something easily to implement...
 
Back
Top