Character Info Toolbox

I'm having a real weird issue and it's been going on for awhile but it's finally gotten to the point where I find it annoying enough that I need to report it.

The image for my companion/familiar always seems to be broken.

The_Kingdom_of_Loathing_-_Google_Chrome_2013-07-16_14-44-04.png
 
This has very little to do with ChIT, but since it now includes game.ash, I thought I'd mention...does anyone else always enter chat immediately upon logging in? Because long, long ago, I made my own game.ash that bypasses chatlaunch.php and goes straight into chat (simply by referring the chatpane to chat.html instead of chatlaunch.php). Just wondering if anyone else was interested in that, and if so, maybe it can be included (with a variable to opt-out for anyone who doesn't want it).

Edit: It should open mchat.php for people using "new" tabbed chat.
 
Last edited:
I was only thinking of panel sizes as you previously suggested. Do you really think it is a helpful idea to allow the placement to be changed? I'm open to suggestions.

Panel sizes would be easy.
EDITED: Including auto launching chat window.
Code:
import "zlib.ash";

void main(){
 setvar('game.charpane','200');
 setvar('game.chatpane','20%');
 setvar('game.chatpane.page','launcher');//launcher, modern, older, ancient, mafia
 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 border="1" id="rootset" cols="'+vars['game.charpane']+',*,'+vars['game.chatpane']+'">');
 writeln(' <frame name="charpane" src="charpane.php"></frame>');
 writeln(' <frameset border="1" id="mainset" rows="55,*">');
 writeln('  <frame name="menupane" src="topmenu.php" scrolling=no></frame>');
 writeln('  <frame name="mainpane" src="main.php"></frame>');
 writeln(' </frameset>');
 write(' <frame name="chatpane" src="');
 switch(vars['game.chatpane.page']){
  case 'launcher':writeln('chatlaunch.php');break;
  case 'modern':writeln('mchat.php');break;
  case 'older':writeln('lchat.php');break;
  case 'ancient':writeln('chat.php');break;
  case 'mafia':writeln('chat.html');break;
 }
 writeln('"></frame></frameset>');
 writeln('<script src="/onfocus.js"></script></html>');
}
Layout would be.. a little more difficult, and probably beyond reason. If people wanted to rearrange the window badly enough, it's not too much to ask them to learn the minor amount of HTML (or just a little bit of reasoning and this source code) necessary to change it manually.
 
Last edited:
Might be nice to figure out why it's a problem for you. I have that option set and I've never had an issue with it.
 
Back when I had it checked, a number of images would frequently get corrupted or something. I would have to go find the image in my mafia directory, and delete it to have mafia re-cache it. IIRC, the images tended to be the same ones, but I can't be sure. Time for a bug report? I stopped using the cache feature anyhow.
 
Usually when I want to disable ChIT, it's to get a manageable debug log for the HTML of the main frame. Setting chit.disable = true still results in a large number of function calls, so I generally ignore the setting and rename charpane.ash instead.

Are you suggesting that it would become usable for you if I made it the first thing that was checked in main() or should I just assume that you need to rename charpane.ash and weren't intending to encourage me to make some change?


Hrm, that's weird I never knew I had that option checked.

Did the problem go away when you unchecked the option?


This has very little to do with ChIT, but since it now includes game.ash, I thought I'd mention...does anyone else always enter chat immediately upon logging in? Because long, long ago, I made my own game.ash that bypasses chatlaunch.php and goes straight into chat (simply by referring the chatpane to chat.html instead of chatlaunch.php). Just wondering if anyone else was interested in that, and if so, maybe it can be included (with a variable to opt-out for anyone who doesn't want it).

I was wondering if other people had a game.php which I would be conflicting with. First, do you know how to merge your changes to game.php with mine, by editing the version in the /svn folder? (Informational Link) Also, I am now considering making that an option for ChIT if anyone else speaks up about wanting to do it.


Panel sizes would be easy.
EDITED: Including auto launching chat window.

I don't understand all of that. What is the meaning of those 5 options for game.chatpane.page? (Obviously I'd be changing your var names to match others in my script, since they don't start with chit.)
 
