Fallen London's Valet: a userscript

I humbly present my latest endeavor: a gentleman’s gentleman, in electronic form. Of course, if we’re going to be downright technical about it, it’s more of a gentlebeing’s gentlebeing, but that rather grates on the ear and there’s only so far I’m willing to go to be gender-balanced.

Fallen London’s Valet is pleased to dress you in your finest equipment, to meet your exacting requirements on what a particular Quality must be. He takes pride in service, not in fashion; if you truly desire to wear the lowest, meanest clothing, he will indeed dress you as a base villain.

In less florid prose: pick a quality, then choose whether to minimize, maximize, or hit a particular value on that quality, and your valet will dress you to meet that. This is particularly good for stat-grinding, when you want to have exactly a 60% or 90% chance of success to maximize the change points you’ll gain while playing a storylet. Of course, it’s also useful when you’re bouncing back and forth between actions that require different qualities. The control panel for this script is in the far lower-left part of the page.

Find this userscript here: https://greasyfork.org/scripts/2353-fallen-london-s-valet

NOTE: BEFORE IT WILL WORK AT ALL, YOU NEED TO LOOK AT BOTH PAGES OF YOUR INVENTORY ONCE! (And you need to look at the relevant inventory page again when you pick up new equipment, if you want the Valet to be able to dress you in it.) The Valet is terribly polite, and refuses to rifle through your goods without your presence.

If you find any errors, you can drop me a line in-game to PotatoEngineer, send me a message here, or just reply to the post. I think I’ve got most of the bugs out.

Technical details:
I’ve only tested this in Greasemonkey on Firefox, but I’ve refrained from using all of the Greasemonkey-specific functions, so it should work in Chrome, Opera, and Safari as well. It might even work in Internet Explorer, except that a) IE likes using using different functions for everything, and b) I’m not even sure there’s a way to run userscripts in IE anymore; I keep finding forum posts about &quotX used to work, but not anymore.&quot

This script is harmless: it doesn’t &quotphone home&quot to report usage stats to me, it doesn’t make HTTP requests to anywhere else, and the only way it defaces Fallen London is with a small, inconspicuous control panel at the far lower-left of the page. It does make HTTP requests to storynexus.com, in order to dress you, update the left sidebar, and update your inventory screen if you choose to change your equipment while looking at your inventory. It also puts a few click-listeners on your inventory when you’re looking at it, so that it knows what you’re currently wearing.
edited by PotatoEngineer on 6/10/2014

FYI, its against the user agreement to use this. So…

It is? Where’s the user agreement? I wasn’t able to find it in the FAQ or Help sections, and I’ve seen a few posts on this forum about wanting such a thing; there weren’t any responding posts that mentioned the user agreement at the time.
edited by PotatoEngineer on 6/10/2014

fallenlondon.storynexus.com/sh/termsandconditions

  1. Visitor Conduct

Failbetter Games may suspend (temporarily or permanently) the accounts of any users it deems to be engaging in malicious or inappropriate conduct. Such conduct includes but is not limited to:

use of automation or scripting to interact with the site;

And more specifically, in this post by Alexis:


edited by dov on 6/10/2014

Well, that’s unfortunate. I’m a continent away from the servers, and it’s not uncommon to get 10-20 seconds of latency on some actions - and it’s often a little higher around inventory-related actions. Ah, well, back to clicking.

It IS unfortunate. Hopefully the functionality you talk about will be built in at some point in the future.

Appreciate the effort, anyway.

Except … ta da: http://community.failbettergames.com/topic9506-fallen-london-extensions-whitelist.aspx

Might the script be re-uploaded, then, since it’s showing as &quotdeleted&quot right now?
edited by an_ocelot on 11/13/2014

