Resource icon

C3X: EXE Mod including Bug Fixes, Stack Bombard, and Much More Release 23

@Flintlock would it be possible to prevent units from being built if the building that is a pre-req (e.g. I made tanks require a factory) exists anywhere in your empire? For example, I have Cavalry obsoleted by Early Tanks and Early Tanks require a factory. However, if the city doesn't have a factory it can still build Cavalry. I'd like it to so Cavalry couldn't be built anywhere once Early Tanks can be built in any city.

My memory is fuzzy, but I thought someone in this thread mentioned a way to make units which you can't build but which nevertheless make other units obsolete (maybe with the king flag?). If so, you could (almost) achieve your desired feature using two of Flintlock's features: Leave the factory as an in-city pre-req for tanks, but also make the factory produce a resource Q. Add a unit that obsoletes cavalry which requires Q. That way any city connected to the city with the factory cannot build cavalry.
 
@Flintlock would it be possible to prevent units from being built if the building that is a pre-req (e.g. I made tanks require a factory) exists anywhere in your empire? For example, I have Cavalry obsoleted by Early Tanks and Early Tanks require a factory. However, if the city doesn't have a factory it can still build Cavalry. I'd like it to so Cavalry couldn't be built anywhere once Early Tanks can be built in any city.
Assuming that (in addition to the loss of its .biq-flag effects) building-obsolescence also cancels any config-provided ability to build specific units(?), there might be a simpler option.

If my assumption is correct, and if you still have Improvement-slots available in your .biq (or an existing building which could be assigned some additional functionality, but is also potentially expendable), you could therefore set the scenario.config to have Cavalry (or even all Horse-based units) also require a building (e.g. a "Riding Stable"), which would become obsolete with the same tech which allows Tanks to be built.

This should then allow Cavs to be built in any town with a Stable (also benefitting from any Factory production-boost) up until the point when the Tank-tech is learned, but not afterwards.
 
Okay, this is weird. Barbs are set to raging (new, random game opened to 'set' the barb level), but for some reason they're suddenly disappearing from camps, leaving them empty. This happens early game and forward, isn't other civ's killing them, and is a new behavior. I've definitely played with C3X where this did NOT happen (both barb settings in config set to 'true').

Frankly, I'm dumbfounded. Any thoughts or suggestions would be appreciated. I don't doubt it'll be something I mucked up, but my troubleshooting hasn't revealed a culprit.

Edit:
I should probably add that I'm playing a personal 'epic' mod, of sorts. I've learned my way around the editor fairly well (thanks to civfan contributers), but I've poured thru my *.biq several times without success. In any event, I can't think of any recent changes that would be remotely related to this issue.
 
Last edited:
Would it be possible to have a configuration page within the game. For example, at one point there was discussion about rail movement remaining infinite or perhaps being "downgraded" to 10 to 1. I can easily imagine people who would like to keep the original infinite rail speed as well as people who would like 5, 10 or 20 to 1 speeds. Having a setup page with the various options allowed by this mod would certainly ease experimentation.
 
Okay, this is weird. Barbs are set to raging (new, random game opened to 'set' the barb level), but for some reason they're suddenly disappearing from camps, leaving them empty. This happens early game and forward, isn't other civ's killing them, and is a new behavior. I've definitely played with C3X where this did NOT happen (both barb settings in config set to 'true').
Do the barbs control any cities when this happens? When barb city capturing is enabled, the mod runs the normal econ logic for the barb player so they can have city production. That logic charges players unit maintenance as long as they have at least one city. I think what's happening in your case is the barb player is going bankrupt from maintenance on all the spawned barbs and then those units are getting disbanded.

I should be able to fix this by making units maintenance free if they have a barbarian tribe ID set, which should cover barb units that were spawned in but not any units built in cities. In the mean time, since you're playing your own scenario, you could create special unit types just for the barbs and give them the king flag so they're maintenance free.

