Cross-Platform Civ3 Editor

Cross-Platform Editor for Conquests now available! 1.48

Oni Ryuu,

Disclaimer: I don't know how exactly the coding is done, but I do have coding background and I have played around with the default behavior.

That being said, either:
*Flat out impossible (the unit type is set to 1, 2, or 3, with 1 corresponding to land, 2 to water, and 3 to air, so you literally can't pick multiple types)
*This will behave as whatever the game checks for and finds first (such as, if it has an air flag at all, it will always be treated as an air unit regardless of the other types checked)
*This crashes the game
*It behaves as if it were a mix of unit types, but in an unpredictable way, and the game's code will have to be highly inefficient.

There are two primary properties units of land/water/air types have. Legal movement tiles, and "priority victory". For legal movement tiles, you need to have some way to determine what tiles the units can move on. Land units can only move on land tiles, water units can only move on water tiles, and air units can move on all tiles. Water and air units also cannot capture cities, only land units. Also water units can only be built in coastal cities as a further restriction.

Other than legal movement tiles, the class of unit is used to determine who will win when attacked, where it goes as Land beats Water beats Air units. For example, if you removed immobile from a fighter, you can fly around and directly attack land and water units, but if you are attacked in turn, it automatically is destroyed. For water units there isn't an equivalent, as you can't use water units to attack cities directly, the only places where land units can interact with them, but if a land unit attacks a city with a water unit, it automatically destroys them. Same with air units.

The movement system and priority victory system will run into problems if a unit belongs to multiple types, and how it will probably work, is that either one of the types is a default type (probably land) and the others are flagged as non-default and thus will take priority if it is checked. If two non-default types are checked (such as water and air) then one of them will take priority over the other present because code can only check for the presence or absence of one flag at a time.

For example, assume there is a default type, and assume it is land (it doesn't matter which, just swap land with water or land with air). Now assume the code checks for the "air" flag before it checks for the "water" flag when executing unit actions, before defaulting to land behavior. If the unit is checked as land, water, and air, it will first check for the air flag, find the air flag present, and treat it as an air unit, ignoring the water flag. If it was land and air flag checked, same thing. If it was land and water, it will not find the air flag, and then find the water flag, and execute it as if it were a water unit.

Now assume there is no default type, so each unit has a flag, rather than a default type, but it still checks it in the same order (first for air, then water, then land). Same thing will result. This is pretty sloppy coding though, because of the case if no type is chosen, and one of two things will happen. Either, it will crash the game because there is no default behavior for none-flags, and the game won't know what to do, or it will not be allowed to move on any terrain, and for the priority victory it will either be at the very top of the list (assuming it can even attack at all), or at the very bottom, leading to instant destruction (so basically a Piñata unit which does nothing but die when attacked).

The only possibility of it behaving differently from these would be if it applies the "property of water units", or "property of air units", or "property of land units" based on the presence of the flags when doing actions. This is *very* sloppy code, as you are doing stupidly huge amounts of unnecessary calculations for every action, and this has many possibilities. Either it overwrites it, behaving similar to the first example, it will crash the game because of some weird interaction between the code (such as simultaneously being able and unable to attack cities), or it will move as an air unit (it can move anywhere) but not be destroyed upon attack like a land unit (if it has at least the air and land flags checked), or some mix of actions based on however the natural attributes of each flag come into play. Oh, and in the null types selected case, you will also have the Piñata unit again.
 
Hi Bluemofia
I thought I t was unlikely. Other examples of mixed code like AI strategies show that the code doesn’t cooperate. If it finds the code for the dominant class the end of code trigger will prevent it from looking for more code so it would never benefit from adding another class.
If I understood everything you said, several areas of the main code would need to be edited just to enable it to continue to search. It looks like just enabling the option in the editor won't do anything.

I keep hoping to find an undiscovered feature of the game that’ll make things new and exciting again.
 
:wave: I'm back. Took a bit of an unplanned summer vacation after my previous post; I think it was programming fatigue resulting from an unusually boring project at work. Maybe combined with summer weather. At any rate I've been making a few updates over the past couple weeks, around reordering techs and units. I think techs is ready to go.

I'll likely edit this post a few times as I catch up on posts.

@Oni Ryuu - I took a look at the BIQ you posted, and the error I was running into was related to not being able to find the unit icons, and was producing issues like what you described. As reinstalling fixed the problem, my guess is something got out of sync between the scenario search path and where the units_32.pcx file was actually located. For whatever reason the editor couldn't find the units_32.pcx for the scenario, so it fell back on the default, which had fewer icons. Most of the early units in the list have low icon numbers, and worked as expected, but once you hit one that's in the upper 300's or so, it starts running into issues due to the icon not being available.

The editor could definitely handle this more gracefully, however, and also provide notification that it can't find the icon. I've added an issue for this so it will be handled more gracefully, which will likely be done once the unit swapping is wrapped up. Also, thanks for posting the .biq and describing what happened; I probably wouldn't have chanced upon the icon index issue otherwise.

Is the actual limit still 65,536 tiles as the in-editor help states? I thought it was more, but i haven't tested the limits in so long i'm not sure.

Yes. However, it's 65,536 total - the game itself doesn't care if there are more than 365 tiles in a particular direction, as long as the overall limit is not exceeded. Firaxis's editor enforces it per-direction, probably for simplicity, but the game doesn't.

-----------------

Oni Ryuu and Blue Monkey - Your discussion of isometric tiles is accurate. And indeed, that was one of the more complex features to figure out, along with zoom. Definitely took some paper and pencil to help figure out how to do that.

---------

Oni Ryuu and Bluemofia - An interesting discussion on multiple classes. It's almost certainly "flat-out impossible"; in the BIQ the unit class is stored like this:

4 long class 0=land, 1=sea, 2=air

So there isn't a place to put a second class, and since land is 0, I can't readily combine both as is possible with, for example, unit actions (1 = skip turn, 2 = wait, 4 = fortify, etc; thus 6 means 4 + 2 = can either wait or fortify). From a BIQ standpoint, the only possibility is to try setting it to something above 2 and seeing what happens - and there isn't a pattern to establish what that would be. Thus, the most likely variants of impossible IMO are:

- It simply is whatever type it checks for last (and thus as a default) - most likely air.
- The game crashes due to the invalid class
- The unit is none of the above, and likely cannot do much of anything because of code elsewhere that checks a unit's type before allowing it to perform certain actions (similar to what Bluemofia described above).

That said, we could experiment with it. However, it probably would make the most sense if you upload the BIQ you'd like to experiment with, note 1-3 units you'd like to have a new class on (3, 4, 5, etc. - choose which ones you'd want), and I'd edit it in manually with a hex editor. If it proves to be useful, it can be added as an option to this editor, but given the unlikelihood of that, it would make more sense to manually edit it once than to add support to the editor (which would take a lot longer). The class being set to 3/4/5/etc. can still be verified with the BIQ Compare section of the editor.
 
Last edited:
:And indeed, that was one of the more complex features to figure out, along with zoom.

Quintillus, is there a real possibility to change the "ZOOM-out" function of a biq to a "Zoom-in" function. Many units are so detailed, that it would be a pleasure to see them in battle in a somewhat larger format, especially Delta_Strife´s ships. Could you recognize in the Antal1987 Patch Number 4, where the Zoom-function is and how to change it from Zoom-out to Zoom-in?
 
Quintillus, is there a real possibility to change the "ZOOM-out" function of a biq to a "Zoom-in" function. Many units are so detailed, that it would be a pleasure to see them in battle in a somewhat larger format, especially Delta_Strife´s ships. Could you recognize in the Antal1987 Patch Number 4, where the Zoom-function is and how to change it from Zoom-out to Zoom-in?

Be careful for what you wish for you might see more errors that I thought would be hard to see on civ level hahahahah.
 
Welcome back, I hope you had fun.

units_32.pcx file
It’s always better to know the cause of a problem even if it’s stopped being a problem.

I’m about 60% through retyping my game into a new BIQ. Reordering everything has already fixed numerous quirks (that doesn’t mean I’ve lost interest in being able to rearrange information in the editor but reaffirmed its importance).

Thanks for offering to do the test. Write down any questions you need answers to or anything that you need me to do when you return the BIQ or I’ll have to send you the main file.

The result I want is for something to cross land and sea but remain vulnerable to artillery and is not automatically destroyed when an opponent attacks the unit. It would be a bonus if the unit can be marked with sinks in sea and ocean. This would help for vertical take-off, rotor-wing, lighter-than-air and amphibious units.

These two should hopefully answer my questions so I’ll leave the third unit to you.
Osprey PRTO_VE2P
Vanguard ROV PRTO_MD6P

This is the disorganised BIQ so both of the units will be roughly 50th from the end.
 
Thanks! I wasn't actually on vacation-vacation the whole time, just Civ/CFC vacation, but there was some real vacation in there too and some decent travel.

I created two .biq files off of the one you uploaded, one with the Osprey having unit class 3, and the other with Vanguard ROV having unit class 4. Thought about doing both, but then thought what if one works and the other breaks? Best to be able to try them separately. Here's the Osprey file and the Vanguard ROV file.

I've only been able to test them in my editor, as I'm having some issues with Firaxis's after a Windows reinstall and taking a shortcut on getting Civ back and running, and in-game I can't load it due to not having all the Civilopedia icons and so forth. But, if you go the the BIQC file in my editor and export the Units section to a .txt file, you can see that the Osprey/Vanguard ROV have a unit class of 3 and 4, respectively. If you select them in the unit list, they will show as the class of the previous unit selected, and will print a warning in the editor's log.txt file due to the unexpected value. Saving after selecting them will set the class to whichever is selected. So I'd recommend testing it as-is and seeing if anything useful happens, although as long as you don't select those units the unusual classes should remain.

@Civinator - I'm afraid that unless there's already something changed related to zoom in the patches, that's almost certainly outside my area of expertise. Checking the thread, I don't see anything about zoom having been changed by Antal1987, unless I'm missing something? Unfortunately being able to do what Antal1987 did would require a completely new skill set for me, and a very non-trivial one at that. If Firaxis designed a fun, sporty car in Civ III, what I've done is like figuring out how to add a rotary engine to make it a bit more fun and a bit more sporty, whereas Antal1987 was making progress on converting it into a time-traveling DeLorean with gull-wing doors.

Being able to support more detailed graphics would be on my short list of changes for a remake, though. Now that we have 4K TVs and even laptops, it certainly would be nice if some of that real estate could be used for more detail instead of just seeing more and more of the map at the same time.
 
TECH Preview Available

Since it's been awhile and my schedule is looking too full this week to realistically be likely to finish 1.10, I thought why not make a preview of re-ordering items available? This is a TECH preview in two senses of the word - a preview of the swapping tech, and it happens to be on the TECH tab.

You can download it here. Note that it is not intended to replace 1.09 yet - and it will prevent you from saving the .biq if you try to re-order units (PRTO), as there are known issues there, especially around items on other tabs that point to PRTOs which are re-ordered no longer pointing to the correct one after a re-order.

If you go to the TECH tab, you should see a new list of techs, with zebra striping, and taking advantage of all vertical space on tall monitors. This is the new, re-orderable, filterable tech list. You should be able to drag and drop techs to reorder them, and it will most likely work as expected. I haven't found a new bug in about a week. However, it is tested much more lightly than most releases.

It's possible, though unlikely, that you may see the old TECH list instead. This is because some of the code depends on a semi-recent (2014 or 2015) Java update, and rather than behave unpredictably, it falls back on the old list if that update is not present. Updating Java and restarting the editor should give you the new list.
 
Quintillus, thank you very much for your answer. :) As you said, Antal1987 did not change anything about the zoom-function and unfortunately I forgot to ask him about that option. As you are the first "Civ 3 genius", who spoke about the zoom-function, I hoped you could recognize the pattern of that function in a hex editor and then we can experiment to find what numbers must be changed here to convert the zoom-out, that nearly nobody is using frequently, to a zoom-in, especially as the editor has more levels of zooming.

I´m still dreaming of a "time-traveling DeLorean with gull-wing doors" :D, but your "fun, sporty car with an added rotary engine" is also very nice. :goodjob:
 
I forgot to send the BIQ in debug mode so I had to activate it after you edited them. I made sure not to do anything other than activate debug mode and I didn’t notice anything unusual. Both units started as land units and both behaved as they did before, so I would call this a dead-end.

It would take more stringent testing to see if it does anything in combination with something else but I wouldn’t subject either of us to that.

One of the main reasons for wanting the test is because I need a method of transporting immobile units to an allied beach by ship. If you share a landmass you can just use land transport units and handover the cargo but there isn’t a method for a homogenous island. Can you think of anything worth trying?
 
Civinator, I see now why you were asking me about zoom. I meant that the zoom in this editor was among the most difficult things to figure out in the editor, along with importing maps from images.

Oni Ryuu - Bummer on it not changing anything, but I'm not surprised. The code must check for sea or air, and use land if the class is neither 1 nor 2.

It isn't possible to transport land transports on water transports, is it? The only other things I'm thinking of are unit-based teleportation, and perhaps airdrops? Certainly each would have its potential tradeoffs (the airdrop range would probably have to be quite large), but that's what I can think of currently.
 
You can make a unit (I’ve referred to them as export or proto units) whose only purpose is to upgrade to a line of king units.

E.g. Export Vehicle can be built as normal and has no stats. This unit can be transported overseas, stockpiled or exchanged with a neutral or allied nation. The unit can then be upgraded in a barracks (or dry-dock for ships) and then act as a land transport at your level of technology.
If you wish to trade; the receiver must capture the unit/s with a nationless unit to prevent an act of war.
I haven’t found a way to export aircraft because they’re automatically destroyed instead of being captured.

I’m using something I’ve called a foreign airbase as a telepad for helicopters. To restrict its use you must airlift it to an airfield and allow an allied nationless unit to capture it. it’s a pain in the ass to do but it’s a partial solution.
The only other workable solution is to give a city to the nation of the arriving ship for the time it unloads. You’d need a proto transport vehicle to first upgrade then move the immobile goods outside of the city so they can be captured otherwise they’d be destroyed when the city is returned.
The simple answer is to un-immobilise them but everyone will just drag them in a stack negating the main purpose of land transports.

It’s a shame that we couldn’t unlock a new feature but I really appreciate you trying.
Thanks Quintillus

EDIT: Aircraft can function as export/proto units. I must have missed something when I was testing it.
 
Last edited:
Is there a simple way to "clone" a civ? To make a second civ with the same properties as the first without having to re-enter everything manually? As a specific example: making a second dinosaur civ for the Jurrasic Park scenario.
 
Is there a simple way to "clone" a civ? To make a second civ with the same properties as the first without having to re-enter everything manually? As a specific example: making a second dinosaur civ for the Jurrasic Park scenario.

Not currently within the editor. Although that is an interesting idea. I believe I could do this fairly quickly within a hexadecimal editor, though.

Still making slow progress towards swapping PRTOs. Roughly 2/3 of the way here. Have been sidestepped by re-uploading my Civ3 Story & Tale, after realizing it was no longer available due to Photobucket changes. On the plus side, I'm actually enjoying going through my old story again. You never know how well your writing will hold up a decade later, but I'll take what I wrote shortly after joining CFC despite being 17 at the time.

Got the Map tab working on Sunday, and also fixed a bug I noticed for the first time; the PRTO and PLYR tabs still need updates when swapping PRTOs.
 
Not currently within the editor. Although that is an interesting idea. I believe I could do this fairly quickly within a hexadecimal editor, though.
...
Got the Map tab working on Sunday, ...
There are many scenarios where culture groups share the same basic unit lines & have flavor units in some slots. Same goes for city improvements, tech lines, etc. Editing is quicker than building from scratch in those cases.

Maybe you will add the idea to the bottom of the "someday" heap. Maybe it's not feasible. Just thought I'd share the general concept.

Glad to hear the map functionality is still receiving attention. Got some bmps ready to test when you post the next version.
 
I’m glad to hear that the reordering function is on its way but it sounds like a Gordian Rubik's Cube. I hope it’s not cost you too many keyboards.
Spoiler :

upload_2017-9-28_20-46-29.png
 
There are many scenarios where culture groups share the same basic unit lines & have flavor units in some slots. Same goes for city improvements, tech lines, etc. Editing is quicker than building from scratch in those cases.

Maybe you will add the idea to the bottom of the "someday" heap. Maybe it's not feasible. Just thought I'd share the general concept.

Glad to hear the map functionality is still receiving attention. Got some bmps ready to test when you post the next version.

That makes sense as a use case. The good news is once I get reordering working, cloning (even if it puts the unit/etc. after the source unit in the list) should be comparatively easy. I can re-use the reordering work for inserting units at random places in the list.

I should clarify for the map that what I got working was the map tab working with switching the order of units. I do plan to continue showing the map tab some more attention in the future, but it likely will remain essentially the same in 1.10 as 1.09.

I’m glad to hear that the reordering function is on its way but it sounds like a Gordian Rubik's Cube. I hope it’s not cost you too many keyboards.

Haha, fortunately not, I tend to take breaks rather than take keyboards to monitors when frustrated. At this point reordering is mainly a lot of t's to cross and i's to dot, since I've figured out the basics of how to do it. But there are still a lot of those t's and i's, particularly since missing a single one could result in odd and tedious-to-fix behavior such as all of one unit on the map becoming a different type of unit, or all the upgrade paths being off by a unit, and no one wants to run into that.
 
Hi Quintilus,

I have a slightly odd bug. And to make it slighltly more oddly and annoying it does not show up regulary.

After adding a new unit, these units frequently (but not allways) lack the "go to" button, despite all order buttons activated.

Normally the button reapears after removing and readding the mark in the checkbox and saving again. But I have still some units lacking the button.

Another point is the otherwise nice "select icon" in the unit menu. As it lacks a scrollbar, one can only select the unit icons from the top part of the units_32.pcx. As I have reached icon no. 1228 (with lots of gaps!) I still have to enter the value by hand.

I am using the latest version 1.09.

And just an idea: Could it be possible to add in the titlebar a signal to show, that the current project has not been saved after the last alteration (Like the star in the titlebar in the Firaxis edtitor)?

Thanks a lot!
 
Last edited:
Hi Quintilus,

I have a slightly odd bug. And to make it slighltly more oddly and annoying it does not show up regulary.

After adding a new unit, these units frequently (but not allways) lack the "go to" button, despite all order buttons activated.

Normally the button reapears after removing and readding the mark in the checkbox and saving again. But I have still some units lacking the button.

Another point is the otherwise nice "select icon" in the unit menu. As it lacks a scrollbar, one can only select the unit icons from the top part of the units_32.pcx. As I have reached icon no. 1228 (with lots of gaps!) I still have to enter the value by hand.

I am using the latest version 1.09.

And just an idea: Could it be possible to add in the titlebar a signal to show, that the current project has not been saved after the last alteration (Like the star in the titlebar in the Firaxis edtitor)?

Thanks a lot!

I've added both of the first two to the issue-tracking system, as items 70 and 71. I'm not sure what's going on with "go to", but I think that is stored differently in Vanilla vs PTW/Conquests, so perhaps there's an error somewhere causing it to store it in the wrong place. Is there any pattern to which new units it happens with? It also sounds like it looks okay in the editor, but "go to" isn't actually available in game?

Good point with scrolling for Select Icon. I hadn't thought about units_32.pcx files of unusual size when creating that dialog.

I haven't added change detection a la Firaxis editor because the obvious and most straightforward way of doing it - setting a flag that something has been changed every time you click a check box, type a character, add a unit, etc. - is also a very tedious task. Most of the check boxes, text boxes, and so forth don't actually do anything immediately upon being clicked/typed in currently, so having them do so would require adding close to a thousand events.

However, what might strike the right balance of being useful, but not being extremely tedious to implement, could be updating the save status on switching, for example, from one tech to another or from the tech tab to another tab. This already triggers an update of the tech (based on any changed check boxes, etc.), so it would not be particularly difficult to check whether any changes have occurred for that particular technology at the same time. It wouldn't be quite as immediate as checking a box and having the * appear, but would likely take a small fraction of the time to add.

Good timing on the idea, I was just addressing a slightly different case of detecting changes in an application at work without also resorting to the thousands-of-individual-events solution, so while a month ago I might have said "that's too much effort", tonight I thought about how I solved the problem at work and realized a variant of the same approach would probably be possible here.

I've now added that one as issue #72. Also thought of a quicker way to do it than when I first added this post.
 
Last edited:
Yes, all checkboxes in "standard orders" are marked, but in the game itself the "Go to" order is missing. All other standard orders ("Fortify", "Disband", "Explore" and so on) are available.

This happens to all unit types (air, land, sea).

Yesterday I had added two land units und two air unit to see if I could locate anything.

To my surprise the land units and one air units have their "Go to" order, but the second aircraft has not. :confused:

In the editor they look exactly the same (except one being a Martin Bomber and one being a Mosquito Fighterbomber ;) ).

A typical example is the Tiger(P) Heavy Tank:





Some of its surrounding units have the "Go to" order. Others do not, despite added in the same editor session.

Thanks!

EDIT: added example Tiger(P)
 
Last edited:
Top Bottom