Guide

lostcalpolydude

Developer
Staff member
In aftercore, I notice that quite a few things are clickable. However, they go to pages that will have a huge list of stuff (inventory, terrarium), so I basically never want to click them, opting instead to use a chat or CLI command. I'm also using Bale's game.php override, so I often want to click in that frame just to make it scrollable, but much of the space will load something I don't want (including whitespace next to items). So it would be cool if something was changed about those links.
 

Bale

Minion
You need to click in the frame to scroll it? Is that a Mac thing or a bad mouse drivers thing?
 

lostcalpolydude

Developer
Staff member
I guess I don't need to click there to scroll, which makes the fact that I never want to load any of those links not such a big deal.
 

lostcalpolydude

Developer
Staff member
Apparently this script loads the quest log twice every time it is loaded, which is likely hundreds of times per day for many people. As I've already told you, mafia loads the quest log when you log in. If mafia isn't tracking quest progress while a quest is being done, then bug report it, don't use wasteful visit_url() loads to work around it.
 

lostcalpolydude

Developer
Staff member
Also, your set_property_if_changed() function is unneeded. Mafia internally checks the current value and only updates if it changed, so it's extra complication when the value hasn't changed and an extra get_property() when it has changed.
 

Ezandora

Member
Also, the Guide wants me to banish "drum pygmys". That should be "drunk pygmies".
Fixed.

In aftercore, I notice that quite a few things are clickable. However, they go to pages that will have a huge list of stuff (inventory, terrarium), so I basically never want to click them, opting instead to use a chat or CLI command. I'm also using Bale's game.php override, so I often want to click in that frame just to make it scrollable, but much of the space will load something I don't want (including whitespace next to items). So it would be cool if something was changed about those links.
Ah, you're right, negative space should be clickable. Reduced the surface area of links a bit.

Apparently this script loads the quest log twice every time it is loaded, which is likely hundreds of times per day for many people. As I've already told you, mafia loads the quest log when you log in. If mafia isn't tracking quest progress while a quest is being done, then bug report it, don't use wasteful visit_url() loads to work around it.
I've looked through the quests, and prevented this from happening for quests that mafia should be tracking properly. This should help, though it was already rate-limited. (this may break some of the advice; I'll try to ascend and verify all the quests)

The quests mafia doesn't seem to track step-by-step - questG02Whitecastle (missing a few intermediate steps), questG03Ego, questI02Beat, questG04Nemesis and questG05Dark - will still issue a quest log load while the player is on them, for the moment. Should be able reduce that further.

I can report those, though tracking the nemesis and cave quest in mafia would require a lot of effort.

Also, your set_property_if_changed() function is unneeded. Mafia internally checks the current value and only updates if it changed, so it's extra complication when the value hasn't changed and an extra get_property() when it has changed.

It does? Thanks, changed.


New version has matt.chugg's suggestion for a resizable interface:
Resizing.png
 

Bale

Minion
New version has matt.chugg's suggestion for a resizable interface:
View attachment 8152

Those images look amazing and I want to try it out, but I updated to the current version (r73) and it seems you haven't committed the code yet or maybe it doesn't work on any of the browsers I tested. (Tested Firefox, Opera and Chrome.)
 

lostcalpolydude

Developer
Staff member
It works for me in Firefox.

When I click on "Open in a new window", which I did just to check out the resizing, the pane is replaced with main.php even if it isn't in the main pane. I'm not sure how to change that, and there's not much reason to use that link when the script is in a smaller permanent frame, so it isn't really a big deal.
 

ereinion

Member
Something I think I noticed upon ascending is that it doesn't give a link/informtation that you should visit toot oriole. Not a huge deal, but it'd be nice to get a link to him, maybe something about selling pork gems, opening astral consumables etc?

Otherwise it's been an amazing help for me on day 1 :)
 

Razorsoup

Member
Those images look amazing and I want to try it out, but I updated to the current version (r73) and it seems you haven't committed the code yet or maybe it doesn't work on any of the browsers I tested. (Tested Firefox, Opera and Chrome.)

I couldn't get it to work either. Firefox 27.0 on Windows 7

It works for me in Firefox.

When I click on "Open in a new window", which I did just to check out the resizing, the pane is replaced with main.php even if it isn't in the main pane. I'm not sure how to change that, and there's not much reason to use that link when the script is in a smaller permanent frame, so it isn't really a big deal.

Maybe an option to disable that link? I don't need it since I have guide loading in a side frame and it just takes up valuable vertical space.
 
Last edited:

lostcalpolydude

Developer
Staff member
I just tried IE11, Chrome, and Opera, all of which have no add-ons or anything because I never use them, and the resizing worked in all of those for me too. Windows 7.
 

