User script - how much are you worth + Wardrobe!

Edit: New feature: wardrobes! Manage multiple outfits, and equip them from any tab!

I wanted to add wardrobe features to this script, but it was taking a long time because of the state of the code. So I did what any self-respecting programmer would do and re-wrote it from scratch. This made adding new features much easier - check out the new wardrobe functions!

End edit

Due to an unfortunate illness, I’ve been unable to complete any real work - but this is to your advantage delicious friend, as I had a bit of time to dabble in user scripts (long on my to-do list.) Specifically, I’ve written one to display a few monetary statistics in Fallen London. More specifically, the script makes the following changes to your Fallen London display:

On the “Myself” tab:

  • Adds the value of a sellable good to its tooltip (the value of the entire stack that is.)[/li][li]Adds the total value of all items of a category (e.g. “Curiosity” or “Academic”)[/li][li]Adds the total value of all your equipment[/li][li]Creates a comma-separated-value output of the entire character[/li][li][color=#33cc00]New[/color] Manages custom and automatic wardrobes[/li][li][color=#33cc00]New [/color]generates complete outfits to maximize stats, and allows you to equip them from any tab

On the Bazaar tab:

  • Adds the total worth of all your sellable goods[/li][li]Adds the worth of each type of good (e.g. if you have 10 London Street Signs it will show $25.00)

Notes and caveats:

  • The script gets its data from the Bazaar; you will have to visit it before it can display values on the “Myself” page. This also means that if you get a new item you haven’t seen before, you will have to visit the Bazaar again to get its value.[/li][li][color=#CCCCCC]Currently it only works on the “my stuff” tab on the Bazaar, and only if you visit the bazaar from some other tab.[/color]Fixed.[/li][li]It doesn’t update when you sell something; only when you enter the bazaar[/li][li]It works for me in both Chrome and Firefox (with greasemonkey).[/li][li]I haven’t actually been a paid programmer in more than a decade; use at your own risk.[/li][li][color=#33cc00]New[/color] The script can’t equip “nothing” in a slot - if you leave it blank when creating an outfit, then that slot will be left alone when you change outfits. Be careful with those silly hats.

Get it [color=#0033ff]here[/color], and be well.
edited by TheDaveEBZ on 4/18/2012
edited by TheDaveEBZ on 4/19/2012
edited by TheDaveEBZ on 4/19/2012
edited by TheDaveEBZ on 5/4/2012

I would like to add that, frankly, I don’t think a person’s (or even a rubbery one’s) worth is determined monetarily. I’m not even sure how I feel about being reminded of the value of things in-game like this; it detracts somewhat from the feel. But I wrote it, and figured I ought to share it in case others find it useful.

An interesting script to play around with although unfortunately it conflicts with Kaaniya’s tooltip script, which is a shame, because that’s a rather useful one. (There’s a thread for it somewhere on the boards.)
(I’ve been tracking the value of my inventory, since I’ve been gathering a rather full warehouse for my own purposes. Still, it’s nice to know that if I sold everything, I could buy two Overgoats.)

While I quite agree that a man’s worth; be they mineral, fleshy, or fishy; is not measured monetarily, your ability to purchase an Overgoat most certainly is.

I do not intend to use this script, as I am already using a somewhat more cro-magnon approach to determining my value relative to that of an Overgoat. However, I must complement you on having the most readable code I have seen in ten years. You are also not trying to steal my credit card numbers or email address, which is always a pleasant surprise.

[quote=travellersside]An interesting script to play around with although unfortunately it conflicts with Kaaniya’s tooltip script, which is a shame, because that’s a rather useful one. (There’s a thread for it somewhere on the boards.)
(I’ve been tracking the value of my inventory, since I’ve been gathering a rather full warehouse for my own purposes. Still, it’s nice to know that if I sold everything, I could buy two Overgoats.)[/quote]
That thread is [color=rgb(0, 0, 153)]here[/color]
I’m running both scripts right now without interference and they both seem to be working fine? I’m running on Firefox if that makes a difference. Have you tried turning it off and on again?
While I could buy an Overgoat by selling everything I have, one of the things I’d have to sell would be my Overgoat. Such is life!

Updated the script so it works on all bazaar tabs now.

[quote=travellersside]An interesting script to play around with although unfortunately it conflicts with Kaaniya’s tooltip script, which is a shame, because that’s a rather useful one. (There’s a thread for it somewhere on the boards.)
(I’ve been tracking the value of my inventory, since I’ve been gathering a rather full warehouse for my own purposes. Still, it’s nice to know that if I sold everything, I could buy two Overgoats.)[/quote]

That’s an impressive amount of things!

I have now tried running Kaaniya’s script alongside this one in Chrome, and both appear to function fine together. They don’t touch any of the same elements from what I can see. PM me if there was a specific problem you had; I’ll see if I can fix it.

[quote=Abraham Bounty] While I quite agree that a man’s worth; be they mineral, fleshy, or fishy; is not measured monetarily, your ability to purchase an Overgoat most certainly is.

I do not intend to use this script, as I am already using a somewhat more cro-magnon approach to determining my value relative to that of an Overgoat. However, I must complement you on having the most readable code I have seen in ten years. You are also not trying to steal my credit card numbers or email address, which is always a pleasant surprise. [/quote]

Now that you mention it, stolen credit cards would be a faster way to an overgoat than a script… I’ll have to re-think my plans. I suspect the code is “readable” because it’s beginner; I had managed to avoid using javascript from birth until this Monday. I too had a more cro-magnon approach (wait… does a Google docs spreadsheet count as cro-magnon?) but I got too lazy to update it - the programmer’s virtue.
edited by TheDaveEBZ on 4/19/2012

This is awesome, even if it doesn’t use the proper currency sign. (Copy-pasted from the site, [color=#cc3300][/color] is the echo symbol. For some reason I can’t change the color to anything but red; I assume that’s a sign there’s some sort of black wizardry going on that would make it impossible to implement.)

Your black wizardry is lacking: behold!

Also, updated the script just for you; see if the new version is more to your taste. Enjoy.

(Also note that the script is sometimes failing on the “Myself” page. I’ll fix that soon too. Maybe after sleep; cold medicine allowing.)

Stay pure Dave.

Not precisely, though I’m sure that’s a factor. I personally believe it stems more from the fact that you use to be a professional programmer and a surplus of userscript creators are not. I am largely referring to the headers that explain what each function is for, your foresight in noting which functions will need to be changed should Echo Bazaar change it’s format (something I’ve never seen in any userscript before), and most emphatically a consistent and comprehensible indentation schema.

It most certainly does, as my own Google doc is a living inventory of my personal worth, though since it is not updated automatically it is relegated to cro-magnon status.



I don’t have a stone ax, but hopefully you’ll find my latest feature handy for your cro-magnon ways nonetheless. I’ve added a “CSV” tab under qualities that does a comma-separated-value dump of all your stats, qualities, equipment, goods, and wealth. It’s ripe for importing into your favorite spreadsheet. It’s not fully automatic… although Google docs does have an API, so it could be. ;)


[quote=Abraham Bounty]Stay pure Dave.[/quote]

I feel compelled to point out that this advice doesn’t condemn pure malice; only a halfhearted attempt. Should I take that as a worrying sign from a person whose avatar is a skull?

[quote=Dave][quote=Abraham Bounty]Stay pure Dave.[/quote]

I feel compelled to point out that this advice doesn’t condemn pure malice; only a halfhearted attempt. Should I take that as a worrying sign from a person whose avatar is a skull?[/quote]
How astute of you to notice. Though why would you be concerned about my having a skull? With the possible exception of our mineral and aquatic brethren, we all have skulls.
edited by Abraham Bounty on 4/20/2012

I can assure you that out rubbery brethren have skulls. Why, I have one right here.

I feel compelled to point out that this advice doesn’t condemn pure malice; only a halfhearted attempt. Should I take that as a worrying sign from a person whose avatar is a skull?[/quote]
How astute of you to notice. Though why would you be concerned about my having a skull? With the possible exception of our mineral and aquatic brethren, we all have skulls.
edited by Abraham Bounty on 4/20/2012[/quote]

Any gentleman of fine Victorian values can tell you there is a difference between having an ankle and having a bare ankle. A skull is similar, though different in both degree and direction.

Wonderful script. I found it had some issues, and some spots where it could be improved. Sent you a diff file with the changes via PM Dave.

Thanks, updated it! Everyone should update to this version; the old one counts your mantlepiece item twice if it has a value.

No problem. Saw that you adapted my changes to your coding stype. No problem with that. Me, I’m partial to ternary operators to check for nulls ;).

Ternary operators are always useful; but I had meant for the csv function to handle nulls from the start - that way if I add more data I don’t have to find every place it’s called to update it. Unfortunately I hadn’t known that even nulls and undefineds have some status in javascript, unlike C++. Nulls are even full-fledged objects! So my original handling was a bug. That’s what I get for releasing code in a language I’ve used for less than a week.

This also works in Opera (manually saved to one’s userjs directory, of course).

Is it just me, or does that “echo” symbol look suspiciously like a correspondence sigil?

You are not the first to notice this coincidence.