User Style: Opportunity Protector [Whitelisted]

I made a user style to prevent myself (and, now, others!) from accidentally discarding important Opportunity Cards after a couple mistakes involving A Presumptuous Opportunity and An Unsigned Message.

Get it at Fallen London - Opportunity Protector | Userstyles.org

It prevents you from discarding any of the important/rare cards listed below at first, but it’s fairly easy to add or remove opportunity cards (instructions in the userstyles.org link).

Installation requires the Stylish browser extension, which is kind of like GreaseMonkey but for CSS. If you don’t already have it, a link will be provided on the style’s page.

With Stylish installed, just click the big green link with the + button to install Nadir Protector. You can quickly disable it within Stylish if you want to sell your plant, or delete the style if you don’t like the changes it makes.

Stylish is a browser extension which allows you to add custom CSS to sites you visit. Opportunity Protector is not a script, but a small CSS patch which applies the display:none attribute to certain parts of Fallen London. It will not play the game on your behalf or send any sort of information to anybody, all it does is modify what you see in your browser.

Please do not report missing &quotDiscard&quot buttons as a bug to FBG if you use this. If you do see errors, particularly display errors, confirm they persist with the style disabled before reporting them to FBG. If the error is on my end, report it here or to me via private message. You use the extension at your own risk. The style may stop working or behave strangely in the event FBG makes a change to their code base.

