Cross-Platform Civ3 Editor

Cross-Platform Editor for Conquests now available! 1.51

So, unfortunately, there are no errors in the log. The only hint of what might be an issue (but in theory should only affect saving files, not opening them) is that Civ is installed under C:\Program Files (x86)\. Windows Vista and later tend to protect access to that folder, which has been the root cause of many mysterious "I made updates to my BIQ and re-saved it, but when I re-opened the BIQ, the changes weren't there" type bugs over the years, including with the Firaxis editor. This can apply to Civ saves as well; back in 2007 when Vista was new and I had Civ installed to C:\Program Files\, my saves would mysteriously disappear.

I should really add a warning message about potential issues when those install directories are detected. It's common since it's it was and still is the default, but any of us old-timers who lived through Windows Vista + Civ3 likely learned the hard way to avoid it.

There's a 10-50% chance this is causing what you are seeing; the only way that comes to mind to test it is to copy the whole Civ structure to somewhere outside of Program Files (and Program Files (x86)), change the editor's "Civ Install Directory" in Editor Settings (Ctrl+P) to point to that folder, and try again.

But read on...

This seems to be happening significantly more this year, and alas, never on my machine so figuring out why is quite difficult.

But I would suggest trying this "Windows XP build" and seeing if it works as expected. It included a bundled build of Java, includes a XP_launcher.vbs script to start it, and should work just as well on 10 as on XP. Originally the bundling of Java was only necessary on XP, but it seems to be an increasingly good idea on all versions of Windows nowadays.

launcher.jar was required in the early days as back then Java would restrict itself to low amounts of memory by default - I think 64 MB - and the launcher would tell the editor it could use more memory, which was necessary for map graphics. Over the years, Java became more willing to use more memory by default, so launcher.jar was eventually retired. start.bat was used to launch the launcher on systems that didn't have Java installed at all.

This year, I've seen reports of Java restricting itself to 256 MB again, which on larger maps with graphics enabled is not enough. So launcher.jar may be coming back.

You do get brownie points for checking the HTML documents. I'm glad someone has looked at them!

Let me know if the "XP build" works. If it does I'll probably switch that to the default for 1.45, on Windows anyway. It's more work to build and upload it (while still having the traditional build for Linux/Intel Mac), but if it is solving the "2022 Java issues", that work will be saved in terms of support.

giphy.gif


I was able to get it to work with XP_launcher.vbs! Bad news is, this now means I need to learn how to use it!

First question: Where is the "undo" and "redo" functionality?
 
First question: Where is the "undo" and "redo" functionality?
It doesn't exist. I think I experimented with adding it on the CTZN tab at one point, but it falls into the bucket of "too much effort for a 15+ year old game" at this point. It's something that I've considered adding for the "interesting challenge" aspect of it, but realistically that's the only way it's going to be added.

Instead, auto-saves are created periodically, every 4 minutes by default (configurable via Settings [Ctrl/Cmd+P] -> Autosave). This limits the amount of damage that can be caused, while also providing protection against power loss.

I really dont know what is a problem. I created a map 512x256 with only plains tiles - a lot of place to locate civs. But...
What do you think about this case?
I did a bunch of testing this morning, and it was quite interesting. The tl;dr is that Civ3 seems to have some bugs with loading/placing starting locations on large maps with one terrain.

But 512x256 in particular is one tile too large. There must be at maximum 65,535 tiles, and that map has 65,536 tiles.

Testing with slightly smaller maps, e.g. 512x254, Civ3 often crashed. But if I loaded a smaller map it could handle (a regular scenario, or an all-plains 100x100 map), and then loaded the 512x254 all-plains map, it worked. This behavior was evident across many file sizes. In all cases, the Firaxis editor also opened the BIQ without any problems, and re-saving it with the Firaxis editor did not affect whether Civ3 crashed, just whether Civ3 had already successfully loaded a smaller map.

So the takeaway is:

