Resource icon

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

I don't remember seeing anyone mention this, but would it be possible to allow Hidden Nationality units to attack units within a Locked Alliance? I was toying around with an idea of a "shadow war" between allies and it got me wondering.
 
@Flintlock Would it be possible to get some better descriptions of many of the functions in the config.ini file? There are lots of functions that are very well documented with good explanations of what they do, and even what the setting should be for standard game behavior where appropriate. Of course, a lot of the functions are well named enough that you can get a sense of what they do, but there are also many functions that I simply have no idea of what they do. For example,

show_zoc_attacks_from_mid_stack = true

suppress_hypertext_links_exceeded_popup = true

restore_unit_directions_on_game_load = true


And here, even a simple comment next to the function with a link to a forum post describing the bug would be helpful. For example, while I'm familiar with at least a few of these bugs, like the submarine bug and the barbarian diagonal bug, most of the others I have no idea about. I'm sure there's many people who also don't know what they are and it would save lots of time researching them:

patch_submarine_bug = true
patch_science_age_bug = true
patch_pedia_texture_bug = true
patch_blocked_disembark_freeze = true
patch_houseboat_bug = true
patch_intercept_lost_turn_bug = true
patch_phantom_resource_bug = true
patch_maintenance_persisting_for_obsolete_buildings = true
patch_barbarian_diagonal_bug = true



This one in particular I'm curious about. The default minimum city separation in the INI file is set to 1, but I have no idea what the standard game behavior is.. I thought it was 2. It would be very helpful to have that information in a comment next to this function:
minimum_city_separation = 1

Also, I'd love a little better description of the effects of this function:
disallow_founding_next_to_foreign_city = true

promote_forbidden_palace_decorruption = false
(does anyone know if this is the same behavior of Civ3 Vanilla when set to true?)

show_untradable_techs_on_trade_screen = false (what exactly is the definition of an "untradable tech"? i.e. what would lead it to being listed? is it a tech we both already know?)

Thanks!
 
Last edited:
Also, do you think it would be possible to add an engine extension to allow brokering peace as one of the options to the diplomacy screen? For example, I often find myself getting involved in wars due to an aggressor attacking another friendly civ who I have a mutual protection pact with. Once I've sufficient beat back the aggressor enough that either they come to me begging for a peace treaty (or I feel they've suffered enough), I would love to be able to demand they make peace with one or more civs they're still at war with as part of the terms of my peace treaty. Do you think this is doable?
 
Anyone know how to let AI raze cities which have population number = 1 only ??? I think AI not razes such cities. But anyway, game crashes during AI moves and can't find why. Is there some option to see what's wrong??
 
Last edited:
I'll have to listen more closely but I thought it could happen to any ambience sfx. If we can replace them with dummy files that's good enough for me. I also get a sharp clicking in low-frequency sounds like unit footsteps, but maybe that's just me.
After some more time playing, there are quite a few sounds affected but it seems to be predictable. Hawk.wav is the obvious one as it's inevitable and loud. I also heard it looping a button click, a subtle bump effect, and the palace improvement cheer. One of the songs that play for ancient Rome would also loop a few seconds in, which was repeatable by toggling music off and on. All of the loops seemed to be about 1 second long.

I'm curious if anyone else is getting the sharp clicks in most bass sounds. I thought maybe it was a driver issue with a certain frequency range but it also seems to be only specific effects. It happens with footsteps, worker actions, and some vehicle movement, but not when dragging the minimap for example.
 
I don't remember seeing anyone mention this, but would it be possible to allow Hidden Nationality units to attack units within a Locked Alliance? I was toying around with an idea of a "shadow war" between allies and it got me wondering.
It would be possible but it's unfortunately a lot more difficult than it ought to be. The issue is that the limitation you're referring to is enforced by some (possibly) redundant logic inside the movement code itself. Basically, the game has some logic to determine whether a move is possible & permitted. That includes a function I've called "confirm_war" which checks if hostile actions or moves are okay, including asking the player if they want to declare war and other things like that. I thought that function would be responsible for limiting attacks against allied HN units, but it turns out it's not. The limitation is due to some additional logic inside the movement code itself which prevents units from moving onto tiles that are occupied by other civs' units, ignoring HN status. It's unfortunately difficult to modify that logic (unlike confirm_war) and I don't want to remove it since I don't know if it's necessary. Anyway, long story short, I'm sure I could manage this with enough effort but it's annoyingly difficult.

