Idle thoughts on item sources, wikitext export and parsing

From Fallen London Wiki

The item pages list item sources, which are helpful if you need to grind items. Category:Cartographer's Hoard Gain is very helpful: it lists the two actions which give out that item.

For Whispered Hints, there are some 234 actions yielding them. The anatomy of a secret is helpfully listed on the item page via

 |Unfinished Business Location = Ladybones Road
 |Unfinished Business = The anatomy of a secret

A bit less helpful is Searing Enigma, which just gives out the 76 actions which can yield searing enigmas. Of course, most of these are not viable sources: the first requires SMEN, the second is a rare success, the third depends on items in limited supply. The next one takes place in Khan's Heart, then one which gives the enigma as a byproduct, followed by unpredictable treasures, the first of many fate-locked stories, an an ambition conclusion, another non-repeatable gain, more stories, more conclusions, etc.

The reasonably grindable options (e.g. from expeditions, underclay or (preferably) the tigers) are all there, they just require reading through some 76 pages.

I think one option to improve on this would be to flag grindable gains.

Mark gains in actions which are

  • freely repeatable (without tea leaves or the like)
  • provide the item as a main reward

by some flag, e.g.:

 *{ { Item Gain|Searing Enigma|1 x|grindable } }

Then we could have a Category:Searing Enigma Grindable Gain, which lists only a few options. For my alt in the middle of Hearts Desire looking for five enigmas, I could quickly conclude that both overseas options are not reasonable to gain access to, and get on with expeditions/underclay.

Alternatively, one could also flag rare success, non-repeatable or fate-locked gains, but this would probably be more work.

(The following is related to my linear optimization project, but relates directly to the wiki site in particular, so I hope it is okay if I post it here:)

Semi-related, I am currently thinking about reviving my emissary software project. Looking back, I think the main design flaw was copying actions (as text) from the wiki, which means my data is now badly outdated (e.g. Balmoral nerfs). A much better option would be to parse wikitext directly.

Fetching the wikitext would be doable by using e.g. Special:Export, which seems nicer than thousands of separate API calls. Parsing it might be doable by some alternative parsers.

Having actions which can be reasonable grinded in a category would be a huge boon here.

Also, as most of the new content is not of the type 'spend 1 action to exchange k Foos for l Bars', translating this into new rows of the matrix will probably be nontrivial. The easiest cases to implement might be Underclay-like carousels where the characters can repeat any action of choice. As excess quantities will yield secondary rewards (with a somewhat usable EPA), I would feel somewhat comfortable just ignoring rounding issues here, but still would have to adjust the action cost.

For some stuff (e.g. skeleton assembly), a hand-maintained list of effective block actions ('spend 5 actions, lose 2 arms, 2 legs, gain ...') can probably not be avoided. It would be convenient to be able to host these in the User: namespace of this wiki (where people could fix stuff without making a pull request on github). Of course, this stuff would have to be prevented from showing up in the category (e.g. gain) pages. Or it might just be considered an unacceptable use of this wiki.