Civ4 XML Editor - First Release!

Feet said:
Ok there's a new typo in the config file of the new version you put out.

<value>C:\Program Files\Firaxis Games\Sid Meier's Civilization 5</value>

Spot the error. ;)

I think that's just wishful thinking tbh. :p Setting it back to 4 makes the new version work for me again.

LOL, not wishful thinking, more coding when I'm not getting enough sleep... See I needed to test the fix for the config file bug, but it is installed in the default directory on my computer, so I thought, I'll test it by setting it to the wrong folder and see if i get the error I should get... And I did! But then I forgot to set it back to normal before packaging up the install... :wallbash:

OK, I'll get that fixed up for the next update, but yes, in the meantime, please manually set the value back to Civ 4 in your config file and it should work fine.
 
jbfballrb said:
what do i need to do to get it to see my alternate civ4 directory?

In the install directory, there should be a file called Civ4XMLEditor.exe.config. You can open it in notepad or any text editor you like, then look for this section:

<Civ4XMLEditor.Properties.Settings>
<setting name="Civ4RootDirectory" serializeAs="String">
<value>C:\Program Files\Firaxis Games\Sid Meier's Civilization 4</value>
</setting>
</Civ4XMLEditor.Properties.Settings>

Change the file name there to wherever you installed Civ 4.
 
This is a great tool you have made, Futzy.

I am also getting the unhandled exception error that Cafegio was experiencing... It occurs very frequently and is getting annoying. Anyone has an idea how I can fix it? Thanks.
 
thtycho said:
This is a great tool you have made, Futzy.

I am also getting the unhandled exception error that Cafegio was experiencing... It occurs very frequently and is getting annoying. Anyone has an idea how I can fix it? Thanks.

I have not been able to reproduce this error. So to make it easier to find, I have put out a new version of the app that includes some debug files, which when the error happens again will give me more information to work with. So if you are getting this error, please download the newest version from the top message in this thread, and then if the error happens again, please post the error message to this thread.
 
Can I use your program to mod NOT mods but normal "New Game".....??????



Second.

I loaded your program, clicked "single player only?" and an ERROR occured:

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 Civ4XMLEditor.frmMain.UpdateIniFile(String key, String value)
at Civ4XMLEditor.frmMain.cbGenSinglePlayerOnly_CheckedChanged(Object sender, EventArgs e)
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
at System.Windows.Forms.CheckBox.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.Control.ControlNativeWindow.OnMessage(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.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Civ4XMLEditor
Assembly Version: 0.1.2145.38171
Win32 Version: 0.1.*
CodeBase: file:///C:/Program%20Files/Civ4%20XML%20Editor/Civ4XMLEditor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
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.42 (RTM.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.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.
 
Downloaded it again from your very first post in this thread. Reinstalled it. Changed Civ4 path to my Civ4 path in Civ4XMLEditor.exe.config.

When I open the program, it gives this error:

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

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\My Documents\My Games\Sid Meier's Civilization 4\MODS'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption)
at System.IO.Directory.GetDirectories(String path)
at Civ4XMLEditor.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Civ4XMLEditor
Assembly Version: 0.1.2145.38171
Win32 Version: 0.1.*
CodeBase: file:///C:/Program%20Files/Civ4%20XML%20Editor/Civ4XMLEditor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
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.42 (RTM.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.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.
----------


I am able to continue and get to the editor interface. Soon enough, when I try to edit anything, it gives me the following unhandled exception error:

----------
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 Civ4XMLEditor.frmMain.txtCivDescriptionKey_TextChanged(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)
at System.Windows.Forms.Control.set_Text(String value)
at System.Windows.Forms.TextBoxBase.set_Text(String value)
at System.Windows.Forms.TextBox.set_Text(String value)
at Civ4XMLEditor.frmMain.ClearCivilizationTab()
at Civ4XMLEditor.frmMain.cbxModName_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Civ4XMLEditor
Assembly Version: 0.1.2145.38171
Win32 Version: 0.1.*
CodeBase: file:///C:/Program%20Files/Civ4%20XML%20Editor/Civ4XMLEditor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
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.42 (RTM.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.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.
----------

I don't know if the second error was based on the first one. By the way, I have .NET Framework 1.1 already installed. Do they have conflict with each other? Or is there some settings I have to change?

Thanks.
 
Just click continue and it carries on working just fine. I got a similar error loads of times, I just clicked continue and the changes I made seemed to work anyway.:scan:
 
Whenever I create a new mod and change config settings, it works fine. But after adding a new civ, it always gives me those unhandled exceptions when I try to save, and clicking continue doesn't help.
 
Hi ,
Im french and excuse my poor english!
Im a civ fan and the xml editor is a good thing but it doesnt work in french so...
please make a xml editor who work in french pleeeeeeaaaaaassssseeeeeee!!!
And do not surprise because you are the only one in the web who make anything
in civ 4
Thanks !
(excuse my english)
 
maybe i can change xml in english to xml in french...
if someone have an idea please
i love this game ;)
 
I'm getting errors all the time, making this unusable.

Also for some inexplicable reason, the path refers to Civilization 5 folder. Wtf?
 
Martinus said:
I'm getting errors all the time, making this unusable.

Also for some inexplicable reason, the path refers to Civilization 5 folder. Wtf?

Yeah, when I opened up my firaxes folder i saw a new folder for "Civ 5" where it had put the new mod i tried to create. :confused:
 
buggy as hell on my pc, but i guess that's my pc's fault. For every single character i type, it brings up an exception window. But the program itself looks very promising.
 
I'm having a problem. Every charecter I type a message comes up saying there's an error. Then I press continue and its fine.
Great program by the way.
 
Top Bottom