@Flintlock Would it be possible to get some better descriptions of many of the functions in the config.ini file?
Sure. Sometimes I don't bother adding descriptions for config options because I don't think anyone would ever turn them off anyway, and other times I don't do it simply due to laziness. About the ones you mentioned:
  • show_zoc_attacks_from_mid_stack - This makes it so that units that are playing their attack animation while exerting zone of control are always visible on top of others on the same tile. Normally this is not done so you won't see the attack animation. Now that I think about it, this should have been categorized as a bug fix since it's probably an oversight by the original devs.
  • suppress_hypertext_links_exceeded_popup - There is a limit to how many links you can have in each Civilopedia page. If you exceed that limit, the game may crash. The game also warns you when you open a page with too many hyperlinks and the problem is that it opens one popup per link over the limit. This option solves that by stopping all the popups from appearing. It doesn't fix the crash, which is an annoyingly difficult little issue, but it does stop you from getting spammed with dozens of popups when you open Civilopedia pages in some mods.
  • restore_unit_directions_on_game_load - The game doesn't store which direction each unit is facing in saved games, so after a game is loaded all units face the default direction of southeast. However the game does store the previous location of each unit, i.e., the tile it was on before its most recent move. That info can be used to figure out which direction it should face.
  • minimum_city_separation - A value of 1 here corresponds to the standard game rules. In fact, C3X does not change the game rules at all unless you edit the config file. Under the standard game rules, the closest you can place cities is at a distance of 2 tiles, or as I've defined it a separation of 1, since there is one tile between the cities.
  • disallow_founding_next_to_foreign_city - This is an additional restriction on top of the minimum city separation that prevents you from placing a city right next to one owned by another civ. This only matters if minimum_city_separation is set to zero since otherwise those city spots wouldn't be allowed anyway. The point of this option is to allow players to found their own cities right next to each other, for example to create canals, without allowing them to exploitatively attack other players by founding right next to their cities.
  • promote_forbidden_palace_decorruption - Setting this to true makes the forbidden palace as effective at reducing corruption as the palace itself. That's why it's a "promotion". Under the standard game rules the FP is much less effective than the palace.
  • show_untradable_techs_on_trade_screen - Untradable techs are those that are flagged as "cannot be traded" in the editor. There are none in the standard game. The point of this option is that it lets modders turn off trading for certain techs while still allowing civs to monitor each others' progress on those techs.
Hope that helps. I'll add in some quick descriptions of the bugs that were fixed too, in time for R17 Preview 3.

Also, do you think it would be possible to add an engine extension to allow brokering peace as one of the options to the diplomacy screen?
Maybe. The last time I looked at the trade screen code I got the impression that it would be possible to add new kinds of things to trade but I don't remember the details. Making the trade actually happen should be easy since there's one game function that applies each item after a deal is done. It should be simple to modify it to handle new kinds of trades. One difficult part would be figuring out what making peace is worth to the AI. I could probably do that by setting up a trade between the AIs containing only a peace treaty then evaluating what that's worth. The other difficult part(s) would be whatever comes up if I were to actually try to do this, because there's always something.

Anyone know how to let AI raze cities which have population number = 1 only ??? I think AI not razes such cities. But anyway, game crashes during AI moves and can't find why. Is there some option to see what's wrong??
Do you have prevent_autorazing set to true in the config? If so, that stops size 1 cities from being destroyed automatically. If you could post the save file that's crashing, I'll look into it. So far I've fixed every repeatable crash that's been reported to me.
 
So, I get it, giving the effect of potential improvements is too difficult. Would it be difficult to give percentages for spy actions?
 
After some more time playing, there are quite a few sounds affected but it seems to be predictable. Hawk.wav is the obvious one as it's inevitable and loud. I also heard it looping a button click, a subtle bump effect, and the palace improvement cheer. One of the songs that play for ancient Rome would also loop a few seconds in, which was repeatable by toggling music off and on. All of the loops seemed to be about 1 second long.

I'm curious if anyone else is getting the sharp clicks in most bass sounds. I thought maybe it was a driver issue with a certain frequency range but it also seems to be only specific effects. It happens with footsteps, worker actions, and some vehicle movement, but not when dragging the minimap for example.
I'm not sure if this is related to the C3X mod or not, but I just had something really weird happen to me today with the sound effects. And I'm on Windows, too.. But about a third the way through a game I was playing today, the sound effects started becoming very strange. Like the sound of workers walking sounded more like a punching sound effect from a Street Fighter game from the 80s, instead of footsteps. And most of the combat sounds sounded corrupted. In particular, a Knight vs. Longbowman fight, the Longbowman sounded like chipmunks. I've never seen anything like this before. And it wasn't all the sounds in the game either. The ambient sound effects played fine. It was mostly related to unit sounds and combat sounds.