Ezandora

Member
Those images look amazing and I want to try it out, but I updated to the current version (r73) and it seems you haven't committed the code yet or maybe it doesn't work on any of the browsers I tested. (Tested Firefox, Opera and Chrome.)

Edited the CSS a bit. Don't know if that'll help, haven't been able to reproduce the bug.

Something I think I noticed upon ascending is that it doesn't give a link/informtation that you should visit toot oriole. Not a huge deal, but it'd be nice to get a link to him, maybe something about selling pork gems, opening astral consumables etc?

Otherwise it's been an amazing help for me on day 1 :)

I would like to do this as well, though there's no way to track that currently. Unopened astral consumables should show up under resources.

When I click on "Open in a new window", which I did just to check out the resizing, the pane is replaced with main.php even if it isn't in the main pane. I'm not sure how to change that, and there's not much reason to use that link when the script is in a smaller permanent frame, so it isn't really a big deal.

Detected this situation.

I've removed quest log loads entirely. As a side effect, the nemesis quest may be inaccurate until I am able to test it. (as well as the rest of the kingdom quests) If it bugs out, apologies in advance.
 

lostcalpolydude

Developer
Staff member
A reminder to take off the mega gem after killing Dr. Awkward would be useful. Someone might actually want the talisman on for +stats in rare instances.
 

Razorsoup

Member
RE: resizing issues, I was able to get the resizing thing to work by removing and reinstalling guide.ash. I don't know why it wasn't working but it is now. Thanks.
 

Bale

Minion
Huh. Same thing that worked for Razorsoup worked for me. Delete and reinstall was the key! Bizarre.

Ezandora, The resizing is utterly awesome. I like 319 pixels width the best. (320 is the next larger size.)

PS. My current game.ash with a narrower guide pane, a more normal sized chat pane and room for slightly smaller screens. Also, I decided that I like the guide closer to the action, while I keep the chatpane on the far right. I also made it work properly for people who use the drop-down style menu pane option.

PHP:
void main() {
	string rows;
	matcher rowmatch = create_matcher('rows="(\\d+)', visit_url());
	if(rowmatch.find()) rows = rowmatch.group(1);
	else rows = "50";
	writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>');
	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,*,380">');
	writeln('  <frame name=charpane src="charpane.php"></frame>');
	writeln('  <frameset id=mainset rows="'+rows+',*">');
	writeln('    <frame name=menupane src="topmenu.php" scrolling=no></frame>');
	writeln('    <frameset id=center cols="*,319">');
	writeln('       <frame name=mainpane src="main.php"></frame>');
	writeln('       <frame name=guide src="relay_guide.ash"></frame>');
	writeln('    </frameset>');
	writeln('  </frameset>');
	writeln('  <frame name=chatpane src="chatlaunch.php"></frame>');
	writeln('</frameset>');
	writeln('<script src="/onfocus.js"></script></html>');
}
 

Razorsoup

Member
Ezandora, The resizing is utterly awesome. I like 319 pixels width the best. (320 is the next larger size.)

You probably already figured this out but lines 32-35 of relay_Guide.ash contain the size limits for the different styles. So if you really like round numbers and want the panel at 320, change the line that is
Code:
string __setting_media_query_medium_size = "@media (min-width: 320px) and (max-width: 500px)";
to this instead.
Code:
string __setting_media_query_medium_size = "@media (min-width: 321px) and (max-width: 500px)";

@Ezandora: I don't understand css and the details of how your script works but it seems like there may be a one pixel overlap in the different size ranges for styles. I think it should probably be 0-225, 226-320, 321-500, 501+. But again, I don't really understand css very well and don't know the details of how this script works so I could be very wrong. Thanks for writing and releasing this. It's a pretty sweet addition to my KoLmafia setup.
 
Last edited:

Bale

Minion
You probably already figured this out but lines 32-35 of relay_Guide.ash contain the size limits for the different styles. So if you really like round numbers and want the panel at 320...

Changing my copy of relay_Guide wouldn't have helped anyone who was using the game.ash I posted. They'd have to modify their copies of Ezandora's guide also. I really wasn't about to start instructing them to do that just so that they could use that cute little game.ash override.

Anyway, I didn't point it out because I like round numbers. I pointed it out because I wanted it to be clear why I was one pixel undercutting. It looks really weird.
 
Last edited:

Ezandora

Member
I made up those numbers anyways. I might change them in the future, to improve readability? Maybe edit the layout to scale better.

Unrelated coincidence: did you know the iPhone's screen is 320 CSS pixels wide?
 
Top