Resource icon

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

I thought "Flag (Ad)" was supposed to be a resource since you said it was "generated". Yes, if you made it a palace-generated resource then it would only work with a trade connection to the capital.
 
The Lua concept was interesting, but I understand that you don't want to spend that much time on it. :)

I have a few other ideas that came to mind in a recent game:

Would this be possible:
- An option to scale pop-rushing shields by age such as 1x in ancient to 4x shields in modern - The AI notoriously kills its cities by rushing in governments such as communism and fascism later in the game, where turns become more meaningful and cities take comparatively long to get back.
- An option to affect the chance of building retention on capture: It would be nice if you could change the % chance of buildings not being destroyed. It can be quite sad when even the taking of an empty city destroys most things
- An option for "no tech brokering" as it is done in Civ4: Being able to only sell techs you have researched yourself, but not those that you received by trade.
- It has been requested before, but science and production overflows would be really nice for less micromanaging of individual cities/sliders. :)
- A "maintenance factor" for units, where it is possible to make a unit cost X times the government maintenance. For example, modern armor costing 2x as much as generic units, stealth bombers 5x and ICBMs 10x. I.e. if you have free support for 12 units with your cities under republic, and any other unit costs 2 (as per vanilla Republic), having 5 infantry and 5 modern armor would cost as much as "15" units, so you'd pay (15-12)*2=6 maintenance. It sounds a lot more complicated written out than when I thought about it, but I considered this "factor" to be simpler than a flat additional maintenance (because then how would you treat free unit support in non-1-cost governments?).

Can you make it possible to show AI building priority/values also when inspecting a city via espionage? It would be nice when wanting to investigate AI behaviour in a game that was started the normal way. Or a way to switch to debug mode altogether. :D

Edit: As I am reading across the forum again, I get too many thoughts:
- A different text option for units that upgrade to something else, but do not have the upgrade ability. This is only found in custom scenarios, but it would be nice to have the ability to have the civilopedia say "obsoleted by" rather than "upgrades to" in case of a unit going unavailable when a successor comes out, but the individual existing units being unable to be upgraded. I recall such a mechanic from Age of Imperialism, where many units (especially ships) can only be upgraded to a limited extent, but I might of course be mis-remembering and it actually was somewhere else.
 
Last edited:
I have not looked at it, in fact I don't even know what that bug is about, could you describe it? I don't think I've ever played a game of Civ 3 with "capture the princess" rules in play.

Each player starts with one immobile princess unit. The intended functionality, which works fine in PTW, is that when a military unit moves onto to same square as another civ's princess, a button will appear, in the space where worker actions do for a worker, to allow the military unit to pick up the princess, and that one can then carry the princess back to one's own capital and get lots of victory points, following which the princess respawns in the original owner's capital. In Conquests the "pick up" button does not appear, and so far as I know there is no way to make it appear. So there is basically nothing one can possibly do with princess units. (Except sentry them so that you don't keep coming back to them every turn, and the animation for that is wonderfully dismissive.)

I suspect that allowing units to travel on both land and sea is the sort of thing that would be easy to do at a basic level, e.g. by editing one movement function, but would break many other things like combat. We could always try it and see. Other changes to the game's movement rules, limiting railroad movement and restricting trespassing, turned out to be surprisingly easy, for what that's worth.

I will look forward to seeing that if you do get around to it.
 
Last edited:
Each player starts with one immobile pincess unit. The intended functionality, which works fine in PTW, is that when a military unit moves onto to same square as another civ's princess, a button will appear, in the space where worker actions do for a worker, to allow the military unit to pick up the princess, and that one can then carry the princess back to one's own capital and get lots of victory points, following which the princess respawns in the original owner's capital. In Conquests the "pick up" button does not appear, and so far as I know there is no way to make it appear. So there is basically nothing one can possibly do with princess units. (Except sentry them so that you don't keep coming back to them every turn, and the animation for that is wonderfully dismissive.)
I have seen many scenarios using treasure units for capture the flag (or reverse capture the flag), such as Age of Discovery/Imperialism, The Desert and the Mountain, Medieval European Mod II - and I think in all these, enemy treasures can be captured. What exactly are the circumstances where it doesn't work?
 
Thank you Flintlock for the in-depth explanation of the difficulties regarding Lua. I appreciate that you tell us why you make your decisions. It's also nice to learn more about the Civ3 code from your explanations. My best wishes for whatever modding moves you make next!
 