1. 512x256 is too big. I should probably add a "map is too big for Civ3 to handle" warning.
2. Civ3 struggles with large, all-one-terrain maps, but loads them successfully if it has loaded a previous map first. This appears to be a Civ3 limitation, but can be worked around.

I do not know whether Civ3 would struggle with those large maps if they had varied terrain, or had adequate starting locations placed, but would not be surprised if the lack of variety is contributing to Civ3's struggles.
 
Hey there, lovely editor. It works great and is simple enough for a first time modder such as myself. But I have one question.

How do you rename stuff such as Civs and Units and etc? Because when I click on it, nothing happens. Can you rename?
 
@Quintillus I know the mod doesn't officially support Apple Silicon, but I believe my current error is not related to Apple Silicon, but to folder/file structure using WINE. Perhaps you or somebody else will have a solution.

I can run the editor, but when I try to open a big file I get this error: "Could not find the pcx file. The civ install dir (/Applications/ Sid Meir s Civilization III Complete.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Civilization III Complete) being incorrect may cause this problem. This can be changed by clicking on the settings button. Last hope was /Applications/ Sid Meir s Civilization III Complete.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Civilization III Complete/Civilization 3 Game Data/Art/Units/Palettes/ntp00.pcx"

The correct path for the file ntp00.pcx is /Applications/ Sid Meir s Civilization III Complete.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Civilization III Complete/Art/Units/Palettes/ntp00.pcx.
 
What is the difference between "50% luxury tax effect" and "more lux trade"? Which one gives the happiness bonus to the market place for luxuries?
 
"+50% Lux" boosts the Happyfaces provided by the current Lux-slider setting. No buildings in the epic-game have this property, and the AI can't use it anyway (because it doesn't use the Lux-slider).

"More Lux-trade" increases the number of Happyfaces per Luxury-resource, starting with the third Luxury becoming available through the trade-network. This is the property attached to epic-game Marketplaces.
 
Hey there, lovely editor. It works great and is simple enough for a first time modder such as myself. But I have one question.

How do you rename stuff such as Civs and Units and etc? Because when I click on it, nothing happens. Can you rename?
Welcome to the thread! It's always good to have more friendly neighborhood zombies around!

It ought to be possible to rename it by right-clicking the civs/units/etc. and selecting Rename. Most tabs also support Add/Delete via right-click.
@Quintillus I know the mod doesn't officially support Apple Silicon, but I believe my current error is not related to Apple Silicon, but to folder/file structure using WINE. Perhaps you or somebody else will have a solution.

I can run the editor, but when I try to open a big file I get this error: "Could not find the pcx file. The civ install dir (/Applications/ Sid Meir s Civilization III Complete.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Civilization III Complete) being incorrect may cause this problem. This can be changed by clicking on the settings button. Last hope was /Applications/ Sid Meir s Civilization III Complete.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Civilization III Complete/Civilization 3 Game Data/Art/Units/Palettes/ntp00.pcx"

The correct path for the file ntp00.pcx is /Applications/ Sid Meir s Civilization III Complete.app/Contents/SharedSupport/prefix/drive_c/GOG Games/Civilization III Complete/Art/Units/Palettes/ntp00.pcx.
Ah, that is because the editor has realized it is running on a Mac, and expects the file structure to match what the Mac version of the game ships with, whereas you have the directory structure that matches the Windows version of the game, which makes sense as you are using WINE. Unfortunately, the editor is not aware of WINE.

The Mac version ships with everything that is top-level in the Windows version ("Art", "Text", "Saves", etc., other than the PTW/Conquests folders) as sub-folders. So there's a "Civilization III Game Data", "Conquests Game Data", and either "PTW Game Data" or "Play the World Game Data" folder, and each of those has their own Art/Text/Saves/etc. folders. It sounds like you may have already figured it out given the luxury tax question, but it should be possible to create one new folder to match where it is looking for the Vanilla (no-expansion) assets and move those there, and rename the PTW/Conquests folders as well.

