Character Info Toolbox

Also, you can use the debugging line I added to force the rollover box to appear, if you don't want to wait until rollover to see how it looks.

OH! So, that's the purpose of that line! Anyway, I decided to use a more accurate test and it didn't work. Add these two lines after chitSource["header"] = parse.group(1); and you'll activate the rollover message by lying to the javascript about the rollover timer:

PHP:
		matcher test = create_matcher("rollover \= (\\d+).*?rightnow \= (\\d+)", chitSource["header"]);
		if(test.find()) chitSource["header"] = chitSource["header"].replace_string(test.group(1), to_string(to_int(test.group(2)) + 800));

When I do that, I see that the last line from the roof block disappears behind the wall block. In my case that means the Last location link disappears.
 
Same behavior here. I see what's happening. The startup() function which is being called in the <body> tag's onload event is what determines the rollover message text. (See charpane.4.js). So, the page has already been drawn and the roll message is injected afterwards. Pondering what to do about it ....
 
Here's one solution. I changed a line at the end of bakeEffects() :

PHP:
chitBricks["effects"] = result;

to

chitBricks["effects"] = chitSource["rollover"] + result;

And removed the line I added to buildRoof(). And it doesn't look too bad to me.
 
Last edited:
Interesting solution. I'd rather it appears at the top of the page, but your idea certainly seems to be an improvement to the status quo. What about some variant on my original idea to use position:relative?
 
Interesting solution. I'd rather it appears at the top of the page, but your idea certainly seems to be an improvement to the status quo. What about some variant on my original idea to use position:relative?

The thing about those positions is that they are all determined when the "rollover" <center> tag is empty. And then the javascript comes along and adds content to it later. I actually thought it looked better in the middle than at the top. But, I will look at it some more.
 
How about this in parsePage() ?

PHP:
matcher test = create_matcher("rollover \= (\\d+).*?rightnow \= (\\d+)", chitSource["header"]);
            if(test.find()) {
            #chitSource["header"] = chitSource["header"].replace_string(test.group(1), to_string(to_int(test.group(2)) + 5));
            #int roll = test.group(2).to_int() + 5;
            int roll = test.group(1).to_int();
            int now = test.group(2).to_int();
                if ((roll - now) < 1810) {
                chitSource["rollover"] = chitSource["rollover"].replace_string("</center>", " <br> </center>");
                }
            }


Starting at 30 min and 10 sec before rollover, chit will start reserving space at the top for the rollover message.
 
I recommend downgrading Notepad++ to version 6.1.8 to fix the highlighting problem. Very annoyingly they "improved" their context highlighting so that I can't make it work with ash. I have had to turn off automatic updating.
I have a slightly modified version of your highlighter that works fine with version 6.3. I attached it to this post if you want to look at it.
 

Attachments

Thank you Alihifar, I'll have to screw up my courage to update and try that out.


How about this in parsePage() ?

Actually, the more I look at it, the more I'm appreciating your fix to put it at the top of the effects block. I might go with that one.
 
Damn. And I thought I was being clever by re-using the matcher you made to describe the problem to solve it ! In any event, I thought it looked better under the roof as well.
 
Updated to 0.7.6.3
  • Giant's Castle floor is now easy to read in "Last Adventure"
  • Thanks to AlbinoRhino we display "time to rollover" when close to rollover. Just like vanilla KoL.
    This is more of a belated bugfix than a new feature! Finally.

Since last version only charpane.ash has been changed
Download to /relay directory: View attachment 7471
 
You are very welcome. I've been wanting to restore that basic KoL functionality since shortly after I took over this script. When I was first debugging it I found a failed line of code, commented out, which was intended to add the rollover timer. So I know that Chez must have been stumped by it also.

Both Chez and I owe a debt to AlbinoRhino for figuring out how to make it happen. He was brilliant to think of moving it from the top of the page, to the top of the wall.
 
Last edited:
Did you change anything else in the layout in the latest version? I seem to have gotten another scrollbar inside the charpane, it disappears whenever I make the charpane wider, but it's a bit annoying to have to do that every time I open the relay browser or the charpane refreshes...

Charpane-doublescroll_zpsec90bf58.png
 
Last edited:
Odd. I usually have no scroll bars at all, except on the walls when the effects list runs long. Those both look full length. What browser & version are you using ?
 
Firefox 19.0, mafia r11950, chit 0.7.6.3. Appeared with the most recent version of chit... or mafia, but I think it's more likely caused by chit?
 
Back
Top