I have seen many scenarios using treasure units for capture the flag (or reverse capture the flag), such as Age of Discovery/Imperialism, The Desert and the Mountain, Medieval European Mod II - and I think in all these, enemy treasures can be captured. What exactly are the circumstances where it doesn't work?

My understanding here, and I would welcome correction from a more experienced modder if there is already a known fix for this, is that the "reverse capture the flag" mode works fine, but the "capture the princess" mode persists in not showing the "capture unit" button. This is listed as #9 among the major Civ 3 bugs in the first post in https://forums.civfanatics.com/thre...gs-and-non-bugs-not-a-dicussion-thread.70063/ (from 2003), though I am on a quick Google finding reports of it as recently as 2018 (https://steamcommunity.com/app/3910/discussions/0/1693785035823676904/); nothing giving definitive identification of the circumstances in which this occurs, alas.
 
Thinking more about (hopefully) relatively minor fixes to C3C, have you looked at the bug that broke "capture the princess" functionality between PTW and Conquests?
The capture the princess option is working very well with C3C and the button to pick up the flag-unit is there. CCM 2.50 and RARR are using this option for the supply shipments in these mods. Victory point scoring must be additionally enabled for that option. Please have a look into the short game hints in the concepts part of your C3C civilopedia. Other than noted in the civilopedia and the Civ3ConquestsEdit this option is also working when the flag unit is not set to be immobile.

Here nothing is broken in C3C, but there is a problem for the AI to convert flag-units, that are produced in the capital, to gold and victory points, as the AI is not capable to draw the flag-unit out of the capital and than return it escorted back into the capital again.
 
Last edited:
The capture the princess option is working very well with C3C and the button to pick up the flag-unit is there. CCM 2.50 and RARR are using this option for the supply shipments in these mods. Victory point scoring must be additionally enabled for that option. Please have a look into the short game hints in the concepts part of your C3C civilopedia. Other than noted in the civilopedia and the Civ3ConquestsEdit this option is also working when the flag unit is not set to be immobile.

Here nothing is broken in C3C, but there is a problem for the AI to convert flag-units, that are produced in the capital, to gold and victory points, as the AI is not capable to draw the flag-unit out of the capital and than return it escorted back into the capital again.
Does the AI know how to use transports to escort the flag unit back to its capital? And does it upgrade the flag unit if it's spawned in the capital? I see the concept of a "booty" unit is the result of enslave. It can either be sacrificed, brought to the capital for cash or upgraded into a worker.
 
I have a few other ideas that came to mind in a recent game:
Would this be possible:
- This should be easy, I could swap out the "Citizen Value in Shields" BIC variable temporarily for the hurry production procedure based on the era of the city in question. That would change the game rule, but I'm not sure how it would impact the AI. There's another reference to that variable that I suspect is in some AI logic but I'd have to study it more. In any case I could probably swap the variable out there too.
- I haven't yet looked at the logic for destroying improvements on city capture, but I can't imagine it's very complex. This should be doable.
- I don't know how difficult it would be to edit the logic regarding what is tradeable. I've never looked at that part of the code before. But, other than that, one challenge with restricting tech brokering is that it would be necessary to record which techs have been traded vs researched by which civs and store that info in the save file. I'd still don't have a way to include additional things in the game's saves.
- Again, this should be doable. I can't think of any reason why it would be impossible, but it might be tricky depending on what specific changes are necessary.
- It would be possible to make some units cost more maintenance than others. It wouldn't require any cleverness, just some work rewriting the function that computes the unit maintenance cost.
Can you make it possible to show AI building priority/values also when inspecting a city via espionage? It would be nice when wanting to investigate AI behaviour in a game that was started the normal way. Or a way to switch to debug mode altogether. :D
This is how it works already. Are you confusing the production ranking with the city location desirability highlighter? The highlighter requires debug mode since it shows you information that's normally behind fog of war, like where the AI players are located. The AI production ranking actually does leak a bit of info about the AI's tech progress, but I decided it was minor enough that it shouldn't require debug mode.
- A different text option for units that upgrade to something else, but do not have the upgrade ability.
This might be awkward to do because the game text is stored outside the EXE. If "Upgrades to" is its own label, though, it should be easy to swap out its text.
 
This might be awkward to do because the game text is stored outside the EXE. If "Upgrades to" is its own label, though, it should be easy to swap out its text.
That text is pulled from the active .biq's corresponding labels.txt file.
 