I don't understand all of that. What is the meaning of those 5 options for game.chatpane.page? (Obviously I'd be changing your var names to match others in my script, since they don't start with chit.)

The don't start with chit because from my perspective, they aren't chit. They could be, sure, but when I wrote it last night I was going for modularity (also I wanted different names for a different thing I was testing out). As for the options:
-launcher: this is the standard page that is shown when logging into KoL. Could also be renamed to 'default' or whatever.
-modern: Modern Chat (as described in the KoL chat options)
-older: Older Chat (see above)
-ancient: Ancient Chat (see above)
-mafia: I *believe* this is Older Chat, in function, with a tab on top to access the gCLI from the chat window.
 
-mafia sounds like ActiveChat, which requires Older Chat, and supplies tabs and a gCLI tab. Although Modern Chat provides tabs, I still use Active Chat - since it is familiar, is integrated correctly with KoLmafia, and is, as far as I can tell, just as good (if not better) than Modern Chat.

Various people have said they were working on integrating Modern Chat with Mafia Chat. I have no idea if and when somebody will finish that.
 
After some consideration I decided that I didn't really need to know all that. It's okay to take one extra server hit since the game is only rarely refreshed. That'd save the player the trouble of having to figure out their setting. Right now I'm considering implementing it like this:

Code:
import "zlib.ash";

string chatpane() {
	if(vars['chit.game.chatlaunch'] == 'true') {
		matcher chat = create_matcher('"([^"]*)"><b>Enter the Chat', visit_url('chatlaunch.php'));
		if(chat.find())
			return chat.group(1);
	}
	return 'chatlaunch.php';
}

// Rewritten game.php by bordemstirs
void main() {
	setvar('chit.game.chatlaunch', false);
	
	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="'+ chatpane() +'"></frame>');
	writeln('</frameset>');
	writeln('<script src="/onfocus.js"></script></html>');
}
 
Last edited:
I was wondering if other people had a game.php which I would be conflicting with. First, do you know how to merge your changes to game.php with mine, by editing the version in the /svn folder? (Informational Link) Also, I am now considering making that an option for ChIT if anyone else speaks up about wanting to do it.
Thanks for the link! I knew there was a way, but I was too lazy to look it up. =/

Also, thanks for at least considering implementing this. I wasn't sure it would be appropriate since, as bordem pointed out, it's not really ChIT.
 
I consider that anything which affects the charpane can be part of the Character Info Toolbox. Making the charpane taller certainly seems relevant to me.

Though, if a bunch of people started to tell me I've gone too far I would probably back off. I could always keep that game.ash override on my system even if I took it out of ChIT, after all.
 
I consider that anything which affects the charpane can be part of the Character Info Toolbox. Making the charpane taller certainly seems relevant to me.
I think he just meant the bit about the chat launcher.

Anyway, as with chit.game.chatlaunch, you could always have a chit.game variable (or chit.game.disable) to control whether people want to use the relay or not.
 
Oh yeah. That is kinda odd for ChIT. Maybe I shouldn't include it? I'm going a little off the reservation there...

I'd really like to hear if people reading this thread approve or disapprove of chat launching and changing frame arrangement to allow the charpane to be taller. Your opinions greatly matter to me.
 
I technically never use chat in the relay browser so code to launch that would be completely useless for me as I would close it again (I use Mafia's builtin chat that opens up on login) which would be several unnecessary server hits.
 
I technically never use chat in the relay browser so code to launch that would be completely useless for me as I would close it again (I use Mafia's builtin chat that opens up on login) which would be several unnecessary server hits.

Which probably means that you would ideally want game.php to remove the chat pane? Except then you don't see recent updates listed there either.
 
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.
 
Oh yeah. That is kinda odd for ChIT. Maybe I shouldn't include it? I'm going a little off the reservation there...

I'd really like to hear if people reading this thread approve or disapprove of chat launching and changing frame arrangement to allow the charpane to be taller. Your opinions greatly matter to me.

It does seem related to me, I think of this script as modifications to the relay interface in general. I'd use an automatic chat launcher.
 
Back
Top