I have written this up in my issue tracker (https://todo.sr.ht/~adj/civ3_cross_platform_editor/182), as something where I could make the editor handle this more gracefully in the future. No promises, I'm mostly spending time on other hobbies nowadays, but it's an interesting case that makes sense but which hadn't come up in the thread previously.
 
Quintillus, I have been trying to change the work rate cap for the various governments, but I cannot seem to get it to save properly. I suspect that I may be doing something wrong. I am trying to increase the work rate cap for Republic and Democracy to 12 and 15 respectively.
 
It doesn't exist. I think I experimented with adding it on the CTZN tab at one point, but it falls into the bucket of "too much effort for a 15+ year old game" at this point. It's something that I've considered adding for the "interesting challenge" aspect of it, but realistically that's the only way it's going to be added.

Instead, auto-saves are created periodically, every 4 minutes by default (configurable via Settings [Ctrl/Cmd+P] -> Autosave). This limits the amount of damage that can be caused, while also providing protection against power loss.


I did a bunch of testing this morning, and it was quite interesting. The tl;dr is that Civ3 seems to have some bugs with loading/placing starting locations on large maps with one terrain.

But 512x256 in particular is one tile too large. There must be at maximum 65,535 tiles, and that map has 65,536 tiles.

Testing with slightly smaller maps, e.g. 512x254, Civ3 often crashed. But if I loaded a smaller map it could handle (a regular scenario, or an all-plains 100x100 map), and then loaded the 512x254 all-plains map, it worked. This behavior was evident across many file sizes. In all cases, the Firaxis editor also opened the BIQ without any problems, and re-saving it with the Firaxis editor did not affect whether Civ3 crashed, just whether Civ3 had already successfully loaded a smaller map.

So the takeaway is:

1. 512x256 is too big. I should probably add a "map is too big for Civ3 to handle" warning.
2. Civ3 struggles with large, all-one-terrain maps, but loads them successfully if it has loaded a previous map first. This appears to be a Civ3 limitation, but can be worked around.

I do not know whether Civ3 would struggle with those large maps if they had varied terrain, or had adequate starting locations placed, but would not be surprised if the lack of variety is contributing to Civ3's struggles.
Thank you! I will try to make a map 480x240. Hope I will solve a problem. I will write later if it will be successful.
 
"+50% Lux" boosts the Happyfaces provided by the current Lux-slider setting. No buildings in the epic-game have this property, and the AI can't use it anyway (because it doesn't use the Lux-slider).

"More Lux-trade" increases the number of Happyfaces per Luxury-resource, starting with the third Luxury becoming available through the trade-network. This is the property attached to epic-game Marketplaces.
@tjs282 I just wanted to follow up on this. When I open the epic game biq in @Quintillus editor the Marketplace has the +50% luxury tax effect flag checked, but not the More lux trade. However, when I open the same biq in Stephen's editor it has the Increase luxury trade flag and NOT the 50% luxury. And when I open the biq in the standard editor the Increase luxury trade flag is checked.

So, it seems in the Quintillus editor that the +50% luxury tag effect is the one that increases the number of happy faces. At least from my observations.
 
Last edited:
If that's true, then those 2 specific building bit-flags have been mis-labelled in the version of the QEditor which you're using, i.e. @Quintillus that is a bug-report!
 
I've missed something along the way. I'm setting up a new W11 machine and the ".jar" is a zipped folder, which, well, only unzips when I click on it.

Edit 1: I'm guessing my installations are somehow not executing it with the "javaw -jar" command ...?
Edit 2: My installs are somehow missing "C:\Program Files\Java."

So: the "upgrade" from W10 to W11 somehow didn't bring Java along with it. Now, with Java reinstalled, all is well :hammer2:
 
