Examples of how it's done:
Topic on User talk:Dr. Strangelove
Jump to navigation
Jump to search
Reply to "Datamining the Defs for Infoboxes and Integration with MediaWiki"
XML Definition files related to pawns:
- Humans:
/Defs/Races_Humanlike.xml
- Animals:
/Defs/Races_Animal_*.xml
- Mechanoids:
/Defs/Races_Mechanoid.xml
- Insectoids:
/Defs/Races_Animal_Insect.xml
All of the above inherit from: /Defs/Races_Animal_Base.xml
Thoughts:
Current idea is to use an external parser to convert xml based data to a Lua table.
- Manual for now.
The root element of a logical unit would be based on <defName> and all inherited values would be merged into its subtree. If inherited values are merged for a (let's use Pawns as an example) Pawn, that would duplicate some data but would be more human readable.
- No merging. Just use Lua to check the parent.
For now, another idea is to filter data that might be deemed unnecessary. This adds a layer of complexity of having to maintain a table for this, but seeing as it would need to be done once (for each "category" - if split into them) or very, very rarely... not that big of an issue.
- Yes.
Another way of doing it could be to remove the need for an external parser, upload the relevant defs and do transforms with Lua. While doable... more work would have to be done with Lua. (Not liking it at the moment.)
- Hard no.