Note: it MAY not be feasible for stonehearth.
This is just possible suggestions depending on the current state of things.
I used to be active on a couple of mediawiki-based wikis, and specialized in embedding data into wiki pages which are accessed via templates by other pages to create a dynamically-consistent set of pages (instead of having the value manually entered into individual pages that has to be all updated manually, I just update the ‘source’ data and all dependent pages will show things correctly).
Now, this was before the “boom” of semantic web and stuff, and though I have not been keeping in touch, there are probably much easier ways to do things that are similar to those which I had to conjure a lot of voodoo template coding to accomplish.
The main problem I see here, is that the data format, and data content of stonehearth is likely to be volatile. So I had this notion:
- embed the raw JSON file content of stonehearth.smod into respective pages as “data”. (if possible, the exact JSON file. as a fallback, run a script that automatically formats the raw JSON into a form suitable for wiki)
- create support templates that extracts information (properties) from these raw data.
- Then create the templates that actually make use of the support templates above to compose the “human-readable” pages.
What this means is that, the same template can be used to generate the human-readable pages for all the entities without requiring human to manually edit all the content. Adding a new entity is simply creating a new data page (dump the json/data from game into it), creating a new content page that calls a template referencing the data page above (one line), and we have the final page.
To still allow “manual additions”, we can mix the auto-generated part from parts which allow human to edit.
Note that this is done a long long time ago, using very basic template stuff which is probably outdated by today’s standards.
This is a page for a sword in the game The Sims Medieval for human to read.
This is what the source (click on the source tab) of the page actually looks like. Notice that the info box etc from the page view above are template generated from the embedded data instead of manually edited. Part of the page however, retains the manual wiki editing style so even those people who don’t know the templates can add content there.
The properties of the “sword”, which are declared as data on the page, are actually accessible from other pages as well by referencing. (so changing the values on this page will “automatically update” all other pages that uses it).
Example of another page that uses data from many other pages.
Note that everything in the table on the page, including the icons, values, etc are all pulled from the data from the individual pages for the items. Changing the values on the item page will automatically update this page’s table.
If you look at the source of the page, you can see how the values are pulled, which is quite intuitive to read.
EDIT: lol I even forgot some niceties that were placed in. In the above page with the list, pages for items which are not created are shown in redlink. but some of them have a small “(create)” link behind. Clicking that will load a default template and instructions on how to create a page for a new item from scratch that integrates into the template system, even for people who do not know how the templates work.
Those with “(objectify)” are “legacy” pages which do not contain object data detected by the templates, so providing easy prompts for the contributors who knows how to do the template to “update” them.
For those who are more familiar with mediawiki templates
basically, the above is achieved by using a generator template (e.g. one for Sword) to generate an item specific template on the item’s page (e.g. Crude Sword page above is actually a generated template). This allows the item page to be used as firstly a human readable page, and secondly, as a template that can return properties of that item. Reminder that this is “old tech”.
Just thinking that if we had something similar to that, every time after an update for stonehearth, we can just
- if there are no document structure changes, paste in the new json data directly into the respective entity pages and everything else will update.
- if there are document structure changes, change the support templates on how process it, without breaking the other pages that uses the support templates to “extract data” from it.
iow, I just don’t feel like updating 101 things manually after each new game release… lol…