This was part of the original typcreate request. Without runtime access to the XML in string form it is not possible to alter content. The most obvious example of why this is needed is to alter tables.
With runtime XML access it would be possible to append to something like &tbCommTraffic; in a way that does not break compatibility if the table changes in vanilla and allows multiple mods to add to the table without stepping on each other's toes.
There are several of these tables that need to be appended to to integrate mod ships into the Commonwealth and CH and it should be possible to append to them rather than replacing them.
Runtime XML access
- pixelfck
- Militia Captain
- Posts: 571
- Joined: Tue Aug 11, 2009 8:47 pm
- Location: Travelling around in Europe
This is very true, it would open a lot of new doors if we could read the XML definitions. I guess you request could more or less be satisfied with what I proposed earlier?
~Pixelfck
~Pixelfck
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
unfortunately, as George explained (more than once I think), XML is dropped after game load.
So you can typCreate an existing UNID at game load and overwrite it or you can typCreate new stuff during gameplay.
In the particular case of tables, wouldn't a function that retrieves the table data as a list be enough ? From the list you can recreate the XML and typCreate at game load.
Each mod would retrieve the table, add contents to it and typCreate it again, making mods fully compatible with each other.
so somthing like
(typGetTableData tableUNID) --> list
So you can typCreate an existing UNID at game load and overwrite it or you can typCreate new stuff during gameplay.
In the particular case of tables, wouldn't a function that retrieves the table data as a list be enough ? From the list you can recreate the XML and typCreate at game load.
Each mod would retrieve the table, add contents to it and typCreate it again, making mods fully compatible with each other.
so somthing like
(typGetTableData tableUNID) --> list