ModXML Editor ALPHA Release Thread

primem0ver

Emperor
Joined
Jun 16, 2006
Messages
1,158
Location
Peoria, AZ
I am finally posting a project that has been in the works for some time...
The Update is Here. See this post for changes. Download is below.
The Documentation Thread describes and explains how to use some of the editors helpful features.

The Civ4 Mod XML Editor

This thread is for downloading and discussing features and bugs of the ALPHA release. Please see the next few posts for information on what using this entails. I have also created a Documentation and help thread for help on how to use this feature. Please be patient as I get the details up and in these threads. Here are links to relevant threads:

Documentation thread
The original discussion thread with some screenshots.

I have uploaded an installer for you to download. Please make sure you read the next post (or the license agreement) before you install...

DOWNLOAD LINK BELOW

Current Features:
Please note that while I have tested each of these features to some extent, that does not mean they will always behave as expected. Remember this is an ALPHA version

  • Backs up files you are working on to a separate backup directory once per each time you run the program.
  • Loads nearly all XML files and Schemas for ALL Editions of the game (For exceptions see the Known Issues Post)
  • Loads and allows changes to the text files, including tags for different languages.
  • Allows you to edit any of the XML files it loads (nearly all of them)
  • Loads nearly all files for all mods I have been able to try (there is a new issue however since adding BtS capabilities... will not affect any but the most ambitious mods. See Known Issues)
  • Color codes tags by the edition that introduced them (including a mod)
  • Presents files in an expandable/collapsible node format
  • Has a list of short cuts to recognized info types in separate panel (on left). These are alphabetized
  • Allows on the fly editing of values using custom made controls specific to the data type.
  • Recognizes many tags that are meant to contain info types (in bold) and presents you a drop down list of all infos of that type (including ones you just added! I call this "type casting"). Recognition will improve over time... its pretty easy to modify.
  • Allows you to search for text within nodes. (Does not allow searching of xml markup code.... i.e. dont search for <iCost>, instead search for "iCost" or "icost" or "ICOST" etc...).
  • Allows copying, deleting, pasting, inserting, of "container" (expandable) nodes . This includes InfoTypes.
  • Pasting and Inserting are context sensitive so you cannot past an item where it doesn't belong. (for example, you cannot paste an info node inside an info node).
  • Allows creation of and inserting of completely blank new infos with default values (strings, including the name must be entered)
  • Allows automatic creation of children in empty (blank) "container" nodes and sets children to default values. (Any container nodes that are children must be created separately).
  • Allows the creation of new mods. Does not save over original files.
 

Attachments

Civ4 ModXMLEditor
License Agreement and "Readme" (IMPORTANT)

This software is an ALPHA RELEASE. This means it is NOT bug free. Expect problems to occur. There are a few known issues and probably several unknown ones. It's basic functionality has been tested and seems to be at a point where this product is usable. However, I have only used it on my personal machine. The primary purpose of this release is to give people a chance to try out a functional mod editor that has capabilities that have been sought by some modders and to get feedback as well as work out bugs.

I have tested it's backup functionality once. It is programmed to back up work so that you can restore it if problems occur. Backups will be saved in a directory labeled "ModXMLBackup" in the main folder for the edition you are modding. However, I do not guarantee any of this in any way at this point. I strongly recommend you backup any mods you intend to work on for the time being until you are comfortable that it will not overwrite any files unintentionally.

As far as the "license" goes... this is public domain. However please do not reverse engineer and resubmit without my consent. I.E. Don't steal my work and put your name on it. Any and all rights to copyrighted material belongs to Firaxis.

As long as you can agree to live with the possible consequences, takes steps to avoid them, and agree not to hold the author liable for anything that might happen... by all means, install a way and I hope this makes your modding easier!
 
