fully automatic CivV XML editor

Discussion in 'Civ5 - Utility Programs' started by Chile, Jan 4, 2013.

  1. Chile

    Chile Chieftain

    Joined:
    Jul 15, 2010
    Messages:
    47
    Location:
    Leipzig / Germany
    Last Update: 1.8.2013
    Just added two examples of base-data-files
    You will need NET-Framework 3.5
    NOTE: This is a beta-version, there are bound to be errors somewhere.
    I need you to give me exact formulated bug-reports.
    Also there will be a Youtube vid somewhere in the near future. :p


    Intro

    A while ago I was searching for a Editor which takes the error prone process of XML-editing out of my hands. Since nothing suitable (except maybe the Tech-Tree-Editor) was to be had, I sat down and did it myself.

    Result: A fully automated Xml Editor for Civilization 5.





    Features:
    (a Row is resembles an element of a given XML-Table e.g. a Row in Table Buildings is a Building)

    - add new Rows...
    - delete any Row...
    - change any value to any XML-Table in any version of Civilization 5



    - all changes can be made to any given XML-state
    (meaning: choose a state of your xml-data which you want to base your new mod on, e.g. the original xml-state of Gods & Kings, make changes to the xml-data, save those changes, import the resulting xml-file into a new Modbuddy project... and your new mod for Gods & Kings is done )

    - all default-values will be added automatically
    - save your changes to import in a new project or to work on it later

    - all references between tables will be observed
    (meaning: if a key-column pertains to an other table, it can't be changes or left empty, deleted references will be remarked upon before saving)



    - undo, redo any modification
    - visualization of all modifications
    - cycle through all of your past changes (with possibility to specify which modifications you want to revisit: new rows, changes... very handy with 300+ xml-tables)

    - search function
    - instant text editing (without changing to the language-table and searching for the specific tag)
    - all referenced and changeable values can be chosen via drop-down-button



    Download:
    http://forums.civfanatics.com/downloads.php?do=file&id=20698


    First steps

    1. download + unpack + start
    2. you will be redirected to the options-window
    fill out:
    a) your Civ5 root directory
    b) Civ5 user folder
    c) language you want to edit
    d) if you filled out all of the above: create a new base-data-file
    3. crucial step: build a base-data-file
    (note: this procedure is not needed at every startup!)



    - choose a state of your xml-data you want to base your mod on
    (note: if you choose nothing vanilla will be loaded)
    - lets choose Gods & Kings, also take Mongolia in consideration
    - click 'generate base-data-file'
    (note: you can create as many B-d-fs as you wish)
    - this will take up to 3 min (vanilla), up to 5 min (G&K)
    - save the resulting file
    - you will encounter this error-message:



    Unfortunately the xml-data of Civ5 is plagued with little inconsistencies
    while I took care of the biggest flaws there are still a few where I did not know how to handle them. Since they are few and between you are save to ignore them for now.

    Here are the standard-error-logs for vanilla + G&Ks
    (I also did tests with some different Civilization-DLCs which added no additional errors)

    vanilla: http://forums.civfanatics.com/downloads.php?do=file&id=20697
    G&Ks: http://forums.civfanatics.com/downloads.php?do=file&id=20696

    If your Error Log looks different from that, your XML-data is somehow different from mine

    I uploaded my base-data-files for vanilla + G&Ks without any DLCs for those who encounter problems or just want to sniff out the app:

    vanilla: http://forums.civfanatics.com/downloads.php?do=file&id=20695
    G&Ks: http://forums.civfanatics.com/downloads.php?do=file&id=20694

    - just unpack in the editor-directory
    - at last: select your new base-data-file und click 'select...' - done

    4.
    I hope the application is self-explanatory, if not I will do a Youtube video

    just a few tips:
    - use the context menu via right-click
    - save: ->top left result: xml-file
    - load a previous session:
    - make sure you've chosen the right base-data-file
    - load you saved xml-file (first left button)

    5.
    happy modding and a happy new year :)
     
  2. trystero49

    trystero49 Prince

    Joined:
    Apr 30, 2012
    Messages:
    515
    Wow, this looks great. I will try it out and see what happens. Thanks!
     
  3. Craig_Sutter

    Craig_Sutter Deity

    Joined:
    Aug 13, 2002
    Messages:
    2,753
    Gender:
    Male
    Location:
    Calgary, Canada
    How does it integrate with Modbuddy? Are the XML files added to a solution or do they have to be imported?

    Looks good.
     
  4. Greensiberia

    Greensiberia Chieftain

    Joined:
    Jun 23, 2012
    Messages:
    24
    Location:
    Western Siberia
    Got error. Cannot build database,.
     
  5. Chile

    Chile Chieftain

    Joined:
    Jul 15, 2010
    Messages:
    47
    Location:
    Leipzig / Germany
    good question:
    1. Open (new) project in Modbuddy
    2. Solution Explorer -> Add -> existing Item
    3. select the xml-file you created via the editor (not the base-data-file!)
    4. As usual: Properties -> Actions -> Add -> select Event -> Update Database -> select the file...
    5. save and import into MODS directory
    6. play your mod


    I'm sorry... but I can't help you with a short message like yours.
    I do need some more Information (error-message? where did the error occur? ...)
    I uploaded some basic BDFs today(see above), use one of those to test the application

    hope you are successful... ;)
     
  6. Greensiberia

    Greensiberia Chieftain

    Joined:
    Jun 23, 2012
    Messages:
    24
    Location:
    Western Siberia
    System.NullReferenceException: В экземпляре объекта не задана ссылка на объект.
    в CivV_XML_Editor.BuildBaseDataFileWindow.PopulateDlcsListBox(ListBox lsb, String dlcFolder, String modFolder)
    в CivV_XML_Editor.BuildBaseDataFileWindow..ctor()
    в CivV_XML_Editor.OptionsWindow.button1_Click(Object sender, EventArgs e)
    в System.Windows.Forms.Control.OnClick(EventArgs e)
    в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    в System.Windows.Forms.Control.WndProc(Message& m)
    в System.Windows.Forms.ButtonBase.WndProc(Message& m)
    в System.Windows.Forms.Button.WndProc(Message& m)
    в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
     
  7. Chile

    Chile Chieftain

    Joined:
    Jul 15, 2010
    Messages:
    47
    Location:
    Leipzig / Germany
    @ Greensiberia
    Your case is quiet the mystery, since your kind of error should not be caused by the function where it occurs. :crazyeye:

    Therefore:
    - please check if you have NET Framework 3.5 installed
    - make sure you selected the right paths (Civ root and user path)

    since those shortcomings are supposedly checked beforehand this is just a grasp for straws.
    Also, download the editor again since I put up a new version with minor changes today.

    If anyone encounters the same error, please give me a message.
     
  8. Greensiberia

    Greensiberia Chieftain

    Joined:
    Jun 23, 2012
    Messages:
    24
    Location:
    Western Siberia
    I have only .Net 4.0 may be problem in this fact.
     
  9. ignite

    ignite Chieftain

    Joined:
    Sep 26, 2010
    Messages:
    62
    Location:
    Minnesota
    Running Net Framework 4.5 so I get this error message:

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at CivV_XML_Editor.BuildBaseDataFileWindow.PopulateDlcsListBox(ListBox lsb, String dlcFolder, String modFolder)
    at CivV_XML_Editor.BuildBaseDataFileWindow..ctor()
    at CivV_XML_Editor.OptionsWindow.button1_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    CivV-XML-Editor
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/ignite/Downloads/Chile's%20civVxml%20Editor/CivV-XML-Editor.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5460 (Win7SP1GDR.050727-5400)
    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.5466 (Win7SP1GDR.050727-5400)
    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.5462 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

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

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
     
  10. Chile

    Chile Chieftain

    Joined:
    Jul 15, 2010
    Messages:
    47
    Location:
    Leipzig / Germany
    Still searching for the reason of this error.
    I guess I need a little more help:
    I presume the error occurs at 2d (First steps, see above), after clicking on 'select/choose your BDF' ?
    Also which DLCs / Extensions do those of you coming across this error have?

    I uploaded a new version today which tries to tackle this problem. :mischief:
    I hope I found the the reason for it, but I can't test, since this error is not happening to me...

    No worries, NET Framework is downward-compatible. Please try the new version...

    Thanks for the whole message, let's see if this was help enough.


    Also I hope there are some without errors?
    What are your experiences?
     
  11. Leprechaun7377

    Leprechaun7377 Chieftain

    Joined:
    Apr 19, 2013
    Messages:
    1
    I'd love to give the tool a try, but I'm seeing the error below.

    I did notice when I selected my user folder, it automatically added MODS to the end of the path.

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at CivV_XML_Editor.BuildBaseDataFileWindow.PopulateDlcsListBox(ListBox lsb, String dlcFolder, String modFolder)
    at CivV_XML_Editor.BuildBaseDataFileWindow..ctor()
    at CivV_XML_Editor.OptionsWindow.button1_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6400 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    CivV-XML-Editor
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Chris/Downloads/chile_s_civvxml_editor/Chile's%20civVxml%20Editor/CivV-XML-Editor.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6402 (Win8RTMGDR.050727-6400)
    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.6401 (Win8RTMGDR.050727-6400)
    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.6401 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

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

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
     
  12. Zimdictive

    Zimdictive Chieftain

    Joined:
    Mar 18, 2013
    Messages:
    47
    Location:
    Cambridge, UK
    I'm getting the same error as above.
     
  13. SteamCiv

    SteamCiv Warlord

    Joined:
    May 18, 2012
    Messages:
    131
    I do not know if this is sill being worked on and this is an old thread, here is the error, btw using Windows 64 bit 8.1 (yes I know some of you hold up the Cross against it, but with Classic shell it looks like Win 7). After the error appears Continue Quit,; Continue does nothing, attempt to save and quit throws a dialogue box to rebuild the database (which it never does).

    Thanks

    --------

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentException: An item with the same key has already been added.
    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
    at CivV_XML_Editor.BuildBaseDataFileWindow.PopulateDlcsListBox(ListBox lsb, String dlcFolder, String modFolder)
    at CivV_XML_Editor.BuildBaseDataFileWindow..ctor()
    at CivV_XML_Editor.OptionsWindow.button1_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8000 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    CivV-XML-Editor
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Applications/Chile's%20civVxml%20Editor/CivV-XML-Editor.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
    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.7905 (win9rel.050727-7900)
    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.7905 (win9rel.050727-7900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

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

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
     

Share This Page