Other than this issue, is barb city capturing working properly? (Anyone who's played with it, please share.) I marked it as experimental but never got much feedback so I don't know how well it works.

Would it be possible to have a configuration page within the game. For example, at one point there was discussion about rail movement remaining infinite or perhaps being "downgraded" to 10 to 1. I can easily imagine people who would like to keep the original infinite rail speed as well as people who would like 5, 10 or 20 to 1 speeds. Having a setup page with the various options allowed by this mod would certainly ease experimentation.
I've thought about this but the problem is it would require so much work. Back when the mod config had only true/false and integer options, this would have been feasible since I could have generated the in-game controls automatically, but now there are so many special options like the per-era names that would require custom code. And generating the UI controls is only half the problem, the other half is writing the changed settings back out to a config file.
 
Do the barbs control any cities when this happens? When barb city capturing is enabled, the mod runs the normal econ logic for the barb player so they can have city production. That logic charges players unit maintenance as long as they have at least one city. I think what's happening in your case is the barb player is going bankrupt from maintenance on all the spawned barbs and then those units are getting disbanded.
Yes, they have one city now, at least in N. America on a large/huge earth map. They also have a lot of camps too. In the game I first noticed this, I played long enough to where they should've been spawning their advanced units, but they seemed to stop spawning altogether; and, yes, they had a city or two.

A unit maintenance penalty would certainly explain both the disappearance and non-spawning of barbs. Come to think of it, I think I recently altered the 'bankrupt' setting; it's a long shot, but I'll try changing it back to see if there's a difference.
I should be able to fix this by making units maintenance free if they have a barbarian tribe ID set, which should cover barb units that were spawned in but not any units built in cities. In the mean time, since you're playing your own scenario, you could create special unit types just for the barbs and give them the king flag so they're maintenance free.
Okay, thanks for the workaround. If my above experiment proves fruitless (probably), I'll follow your suggestion to, hopefully, keep the barbs relevant longer. Also, as you suggest, making them maintenance-free in a future patch would seem a sensible fix. Although they capture cities, they don't seem to have any workable tiles, and so paying maintenance for non-city barbs is a bit crippling.
Other than this issue, is barb city capturing working properly? (Anyone who's played with it, please share.) I marked it as experimental but never got much feedback so I don't know how well it works.
Overall, I think what you've done for barbs is great; they're a true background threat that every civ has to contend with. I'll keep you informed on either/both of the above changes if they make a relevant difference.

The idea you proposed earlier of being able to set more advanced units (vs. only one now) would contribute to them being a potential factor for longer. If you don't mind another suggestion: when the barbs capture a city, it'd be cool if they had workable tiles -- again, making them more relevant, combined with your idea, to advance enough to manufacture more and stronger units. But maybe you've already considered and discounted this pragmatically.
 
I can confirm that in my experiments playing as the barbs with c3x, i was continuously bankrupted by maintenance on spawned units and had to keep modding my save to add more money to 'win'!
 
Okay, this is weird. Barbs are set to raging (new, random game opened to 'set' the barb level), but for some reason they're suddenly disappearing from camps, leaving them empty. This happens early game and forward, isn't other civ's killing them, and is a new behavior.
In the game I first noticed this, I played long enough to where they should've been spawning their advanced units, but they seemed to stop spawning altogether
One easy thing I would do first, just to rule it out, is check if the barbarians actually have an advanced unit set? I mean, since the normal barbs are working, but the advanced ones are not? It's in the General Settings tab. Even if you haven't touched this, the units here can change every time you add or delete units to the mod.
Overall, I think what you've done for barbs is great; they're a true background threat that every civ has to contend with.
Agree on this.
 
OK, I get that for some (many, most?) of the settings an in game configuration screen would be problematic. Would it be feasible to have a configuration screen for a subset of the total possible configurations? Maybe some of the simplest/most common settings?
 
Paratroopers and helicopters are no longer useless. Yay. Got to the modern era play testing my mod and finally got around to playing with the paratrooper and helicopter using the "dont_end_units_turn_after_airdrop" setting. I was dropping Modern Infantry units left and right during my conquest of the Russians and dropping Paratroopers and then Special Forces into a neighboring island as I fought the Greeks on another front. Good times!
 
I should be able to fix this by making units maintenance free if they have a barbarian tribe ID set, which should cover barb units that were spawned in but not any units built in cities. In the mean time, since you're playing your own scenario, you could create special unit types just for the barbs and give them the king flag so they're maintenance free.
Many thanks, Flintlock, it worked a charm. Both regular and advanced barbs now have UUs, with the "Req. Support" unchecked and the "King" flag set. I think it'd still be beneficial if, as you said, you fix the barb tribe ID, especially if you decide to add the capability for choosing more advanced units. Then I won't have to add more UUs (what can I say, I'm lazy).
 
OK, I get that for some (many, most?) of the settings an in game configuration screen would be problematic. Would it be feasible to have a configuration screen for a subset of the total possible configurations? Maybe some of the simplest/most common settings?
Probably, I think I understand how the game's interface works well enough to implement that. It would make the most sense to do it for the convenience features since they're like preferences instead of game rules. All of those are true/false settings except for draw_lines_using_gdi_plus, which has three options, so that makes it easy. Is that something you would care about? You mentioned the railroad limit but that's more difficult since it's an integer setting.

Paratroopers and helicopters are no longer useless. Yay. Got to the modern era play testing my mod and finally got around to playing with the paratrooper and helicopter using the "dont_end_units_turn_after_airdrop" setting. I was dropping Modern Infantry units left and right during my conquest of the Russians and dropping Paratroopers and then Special Forces into a neighboring island as I fought the Greeks on another front. Good times!
Good to hear. That reminds me: I was going to stop units from airdropping multiple times per turn so they can't travel across the planet in one turn when that option is turned on. One of the reasons I didn't do that before is I had no way to recording that data in the save file so it still would've been possible to allow multiple airdrops by saving and reloading the game. However, I'm working on adding extra save data now. It's long overdue.

Both regular and advanced barbs now have UUs, with the "Req. Support" unchecked and the "King" flag set. I think it'd still be beneficial if, as you said, you fix the barb tribe ID, especially if you decide to add the capability for choosing more advanced units.
I'll do the fix based on tribe ID for R20 since it's a very simple change. Alternate barb units is something I've wanted to do for a while now but I don't know when I'll get around to it. Swapping out the unit type before a barb spawns is simple but the hard part is determining which unit type to use. I'll probably have it tied to a tech set in the config file, something like barbarian_alternate_basic_units = [Gunpowder: Longbowman, "Replacable Parts": Rifleman] so the barbs spawn longbows at gunpowder and rifles at replaceable parts. That still leaves the question of how to determine the tech level for the barbs.
 
I'll do the fix based on tribe ID for R20 since it's a very simple change. Alternate barb units is something I've wanted to do for a while now but I don't know when I'll get around to it. Swapping out the unit type before a barb spawns is simple but the hard part is determining which unit type to use. I'll probably have it tied to a tech set in the config file, something like barbarian_alternate_basic_units = [Gunpowder: Longbowman, "Replacable Parts": Rifleman] so the barbs spawn longbows at gunpowder and rifles at replaceable parts. That still leaves the question of how to determine the tech level for the barbs.
I currently have an advanced unit set with the tech prerequisite of horse riding. However, by the time they start spawning there are few (or zero) barb cities or camps left, making them mostly cursory (on Regent difficulty) for civs in general.

One thing I still notice is that they often leave captured cities undefended, making them easy to recapture. I don't know if that's related to the maintenance issue or not. How difficult would it be to address this? Something, maybe, where they preference defending cities like they do camps.

On a side note: I find it amusing when a civ loses a city to the barbs and another civ recaptures it.
 
Paradropping and then rebasing was too overpowered and unfortunately the AI doesn't know how to rebase with paratroopers/helicopters out on the field. But even being able to drop and do mischief in the same turn is enough to give them a real niche, esp if you mod away the crazy armies.
 
I think that a configuration screen along with the standard Civ III configuration screen would be an attractive option.
 
One thing I still notice is that they often leave captured cities undefended, making them easy to recapture. I don't know if that's related to the maintenance issue or not. How difficult would it be to address this? Something, maybe, where they preference defending cities like they do camps.
The problem here is that the barbs have their own unit AI which never considers that there might be friendly cities. It's easy to fix though, as you guessed, by modifying the barb's tendency to guard their camps to cover cities as well. Basically, at the beginning of the barb unit AI there's a check if the unit in question is on a tile with a barb camp and then if it's the only unit on the tile. If so, it fortifies in place. I can modify that first check to also pass if there's a city on the tile so that way the barbs with guard their cities like they would camps.
 
What is the difference between having a building as a pre-req for a unit versus a building that builds a virtual resource that would be required? For example, instead of having the Factory be a requirement for aircraft, motorized units, and modern ships, I could have a steel mill that requires iron and coal that produces a new resources ... "steel". Both methods seem to serve roughly the same function. What are the advantages of one over another?
 
mr. Flintlock
I want to thank you because your mod (which I consider more a patch) gave me back the pleasure of playing Civ 3 which had some things that bothered me, such as the territory crossed by units without transit permission, I really thank you :worship:
 
What is the difference between having a building as a pre-req for a unit versus a building that builds a virtual resource that would be required? For example, instead of having the Factory be a requirement for aircraft, motorized units, and modern ships, I could have a steel mill that requires iron and coal that produces a new resources ... "steel". Both methods seem to serve roughly the same function. What are the advantages of one over another?
Both methods in their results are only "the same" if the building produces the virtual resource only in that city (local) as the virtual resource is not available in the complete trade net. In that case the default.c3x_config or the scenario.c3x_config can be kept much smaller when the units only need the special resource, what can be a big advantage when creating a c3x_config or the scenario.c3x_config for games that have a big number of units.

If a mod or scenario holds thousands of units, as it is per example the case in CCM 3, you have to write hundreds or thousands of units behind the required building in the c3x_config or the scenario.c3x_config files, while with the methode, that these units need a special virtual resource, you only need a small entry behind the building that produces this local virtual resource. The local virtual resources can keep the entries in the c3x_config or the scenario.c3x_config files and therefore your work much smaller (that is why I asked for this long time ago).

That is why in CCM 3 only the methode with the local virtual resources is used. Otherwise per example I would have to write the names of hundreds of battleship classes, dreadnought classes, battle cruiser classes and pre-dreadnought classes behind a building that equals the local virtual resource "capital ships" in CCM 3. The virtual local resources also in my eyes are more flexible, as they can be produced by different special buildings.

The methode with the building as an additional requirement without a virtual resource, that is produced by that building, in my eyes can be useful, if the unit needs more than the three possible resources as a prerequisite, or if all possible 256 resources in a mod or in a scenario are used otherwise, or if that building should create a "special flavor" for the unit that now can be produced in that city, or if the building is a prerequisite only for a very small number of units.
 
Last edited:
Back
Top Bottom