I created a git repository for a standalone XML editor, which can be viewed
here.
Status is that I have been trying to edit RaR and while testing is limited, it would appear that it's mostly working. There are a few known issues remaining, hence no release yet.
It works like a standard Colonization mod. You drop it in the MODS directory. There is a file called EditorSettings.xml in Assets containing the path to the mod you want to edit.
PHP:
<?xml version="1.0"?>
<Editor>
<!-- ModPath links to the Assets directory of the mod you want to edit -->
<ModPath>../../Religion-and-Revolution/Assets</ModPath>
</Editor>
Once set, all you have to do is to load the mod and open the editor from the main menu (see screenshot). No screenshots from the editor itself because it's identical to the previous screenshots... more or less anyway. There is a button to copy graphics and GameFont from the mod into the editor mod, which allows graphical previews of what you are doing. It only works with unpacked files though, but you should be able to manually copy those big packed files if you really want to.
No BTS support for the time being since I want to get it stable for Colonization first. However I'm planning for this and a significant part of the code is BTS ready, like reading the mod/vanilla are all loops, meaning those functions will hopefully work unmodified once the list contains all 3 vanilla locations for BTS.
Making an editor, which runs in BTS rather than Colonization is a bit of an issue and will be the last thing I do regarding an editor. The main issue is that as long as I'm fixing bugs and fine tuning all the features, I really only want one source code. Fixing the same bug for both BTS and Colonization means making the code change in two different mods and commit/release both. Not only is this more time consuming, it's also really annoying and a big motivation killer. Another issue is that Firaxis added drag-n-drop support to Colonization, meaning the editor is currently using some python functions not available in BTS.
I haven't quite figured out how to most efficiently test this. Most likely I will make some pre-release and make the testing and possibly even guide writing a community effort. It has already taken way longer than planned to make this editor, which is partly because it's a one man project.
One thing, which has to be a community task is setting up the tags. When you right click on a box, you will get a window for editor setup for the tag in question. Here you can set how the editor should view the tag in question and how it should act to make it most efficient for the user. If you type while the editor window is open, it will write a string. This string is then the help text, which will be used for mouse over text, which can then tell what the tag is used for ingame.
Example: (names are from memory)
In a BuildingClassInfo, you right click on DefaultBuilding. You select that it's of type "Type" and it's linked to BuildingInfo. You make sure not to check the "allow none" checkbox. Now whenever anybody left click on the DefaultBuilding box, a window will open with a pulldown menu where it lists all BuildingInfos. No typing, just select from the menu. You can click on the first character to jump in the menu (vanilla feature), which is why the BUILDING_ prefix is not part of the menu.
Next you right click on the BuildingClassInfo box and select which child tag to get the preview from. You select DefaultBuilding. Now whenever the editor requires a preview for a BuildingClassInfo, it will read from Default Building, which will then read the preview from the BuildingClass it's pointing to. The BuildingInfo is then set up similarly and points to a BuildingArtInfo, which has a tag, which is set to be a button. It contains the actual file path.
This mean whenever you get a list of BuildingClassInfos (like editing the file), each index will display a dds file, which it reads through that chain. Since all files are stored efficiently in memory, reading everything for a file is instant even if the file is big and each chain goes through multiple files.
Available options and default behavior of a box depends on the schema, meaning an int will have a different set of types than a string and ints can't be set to be a button or a Type from another xml file. The schema is also used to display tags even if they have minOccur=0 and not present in the xml file (a problem with every single xml editor I have seen elsewhere, hence the reason why I started my own)
I'm thinking of making one default set, which will (hopefully) apply to BTS as well as Colonization. Most of the tags are identical and the difference is all about new tags. For instance if a BTS mod has rules for ProfessionInfo, it won't use them because it doesn't care what it has rules for. It looks in the settings for a specific string and ignore the rest. It will never notice if there is a string, which can't be accessed because it's not in the schema file.
While it's designed to be adjusted for each mod, it would be nice to have a default set to prevent each mod from having to start from scratch. It would be nice if somebody familiar with a lot of xml settings would make a default setup to include in the distribution.
If anybody is interested in assisting, please let me know.