Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,378
I managed to get the first group working in CivicInfo. It's doesn't look like much and there is no change ingame (luckily). However the start is always the hardest.
I encountered a severe problem. Whenever I changed just a tiny bit, there were an XML file full of data, which needed a new layout. Most of my work so far have been to make a script to deal with that problem. Now we can say "put variable X in group Y" and it will do so. Such requests will have to come in order meaning the script only works if it starts over every time. Not perfect, but good enough considering it will just have to do until everything have been converted to the new format.
The rest of civic organizing seems like simple bookkeeping now. Make groups, name them well and add variables to those. No real coding and no designing.
I have been thinking on a final design. I want multiple XML files for civics. They all end up in the same vector and are all based on the same schema, but even if that is the case, they will not be treated identically. The XML reading code is to be aware of which file it reads from and it can set certain data accordingly. For instance it should automatically disable tech tree display for everything not written in the invention file.
Not only will this ensure that techs will not be placed in traits by accident (and still work ingame), it will also ensure that no group is stored in multiple pieces. This can be exploited to loop just inventions when drawing the tech tree and similar.
Feel free to look into civic_rewrite and provide feedback if you like. However do not commit changes to CivicInfos.xml or you will screw my newly designed script
I encountered a severe problem. Whenever I changed just a tiny bit, there were an XML file full of data, which needed a new layout. Most of my work so far have been to make a script to deal with that problem. Now we can say "put variable X in group Y" and it will do so. Such requests will have to come in order meaning the script only works if it starts over every time. Not perfect, but good enough considering it will just have to do until everything have been converted to the new format.
The rest of civic organizing seems like simple bookkeeping now. Make groups, name them well and add variables to those. No real coding and no designing.
I have been thinking on a final design. I want multiple XML files for civics. They all end up in the same vector and are all based on the same schema, but even if that is the case, they will not be treated identically. The XML reading code is to be aware of which file it reads from and it can set certain data accordingly. For instance it should automatically disable tech tree display for everything not written in the invention file.
Not only will this ensure that techs will not be placed in traits by accident (and still work ingame), it will also ensure that no group is stored in multiple pieces. This can be exploited to loop just inventions when drawing the tech tree and similar.
Feel free to look into civic_rewrite and provide feedback if you like. However do not commit changes to CivicInfos.xml or you will screw my newly designed script