Last edited:
@Quintillus I know troubleshooting for an old tool for an old game is not a priority, but I just tried to open the big for the mod I have spent a lot of time and all of the sudden it won't open and I get bombarded with errors. Obviously it has me a little stressed.

I tested in Steph's old expanded editor and it worked. So, then I tried opening in the game and it loaded no problem. I saved a copy from Steph's with a new filename. Same error. I tried loading autosaves. Same error.

I am attaching the log and below are some screenshots. Hopefully, there is an easy way to fix. Thanks.

Spoiler :
Screenshot 2023-01-19 at 11.00.45 AM.png

Spoiler :
Screenshot 2023-01-19 at 11.01.00 AM.png

Spoiler :
Screenshot 2023-01-19 at 11.01.16 AM.png

Spoiler :
Screenshot 2023-01-19 at 11.01.30 AM.png
 

Attachments

@Quintillus I know troubleshooting for an old tool for an old game is not a priority, but I just tried to open the big for the mod I have spent a lot of time and all of the sudden it won't open and I get bombarded with errors. Obviously it has me a little stressed.

I tested in Steph's old expanded editor and it worked. So, then I tried opening in the game and it loaded no problem. I saved a copy from Steph's with a new filename. Same error. I tried loading autosaves. Same error.

I am attaching the log and below are some screenshots. Hopefully, there is an easy way to fix. Thanks.




I took a look at the logs and compared it to the code, and from that I can see that it's failing on the stealth targets section - it looks like a unit has a stealth target of 144, but there are only 144 units (and because it is a computer program, it starts counting at zero, so 144 units means the valid numbers are 0 through 143).

My best guess is that a unit with a stealth target of the last unit in the list (unit 144, when you had 145 units), and when you deleted unit 145, the editor that you were using at the time didn't properly update that unit's stealth target list. That may be this editor and indicate a bug in this editor, or it could be another editor and indicate a bug in that editor. When I am less tired, I'll try to remember to attempt to recreate that scenario and see if I can identify it as a bug in this editor, although if you know that scenario matches what you were doing in this editor, that is also good to know.

Since Civ3 and Steph's editor can open it, and this one can't, I can deduce that Steph's editor and Civ3 either fall back more gracefully when encountering this situation, at least at a surface level. On the other hand, the fact that you re-saved it with Steph's editor and it still didn't work in my editor indicate that Steph's left the error intact - not necessarily surprising if you didn't edit the unit with the issue, my editor would likely do the same if the situation were reversed. It looks like this also hit an edge case where it's possible for my editor to throw multiple errors on load; it shouldn't have tried to read the pedia icons/script files when it tripped up on the base BIQ.

The BIQ may well still play fine in Civ3, although I can't guarantee something odd won't happen when the unit(s) with the invalid stealth target is produced. I can probably fix the issue in the BIQ manually if it is uploaded to somewhere I can download it. In the meantime you may want to look at the list of stealth targets in Steph's editor or the Firaxis editor and see if any of them look like they've been shifted by one or two units near the end, which is likely if the problem is indeed caused by the stealth target list not being properly updated after a deletion.

Bottom line though this looks fixable, the problem is limited to a specific area. Thanks for including the log, I would not have been able to tell where the problem was without a log or BIQ.
 
Awesome @Quintillus. I will see if I can fix in Steph's editor. I was adding stealth attack to a new special forces unit. So, your feedback gives me an idea where to look. Thanks.
 
Hmmm. I removed stealth attacks targets from new units in Steph's editor. Still same error. Then for good measure and to test, I removed stealth attack targets and stealth attack from ALL units including firaxis units like stealth bomber. Still same error. If you get change, can you check the attached biq? I have an older version from a couple of weeks ago that still works and keep tracks of everything in a spreadsheet, it would just be hours of work updating that I'd prefer not to do.
 

Attachments

