Help:Shared wiki data

From Welcome to Elderfield Wiki
Jump to navigation Jump to search
Shared wiki data separates recurring facts and tables from article-specific explanations. Information, image choices, styles and ordering are preserved during migration. Narrative sections outside the converted tables, headings, categories and transclusion boundaries remain on their articles. Dialogue and explanations within a converted table are preserved in its cells.

== Find the right record ==
* Open [[Help:Shared data directory]] and find the article.
* Its table/infobox module contains a record under the exact article title. Tables have readable section keys, such as Acquisition, Schedule or Stock.
* Its shared-facts module contains reusable infobox values. A value pointing to another module is maintained in that module, not copied into a second place.
* [[Help:Templates and modules]] lists all templates, modules, documentation and usage links.

== What to edit ==
Edit a table cell's value to correct information. Preserve its before marker and any styles unless intentionally changing layout. A shared field reference is not missing text: it reads the current value from the named article's facts. Updating that field also updates the matching index and table cells that reference it.

Large tables have ordered segment modules. Follow the segments listed in the parent table record and edit the appropriate cell there. Keep their sequence unchanged unless intentionally reordering the table. Formatting is handled by [[Module:Elderfield/Shared]].

Prose, tips, dialogue and introductions outside converted tables, along with section headings, should still be edited on the article itself. For text within a converted table, edit its cell record instead. Do not move all prose into a data module. Existing ID-backed weapon, armor and food templates continue to use their established data modules.

== Reading the data ==
Modules contain Lua tables. Quoted strings are editable wiki text: links, images and icon templates work inside them. Keep brackets, commas and quotation marks balanced. When a string contains double quotation marks, use a long-bracket string such as <code><nowiki>[=[text]=]</nowiki></code>, or escape the quotation marks. Long brackets with an equals sign also safely contain ordinary wiki links.

A literal cell has a <code>value</code> containing its wiki text. Its <code>before</code> and <code>ending</code> entries preserve table separators and line breaks. Some cell values also contain alignment, column spans or other styling; retain those attributes when changing only the information.

A shared value such as <code>{ entity = "Coal", field = "sell_price" }</code> reads Coal's sell price from its shared-facts record. Edit that fact rather than replacing every consumer with a copied price. Optional <code>before</code> and <code>after</code> strings on a shared value preserve context, such as units. A value with <code>module</code>, <code>record</code> and <code>path</code> points into an existing data module; follow that reference to its source.

Adding an article requires an article-to-record entry in [[Module:Elderfield/Shared/Registry]], together with its data record. Adding a table to an existing record requires a unique table key and a matching template call on the article. Ordinary corrections to existing cells do not require registry changes.

== Templates ==
<pre>{{Elderfield table|page=Coal|key=Acquisition}}
{{Elderfield infobox|page=Coal|key=infobox}}
{{Elderfield field|page=Coal|field=sell_price}}</pre>
Always provide page= explicitly: a table can be transcluded from a different article, and its data must still belong to the intended article.

== Safe maintenance ==
* These records are wiki-maintained. Future imports must compare and merge; never overwrite editors' corrections blindly.
* Preview changed modules and their affected articles before saving. A shared-field edit can affect several pages.
* Preserve named variants, quality distinctions, quantities, probabilities, stock conditions, anchors and image captions.
* Do not substitute a shop-specific price for a generic buy value. Do not merge conflicting records without checking the underlying mechanic.
* Missing information should be investigated and filled in, not deleted merely to simplify a schema.
* Templates are appropriate for recurring structures; short prose-only and already data-backed articles do not need artificial wrappers.
* This migration changes maintenance structure, not factual claims. Contradictory pre-existing claims require a separate evidence-based correction.

== Presentation and rollback ==
Shared tables retain their current style, collapsible sections, images, links and ordering. Parser-limit or formatting regressions are not acceptable reasons to discard content. If a conversion cannot render correctly, keep the original article until its adapter is repaired.

== Named-field editing ==
See [[Help:Record ownership]] for authoritative domain records, [[Help:Data authority review]] for active and candidate legacy datasets, and [[Help:Shared record tests]] for regression previews. Presentation adapters retain styles and unusual contextual content; edit recurring values through their named owner fields.