I tried to isolate the problem. Restarting Conquests didn't fix it. Restarting my PC didn't fix it. Playing a new game or loading an old game made the problem vanish. Restoring the unmodded Civ3Conquests.exe didn't fix it either. It's as though the .sav file itself is corrupted and part of the problem. But I wonder somehow if the C3X mod is responsible.
 
Last edited:
Would it be possible to change the nationality of newly born citizens in a city depending on the nationality of the citizens in that city and the ratio of cultures? In practice, this would have the effect of conquered cities (or more simply, cities with multiple nationalities of citizens) maintaining the population of conquered nations and having the opportunity to even grow, instead of the population being slowly essentially replaced by the population of the conqueror or nation currently controlling the city each time the city grows. What I mean by culture ratio is that cities with larger cultures would have an even greater chance of increasing their original population after conquest as they grew.
Example: a city with two citizens, one citizen has nationality B (base), the other citizen has nationality C (conqueror), the city had 400 culture points of nationality B when conquered and now has 100 culture points of nationality C. Taking only the population into account, the odds in this example should be fifty-fifty of what nationality the new citizen will be, when also including the ratio of cultures in the city, the odds should be 65 to 35 in favor of nationality B.

Otherwise, how is it going in terms of progress with the things we talked about a few months back? (fighting the 256 building limit, adding the ability to generate resources conditional on government types, unhappy faces, negative culture, and so on)
Do we have anything big to look forward to for R17?
 
After some more time playing, there are quite a few sounds affected but it seems to be predictable. Hawk.wav is the obvious one as it's inevitable and loud. I also heard it looping a button click, a subtle bump effect, and the palace improvement cheer. One of the songs that play for ancient Rome would also loop a few seconds in, which was repeatable by toggling music off and on. All of the loops seemed to be about 1 second long.

I'm curious if anyone else is getting the sharp clicks in most bass sounds. I thought maybe it was a driver issue with a certain frequency range but it also seems to be only specific effects. It happens with footsteps, worker actions, and some vehicle movement, but not when dragging the minimap for example.
I finally got around to creating a little sound test program like I mentioned earlier. It loads sound.dll from the game's folder and uses it to play a wave file, right now hardcoded to Hawk.wav. I haven't tried it out yet on Linux because I'll have to reinstall Wine after changing hard drives a few months ago. The source code is on the C3X GitHub page if you want to play around with it. It'll be interesting to see whether the sound glitches appear in this simple test.

So, I get it, giving the effect of potential improvements is too difficult. Would it be difficult to give percentages for spy actions?
Unfortunately that too would be difficult since the final probabilities for spy missions aren't calculated until the mission is actually performed, at least in most cases, and even worse the logic to compute the probabilities can't be reused by the mod. The way it's all set up is a bit weird. The game computes some sort of base chance ahead of time when a spy mission is configured and then when the mission is performed the actual probabilities for all the possible outcomes are computed based on the base chance. Those actual probabilities may be very different from the base chance, specifically in the case of the propaganda mission, the game doesn't account for city improvements or government until the very end. For other missions the base chance means different things, for example for stealing technologies it's the chance not to fail completely, i.e. if you lose the roll against the base chance you fail to steal the tech and the spy gets caught, but even if you pass that roll there's another roll to determine if you fail to steal the tech but the spy gets away.

I tried to isolate the problem. Restarting Conquests didn't fix it. Restarting my PC didn't fix it. Playing a new game or loading an old game made the problem vanish. Restoring the unmodded Civ3Conquests.exe didn't fix it either. It's as though the .sav file itself is corrupted and part of the problem. But I wonder somehow if the C3X mod is responsible.
That's very strange. I highly doubt C3X is responsible since it doesn't touch anything related to audio and barely touches the process of saving games.

Would it be possible to change the nationality of newly born citizens in a city depending on the nationality of the citizens in that city and the ratio of cultures?
This would be possible and in fact looks pretty easy. There's a function the game calls to fill in some details for newly created citizens including their nationality. I could intercept that call and swap out the nationality based on whatever.

