Guide

ereinion

Member
That was a KoL issue, but only for people that had short character pane enabled. It is fixed now.
Really? Cause it still fails to appear in the sidebar for me. Furthermore, whenever I open the relay browser it seems to have forgotten the size of the center pane: http://prntscr.com/cxdtll

Resizing, closing, and opening again gives the same result as show in the picture above.

Using mafia r12794 and FF49.0.2
 

lostcalpolydude

Developer
Staff member
Well, the issue that showed up even without mafia was fixed, namely the lack of a chat frame. Something must have changed with the cookie for that, and I guess mafia isn't handling it properly?

I'm pretty sure there's nothing for Guide to do about it, at least until mafia handles the change.
 

fronobulax

Developer
Staff member
FWIW, I had the frame size problem in the relay browser and made it go away by deleting all cookies from 127.0.0.1
 

Veracity

Developer
Staff member
There are cookies that KoL sends if you tell it to remember frame sizes. There are two specific cookies that KoL sends that we handle ourself, but we pass any other cookie down from KoL to the Browser and up from the Browser to KoL without modification.

The last change to cookie handling was revision 17186 on September 9.

I tried to figure what those cookies might be.

- I opened the Relay Browser
- I went to Options (the Interface section)
- I checked the "Remember the size of the character pane and chat" checkbox

Code:
Requesting: https://www.kingdomofloathing.com/account.php?am=1&pwd&action=flag_noframesize&value=1&ajax=1
3 request properties
Field: Cookie = [PHPSESSID=vjkvt9t79ap3q0lmvjepgo98e2; charpwd=deleted; chatpwd=deleted; AWSALB=WsJ9hU7A0sre1POX9wzzsPQ4RjqIfzr451tvncsivZxBz0OFuPRgpnfCL6BjskZnCeyuDDzvWBt2iGMFGCVlzW4xKZTERYDffZDdBFAsBKpNGcoRji8PizXWlCCR]
...

Retrieving server reply...

Retrieved: https://www.kingdomofloathing.com/account.php?am=1&pwd&action=flag_noframesize&value=1&ajax=1
12 header fields
Field: null = [HTTP/1.1 200 OK]
...
Field: Set-Cookie = [AWSALB=NJuVHnpeY2xO+n5ysjMkDqPLuPkweZu7x0krCAd+pHGvrGt++SzWhMVCZS2USJk5QK7FJn61Pt97eswSpGjx4eaLkw6TIrk6SiLunrnjImd5mQJFcu3YVo8XlOoD; Expires=Sat, 29 Oct 2016 16:44:10 GMT; Path=/]
...
Retrieving server reply
ResponseText has 1 characters.
0
Notice that it did not send any new cookies.

- I unchecked the "Remember the size of the character pane and chat" checkbox

Code:
Requesting: https://www.kingdomofloathing.com/account.php?am=1&pwd&action=flag_noframesize&value=0&ajax=1
3 request properties
Field: Cookie = [PHPSESSID=vjkvt9t79ap3q0lmvjepgo98e2; charpwd=deleted; chatpwd=deleted; AWSALB=NJuVHnpeY2xO+n5ysjMkDqPLuPkweZu7x0krCAd+pHGvrGt++SzWhMVCZS2USJk5QK7FJn61Pt97eswSpGjx4eaLkw6TIrk6SiLunrnjImd5mQJFcu3YVo8XlOoD]
...

Retrieving server reply...

Retrieved: https://www.kingdomofloathing.com/account.php?am=1&pwd&action=flag_noframesize&value=0&ajax=1
12 header fields
Field: null = [HTTP/1.1 200 OK]
...
Field: Set-Cookie = [AWSALB=e4QSHHMYxQNAXX3hCMlAINiOVe/ZG97/qnDhVP9vesTb5kPVWMJoUaBmutt1B5uaFwITpc8J/8jzNcNnbRZjFg3f4JTBM3SnHoo5X+FXLGZ1A3enMH0qL3e2kiWm; Expires=Sat, 29 Oct 2016 16:45:36 GMT; Path=/]
...

Retrieving server reply
ResponseText has 1 characters.
1
Notice that it did not send any new cookies.
 

lostcalpolydude

Developer
Staff member
Just looking at my saved cookies, charpwd and chatpwd (why are those the cookie names? anyway...) are changing their value every time I reload the window, without touching anything between immediate reloads.
 

Veracity

Developer
Staff member
Hmm. Let me check those Browser interactions:

