Item lists

From Fallen London Wiki

For a long time, I've wanted to see if there's some way to automatically create the items lists one might find in Category:Hat, or in Persuasive Items.

Please read, and try this out in a sandbox. Comments are more than welcome.

(tagging some of the more active wiki editors: Rahv7, Mikey thinkin, Zen Rider)

Background: How it Works Today[edit]

The way it works today, is that whenever there'a s new item in the game, besides creating for it a new Item page (with the {{Item}} template), the following steps are needed:

  1. For each of the effects of the item, go to the relevant effect's "Items" page.
  2. In the relevant section ("Hat", "Boots", etc.), insert a new line for the item, listing all its effects in parenthesis, remembering to re-order so that the current page's quality is at the start of the list). Also make sure to place this new line in the proper place in the list of already existing items (sorted by level of effect).
  3. Remember to add qualifiers to the item line (e.g. FATE, Holiday marker, etc.)
  4. Repeat for the other effects, remembering to reorder the effect list in the item line.

Needless to say, this is cumbersome and error-prone. Also, most casual wiki editors don't know about this, and just create the Item page itself.

The Goal[edit]

So, I wanted to try and find a way to automate this process as much as possible. The idea was to write the item's qualities/effects/etc. in just one place, and by some magic have the other places updated properly.

This can't be done with just Templates. But it can be done with Modules. This is the approach which is used today by the "IL" template and module - there's one place with a list of all images linked to some name, and then the {{IL}} template, invokes the IL module which extracts the proper image file name.

So my approach was: like the table used by "IL", create some table(s) which contain the items' qualities and effects, and have a Module which parses it, sorts the list appropriately, and formats it for display. Of course, the Module is much more complex than the one used by IL (which just retrieves a value), and I had to teach myself Lua for this, but that part was fun.

What's Next?[edit]

For now, I've populated the tables for Hats and for Boots. If the general approach is accepted by others, we can work to build up the other classes of items. I didn't want to invest too much effort on this if the idea is rejected by others. Please take a look at these tables, and let me know if the format makes sense (and especially, if this is something you feel will be easy to update when new items are added).

If people like this approach, I'll add more documentation to the Modules and Tables to make everything much clearer.

Pros[edit]

  • For a new item, just go to the proper table and update it (like we do with a new image) once.
  • The item will automatically appear in all relevant effect lists and equippable-class lists
  • The added item lines will be properly sorted for each page and with a consistent display style.

Cons[edit]

  • Updating the tables needs to be done carefully, as it's easy to mess up the Lua table syntax by mistake. Of course, copy/paste from other item lines is best.

How to Use This[edit]

I've created this Module for now in a sandbox, for testing and for review. Modules are not intended to be invoked directly from a wiki page, but via wrapping templates (like for "IL"). So I've created a template for demonstration purposes: Template:ItemList.

This template accepts the following parameters:

  • Class = the type of equippable item (only "Hat" and "Boots" are currently supported).
  • Quality = the desired quality (e.g. "Persuasive", "Bizarre", or even "Scandal").
  • Title = optional parameter. If specified, will create a title section before the list.

To Do[edit]

  1. Add support for "Other" item type, to list all items *not* having any of the regular effects (i.e. items with no effects (e.g. Pair of Leg Irons) or just special effects (e.g. Your Own Severed Head).
  2. Add more explicit error tracking, by adding proper maintenance categories to the return string/list if there's a module error.
  3. Update {{Item}} template to add a maintenance category for items not in the proper class table.
  4. QA: review resulting lists and make sure there were no copy/paste errors in effects and qualifiers.
  5. Start embedding in actual wiki pages.
  6. Add links to Making Your Name items (mostly weapons)
  7. Consistency in Exotica vs. Knife & Candle qualities
  8. Add support for Stat-reducing items (only one page needs this, but why not automate it?)
  9. Figure out if we want to support Menace-increasing items. This will require running the module without specifying an item class (just the desired effect), which would be costly (module would need to scan all item class tables for everything with the desired menace listed as an effect).

Examples[edit]


{{ItemList
|Class=Boots
|Quality=Respectable
|Title=Respectable Boots
}}

Respectable Boots

  • Chiropteran Claws (Respectable +1, Dangerous +8, Monstrous Anatomy +1) CHRISTMAS FATE
  • Elevating Silk Slippers (Respectable +1, Dangerous +8, Monstrous Anatomy +1) SUMMER
  • Pair of Defenestrating Boots (Respectable +1, Dangerous +7) Criminals Faction Item
  • Completely Unassuming Palaeontological Accessory (Respectable +1, Dangerous +5, Persuasive +5) CHRISTMAS
  • Moray Heels (Respectable +1, Dangerous +5, Dreaded +1, Zeefaring +1) WHITSUN
  • Vigilant Chitin-Fur Boots (Respectable +1, Watchful +5, Artisan of the Red Science +1, Bizarre +1) WHITSUN
  • Wax-Hardened Boots (Respectable +1, Watchful +5) WORLD QUALITY
  • Love-Sickened Seneschal (Respectable +1, Shadowy +1) FATE


{{ItemList
|Class=Hat
|Quality=Persuasive
|Title=Persuasive Hats
}}

Persuasive Hats



Here's a different display style, perhaps better suited for longer lines
(lots of effects/qualifiers)
{{ItemList
|Class=Home Comfort
|Quality=Persuasive
|Title=Persuasive Home Comforts
|fancy=yes
}}

Persuasive Home Comforts

Value Item
+8
Beatific Stone
(Persuasive +8)
The Church Faction Item
+6
Serpent-Headed Oneiropompic Stave
(Persuasive +6, Bizarre +2, Glasswork +2)

A Gazebo!
(Persuasive +6, Respectable +1)
SUMMER
Extraordinary Drinks Cabinet
(Persuasive +6)
CHRISTMAS FATE
+4
F.F. Gebrandt's Patent Neathoscope, Containing and Displaying All Seven Colours of Exotic Light
(Persuasive +4, Watchful +7, Bizarre +2)

Tapestry from the Elder Continent
(Persuasive +4)
FATE
+3
A Portrait in the Bazaarine Style
(Persuasive +3, Respectable +1)

A Replica of the House of Chimes, Awash with Snow
(Persuasive +3, Respectable +1)
CHRISTMAS FATE
Probably a Coincidence
(Persuasive +3, Dreaded +1)
CHRISTMAS FATE
Ray-Drenched Correspondence Paperweight
(Persuasive +3, Bizarre +1)
CHRISTMAS FATE
Unopened Bottle of Broken Giant 1899 'Century Label'
(Persuasive +3, Respectable +1)

+2
Anatomically Accurate Batrachian Bench
(Persuasive +2, Bizarre +2, Dreaded -2)

Regally Re-embodied Bird of Prey
(Persuasive +2, Respectable +2, Dreaded -2)

+1
An Exemplary Work of Lapsarian Theological Art
(Persuasive +1, Watchful +1, Dreaded -2)
MASK OF THE ROSE
-15
A Complete Set of Preserved Internal Organs
(Unaccountably Peckish +1, Persuasive -15, Dangerous -15, Shadowy -15, Watchful -15)
CHRISTMAS SMEN FATE