ALPHA Version 0.2 Changes:


  • Added error support to beginning of load so that if the application can't find your Civ folders, it will tell you (and log) which it is looking for and where.
  • Completed full language support. The editor now allows and accurately saves any modification to any language tags in Text files. One exception is when language tags are not formed properly. Details about this issue can be found in this discussion thread. Also, for now, escape sequences are in escape sequence format (It will NOT show the foreign characters). I hope to add an option for displaying foreign characters later.
  • Added context menus for ordinary values
  • Added support for Options menu (removed all but one option for now). This means float (decimal) value support is fully operational (I had forgotten that it wasn't). NOTE: That if you change this in the middle of editing a file, you will have to restart the editor in order for changes to take effect.
  • Added insert above and insert below to edit strip icons. These work as they should.
  • Added the ability to remove tag sensitivity when you want to paste ordinary values (such as bool, decimal, integers, and strings) to tags with different names than the one on the clipboard (right click and uncheck "Restrict pasting to matching TAGS." NOTE: This will NOT work on "container" tags for hopefully obvious reasons.
  • Added a link to the Documentation thread in the help menu. Of course this won't work when you don't have internet access.
  • Temporarily removed the Edit menu since it is not necessary.
  • Greyed out the Tools Menu since it is currently not in use. The tools menu will eventually provide complex editing options such as upgrading a file from one edition to another).

First Alpha Release screenshots:

attachment.php


Above is an example of node coloring by edition that introduced the tag. Brown was introduced in Warlords and Blue is new to the mod. Bold are items that will present a dropdown box like the one shown when editing. Also notice that the clipboard text is red on the toolbar. That means it is illegal to paste on the currently selected node.


attachment.php


Here the clipboard text is green showing that it is legal to paste/insert where the currently selected node is. Also notice the paste/replace options. These will not appear when the clipboard text is red.
 
Some important issues:

  • The editor does not currently support the modular XML system for BtS that has been introduced by modders at this time. (As far as I know. I will look into this to see if it something I can work with).
  • Splash screen at load is not working (drawing items) properly... but I figured that was just a cosmetic issue so this is low on the todo list. It is meant to let you know what it is currently doing as it loads.
  • There might still be issues with loading the Complete version... not sure. I hope to get your feedback on this.
  • Does not support large text box editing yet. Only single line editing works right now.
  • It is not very user friendly yet. If you have any errors in your modded xml coding, it will crash the program and give you a custom but general error message. IT IS VERY PICKY ABOUT YOU FOLLOWING THE SCHEMAS (even more picky than the game). I have included links to the log files on your start menu so that you can find out which info it had trouble reading (the last one listed).
  • If you created new pre-BtS info files (and types) that have were included in the bts version, it will not load these files (such as the event and invisibleinfo files in the Generic Era Mod). This probably does not apply to many people (if any).
  • Files that will not load (or load correctly): GraphicOptionInfos (Unexpected XML Value), AnimationInfos (unexpected xml... this happens in AnimationPathInfos for BtS), And GlobalTypes will not load at all. LSystem files and one other file will not load properly. (They do not crash... but they do not show the information in the nodes either).
  • Only one shipped mod does not load: The "Default Values" mod that was included with the Warlords Expansion because there is an error in the XML coding. Some of the files may load but the UnitInfos file (the default file) will not load. All other other shipped mods will load (including the ones created by Civfanatics users).


UPDATE: Text files NOW SAVE PROPERLY!
 
This thread is for posting comments, suggestions, and reporting bugs. However, I can help you better if you describe your issue and post both log files (that should be installed in your start menu and/or in the application directory. The default directory is "C:\Program Files (x86)\IMT\Civ4 ModXMLEditor\"

Keep in mind that things may take time to respond to. Especially since I will be moving in the next couple weeks.

Look for the Debug.log and the InfoRead.log files and attach them to your email message and send it to imtsoftware@live.com
 
OK. Moving my problem with loading the FFH2 XML to this thread.

I get the following error:

Object reference not set to an instance of an object

Here is the last entry in inforead.log, so I guess it's actually a problem with the Unitinfos file.

Reading Info with label: UNIT_LIGHTBRINGER

I would guess that the issue is with the next entry which would be UNIT_LIGHTNING_ELEMENTAL?
 
OK. Moving my problem with loading the FFH2 XML to this thread.

I get the following error:



Here is the last entry in inforead.log, so I guess it's actually a problem with the Unitinfos file.



I would guess that the issue is with the next entry which would be UNIT_LIGHTNING_ELEMENTAL?

Thanks... thats a lot more helpful. I updated my post in the other thread... but im glad your using this one. Your deduction is correct. This is an XML issue. I will have to download the mod to figure out exactly what it is.
 
Is this the BtS version or the Warlords version? I downloaded FfH 2 for BtS Version 0.41n and it is working fine for me.
 
Is this the BtS version or the Warlords version?

BTS. I don't think there is a Warlords version.

I didn't quite understand your comment in the other thread about renaming folders.

I did try a fresh re-install of FFH2 and your program works fine, so it must have been something I had changed.

EDIT: Managed to find my problem. Turns out that I had added the <bNeverObsolete> tag to Lightbringers but put it one line above where the schema thought it should be. Fixed that issue and your utility now seems to work just fine with my mod! Thanks!
 
Lol... like I said in the introduction... (under known issues), its pretty picky. I am hoping to add the ability to have it ask for user input when it encounters problems like these while loading instead of just throwing an error.
 
It crashes on startup for me with the following error window:

Code:
Problem signature:
  Problem Event Name:	CLR20r3
  Problem Signature 01:	modxmleditor.exe
  Problem Signature 02:	1.0.0.0
  Problem Signature 03:	4e359086
  Problem Signature 04:	ModXMLEditor
  Problem Signature 05:	1.0.0.0
  Problem Signature 06:	4e359086
  Problem Signature 07:	74
  Problem Signature 08:	1
  Problem Signature 09:	System.TypeInitialization
  OS Version:	6.0.6002.2.2.0.768.2
  Locale ID:	1033

I use a x64 processor and Vista.
 
If I remember correctly, you have the complete edition. I think the current version might have a problem loading the directories when the application starts for the complete edition. I am just about finished fixing that issue. I should post the fix today.
 
hmm... i might be wrong about that. It *looks* like the code for loading the complete version is correct. However... I can't be sure that it works correctly since I don't have the complete version.

The update I post today should give more information about the loading process in the log file. If it still doesn't work it might be easier to track down the problem with the newer edition.
 
hmm... i might be wrong about that. It *looks* like the code for loading the complete version is correct. However... I can't be sure that it works correctly since I don't have the complete version.

The update I post today should give more information about the loading process in the log file. If it still doesn't work it might be easier to track down the problem with the newer edition.

I get the same error and I have the complete version.
 
I have posted the updated edition. The installer should remove your older edition when installing. Please let me know if you are having issues with the editor loading. I know there are a few out there.
 
The editor loads for me know. In which thread do you want bug reports?

anyway, first one I found is that Civ4Unitcombat.xml cannot be modified.
 
when I use Info->Units->Civ4AnimationInfos.xml, the program crashes (vanilla loaded). When I open the file with BTS loaded, no crash

see bug report
Spoiler :

Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
ModXMLEditor.UnexpectedXMLValue: Eine Ausnahme vom Typ "ModXMLEditor.UnexpectedXMLValue" wurde ausgelöst.
bei ModXMLEditor.XMLFileManager.VerifyNode(SchemaMember member, XmlNode node)
bei ModXMLEditor.XMLFileManager.FillPreInfoContainer(SchemaMember member, XmlNode node, Boolean isRootCall, Value parent)
bei ModXMLEditor.XMLFileManager.FillPreInfoContainer(SchemaMember member, XmlNode node, Boolean isRootCall, Value parent)
bei ModXMLEditor.XMLFileManager.FillPreInfoContainer(SchemaMember member, XmlNode node, Boolean isRootCall, Value parent)
bei ModXMLEditor.XMLFileManager.FillPreInfoContainer(SchemaMember member, XmlNode node, Boolean isRootCall, Value parent)
bei ModXMLEditor.XMLFileManager.ImportData()
bei ModXMLEditor.XMLFileManager..ctor(XMLFile infoFile, StreamWriter log, Boolean[] load)
bei ModXMLEditor.ModXMLEditorUI.LoadFile(XMLFile theFile, Boolean[] conditions)
bei ModXMLEditor.ModXMLEditorUI.set_ActiveFile(XMLFile value)
bei ModXMLEditor.ModXMLEditorUI.OnInfoMenuClick(Object sender, EventArgs e)
bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladene Assemblys **************
mscorlib
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4211 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
----------------------------------------
ModXMLEditor
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Program%20Files%20(x86)/IMT/Civ4%20ModXMLEditor/ModXMLEditor.exe.
----------------------------------------
System.Windows.Forms
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4016 (NetFxQFE.050727-4000).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4205 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Drawing
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4016 (NetFxQFE.050727-4000).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
SimplePanels
Assembly-Version: 1.0.4229.11454.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Program%20Files%20(x86)/IMT/Civ4%20ModXMLEditor/SimplePanels.DLL.
----------------------------------------
AppSettingsFileManager
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Program%20Files%20(x86)/IMT/Civ4%20ModXMLEditor/AppSettingsFileManager.DLL.
----------------------------------------
IMT.Collections
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Program%20Files%20(x86)/IMT/Civ4%20ModXMLEditor/IMT.Collections.DLL.
----------------------------------------
System.Xml
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4016 (NetFxQFE.050727-4000).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4211 (VistaSP2GDR.050727-4200).
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.4016 (NetFxQFE.050727-4000).
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
 
Bugs should be reported in this form. Your second post is a known issue and is mentioned in the list in the 4th post. However, you are right. AnimationInfos DOES load in BtS. But there is a second file in BtS called AnimationPathInfos that does not load. It looks like the may have separated the original file into two and the problem got moved to the new file. I will update the known issues to reflect this.

As for your first post, are you having troubles saving the new file? Or just having troubles clicking the edit button? It takes a couple of seconds when you press the edit button to populate the list of text infos checkbox (because for BtS there are probably over 10,000 text infos).

I ran into a problem too when trying to save it. It asks me to create a new mod and the new mod doesn't seem to be working right. The issue is that the path that is trying to save too repeats itself. This is easy to fix once I find what part of the code actually does this.

I appreciate the bug reports. I know there will be a few more. Once they are ironed out I think we will be on our way to a really useful editor
 
How about you stolenrays and lampuiho? Does the editor load for you two now?
 
Back
Top Bottom