[color=#0066ff]I’ve let PotatoEngineer know, hopefully they’ll get it back up soon. :)[/color]

Thanks!

It appears that the script has been deleted - is there another download portal?
edited by James Mareno on 11/19/2014

Commenting because I’d love this if it’s re-uploaded.

Commenting because I too would love this if it were re-uploaded.

Hi,

I’m not the original poster, but I think I figured out how the original poster made it work. More or less.

Here is a quick description of how to use the extension:

  1. Click the &quotMyself&quot tab. (You should see some new buttons near the top of the page. If you don’t, please check your installation.)
  2. Click the &quotRead Page&quot button.
  3. Click the &quotExpanded Inventory&quot button. (This is necessary to equip the best affiliations, transportations, etc…)
  4. Click the &quotRead Page&quot button again.
  5. Click the &quotWatchful&quot, &quotShadowy&quot, &quotDangerous&quot, or &quotPersuasive&quot buttons, and the script will equip the items that give the highest bonus to the respective stats.

The stat buttons will appear on the story page as well, although they are in the habit of disappearing. If you click the &quotStory&quot tab, they should reappear.

WARNING The script does not check for menaces, and will equip items that give menaces if they also give the highest bonus.

Here is a link to the extension. It comes bundled with two text files describing how to install it and how to use it.

Here is a link to the raws, should anyone want them. If there’s interest, I can put in some comments explaining the code.
https://drive.google.com/file/d/0B4_pkuL9YRWpU1B3ZDdNRmt3TGM/view?usp=sharing

I’m new to writing extensions and javascript, so any constructive criticism would be helpful.
Please let me know if you find any bugs or problems. I will try to fix them.

Thank you &quotAn Individual&quot for posting their &quotGoat Farmer’s&quot extension. I used your raws as the basis for this extension.
Your work was very useful, and I want to give credit where it’s due.
http://community.failbettergames.com/topic9501-goat-farmers-browser-extension.aspx

And thank you Failbetter Games for letting me post this.

I would like to add a few more features, such as:

  • Equipping items to increase/decrease the different menaces[/li][li]Equipping items to increase Respectable, Bizarre, and Dreaded[/li][li]Equipping items to increase the sum of one’s Respectable, Bizarre, and Dreaded[/li][li]Handling a few fringe use cases. (For example: If you had an item equipped that decreased an attribute and no other item in that category that increased that attribute, you would be better of not using any item in that category. But the script doesn’t realize that right now).

I will update you if/when I make improvements.
edited by ancusohm on 1/30/2022

thanks, ancusohm… I would like to use this too but I see it’s a chrome extension, do you know if you can make it available for firefox or greasemonkey?

Uh, I just looked, and it looks like converting chrome extensions to firefox extensions is difficult. I might take a crack at figuring out how to do it, but it will be a few days at least. (Although if anyone could point at me some good instructions that would be helpful)

Sorry.

If you’re using Chrome on Windows, which no longer lets you keep extensions that don’t come from the store, here’s what to do:

Download the raw file.

Install Tampermonkey.

Make a new script.

Put the following at the top:

// ==UserScript==
// @name Fallen London Item Equiper
// @include http://echobazaar.failbettergames.com/Gap/Load*
// @include http://fallenlondon.com/Gap/Load
// @include http://fallenlondon.storynexus.com/Gap/Load*
// ==/UserScript==

Then copy the contents of fl-item_equiper-extension.js into the rest of the script.

Save and close, reload FL, proceed according to directions in download.

ancusohm actually I just import it into greasemonkey on firefox by clicking New User Script, it just needed name, namespace and a description and it made the rest:

// ==UserScript==
// @name Fallen London Item Equiper
// @namespace fallen.london.item.equiper
// @description Fallen London Item Equiper dresses you in your finest equipment base on a particular Quality.
// @version 1
// @grant none
// ==/UserScript==

I went to my firefox profile and edited the .user.js it made and copy the @include(s) from the above post and the contents of fl-item_equiper-extension.js into it and it works :)

(This is where it is on my mac)
/User/USERNAME/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/gm_scripts/Fallen_London_Item_Equiper/Fallen_London_Item_Equiper.user.js

for Windows check here: Profile folder - MozillaZine Knowledge Base
or Windows 7 & 8 C:\Users\USERNAME\AppData\Roaming\Mozilla\Firefox\Profiles\XXXXXXXX\gm_scripts\

thanks :)
edited by vermilliant on 12/14/2014

I updated the script.

Now you can equip the items that raise each stat, menace, Dreaded, Respectful, or Bizarre as high as possible.
You can also choose to raise the sum of Dreaded, Respectful, and Bizarre as high as possible

Additionally, if you want to lower a stat instead, click the &quotPositive&quot button. The name will change to &quotNegative&quot and you will then equip gear that lowers stats as much as possible until you click the button again.

Here is a .zip file that contains the raw files and also files to allow you to install the extension in Chrome or Firefox.
https://drive.google.com/file/d/0B4_pkuL9YRWpb010YnZDMjBaYkU/view?usp=sharing

Enjoy.