Civ4Tools - My stab at a Civ4 editor

I'm pretty much convinced it's beyond repair. When I put in the new mainboard and CPU, it started without trouble. Either way, I now have a faster machine that should run Civ4 and my other demanding games a little better. Don't like having my hand forced, though. I plan to upgrade in the spring, going for an Athlon64 3700. :devil:

Anyway, I got VB.NET reinstalled, now just need to reinstall Civ 4. Then I'll be back in business.
 
This looks kick ass. Hope the work continues as this would cut the time in half it takes to make changes to all the files. Bravo sir, and look forward to your finished setup.
 
Ok. I've decided to release what I have so far, just so the community can get a feel for what I'm doing. Your feedback, ideas and comments are welcome!

Also, something I didn't post in the readme.txt. To get the edit dialogs, right-click in the tree-view on the right side of the window to get the context menu and choose "detail edit".

[attachment was deleted, faulty install]
 
When starting the game, I got a problem. It is looking for my CIV4 in e:\games\civ4, which is not where I installed it (I assume that's where you installed it?).

I can't open any files because of that.

Code:
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 "e:\games\civ4\mods\".
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.Directory.InternalGetFileDirectoryNames(String fullPath, String userPath, Boolean file)
   at System.IO.Directory.InternalGetDirectories(String path, String userPath, String searchPattern)
   at System.IO.Directory.GetDirectories(String path, String searchPattern)
   at System.IO.Directory.GetDirectories(String path)
   at civ4tools.frmLoadMod.frmLoadMod_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.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
civ4tools
    Assembly Version: 1.0.2174.17418
    Win32 Version: 1.0.2174.17418
    CodeBase: file:///C:/Documents%20and%20Settings/Jan%20van%20der%20Crabben/My%20Documents/Civ4/civ4tools/civ4tools.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
SandBar
    Assembly Version: 1.0.8.0
    Win32 Version: 1.0.8.0
    CodeBase: file:///C:/Documents%20and%20Settings/Jan%20van%20der%20Crabben/My%20Documents/Civ4/civ4tools/SandBar.DLL
----------------------------------------
FlatTabControl
    Assembly Version: 1.0.2147.32580
    Win32 Version: 1.0.2147.32580
    CodeBase: file:///C:/Documents%20and%20Settings/Jan%20van%20der%20Crabben/My%20Documents/Civ4/civ4tools/FlatTabControl.DLL
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 7.0.5000.0
    Win32 Version: 7.10.3052.4
    CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (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 machine
rather than being handled by this dialog.
 
Well, that didn't work very well. In typical fashion, I forget to change a setting before release, and that botched everything.

What happened, is I disabled the section which verifies the location of Civ4, substituting that with a hard-coded location. Naturally, that's not gonna work too well on others' computers. :rolleyes:

That's now been fixed, so try downloading the file again.

[Dec 16/05: moved the download to the top of the thread for easy access]
 
just downloaded it, going to give it a test run. Looks very promising and right along some of the things that i want to mod for my games.

Thank you very much for your work on this, I will post any feedback i can think about in due time :)
 
Everything that you have seems to work, except I cannot actually edit any of the turn legths or anything in game options at all. The input field box comes up and I am able to input new values, but nothing actually is changed.

It seems that most of the only things that i can change are things related to text, but nothing that has any value besides text can be altered at this point.

I was able to change the name of a gr. person, change the text of a help tip.

I could not change a civs cities. Also when this is implicated could it be possible to enter a text of a city, instead of choosing from the list. People may want to add in cities that are not included in the predefined list.

That is about all that I had noticed on this release. It looks very promising and I will definately be following the progress of this.
 
Posting a small update this morning (it's just after midnight my time as I post this). The civilization edit dialog has been fleshed out pretty much, and it's just about complete.

Vladdrac: Thanks for the feedback. Yes, you'll probably find a lot of things don't work just yet. However, the stuff that is fully functional at this point is a major foundation for everything else. Most of the text stuff is the very basic building blocks upon which more complicated structures are built.

As far as adding/editing a civ's cities, I contemplated just allowing the user to type in the city names. However, all the cities reference the Text\CIV4GameTextInfos_Cities.xml file. The modification of that file is already built in to Civ4Tools. So, if you wanted to add more cities to a particular civ, you first create it in the cities panel, then it will appear in the listview in the civ edit dialog.
 
Having stumbled in vain around the XML I logged on hoping to find someone doing this - from what I've read this is the salvation I've been looking for!

This fix is going to be REALLY popular once you've got it sorted, there are heaps of us CivVets who are not programers just waiting for something like this.

Thanks again

CIV ON!
 
Will this utility let you add cash to your civilization or your opponents on the fly during a game? like powerbar did for civ3?
 
I'm not the coder, but:

As I understand it, no. The XML determines the game settings when the game is initialized. It doesn't alter memory (while the game is running) at all.
 
Ben E Gas said:
Will this utility let you add cash to your civilization or your opponents on the fly during a game? like powerbar did for civ3?

As Raize has said, no, this is not an 'in game' editor. It works with the data files outside of the game. Any changes made in the editor would not take effect until the game is restarted.
 
Well, it's been an interesting week and a half. I have been busy, mainly working on this tool. Of course, I did visit my mom over Christmas, that was great. But I'm back to business, and I'm ready to share what I've been up to.

Civ4Tools was developing nicely as it was, but I found the tab control on the left side of the screen becoming a bit of a mess. Here's screenshot 4 as a reminder:



Again, quite nice, but imagine having dozens of tabs in there? :confused:

Now have a look at the latest shot (beware, this one's big, wanted to preserve the detail):



It's still got a similar flavour to the old version, except that the tab control is gonzo, replaced by a single listbox at the bottom, and several windows up top. The more important one is open, that is the XML tree. You can see several items hilighted in blue, a feature I retained, indicating that file is part of the current mod.

The design is smart, and uncluttered. And highly customizable, much like the Visual Studio environment is. It took me a while to get it right, but now that i have, we're off to the races.

I've also taken the opportunity to clean up some of my code, which sometimes gets unruly. Even though this is not a game in itself, it doesn't give me liscence to be reckless with my coding by any means.

So, that's where things stand at this point, I'll be posting some kind of release shortly.
 
Its looks good, but is as good as useless, since it hangs at Civ4gamespeedinfo.xml .

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

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at civ4tools.general.SearchTexts(clsText[] ti, String t)
at civ4tools.mLoadData.LoadData(Form1 frm)
at civ4tools.Form1.ToolBar1_ButtonClick(Object sender, ToolBarItemEventArgs e)
at TD.SandBar.ToolBar.OnItemActivate(ToolbarItemBase item)
at TD.SandBar.ToolBar.OnItemRelease(ToolbarItemBase item, Point position)
at TD.SandBar.ToolBar.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at TD.SandBar.ToolBar.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///d:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
civ4tools
Assembly Version: 1.0.2175.30944
Win32 Version: 1.0.2175.30944
CodeBase: file:///D:/Program%20Files/Firaxis%20Games/Civ4tools/civ4tools.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///d:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///d:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///d:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
SandBar
Assembly Version: 1.0.8.0
Win32 Version: 1.0.8.0
CodeBase: file:///D:/Program%20Files/Firaxis%20Games/Civ4tools/SandBar.DLL
----------------------------------------
FlatTabControl
Assembly Version: 1.0.2147.32580
Win32 Version: 1.0.2147.32580
CodeBase: file:///D:/Program%20Files/Firaxis%20Games/Civ4tools/FlatTabControl.DLL
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase: file:///d:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///d:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (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 machine
rather than being handled by this dialog.
 
I've voted this thread terrible because you ignored me.
 
I got the same excpetions as Kaiserguard, but the versions on some of the assemblies were different. I have .NET 2.0, which may be the reason for different versions. However, the exepction (index out of range) is the same.
 

Attachments

Keep in mind, this is not even really in beta yet. There will be problems. The version I released was only a small demo of where it's going, and now is in fact obsolete. Sorry Kaiserguard to have not responded to your post in the past week, I've been tied up with other things, and in fact haven't had a chance to work on Civ4Tools.

As far as the crash is concerned, thank you for the feedback, it is valuble. I will check the code to see where this actually happened. Now, I have a question. Have you modified the default Civ4gamespeedinfo.xml file? Or have you made other changes to the vanilla game? These are things that could influence its performance.

Civ4Tools is being built using VB.NET 2003, which runs on the .NET framework 1.1. You will need that version of the framework for Civ4Tools to work. Now I am planning to upgrade to VB.NET 2005, which runs on the new .NET 2.0 framework. I will post an announcement when I do.
 
Back
Top Bottom