Hmmm. I removed stealth attacks targets from new units in Steph's editor. Still same error. Then for good measure and to test, I removed stealth attack targets and stealth attack from ALL units including firaxis units like stealth bomber. Still same error. If you get change, can you check the attached biq? I have an older version from a couple of weeks ago that still works and keep tracks of everything in a spreadsheet, it would just be hours of work updating that I'd prefer not to do.
I've investigated a little bit. Three units were throwing the stealth target error - the Airborne, Crossbowman, and Chu Ko Nu.

The Airborne had 7 stealth targets:
numStealthTargets: 7
stealth target: 144
stealth target: 145
stealth target: 146
stealth target: 147
stealth target: 148
stealth target: 149
stealth target: 150

The Crossbowman had 1 stealth target:
numStealthTargets: 1
stealth target: 143

The Chu Ko Nu had 10 stealth targets:
numStealthTargets: 10
stealth target: 110
stealth target: 111
stealth target: 112
stealth target: 113
stealth target: 114
stealth target: 115
stealth target: 116
stealth target: 143
stealth target: 147
stealth target: 118

Anything higher than 142 would cause an error (I think I said 143 the other night but I was tired, and it's 142).

Looking at the Chu Ko No, those targets are:

110 - Javelineer
111 - Mandekalu Cavalry
112 - Brave
113 - Crossbowman
114 - Cho Ko Nu
115 - Assyrian Chariot
116 - Sunka Wakan
143 - Invalid
147 - Invalid
118 - Numidian Cavalry

These have been reset in House Rules 0121.biq (except the invalid ones), but should be validated for correctness. I suspect it is supposed to have two more targets near the end of the list, but don't know which ones those are.

I've also identified a bug wherein the stealth attack target list is not adjusted when units are deleted, which can cause this error. I'll be fixing this bug to prevent future occurrences (and it looks like there's another report to investigate earlier on this page, of a potential different bug, to investigate). In the meantime, it is advisable to use an alternative editor for deleting units that are earlier in the unit list than the maximum stealth unit target.
 

Attachments

I just wanted to register some thanks for your thorough documentation Quintillus! I was trying to get this to run on Ubuntu and originally tried OpenJDK. Then I saw in your first post that you recommended a different version of Java 8. I downloaded your recommended version and things now appear to be running correctly.
 
Quintillus, I have been trying to change the work rate cap for the various governments, but I cannot seem to get it to save properly. I suspect that I may be doing something wrong. I am trying to increase the work rate cap for Republic and Democracy to 12 and 15 respectively.
Do you mean the "Worker Rate" below the "Sci/Tax/Ent Cap"? If so, it cannot be set below 50 unless you set the "Safety Level" to "Exploratory" or lower, which may be required before opening the BIQ. The default value is 100 (unless perhaps you are on a pre-version-12.08 BIQ), so values of 12 or 15 would actually slow it down considerably.
I just wanted to register some thanks for your thorough documentation Quintillus! I was trying to get this to run on Ubuntu and originally tried OpenJDK. Then I saw in your first post that you recommended a different version of Java 8. I downloaded your recommended version and things now appear to be running correctly.
Thank you! It is good to know that writing the documentation was worth it and that it is being read.
 
Version 1.45

Version 1.45 is now available! This version adds one new feature and fixes several issues that have been reported.

Feature

You can now use the shortcut Ctrl+Shift+G to turn on tile coordinates over each tile. Compared to the Firaxis editor, the background for these coordinates is partially transparent, allowing more of the tiles to be visible, and having the grid enabled is optional when having tile coordinates turned on.

1675009399056.png


Fixes

  • The marketplace effect and +50% lux tax check boxes being swapped has now been fixed.
  • The stealth target list for units is now properly updated when a unit is deleted
  • The BIQ length limit of 23 characters for a city name is now enforced.
  • Some recent releases of Java 8 (namely OpenJDK) no longer include the graphics libraries the editor requires. You will now be notified if you try to run the editor on these systems instead of being left to wonder why it won't run.
 
Back
Top Bottom