Code:
-----From Browser-----
POST /account.php HTTP/1.1
Host: 127.0.0.1:60080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: application/json, text/javascript, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://127.0.0.1:60080/account.php
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Content-Length: 80
Cookie: AWSALB=e4QSHHMYxQNAXX3hCMlAINiOVe/ZG97/qnDhVP9vesTb5kPVWMJoUaBmutt1B5uaFwITpc8J/8jzNcNnbRZjFg3f4JTBM3SnHoo5X+FXLGZ1A3enMH0qL3e2kiWm
Connection: keep-alive
am=1&pwd=4ba168ccde79588dbd29a84830bcdca6&action=flag_noframesize&value=1&ajax=1
----------
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to account.php...

Requesting: https://www.kingdomofloathing.com/account.php?am=1&pwd&action=flag_noframesize&value=1&ajax=1
3 request properties
Field: Cookie = [PHPSESSID=vjkvt9t79ap3q0lmvjepgo98e2; charpwd=deleted; chatpwd=deleted; AWSALB=e4QSHHMYxQNAXX3hCMlAINiOVe/ZG97/qnDhVP9vesTb5kPVWMJoUaBmutt1B5uaFwITpc8J/8jzNcNnbRZjFg3f4JTBM3SnHoo5X+FXLGZ1A3enMH0qL3e2kiWm]
Field: User-Agent = [Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0]
Field: Content-Type = [application/x-www-form-urlencoded]
Where did we get "charpwd=deleted; chatpwd=deleted;"?

Investigating...
 

Veracity

Developer
Staff member
OK, I logged in with DEBUG logging including Browser interactions.
I started the Relay Browser:

Code:
-----From Browser-----
GET /game.php HTTP/1.1
...
Cookie: AWSALB=0ZFs20C8k9mQmippEgpWP91D3GwovLCS8mC0iMNrZ6QBzny0qm+x5FO1OREOEBncw/T4wRLQL6rEfkxEmGuc/KHorRihOWO4WTJ7FJQHr0yJL5nmeTxW93kAZh/E
----------
2 request properties
Field: Cookie = [PHPSESSID=bdj6g59ej1pk80qm4l8ptsg8c4; AWSALB=2puxFNpMse3drMWu47gOGbTKfM8OzQ3ImHPFJKUXjAsHZ9E2yQ4p6CEcIOEv8DcngeE+rO/k/bT3Lm1OsW95slg3UVkSv2qGu4LwFn+TL/OVtSI7JPuz5M2mYiKi]
Field: User-Agent = [Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0]

Retrieving server reply...

