Cross-Platform Civ3 Editor

Cross-Platform Editor for Conquests now available! 1.48

Please note that Java will not be included as standard in future Mac OS X releases. Lion is due mid-year, and will be the first release affected. You will have to download the Java runtime in order to run Java software such as this editor.

More details here
 
Version 0.63 is now available, download link here. The primary addition of this update is autosave, and as such it is a recommended update. Changes include:

  • Autosave has been added. Your files will now be automatically saved at a certain interval, so if the power goes out or your computer freezes, you won't lose your changes.
  • The Input From SAV ability has been revamped, both adding the ability to open compressed SAV files, and fixing a few logical errors that could cause it to fail even on uncompressed fails. It should now be able to recover the rules part (not the map part) of a BIQ from most any SAV that has custom rules.
  • A bug whereby closing the Export to CSV Window would cause the whole program to quit has been rectified.

The number of autosaves and how often an autosave is performed are both configurable through the Settings window. The autosaves are stored in the same folder as the editor, should you need them.

As usual, most of the work has been on the map end, which is not enabled in this version.

AlanH said:
Please note that Java will not be included as standard in future Mac OS X releases. Lion is due mid-year, and will be the first release affected. You will have to download the Java runtime in order to run Java software such as this editor.

More details here

I'm not too surprised after the 'deprecation' announcement. But it doesn't sound that bad:

According to Appleinsider, if you try to run a Java app on Lion, the OS will look for the latest version of the runtime and download it – with the user's approval.