Thanks to fallingkitten for the idea, and marcmagus for both the Cave of the Nadir Protector (which taught me how to format Stylish CSS) and the main body of this post (which I have shamelessly copy-pasted because wow, it’s well explained). (Cave of the Nadir Protector is here: http://community.failbettergames.com/topic20296-user-style-cave-of-the-nadir-protector-pending.aspx ) Thanks to Optimatum here for an easy way to adjust between any size hand.

Thanks to Cecil for the idea of a list of important / rare card eventid’s, and for compiling most of these:
10133 - Docks (Parabolan Panthers)
10135 - Bohemians (Parabolan Panthers)
10153 - Society (Parabolan Panthers / Mirrorcatch Boxes)
10800 - The Tower of Sun and Moon: a Reservation at the Royal Bethlehem Hotel
10802 - The Lofty Tower: the Potential of Premises at the Bazaar (4 Scraps)
11208 - A Moment’s Peace (Nightmare Reduction)
11338 - A Voice from a Well (Appalling Secret; rare)
11529 - Call in Favours in the Flit (20 scraps from Urchins)
13353 - A dream about a window at night (Is Someone There?)
13368 - A Little Omen (mood)
13373 - A Dusty Bookshop (mood)
14881 - A contact in the Great Game has a tale for you (Church/Great Game conflict)
15360 - Disgraceful Spectacle (Jack Vance memorial)
15957 - Give a Gift (Gifts, many and varied!)
18122 - More Larks with the Young Stags (50CP to Society + Bohemian)
18160 - The Bonfire of the Decencies (Proscribed Materials and London Street Signs; rare)
18161 - A Commotion Above! (Gems, wines, or phosphorent scarabs; rare)
18162 - A Flash of White (Salt Weasel)
18164 - The Mournfully Rubbery Instrument (Rubbery Euphonium)
18165 - A Raggedy Creature (Haunted-looking Dog)
18166 - A Really Nice Haircut (50CP to a stat)
18167 - The Battle Hymn of the Drownies (50CP to Dangerous)
18168 - The Skin of the Bazaar (Scholar of the Correspondence actions)
21762 - A Visit (Contacting Contacts)
22278 - The Soft-Hearted Widow (Adrift on a Sea of Misery, SiC CP, and K&C Openings)
22408 - The Neath’s Mysteries (High-EPA social actions)
99374 - An Unsigned Message (increasing stats past 200)
99967 - A Visit from Slowcake’s Amanuensis (Notability)

Fate-locked cards: Name only

122163 - A Dream of Blood (rare card, and yes, it’s six digits)

Feel free to reply or PM me with more eventid’s for the list!
edited by gazzien on 2/9/2016
edited by gazzien on 2/9/2016
edited by gazzien on 2/10/2016
edited by gazzien on 2/13/2016
edited by gazzien on 2/19/2016

FIRST.

But seriously, this is good stuff.

Also, I can find eventIDs for fate cards, let me know if there’s any interest in that.
edited by Cecil on 2/6/2016

This seems particularly useful. No longer will I have to worry about accidentally discarding A dusty bookshop, A little omen, or An Implausible Penance (yet again) - once I figure out how to work the thing, anyway. :-p

Thankyou, gazzien! :-D

(Edit: I did have a bit in my comment here saying I’d wait until it was Whitelisted rather than risking bad stuff, but it has long-since been added to the whitelist. I simply hadn’t modified this comment accordingly. In other news, this thing benefits a little from tinkering - but it’s been fantastic! ^_^ )
edited by Kittenpox on 6/7/2016

[quote=Kittenpox]

Ah, good point. Perhaps I’ll hold off on trying the thing until they decide whether or not it’s going to be on the whitelist then.
edited by Kittenpox on 2/6/2016[/quote]
this hardly seems like anything close to cheating, i doubt there’s anything to worry about.

i wonder if that rule has ever been invoked

[quote=Nanako]this hardly seems like anything close to cheating, i doubt there’s anything to worry about.

i wonder if that rule has ever been invoked[/quote]
I think there has and that’s why there’s a white list as opposed to banning them all together, because extensions can carry over into bots.

[quote=Nanako][quote=Kittenpox]

Ah, good point. Perhaps I’ll hold off on trying the thing until they decide whether or not it’s going to be on the whitelist then.[/quote]
this hardly seems like anything close to cheating, i doubt there’s anything to worry about.

i wonder if that rule has ever been invoked[/quote]
While I am doubtful I’m likely to get hit with a banhammer, I have spent an awful lot of time playing this game + have purchased quite a bit of Fate over the past year, and I’d rather not risk having it wasted if my account gets flagged for suspension.
I know that often I’m overly cautious, and the odds of this happening may be minimal (especially considering the nature of Failbetter Games’ staff), but there’s much less hassle in re-drawing an opportunity card than in trying to recover a suspended account.

Well, i just drew an unsigned message. There was still a discard button under it.

the sheet is definitely installed with stylish, and active. It didn’t seem to work

Perhaps also listing particularly profitable cards or those in notable categories would be useful? For example The mechanics of progress, the Respectable Landeau card, the Paranomastic Newshound, One’s Public, connected and conflict cards, lodgings cards, relickers, the menace reductions (for example A Moment’s Peace), the fate-locked Aunt cards…

In any case this is a great idea. If there’s some way to easily incorporate blocking various actions in cards, like selling your plant or throwing out the Amanuensis, that would be great. The Amanuensis card would be a great thing to add in general, too.
edited by Optimatum on 2/7/2016

[quote=Nanako]Well, i just drew an unsigned message. There was still a discard button under it.

the sheet is definitely installed with stylish, and active. It didn’t seem to work[/quote]
Did it not? Hm. Can I ask what your hand size is, and what browser you use? I currently have An Unsigned Message sitting in my hand, without a discard button.

[quote=Optimatum]Perhaps also listing particularly profitable cards or those in notable categories would be useful? For example The mechanics of progress, the Respectable Landeau card, the Paranomastic Newshound, One’s Public, connected and conflict cards, lodgings cards, relickers, the menace reductions (for example A Moment’s Peace), the fate-locked Aunt cards…

In any case this is a great idea. If there’s some way to easily incorporate blocking various actions in cards, like selling your plant or throwing out the Amanuensis, that would be great. The Amanuensis card would be a great thing to add in general, too.
edited by Optimatum on 2/7/2016[/quote]
I would be delighted to add those (well, the non-fate-locked ones, as I’m not sure if it’s alright to list out the fate-locked ones) as soon as I run into them. In the meantime, if you find them, I would more than welcome you replying here with their eventids, or PMing me, and I would add them as soon as possible.

Blocking various actions in cards is done differently (though I could add it to this stylish script), but there’s already a script for blocking selling your plant - and I’d like to keep this script with a single purpose.
edited by gazzien on 2/7/2016

I’m fairly certain from other discussions that in most cases just having the name of fate-locked cards is completely fine as long as it’s not spoilery and there’s not much additional detail. For example you already have A Dream of Blood listed, which is fate-locked as it needs one of the Empyrean Redolence beasts.

Anyways I currently have More Larks with the Young Stags in hand, ID 18122, and I’ll keep an eye out for cards of note.

Edit:
The Tower of Sun and Moon: a Reservation at the Royal Bethlehem Hotel (10800)

The Soft-Hearted Widow (22278)
edited by Optimatum on 2/7/2016

[quote=Optimatum]I’m fairly certain from other discussions that in most cases just having the name of fate-locked cards is completely fine as long as it’s not spoilery and there’s not much additional detail. For example you already have A Dream of Blood listed, which is fate-locked as it needs one of the Empyrean Redolence beasts.

Anyways I currently have More Larks with the Young Stags in hand, ID 18122, and I’ll keep an eye out for cards of note.

Edit:
The Tower of Sun and Moon: a Reservation at the Royal Bethlehem Hotel (10800)

The Soft-Hearted Widow (22278)
edited by Optimatum on 2/7/2016[/quote]
Ah, I didn’t know about a Dream of Blood being fate-locked. Well, I’ll leave it in until I’m told otherwise, I suppose.

Added those three, as well as 21762 - A Visit

This is so great! I just accidentally discarded the Unsigned Message last week and almost cried.

Thank you for working on this.

[quote=Myrto]This is so great! I just accidentally discarded the Unsigned Message last week and almost cried.

Thank you for working on this.[/quote]
Of course! Figured if it would work / help me, there was no reason not to share!

Edit: I’m just going to keep adding cards to this post to not spam everything.

  • Call in favours in the Flit (11529) which in addition to the Urchins option also allows turning in Revolutionary connections for a quite-efficient 720 Proscribed Material[/li][li]The Lofty Tower: the Potential of Premises at the Bazaar (10802)[/li][li]A dream about a window at night, the red-bordered no-requirement Is Someone There? card (13353)[/li][li]A contact in the Great Game has a tale for you (14881)[/li][li]The Life of Crime, Gang of Hoodlums card (18188)[/li][li]The Heron Tower (10784)[/li][li]All fear the Overgoat! (21411)[/li][li]The Western Tower: a Guest Room at the Brass Embassy (10804)

edited by Optimatum on 2/10/2016

[quote=Optimatum]Call in favours in the Flit (11529)
The Lofty Tower: the Potential of Premises at the Bazaar (10802)
A dream about a window at night, the red-bordered no-requirement Is Someone There? card (13353)
A contact in the Great Game has a tale for you (14881)[/quote]
Added! Along with

11208 - A Moment’s Peace (nightmare reduction)
99967 - A Visit from Slowcake’s Amanuensis (Notability)

[quote=gazzien]
Did it not? Hm. Can I ask what your hand size is, and what browser you use? I currently have An Unsigned Message sitting in my hand, without a discard button.[/quote]

Certainly <3
the browser is presently; Firefox 43.0.4

My hand size is four, i’m using the brass embassy guest room at the moment.

Here’s how the Stylish menu looks when i have a fallen london tab

And here’s the content of the style sheet, just in case anything’s gotten messed up somehow, or if i’m running an outdated version: http://www.pasteall.org/64394

Hope this helps with debugging, i’m very interested in this mod. Could you perhaps PM me if you find and fix an issue?
edited by Nanako on 2/9/2016

[quote=gazzien]
Blocking various actions in cards is done differently (though I could add it to this stylish script), but there’s already a script for blocking selling your plant - and I’d like to keep this script with a single purpose.[/quote]
I agree with you here, i think you should keep the scope of this limited to preventing discarding of cards, and not interfere at all with options ON those cards

[quote=Nanako][quote=gazzien]
Did it not? Hm. Can I ask what your hand size is, and what browser you use? I currently have An Unsigned Message sitting in my hand, without a discard button.[/quote]

Certainly <3
the browser is presently; Firefox 43.0.4

My hand size is four, i’m using the brass embassy guest room at the moment.

Here’s how the Stylish menu looks when i have a fallen london tab

And here’s the content of the style sheet, just in case anything’s gotten messed up somehow, or if i’m running an outdated version: http://www.pasteall.org/64394

Hope this helps with debugging, i’m very interested in this mod. Could you perhaps PM me if you find and fix an issue?
edited by Nanako on 2/9/2016[/quote]
So I know the problem with Opportunity Protector re:your issue. At the moment, it’s coded for a three-card hand; a four- or five-card hand runs differently. In order to find where the opportunity cards are, each line uses &quotul#cards.hand-size3&quot to find them. You would need to change it from that to &quotul#cards.hand-size4&quot or &quotul#cards.hand-size5&quot in order to get it to recognize where your cards are. Sadly, I can’t make the script automatically find out which one to use (or if you can, I don’t know how).

You can use a CSS attribute selector for that. If I’m reading this tutorial right, you could use something like ‘ul[class^=&quothand-size&quot]’ to match ul elements with a class attribute which starts with the characters &quothand-size&quot.

Ah! This works! Thank you very much!

If someone with a 4/5 card lodging would check as well, I would be very appreciative.