Retrieved: https://www.kingdomofloathing.com/game.php
12 header fields
Field: null = [HTTP/1.1 200 OK]
...
Field: Set-Cookie = [charpwd=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT, chatpwd=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT, AWSALB=iKPiF7/vFUCL2z+/EsRTv6hJcVCELL/BskHXIkr6V2SymH+NlxEU28mSmSPUWnVY/Oyw4+EFLWA2tzw6w126Bk//oKrbpBa+wCn4ije528LSM2wLUpyCHglCstyS; Expires=Sat, 29 Oct 2016 17:04:03 GMT; Path=/]
...
-----To Browser-----
HTTP/1.1 200 OK
...
Set-Cookie: charpwd=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT
Set-Cookie: chatpwd=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT
Set-Cookie: AWSALB=iKPiF7/vFUCL2z+/EsRTv6hJcVCELL/BskHXIkr6V2SymH+NlxEU28mSmSPUWnVY/Oyw4+EFLWA2tzw6w126Bk//oKrbpBa+wCn4ije528LSM2wLUpyCHglCstyS; Expires=Sat, 29 Oct 2016 17:04:03 GMT; Path=/
...
----------
Looks to me like we sent all the cookies that KoL gave us down to the browser.
Note the expiration dates: KoL is setting them to "deleted" with a date in the past in order to force the browser to delete any saved cookies with those names.

Here is the next Browser request:

Code:
-----From Browser-----
GET /topmenu.php HTTP/1.1
...
Cookie: AWSALB=iKPiF7/vFUCL2z+/EsRTv6hJcVCELL/BskHXIkr6V2SymH+NlxEU28mSmSPUWnVY/Oyw4+EFLWA2tzw6w126Bk//oKrbpBa+wCn4ije528LSM2wLUpyCHglCstyS
...
----------
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to topmenu.php...

Requesting: https://www.kingdomofloathing.com/topmenu.php
2 request properties
Field: Cookie = [PHPSESSID=bdj6g59ej1pk80qm4l8ptsg8c4; charpwd=deleted; chatpwd=deleted; AWSALB=iKPiF7/vFUCL2z+/EsRTv6hJcVCELL/BskHXIkr6V2SymH+NlxEU28mSmSPUWnVY/Oyw4+EFLWA2tzw6w126Bk//oKrbpBa+wCn4ije528LSM2wLUpyCHglCstyS]
Field: User-Agent = [Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0]
Note that the Browser is sending only th AWSLB cookie - but KoLmafia is, for some reason, sending back the expired cookies all on its own.

I'll look at this.
 

Veracity

Developer
Staff member
Well, this is interesting.

- We save all cookies that KoL sends via Set-Cookie
- We strip off the Expires field when we save them
- We ignore cookies that the browser sends

That all works fine with PHPSESSID and AWSALB, but not so well for others that KoLmafia doesn't need itself.

The idea was to future proof it so that if KoL added new cookies, we would not have to change which hardcoded ones we save.

Perhaps we should just hardcode PHPSESSID and AWSALB and pass anything else from the browser up and override those cookies.
 

lostcalpolydude

Developer
Staff member
I'm now managing to consistently reproduce the incorrectly-sized frames issue outside of mafia, so this is on CDMoyer to sort out.
 

Veracity

Developer
Staff member
Revision 17296 now distinguished between "special" cookies - PHPSESSID and AWSALB - and everything else.
It will save the "special" ones and send those with every internal or external (Browser) request.
Browser requests will save the non-"special" ones and KoLmafia will also send those for any Browser request that has any.

Which it say, we are now no longer future proofed if KoL adds a new cookie that internal requests will need to save and transmit.

But we shouldn't mess up browser-specific cookies that change during the session.
 

Veracity

Developer
Staff member
I'm now managing to consistently reproduce the incorrectly-sized frames issue outside of mafia, so this is on CDMoyer to sort out.
Yeah, I noticed bad frames when switching back and forth between "save frames" when closing the browser window and reopening it even after we started transmitting all cookies to the browser correctly and no longer internally saving chatpwd and charpwd.
 

Malibu Stacey

Active member
On the Ghostbusting tasks (alerts parsed from the Protonic Accelerator Pack), could we get a note about which element to buff resists for please?
Some of the monsters (e.g The ghost of Lord Montague Spookyraven) can do 700+ damage when you attempt to trap them which in-run isn't easily tankable if you don't have adequate resists. This can cause you to waste one or more turns as losing the battle costs you a turn even though winning doesn't.
Also passive damage and/or familiar damage can kill the monster before you can trap it. I had a filty child leash equipped on my Intergnat which killed some of them before I could even get a 3rd shoot ghost in. Dunno if there's much you can do about that though.
The potential encounter list can be found at http://kol.coldfront.net/thekolwiki/index.php/Protonic_accelerator_pack but you'll have to click through to each monster to get the element it attacks with.

Also Thanksgarden support would be most appreciated. Main ones being recommending the Gravy Boat to cut turns in The Defiled Cyrpt, using Turkey Blasters to advance delay & using Stuffing Fluffers once the Battlefield is open.

Thanks =)
 
Last edited:

Boesbert

Member
Super minor suggestion:

When being tasked to get Fernswarthy's key during the The Wizard of Ego quest, Guide says to "Adventure at the unquiet garves" and links to place.php?whichplace=plains. I suggest a better link target would be place.php?whichplace=cemetery.
 

Boesbert

Member
Another minor suggestion:

2 cashews
Could make into turkey blasters to burn delay, stuffing fluffers for the war, or various foods.

Turkey blasters and stuffing fluffers are 3 cashews each. So if you only got 2, maybe just suggest foods?
 
Turkey blasters and stuffing fluffers are 3 cashews each. So if you only got 2, maybe just suggest foods?

I think they're still worth mentioning, just because you may want to save your cashews for tomorrow. I could see graying out items you can't afford right now, though.
 

camperdave

New member
Suggestion about the Avatar of West of Loathing section of the guide:

On line 42294 you disable the entire section if the my_path_id() function doesn't say we're currently in an AWOL run. I'm still new to AWOL so I'm not sure exactly which sections of this is safe for (so I'm not going to try to suggest a patch), but I do know that Extract Oil continues working into aftercore, and I'd love to have that section of my side bar keep working!

I'm thinking most of the section could just check for the presence of the skills themselves, since they'd be missing if you're not in AWOL or post-AWOL aftercore.
 
Top