Problematic if the user has a slow Internet connection, but it still sounds pretty straightforward, and simpler than what a Windows user would have to do if their computer didn't ship with Java (I don't know what % of Windows computers do, but it isn't 100%). I'm certainly not rewriting the program in another language - both due to the effort, and because I'd have no way to compile it for OSX, and Java solves that problem nicely. I'd be willing to have a 'Java 7' and 'Java 5' version, though, if for some reason the backwards compatibility with Java 5 were broken on Lion (I'd just compile it twice from the same Java 5 code with different Java versions targeted).
 
I've continued to follow the thread even though there hasn't been time yet to actually try out the editor. I really want to. And hopefully the chance will come sooner rather than later. There are a couple of steampunk biqs that are close to being ready for rules editing. The maps are roughed out. The main drag is that I'm still working out how to carefully assign terrain slots to allow radically different graphics. "Do the connecting caves need more terrain types or the settled hollows?", "Can I get away with using lm grassland for the 'real' grassland so all the grass-based terrains are free to have a different base graphic?" and that sort of thing. Once that is done your editor will come in very handy.

As to Java: many of us will not be upgrading the OS right away. Furthermore anyone who can install a custom utility (like an editor) & get it working should be able to dl & install Java, imho.
 
I've continued to follow the thread even though there hasn't been time yet to actually try out the editor. I really want to. And hopefully the chance will come sooner rather than later. There are a couple of steampunk biqs that are close to being ready for rules editing. The maps are roughed out. The main drag is that I'm still working out how to carefully assign terrain slots to allow radically different graphics. "Do the connecting caves need more terrain types or the settled hollows?", "Can I get away with using lm grassland for the 'real' grassland so all the grass-based terrains are free to have a different base graphic?" and that sort of thing. Once that is done your editor will come in very handy.

As to Java: many of us will not be upgrading the OS right away. Furthermore anyone who can install a custom utility (like an editor) & get it working should be able to dl & install Java, imho.

I'm glad you're following along despite not having been able to try it. You'll be able to benefit from others having already used the editor, finding mistakes, and making suggestions when you are able to use it!

Thanks for your work. Has there been any success in breaking some game limits yet?

I haven't spent much time trying to break game limits myself; the most potentially useful one that I have verified works is maps with > 362 tiles in any one dimension (so long as there are <= 65,536 tiles overall). Spending a lot of time trying to break the limits myself would mean less time making the editor, so it's my hope that by having made this editor that makes it relatively easy to go beyond Firaxis's limits, others will be able to try to go beyond the usual limits if they feel constrained by the limits Firaxis's editor imposes.

Theoretically, I think a lot of the limits are arbitrary, such as the 100 culture per building limit - there's no technical reason 100 should be that upper limit. With my editor you could create a building with 5000 culture if you wanted to. I just haven't tested many of these myself.

edit: Well you made me a bit curious about testing out some boundaries, so I decided to test the maintenance boundary. Firaxis limits maintenance to a 0->100 range. I decided to try setting Temples to -1 maintenance in the WWII scenario. There's no graphic for negative maintenance in-game, but I sold a temple and sure enough my surplus decreased by one. So negative-maintenance seems to work in-game.

What I don't know is if the AI will build negative-maintenance buildings. And that's where the testing time could become prohibitive. For example with more than 7 flavors (which I tested with hex editing, and haven't added to my editor yet), I don't know if the AI will actually factor in the 8th/9th/etc. flavor. As subtle as flavors are, that could take awhile to determine. As many items as there would be to test, and the time adds up, which is where the need for others to help with that problem comes in.

Now that I've started though, I am going to start up a regular game in Debug Mode and see if the AI builds negative-maintenance temples.
 
While looking into negative-maintenance buildings (result: the AI does build them, seems to work perfectly. you even get a "- -2: Maintenance" in the Domestic Advisor screen), I realized that the Safety Level customization wasn't as smooth as it could have been. So I updated it. Changes in version 0.64:

  • Tabs default to having the first item selected when a file is opened.
  • You may now change all the safety levels at once

Note that the unit icon will not display until you manually select a unit, unless the unit tab is the first tab you open. It still requires 1 click to display most of the time, just like before.

I have also concluded the first minor tests of modifying a tile with the editor. Currently the editor has the capabilities of a very unskilled worker when it comes to the map, so it still has some tricks to learn, but it's gaining abilities.

Download link.
 
Having trouble getting this to run. I'm using Windows 7 and the editor is in the same directory as Java.

Here's the cmd.exe screen:
 
Spoiler :
Having trouble getting this to run. I'm using Windows 7 and the editor is in the same directory as Java.

Here's the cmd.exe screen:

Hmm, that error is in the part of the program where it auto-detects where Civ3 is installed. It's using the built-in registry query tool, which behind the scenes is doing this:



The program looks for the line that has "Install_Path", and then goes through the line looking for the REG_SZ, then goes ahead by a tab, and then reads where Civ3 is installed.

Only for some reason, when you ran it, it didn't see a tab following the REG_SZ in the Install_Path.

If you could run the same query in cmd (req query "HKEY_LOCAL_MACHINE\SOFTWARE\Infogrames Interactive\Civilization III\") and report back what it gives you, that might well lead to solving the problem. It's odd that it failed here - I would have expected either it wouldn't have found the entry for Civ3 at all (which the program is prepared for as a possibility), or it would be there entirely. Are you using the retail copy of Civ3, or Steam/Impulse/etc.? The other possibility is maybe Windows 7 changed the format that "reg query" returns results - I'll see if I can revitalize my Win7 install long enough to test this.

In the short term, though, you can fix this problem by going to wherever you put the editor, and creating a new text file called "civ3editor.ini". Put a single line in that text file (space at end optional),

firstRun=false

save it, and start the editor. It won't try to query the registry anymore. Now go into the Settings box in the main editor window, and tell it where Civ3 is installed (and optionally, where you save your scenarios by default - if you don't specify this, you'll start in "My Documents" whenever you open a BIQ). Then you should be back in business.

I'll add a few lines of code to the next version so that if this happens, it will ask the user where Civ3 is installed instead of crashing like this. Thanks for taking the time to report the error.
 
Thanks for the help. :goodjob: It's now working with the .ini text method.



Java c:\Programs Files\Java\jre6\bin
main Civ 3 d:\Steam\Steamapps\Common\Sid Meier's Civilization iii Complete
backup Civ 3 d:\Civilization III
 
Hmm... that looks like it should work. I tried to revive my Win7 install, but it's hopeless, and its registry query utility wouldn't work on XP 64-bit. I had better luck de-installing my retail Civ3 and trying the Impulse version, but it worked just fine with a fresh copy of the editor - too good of luck. So unfortunately I can't get it to break on my computer.

If you're up for it, though, there's one thing you could do to help me diagnose this. You'd need to delete the log.txt file that the editor creates, and then rename the civ3editor.ini file. Then create a new civ3editor.ini file, and put this in the file:

Code:
debugLevel=debug
firstRun=true

Now run the editor. It will have debug mode on, and will try to figure out where Civ3 is installed. It will fail just like before. But it will put more detailed information in the log.txt file. If you could then upload exactly what is in the log file at that point to CFC in
Code:
 tags, I can use that to feed the editor exactly what your registry query is giving it, and hopefully that will explain what's going wrong.  The [CODE] tags will be necessary so that tabs, spaces, etc. are preserved, which might be why it isn't working.

After that, just put the old civ3editor.ini back to its original name, and the editor will have all your old settings back.
 
It wouldn't run.

Another thing, as is it doesn't save install and scenario locations.

Here's the "old log" from the previous "firstRun=false" version.

Code:
0    [main] INFO  Main  - Starting program - version 0.64
395  [AWT-EventQueue-0] INFO  Main  - Running Windows 7 6.1 on x86
2236 [AWT-EventQueue-0] INFO  com.civfanatics.civ3.xplatformeditor.MapTab  - Weight of 0.23166023166023167 with 1036 pixels in width
2812 [AWT-EventQueue-0] WARN  Main  - Couldn't find config file
2859 [AWT-EventQueue-0] INFO  Main  - Got 448 bytes from the registry query
 
It wouldn't run.

Another thing, as is it doesn't save install and scenario locations.

Here's the "old log" from the previous "firstRun=false" version.

Code:
0    [main] INFO  Main  - Starting program - version 0.64
395  [AWT-EventQueue-0] INFO  Main  - Running Windows 7 6.1 on x86
2236 [AWT-EventQueue-0] INFO  com.civfanatics.civ3.xplatformeditor.MapTab  - Weight of 0.23166023166023167 with 1036 pixels in width
2812 [AWT-EventQueue-0] WARN  Main  - Couldn't find config file
2859 [AWT-EventQueue-0] INFO  Main  - Got 448 bytes from the registry query

Sorry, I should have mentioned that it wouldn't run with the "firstRun=true" - but the log from that run would hopefully let me know what I needed to know to fix the crash. I do see now that you're running Win7 32-bit, which I unfortunately have no way of procuring. I might be able to try on Vista :)vomit:) 32-bit, though.

You're right about the saving of scenario locations though, good catch. The Java methods I was using to save the auto-save preferences weren't as predictable as I thought they were, and sometimes that caused problems. So I've figured out how to put that part of the program on a tighter leash, and am creating a new version with that fixed, as well as more graceful handling of the registry query issue you encountered (it will ask you where Civ3 is installed instead of not working). It should be available quite soon.

In the meantime, if anyone else has tested the editor with the Steam version of Civ3, or Win7 32-bit, or both, I'm curious to know if it's working.
 
This is a bug-fix version. Bugs fixed:

  • Settings not always saving correctly [since version 0.63]
  • If the program cannot determine where Civ3 is installed from the registry query, it will ask you instead, even if it can tell Civ3 is installed [Windows only]

Download here.
 
MeteorPunch, I was able to test the editor in Server2008R2, which is the server version of Windows 7, and was able to figure out that the error you encountered is because Microsoft changed their registry utility to separate components with four spaces instead of one tab in either Vista or 7 (haven't tested in Vista, but my guess is that's where it changed). It's a bit more inconvenient to parse with spaces, since the install path can also contain spaces, but I've updated it so that auto-detect now works on Win7 as well, and the next release will include that update.

In the meantime, if you encounter any more issues, let me know. I'd been expecting that if anything OSX would cause cross-platform issues due to being significantly different from XP where I write the code, but go figure that it would be Vista that causes OS-specific issues!
 
MeteorPunch, I was able to test the editor in Server2008R2, which is the server version of Windows 7, and was able to figure out that the error you encountered is because Microsoft changed their registry utility to separate components with four spaces instead of one tab in either Vista or 7 (haven't tested in Vista, but my guess is that's where it changed). It's a bit more inconvenient to parse with spaces, since the install path can also contain spaces, but I've updated it so that auto-detect now works on Win7 as well, and the next release will include that update.

In the meantime, if you encounter any more issues, let me know. I'd been expecting that if anything OSX would cause cross-platform issues due to being significantly different from XP where I write the code, but go figure that it would be Vista that causes OS-specific issues!

Windows, keeping you on your toes! :)
 
