Daiwilletti
Charter Member
Just found this wonderful tool. It sorts xml tags alphabetically. So it allows the effects.xml to be put in alphabetic order at the push of a button.
https://xmlsorter.codeplex.com/
Why is this useful? Because the large effects.xml usually has repeat elements which are identical - possibly a hangover from when CFS3 was originally being compiled.
It is tricky to find duplicate effects because so many effects have a long and complex name, often differing from another effect name by one character.
Once I've sorted the effects xml I use an xml editor like XMLEd or "Firstobject XML Editor" to view the file, because the window in the sorter is a bit small. It is much easier to spot the duplicates if "tree view" is enabled - Firstobject has this feature as no doubt do other xml editors.
This exercise started when I re-found Major Magee's version of the ETO Effects xml which he has very kindly provided in another thread - don't remember which one. It has all his gunsights added. So to test the new sorter I used his xml file, and found initially a bunch of duplicate effects starting with the tag "bullet_impact_ ......". I suspect they are entries from the stock Effects.xml, which have ported over to the effects.xml file in other installs like MAW, RS, ETO etc.
There are a couple of issues with tidying up you effects.xml file. One is that all the useful tags (eg. Daniel's effects, O-1 Drivers Effects) become useless as the contributor's entries are alphabetised along with every other effects entry. The other is that some of the duplicate entries have the same name, but different subgroups (ie Effect0, Effect1, Effect2 etc). So it becomes a matter of judgement as to which of the duplicate pair to keep.
Presumably when two effects are called the same, CFS3 randomly decides which one to give effect to at the appropriate moment in the game (eg when a gas tank catches fire).
All that aside, the XML sorter is a great tool and I should update the Knowledgebase sticky post about how to sort the effects.xml.
happy flying,

https://xmlsorter.codeplex.com/
Why is this useful? Because the large effects.xml usually has repeat elements which are identical - possibly a hangover from when CFS3 was originally being compiled.
It is tricky to find duplicate effects because so many effects have a long and complex name, often differing from another effect name by one character.
Once I've sorted the effects xml I use an xml editor like XMLEd or "Firstobject XML Editor" to view the file, because the window in the sorter is a bit small. It is much easier to spot the duplicates if "tree view" is enabled - Firstobject has this feature as no doubt do other xml editors.
This exercise started when I re-found Major Magee's version of the ETO Effects xml which he has very kindly provided in another thread - don't remember which one. It has all his gunsights added. So to test the new sorter I used his xml file, and found initially a bunch of duplicate effects starting with the tag "bullet_impact_ ......". I suspect they are entries from the stock Effects.xml, which have ported over to the effects.xml file in other installs like MAW, RS, ETO etc.
There are a couple of issues with tidying up you effects.xml file. One is that all the useful tags (eg. Daniel's effects, O-1 Drivers Effects) become useless as the contributor's entries are alphabetised along with every other effects entry. The other is that some of the duplicate entries have the same name, but different subgroups (ie Effect0, Effect1, Effect2 etc). So it becomes a matter of judgement as to which of the duplicate pair to keep.
Presumably when two effects are called the same, CFS3 randomly decides which one to give effect to at the appropriate moment in the game (eg when a gas tank catches fire).
All that aside, the XML sorter is a great tool and I should update the Knowledgebase sticky post about how to sort the effects.xml.
happy flying,




).
To be fair, sometimes it's my worst nightmare too! But to each his own, like James says, make a backup and organize away, keeping in mind the possible pitfalls and it might save you some grief.
- the best way to use the tool is on copies of the effects.xml files that are outside of the game (so that you don't mix them up!). One good use for the sorter is that after getting the effects file from two different installs "alphabetised", I can run them past Winmerge. Winmerge is a great programme which can compare two (nearly) identical files, and highlight the differences. This is very handy for a long complex file. It allows for combining effects files easily. I plan to produce a "super effects xml" just for the hell of it, which can work across several installs.

), yes that would be tricky but in some cases you can see what is going on, eg those dust effects I mentioned, logical that they hang longer in MAW. Also IIRC in MAW the colour for the basic explosions like artillery shells is made more brown than the stock texture, to reflect the terrain in MAW. So its good to have some different effects for different places, I wonder what is done in RS? The MAW textures would look silly in explosions in PNG, Solomons or China.