XML Workflow: Unexpectedly Easy

In my last post I had a few things I want to do with tables. The top three turn out to be easier than I expected. In fact, the first two are almost free, in the current code base.

  • Tables as Sections
  • Tables as Searchable Objects
  • Tables with Associated Text

Two of the three are trivially done by adding tables as ‘objects’, like classes or spells. I’ve already got functionality that lets me treat game objects as sections and as searchable objects. I think the only thing I’d need to add is a rendering mode that doesn’t put a heading on. Tables built this way will be indexed with an id like ‘table.rogue/class.rogue:prd!cmb’ (for the level table in the rogue class).

The ‘associated text’ turns out to be the trickiest one… and even that is really just a rendering consideration. The description is basically the solution:

  • All ‘attribute cells’ (that add attributes to the table) are ignored.
  • First single-cell row that is not an attribute cell is the table name.
  • All other single-cell rows that are not attributes, print in the ‘table’ object ahead of the ‘tabular’ element.

That should be pretty easy to implement also.

I expect I can knock all of these out in couple hours.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top