Last edited:
Does the AI know how to use transports to escort the flag unit back to its capital?
Edit: The link here shows the wrong text, but leads to the intended post.
And does it upgrade the flag unit if it's spawned in the capital?
You can only have one type of such a flag-unit in the general settings.
I see the concept of a "booty" unit is the result of enslave. It can either be sacrificed, brought to the capital for cash or upgraded into a worker.
In CCM and RARR that flag-unit is autoproduced by different buildings.
 
Last edited:
The capture the princess option is working very well with C3C and the button to pick up the flag-unit is there
Just FTR, that button is also working in the Firaxis Conquests "Middle Ages" (3 preplaced "Holy Relic" units, to be taken to the Jerusalem VP-location for 10,000 VP each), "Age of Discovery" (autoproduced "Treasure" units to be brought to the player's capital for gold + VP), and also the "Three Sisters" Scenario (IIRC, actual "Princess" units which appear in the capital, to be 'sacrificed' to the Volcano VP-locations).

The problem (again, IIRC!) is that if the modmaker has not 'permanently' set their mod's Game Rules to activate Princess/Treasure units (and/or VP-locations) by default — or has deliberately left those rules optional and the player then forgets to switch them on (in the "Choose Your Civ/ Opponents/ Difficulty" screen) while setting up their game — then any such units included in the mod may still appear, but will not be usable.
 
- This should be easy, I could swap out the "Citizen Value in Shields" BIC variable temporarily for the hurry production procedure based on the era of the city in question. That would change the game rule, but I'm not sure how it would impact the AI. There's another reference to that variable that I suspect is in some AI logic but I'd have to study it more. In any case I could probably swap the variable out there too.
- I haven't yet looked at the logic for destroying improvements on city capture, but I can't imagine it's very complex. This should be doable.
- I don't know how difficult it would be to edit the logic regarding what is tradeable. I've never looked at that part of the code before. But, other than that, one challenge with restricting tech brokering is that it would be necessary to record which techs have been traded vs researched by which civs and store that info in the save file. I'd still don't have a way to include additional things in the game's saves.
- Again, this should be doable. I can't think of any reason why it would be impossible, but it might be tricky depending on what specific changes are necessary.
- It would be possible to make some units cost more maintenance than others. It wouldn't require any cleverness, just some work rewriting the function that computes the unit maintenance cost.

This is how it works already. Are you confusing the production ranking with the city location desirability highlighter? The highlighter requires debug mode since it shows you information that's normally behind fog of war, like where the AI players are located. The AI production ranking actually does leak a bit of info about the AI's tech progress, but I decided it was minor enough that it shouldn't require debug mode.

This might be awkward to do because the game text is stored outside the EXE. If "Upgrades to" is its own label, though, it should be easy to swap out its text.
 Thank you for the quick feedback! I usually try to limit the ideas to what I consider (from my outsider perspective) relatively simple to implement - but indeed, the tech brokering would probably require a new field to track research origin, which the original devs likely didn't care about. I can see how this would be hard to do. The same thing likely goes for the production overflow, since that value would have to be saved somewhere for future turns. On that topic, maybe multiple production could be interesting as well, a feature from Civ4 modding in some mods that allows a city to complete as many things from its building queue as it has production capacity for. I.e. 80 shields, 1 barracks and 4 spearmen in queue -> barracks and 2 spearmen done in one turn. It really helps keeping the production of low-cost, low-power units viable in lategame stages (in those mods that include the functionality for it).

As for AI pop-rushing, I think the less they use it, the better, they really manage to cripple themselves badly with it, especially in the late game. So no idea at which point it would be best to change the value, before or after its evaluation, depends on how they treat a higher value... maybe it would entice them even more. :crazyeye:


And as always, no pressure, just writing down things that I (and I believe many others) would find useful, but it's all your free time. Always looking forward to whatever things you come up with, regardless of what it might be and whose idea it was. :D
 
The same thing likely goes for the production overflow, since that value would have to be saved somewhere for future turns.
Or it could automatically go into wealth, at least of no new project has been chosen.
As for AI pop-rushing, I think the less they use it, the better, they really manage to cripple themselves badly with it, especially in the late game.
Maybe removing poprushing altogether would make for a better game. The penalty on happyness makes it hardly ever worth it. The one exception relevant for AI would be defending a city. But especially during despotism this can be rather unfun as this has the effect of autodestroying a town of size 1.
 
Or it could automatically go into wealth, at least of no new project has been chosen.

Maybe removing poprushing altogether would make for a better game. The penalty on happyness makes it hardly ever worth it. The one exception relevant for AI would be defending a city. But especially during despotism this can be rather unfun as this has the effect of autodestroying a town of size 1.
Pop rushing in despot is necessary for the AI to put up a decent fight vs human rushes. Facing 1 extra spear makes a huge difference when your attack force is 5-6 vet archers.

Unfortunately, the perfume seems like to make the AI keen on pop rushing. I've seen them pop rushed heavily perfumed granaries. Without the ability to use the luxury slider, this is crippling. I somewhat solve it with an AI only heavily perfumed improvement called "AI Luxury" that costs 0 shields, gives 2 happy faces at the cost of 2 gpt. This helps the AI grow tall (4-5 pop before creating a new settler) during the exp phase.
 
Pop rushing in despot is necessary for the AI to put up a decent fight vs human rushes. Facing 1 extra spear makes a huge difference when your attack force is 5-6 vet archers.
The later is true, but it doubt the earlier. Unless playing below Demigod, AI starts with a plethora of extra starting units. Hence early on AI already has a strong advantage.
 
The later is true, but it doubt the earlier. Unless playing below Demigod, AI starts with a plethora of extra starting units. Hence early on AI already has a strong advantage.
It may start with a huge SOD but that SOD is off hunting barbs. And with no roads it won't be doing anything soon. Cities would often have a warrior and a spear facing a human 4-6 vet archer stack. Use the whip and now you're facing at least 2 standard spears and shall have to pray to the RNG gods.
 
That text is pulled from the active .biq's corresponding labels.txt file.
That's promising. Hopefully there's a function call somewhere that draws just that bit of text onto the screen so I could easily intercept it and swap out the text.
The same thing likely goes for the production overflow, since that value would have to be saved somewhere for future turns. On that topic, maybe multiple production could be interesting as well, a feature from Civ4 modding in some mods that allows a city to complete as many things from its building queue as it has production capacity for. I.e. 80 shields, 1 barracks and 4 spearmen in queue -> barracks and 2 spearmen done in one turn. It really helps keeping the production of low-cost, low-power units viable in lategame stages (in those mods that include the functionality for it).
For simple production overflow it should be sufficient to put the overflow back into the shield box after production completes. I don't think a save could interrupt that. For a full Civ 4 like production scheme, i.e. with progress tracked for each available build option, then of course it would be necessary to store those progress amounts in the save. I'm also thinking about how this would interact with production switching discarding shields. It would be pretty odd if you could have 15 shields of overflow, choose to build a worker, and be left with 15/10 shields in the box. Either you should lose the extra 5 shields in that case or not lose them when switching production. I'm not sure how difficult it would be to allow multiple items to be completed in a single turn, it depends on how the production code is structured.
Unfortunately, the perfume seems like to make the AI keen on pop rushing. I've seen them pop rushed heavily perfumed granaries. Without the ability to use the luxury slider, this is crippling. I somewhat solve it with an AI only heavily perfumed improvement called "AI Luxury" that costs 0 shields, gives 2 happy faces at the cost of 2 gpt. This helps the AI grow tall (4-5 pop before creating a new settler) during the exp phase.
I've been thinking about modifying the AI to encourage it to use its luxury slider more. I've already found where the AI adjusts its sliders so it would be easy to insert a bit of code after that to shift spending from research to luxury as long as doing so converts beakers to food at at least a certain rate. I'd have to experiment to know what that rate should be, maybe 2 beakers is worth 1 food? I'd also weigh the food production by the growth rate of the city it's in, i.e. the size of the food box, and by the corruption rate of the city.
 
That's promising. Hopefully there's a function call somewhere that draws just that bit of text onto the screen so I could easily intercept it and swap out the text.
The problem of "obsolescence" (a unit can no longer be produced, when another unit becomes available, but it should not be upgraded to the newer unit) was discussed in the CCM 2 thread here and in the following posts. In that mod this especially concerns the disappearance of battleships from the production queue when carriers become available, but also balloons when zeppelins can be built. In CCM 2 this setting for balloons should prevent, that a fleet of balloons can be easily transformed to a fleet of zeppelins in a time when a human player would have enough gold for such an upgrade, but the balloons should simply disappear from the production queue of the players.

This effect is achieved (as far as I know since El Justo´s great scenario AoI) by setting a unit into the upgrade box, but not tickling the upgrade function of that unit.

Obsolescence.jpg


In the labels text file of CCM 2.50 the text "Upgrades to" was simply replaced by the text "Obsolete with". The new text must be correct for upgrading a unit, but also for the obsolescence of a unit. If anybody here has a better fitting small text, this would be appreciated.

Labels text.jpg

balloon
 
Last edited:
Top Bottom