Blog talk:Adnoam/Item lists/@comment-25219384-20190407062204

From Fallen London Wiki

Some more details and a request for feedback:

Currently, each item (in its appropriate table) can have the following attributes:

  • Effects: a table of quality/value pairs
  • Fate: if it has any value, will add the FATE qualifier
  • Retired: if it has any value, will add the RETIRED qualifier
  • Source: Can be one of: profession name, faction name, holiday event name, "Mood", ambition name, kickstarter name (full list under "display_qualifier" here). If this attribute has some other text in it it will not be ignored, but would be displayed as is.

While developing this I was debating whether to use this structure or, instead, to have a single "modifiers" attribute for the items (e.g. "modifiers = {"Rose", "Fate", "Retired"}", etc.). This current way is slightly easier to code, as it places the "Source" first, then always followed by the (optional) "Fate" and then "Retired" modifiers - i.e. the module doesn't need to juggle its traversal over this list to maintain a consistent ordering. It also simplifies the table somewhat, since "source", "Fate", and "Retired" are all single value attributes (and not a list or table). But this assumes a single possible "Source" value.

If you feel this approach (and assumption) is not ideal, let me know and I'll work on updating the module's code appropriately. The module can do pretty much anything with the data with a bit of coding, so the important thing is to agree on the best structure of the item tables' attributes, as that the part which will be updated for each new item in the game.