Version 0.66 introduces several changes:

  • You may now change the font the editor uses. In addition to Tahoma, the previous default, you may now choose Arial, Lucida Sans, and Trebuchet MS.
  • The log will now be automatically cleared after reaching 1 MB in size. It probably didn't get that big unless you had debug mode on, but just in case, it will now make sure it doesn't eat all your hard drive space
  • Fix so that the oldest auto-save will always be the one overwritten, even after a restart
  • Auto-detect fixed on Vista and Windows 7 (thanks MeteorPunch)
  • ".biq" will be automatically added to the save-file name if you don't add it
  • The titlebar will be updated to reflect the new name of a BIQ if you save it with a new name

Some backend support for BIX (Play The World) files has also been added, but it is incomplete. As of this version you will be able to open at least some BIX files, but you won't be able to save them. Vanilla files are still entirely unsupported.

Map support, meanwhile, progresses, although it is not enabled in this version. I've nearly completed overlay support, except adding cities and a few details such as Play The World custom names for individual units, but have at least one more major hurdle left in terrain modification. The gist of the issue is that you can't place just any terrain next to each other in Civ3 - for example you can't have tundra next to plains or desert, because there's no graphics file that supports tundra being next to plains or desert. :rolleyes: Clearly map modification is necessary, but it isn't the most elegant part of the Civ3 specifications or the most fun to program.