Otherwise, how is it going in terms of progress with the things we talked about a few months back? (fighting the 256 building limit, adding the ability to generate resources conditional on government types, unhappy faces, negative culture, and so on)
Do we have anything big to look forward to for R17?
The last thing I wanted to do for R17 was allowing civ and leader names to vary by era. I implemented that for civ names, and it seemed to work, but as I was working on leader names I realized the whole approach was wrong. It wouldn't replace the names everywhere, and the leader names especially would be a problem. So I'm going to have to take a different approach which means ripping up most of what I'd already done. It's not a big deal but it killed my motivation for a while and then I got distracted writing that sound test. So that's why R17 is delayed. I still intend to put out a preview version 3 "soon".

R17 is going to be another huge version, at least coming from R16. The biggest additions are a whole bunch of changes to defensive bombard and zone of control, Trade Net X which greatly accelerates sea trade calculations, and resource generating buildings adding yields. All that stuff is already in preview 2 though there are a few bugs too in that version. I was at one point planning to make negative culture work for R17 but if I keep adding "one last thing" it'll never be done so that'll have to wait for R18.
 
Thank you for your response @Flintlock !

My settings are
```
prevent_autorazing = false prevent_razing_by_players = false
```
and still this prevents cities of size 1 being not destroyed in any try. Only I can do it myself.

I had those crashed saves but after several tries it eventually didn't crash, so I've overwritten files (I was replacing multiple "Civ3Conquests.exe" files to push it forward.) This happened 3 times. The problem was when AI destroyed a civilization. If it happens again I'll send the file.
 
Anyone know how to let AI raze cities which have population number = 1 only ??? I think AI not razes such cities.
My settings are
```
prevent_autorazing = false prevent_razing_by_players = false
```
and still this prevents cities of size 1 being not destroyed in any try. Only I can do it myself.
Under the standard rules, both the human player and the AI players will auto-raze a city if it is:
  • Size 1
  • Has a culture value of zero (hasn't generated any culture yet)
This happens automatically every time, as far as I know. There is no choice in the matter. But you can prevent it if you want with Flintlock's mod. The settings you have are standard behaviour, and makes no difference.
Apart from that, it is always possible to choose to raze a city, no matter how big it is. It seems the AI players do this about 5-10% of the time, probably there's a small chance that they'll do this completely at random.
 
Is there any possibility that we could get a version which just has the bug fixes and quality of life improvements? Maybe something like:

1. Having the stack bombard and stack workers command.

2. Having the fixes to armies so that AIs can actually build offensive armies (I have a hard time imagining that the designers wouldn't have wanted this, though I could be wrong I suppose).

3. Having the Scientific Great Leader bug fixes.

4. Nothing which says something like "options". For example, I mean having an option to have cities not autoraze might not have been intended, since maybe then there's a consequence for attacking such a weak target. Or maybe it wasn't realistic enough in one of the game designer's opinion. Maybe some other "options" could have been inline with the original designers, but it seems hard to think of an official version.

5. Maybe the autofill feature for trade deals also (though.. I can imagine the argument getting made that the designers intended haggling to come as part of the game, since haggling is part of trading in the real world).

6. The "are you sure you want to end the turn?" feature, since that's kind of similar to how Map Stat's happiness tab gets used.

7. The arrows in the trading screen.

8. Any other "quality of life" changes which don't change AI behavior.

9. Other bugfixes also.

Like, my motivation here comes as that I'd like to be able to say to @superslug hey look at this thing! It has great things like fixing the Scientific Golden Age bug. It might make it more attractive to play, since moving every single unit one at a time has an alternative option in not as many cases. Civ III Conquests is different than Civ III PTW, but adding it as a version helped the Hall of Fame competitions. Maybe we could add this particular hypothetical version with just bugfixes and quality of life improvements it to the list of offical acceptable versions for the Hall of Fame?

Or maybe someone like @Più Freddo would like such a version also?

Or maybe I'm wrong, and affecting the .exe file would do strange things to those competitions. Just an idea... so far at least.
 
But for the HOF or GOTM, there would need to be a single "standard-issue" version that all participants could use.
 
Ideally a 'locked down' version looked after the HOF guys themselves like in civ 4. The game is possibly a bit old for that though. Maybe an alternative qol + bug fixes only comfig file could be added to new releases, saving having to comb through it and switch everything off manually
 
Back
Top Bottom