I'm thinking of taking a look back at feature requests and seeing what sounds feasible to implement. I think I'll need to do the terrain modification on an enthusiastic day, perhaps with a more than ample supply of chocolate.

Link.

Windows, keeping you on your toes! :)

Can't make it work too easily!
 
I think I'll need to do the terrain modification on an enthusiastic day, perhaps with a more than ample supply of chocolate.
Have you looked at maptweaker? Maybe there's some clues in its code? Where do we send the chocolate?
 
Version 0.67 is a performance release. But rather than focusing on loading BIQ files, the focus this time is on program startup. The program now starts in approximately 33% of the time it took previously.

Do note that this is after any loading work that Java itself has to do, which I have no control over. Thus, the first time you load this version after booting it might only seem 10% or so faster. But if you start it a second time, or after running any other Java program, it ought to start in about 33% of the time that version 0.66 would in the same situation.

As you'll notice right away upon starting this version, the tabs are gone. But fear not, they'll appear once you open a BIQ or SAV file.

Download link here.

Have you looked at maptweaker? Maybe there's some clues in its code? Where do we send the chocolate?

I haven't looked at MapTweaker, actually. I'll have to look more closely at that. As for the chocolates, the store five minutes from where I live actually does have a pretty good supply of chocolate, so it's not too difficult to acquire some. :)
 
Just as a note:

On my computer, I cannot simply double-click a jar file to run it... I need to go to DOS cmd prompt and do it from there (pain in the butt).

But if you have problems similar to this; you can try making a .bat file:
1) Make a regular txt file (I named mine ConquestsEditor.txt) in the same directory as the jar file
2) open it and enter this text:
java -jar ConquestsEditor0.67.jar
* The name ConquestsEditor0.67.jar must be the name of whatever jar file you wish to open; if a new version comes out, or it's another jar file, make sure the correct filename is in the bat.
3) save
4) rename it to ConquestsEditor.bat
5) the .bat file will open the jar. I wish I would have done this sooner. :lol: Save me alot of carousing through the lands of the DOS emulator.

You can have the bat file wherever you want, just include the appropriate path in the .bat

Now, I can really jump into to using your editor... and you are right about the performance increase. I can continue hunting for illegal but working BIQ unknowns!
 
Whenever I try and add anything (resource, unit, building, government, tech... anything) when I go to load the scenario the game freezes. It won't even select the file let alone run it.

What can I do?

I have made sure to include a civilepdia entry, even simply copying an existing one but to no avail.

Also, if I make any change to a unit except shield/pop cost or movement, it becomes unbuildable once I get into the game. Even increasing say the attack of a unit by 1 renders the unit unnavailable.

I'm running Civ3 Complete for Mac
 
Top Bottom