Resource icon

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

Since we're looking into civ trait codes, there must be codes that give a city 1 extra commerce/shield for the Com, Ind and Sea traits. If those bonuses can be isolated and assigned to city improvements this could open up new possibilities for custom civ traits or improvements.

I'm designing a custom civ trait called "Exploitative". A SW grants all cities an improvement that gives a production bonus at the cost of unhappiness. But at the current stage a productive bonus of 1 in editor at the cost of 1 unhappy face is balanced in ancient times but overpowered later. 2 unhappy faces makes getting through the expansion phase impossible. 1 extra bonus shield in the city tile at the cost of 1 unhappy face seems reasonable.

Also, medieval production city improvements like "Forge" or "Mill" would be less game altering if they just give 1 shield boost instead of 25%.
 
Thanks for all this exciting work! I am one of those interested in the Lua option.
Great! Since I last mentioned it, I've finished reimplementing the disorder warning in Lua. I'll post a thread about it soon.
Here's a bug-fix request for your giant wishlist; I think it should be a fairly quick fix given what you've done so far: Require that a keyboard shortcut can only be used for a unit if the unit has the corresponding button available. Currently, you can remove the GoTo option from a unit in the scenario editor, which disables the ability to click-&-drag-move the unit but still allows you to move the unit with arrow keys.
Yes, that would probably be an easy change. Do you know of any other cases where the keyboard shortcuts can be used to circumvent a restriction like that? Or is it a one-off thing that units that can't be told to go-to can still be moved with the arrow keys? I wouldn't consider that to be a bug since I'd guess the game was programmed that way deliberately by someone who took the inability to perform go-to orders very literally. I agree that it's a weird and pointless rule.
Has anyone requested a fix for the bug regarding the broken "immune to disease from flood plains" flag in the technology properties? Even if a tech has this flag checked, disease from flood plains still occurs (population is still lost) after discovering this tech.
I don't believe anyone has, I'll add it to the list. This one too should be a small & easy change.
Since we're looking into civ trait codes, there must be codes that give a city 1 extra commerce/shield for the Com, Ind and Sea traits. If those bonuses can be isolated and assigned to city improvements this could open up new possibilities for custom civ traits or improvements.
Editing tile yields is a bit awkward because of the despotism penalty, but I could make it happen if it's something people really want. This is a case where Lua could be useful. There are so many ways modders might want to change tile yields, rather than implementing them all myself, I could insert a hook so the yield can be modified by the modders themselves from a little Lua script.
 
This is really astounding work. It's been years since I was active here, but when I came across this thread it rekindled my interest in some old mods of mine now that things like "making units require buildings" which have always been impossible no longer are, so thank you @Flintlock for that, I am very much looking forward to exploring the possibilities here; reading through this thread has also made me realise I need to experiment with Quintillus' editor.

On the wishlist front, I will second the request for changing the probability of enslaving units, I have always wanted to make specialist units that would have a much higher probability of enslaving. Being able to adjust the enslavement probability at a per-scenario level would be great.

I would also be interested in, if it is possible, changing the "sacrifice unit" mechanic to no longer only work with captive units. What I am envisioning here is a Wonder that infrequently generates units which can be used to give culture boosts anywhere in one's empire, reskinned as something like the Renaissance producing great artists.

Also, and this is a bit vague, the one thing I have always missed from Civ2 is the ability to terraform tiles late-game. As far as I know, Civ III changes tiles only via global warming, or (in vanilla and I think PTW) as a result of nuclear explosions - it would be interesting to know whether the code for "nuclear terraforming" is still in Conquests, I have no idea whether it was removed or just inactivated. Terraforming as an extra worker action would be awesome but I can quite see how it might be a very difficult exercise if even possible; being able to terraform by building a variant nuke that just changed territory would also be really neat. (Something akin to the Genesis Device in Star Trek II.)
 
This is really astounding work.
Thanks. It's always nice to hear my mod is an inspiration for others too. About your wishlist, those first two things should be relatively easy. I'll try to look into them sooner rather than later since my plan is get many small & easy things done for R14, especially those that have been requested multiple times or that I've had in the back of my head for many months. Though recently I've gotten distracted working with Lua, so who knows. About terraforming, it should be possible to do that since it's already in the game in the form of global warming. I suspect the difficulty there would end up being everything surrounding the terraforming. I already know that adding a new unit command would be very difficult. I've done it before with stack bombard, but needed to piggyback off of the regular bombard command, so it wasn't entirely new. I may be able to do similar thing with the plant/chop forest commands for terraforming, but then there may be problems like the AI not knowing how to handle it.
 
To answer one of the above questions, it's also the case in Conquests that local industrial/ population pollution can degrade terrain eventually (if not cleaned up), and nuclear fallout will cause damage immediately.
 
Great! Since I last mentioned it, I've finished reimplementing the disorder warning in Lua. I'll post a thread about it soon.
Great! I look forward to hearing about what you come up with.
Yes, that would probably be an easy change. Do you know of any other cases where the keyboard shortcuts can be used to circumvent a restriction like that? Or is it a one-off thing that units that can't be told to go-to can still be moved with the arrow keys? I wouldn't consider that to be a bug since I'd guess the game was programmed that way deliberately by someone who took the inability to perform go-to orders very literally. I agree that it's a weird and pointless rule.
Cool. I just tested the other basic commands: fortify, explore, sentry, disband, and wait/skip-turn. None of them seem to be bugged; if you un-check the box then the keyboard shortcut does not work either. I agree with your point that perhaps a programmer took "go-to" super literally and thus that it's not a bug per-say, but it does seem to me like a "bug" in practice because I can't think why you would want to allow the user to move the unit with arrow keys but not with click-and-drag; it seems like the point of un-checking "go-to" would be to disallow regular walking movement entirely.
 
When I click on "Preferences > C3X Info," it says:

Version 13 Config files loaded: 1. (base)

Is that what everyone else sees, or am I missing something?
Has anyone got this mod working in WINE on Linux? I managed to get the GOG version installed and working in WINE. I'm now trying to get the mod working, and I'm not sure if it installed properly or not...
 
When I click on "Preferences > C3X Info," it says:

Version 13 Config files loaded: 1. (base)

Is that what everyone else sees, or am I missing something?
Has anyone got this mod working in WINE on Linux? I managed to get the GOG version installed and working in WINE. I'm now trying to get the mod working, and I'm not sure if it installed properly or not...
I think I've got the mod working. I see some things I haven't seen before.

I've run into a problem. The Great Library didn't earn me any techs, even though the AI was ahead of me in tech.
 
How far ahead were the AI-Civs? Because you only get techs from the GLib after they've been learned by at least two other Civs that you know -- and the GLib has not yet been obsoleted by Education.
 
The AI was quite far ahead. I had just one tech in the Middle Ages, that I earned from being a Scientific Civ, when I saw a message indicating that Copernicus Observatory had been completed. Everything else was built already: Bach, Sistine, Leonardo, Knights, Sun Tzu. It obviously wasn't just one AI that was ahead. There was also no message about Education being discovered. I remember in the past, that I used to get a message saying that the Great Library was obsolete, and I don't recall seeing that message.

I've started a new game, and I'll try to build the Great Library again, to see what happens...
Edit: I built the Great Library in my new game, and I just successfully received a tech from it. I wonder WTF happened in my last game?

Anyway, thanks for the mod! I'm liking the changes already!
 
Last edited:
Is there away to have the option of making city improvements that one does not have the tech for or those that are obsolete disappear? The AI will not sell obsolete improvements and will only lose them if they can't pay maintenance. This is a problem with custom civ traits and their trait specific improvements in captured cities.

The option of ensuring all improvements being destroyed upon capture of a city also solves this.
 
Last edited:
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?

On the larger side, I am another modder who would very much like to be able to make units equally capable of travelling over land and water without distinction, it would give us back the possibility of air units that are actual units after the fashion of Civ 1/2, but so much of Civ 3 treats land and water as different that I suspect this would be quite difficult if even possible.
 
I think I've got the mod working. I see some things I haven't seen before.

I've run into a problem. The Great Library didn't earn me any techs, even though the AI was ahead of me in tech.
You need to have contact with 2 civs that have a tech you donnot have. Those are just the mechanics of the base game.
 
Flintlock, the "special resources", created by buildings are working great! :woohoo:

One of the plenty new features by the option to set special resources limited to the building's city is the setting of alternative building prerequisites with the help of special resources, in this example the special resource "Faith" :

Per example in the next version of CCM a Church or a Mosque or a Wat or a Mandir or a Mission can be the alternative prerequisite for the building Religious Center (in the current CCM 2.50 download Great Religious Center) as the Religious Center needs the special resource Faith, that is produced by either of the religious level 1 buildings in a city. This is how it works:

Faith.jpg


Local Special Resources1.jpg


Local Special Resources2.jpg


As these "special resources" offer such a cornucopia of new modding options, it would be great if now at least the multiple pop-ups of the Hyperlink Bug could be wiped out, so all three resource slots for units and all two resource slots for buildings could be used without at least running into those pop-ups:


--------------------------------------------------------------------------------------------------------
There were some posts in this thread about giving cities only one additional shield as 25 % more is considered to be too much and the possibility even to create new traits for civs:

Those special resources could be an interesting way to "fine tune" such settings, as these resources can provide a very different amount of shields, commerce and food to a city, but unfortunately at present there is an obstacle for doing this: These resources improve city tiles where these resources are appearing. As such a resource is not appearing in any city tile, there is no improvement in shields, commerce and food in those cities. It would be nice, if the bonuses of such a special resource, that is appearing in a city could be added to the city, even without an appearance of that resource in the city radius.
 
Great! I look forward to hearing about what you come up with.
Unfortunately I've changed my mind since then about posting that thread. Working through that proof of concept gave me an idea of how difficult it would be to create a usable & reasonably complete interface between Lua and the Civ 3 executable, of course that was the point of the exercise. I'd estimate it would take 2-3 months to create that interface at the rate I'm currently working on C3X, which is too much work to be appealing. I don't want to post a thread teasing something I don't intend to do. The proof of concept, reimplementing disorder warning in Lua, is up on my GitHub if you want to have a look. It's on a branch called "integrate_lua". Here's the important portion, the actual disorder warning code:
Code:
local civ3 = require("civ3")

function CheckHappinessAtEndOfTurn()
  local numUnhappyCities, firstUnhappyCity = 0, nil
  for city in civ3.mainScreenForm:GetController():Cities() do
    city:RecomputeHappiness()
    local numHappy, numUnhappy = 0, 0
    for citizen in city:Citizens() do
      if citizen.Mood == civ3.CitizenMood.Happy then
        numHappy = numHappy + 1
      end
      if citizen.Mood == civ3.CitizenMood.Unhappy then
        numUnhappy = numUnhappy + 1
      end
    end
    if numUnhappy > numHappy then
      numUnhappyCities = numUnhappyCities + 1
      if firstUnhappyCity == nil then firstUnhappyCity = city end
    end
  end


  if firstUnhappyCity ~= nil then
    local response
    if numUnhappyCities > 1 then
      response = civ3.ShowPopup(civ3.GetC3XScriptPath(), "C3X_DISORDER_WARNING_MULTIPLE", firstUnhappyCity:GetName(), numUnhappyCities)
    else
      response = civ3.ShowPopup(civ3.GetC3XScriptPath(), "C3X_DISORDER_WARNING_ONE", firstUnhappyCity:GetName())
    end

    if response == 2 then -- zoom to city
      civ3.mainScreenForm.turnEndFlag = true
      firstUnhappyCity:ZoomTo()
    elseif response == 1 then -- just cancel turn end
      civ3.mainScreenForm.turnEndFlag = true
    -- else do nothing, let turn end
    end
  end
end
It's pretty easy to understand, right? Not shown is another ~200 lines of Lua and ~50 lines of C necessary to make the above code work. For example, civ3.mainScreenForm:GetController():Cities() creates an iterator over the sitting human player's cities, city:Citizens() creates an iterator over the citizens in a city, and civ3.ShowPopup(...) is an easy way to throw up a popup window. Those things aren't available with only bare C bindings to the game's internals; they all require extra work to set up. I don't think it's worth the effort unless this is something people really want and will actually use.

One interesting feature of Lua scripting is that the scripts could be made compatible with both the original Firaxis EXE and C7, the open source recreation. It's "only" a matter of making the Civ 3 interface the same for both. It would be easier for self-contained things like map generation and maybe unit AI, making gameplay modifications compatible with both would be more difficult. C7 doesn't support Lua at the moment, I think everyone has in mind to write the whole thing in C#, but I know @Puppeteer has at least toyed with the possibility before. Again, I'm not sure it's worth the effort, this would add another layer of complications to C7.
When I click on "Preferences > C3X Info," it says:
Version 13 Config files loaded: 1. (base)
Is that what everyone else sees, or am I missing something?
That's normal. Why do you think you're missing something, is it because there are no INI config files listed? The INI files are only loaded when you load into a game. The reason for that is that they can only be loaded after some scenario has been, since they potentially refer to things in the scenario, like the names of units and buildings. The "(base)" config is listed there as a reminder that there's technically still a config present even if all of the INI files are missing. Its settings match the unedited default.c3x_config.ini. Normally the base config doesn't matter since its settings are all overwritten by the default INI.
Is there away to have the option of making city improvements that one does not have the tech for or those that are obsolete disappear? The AI will not sell obsolete improvements and will only lose them if they can't pay maintenance. This is a problem with custom civ traits and their trait specific improvements in captured cities.
That would not be difficult to program in. I could make it an optional game rule that improvements disappear when their tech requirement is not met, but I'd rather enhance the AI to be smart enough to sell buildings it could never use, if possible. Could there ever be a disadvantage to selling an obsolete building? If the AI doesn't have the tech to use a building, it should only sell it if it could never acquire that tech, is there an easy way to determine that? Are all those techs "era zero"?
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?
On the larger side, I am another modder who would very much like to be able to make units equally capable of travelling over land and water without distinction...
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. 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.
As these "special resources" offer such a cornucopia of new modding options, it would be great if now at least the multiple pop-ups of the Hyperlink Bug could be wiped out...
--------------------------------------------------------------------------------------------------------
There were some posts in this thread about giving cities only one additional shield as 25 % more is considered to be too much and the possibility even to create new traits for civs:
Those special resources could be an interesting way to "fine tune" such settings, as these resources can provide a very different amount of shields, commerce and food to a city, but unfortunately at present there is an obstacle for doing this: These resources improve city tiles where these resources are appearing. As such a resource is not appearing in any city tile, there is no improvement in shields, commerce and food in those cities. It would be nice, if the bonuses of such a special resource, that is appearing in a city could be added to the city, even without an appearance of that resource in the city radius.
The hyperlink bug is one of those things I've had in the back of my mind for a while now but haven't gotten around to looking into. I'll try to get around to it sooner rather than later. That's an interesting suggestion that buildings could grant the yield bonuses from their generated resources to the city tile. I suppose it's fair for generated resources to give bonuses like ones gathered from the map. It would also make it easy to create buildings with yield bonuses in the editor, and easy to read in those rules for the mod, but unfortunately it would not make it easier to program the actual effect. Still, the programming is doable. Good idea.
 
That's normal. Why do you think you're missing something, is it because there are no INI config files listed? The INI files are only loaded when you load into a game. The reason for that is that they can only be loaded after some scenario has been, since they potentially refer to things in the scenario, like the names of units and buildings. The "(base)" config is listed there as a reminder that there's technically still a config present even if all of the INI files are missing. Its settings match the unedited default.c3x_config.ini. Normally the base config doesn't matter since its settings are all overwritten by the default INI.

When I click on "Preferences > C3X Info," it says:
Version 13 Config files loaded: 1. (base)
Is that what everyone else sees, or am I missing something?

It says "files" (plural), but it shows one file only, which is: "1. (base)"

It's not a big deal. Everything seems to be working. Thanks!
 
The AI being able to actively sell useless obsolete buildings would be great. Expensive city fortifications that will become obsolete like stone castles for example can now require maintenance without saddling the AI with that forever.

But for custom trait specific city improvements the best solution would be to have the option of wiping out all city improvements upon city capture. For a custom trait like "Administrative" that gives trait specific half priced "Courthouses (Ad)", you could make the regular courthouse obsolete with the custom tech "Administrative". But for regular civs capturing one of these "Courthouse (Ad)", they would be able to enjoy it while still building their regular courthouses on top of it. Wiping out all improvements upon capture solves this problem.

There are 2 ways to implement these "Courthouses (Ad)" . One is to have them require Code of Laws and a "Flag (Ad)" generated by a perfumed "Bonus (Ad)" SW requiring the non-era tech "Administrative". The other is to have the "Courthouses (Ad)" require the non-era tech "Administrative" and a SW generated "Flag (COL)" available at Code of Laws. The latter is messy as non Administrative civs would have that SW in their building queue as well.
 
The AI being able to actively sell useless obsolete buildings would be great. Expensive city fortifications that will become obsolete like stone castles for example can now require maintenance without saddling the AI with that forever.
The easiest way to achieve this, is to abolish maintenance costs for buildings, as it was done in CCM. There are civers who consider this the best part of the CCM mod .

The hyperlink bug is one of those things I've had in the back of my mind for a while now but haven't gotten around to looking into. I'll try to get around to it sooner rather than later.
This is great! :)
 
It says "files" (plural), but it shows one file only, which is: "1. (base)"
It's not a big deal. Everything seems to be working. Thanks!
Sure thing. I was just lazy and didn't add a special message for when there are no config files loaded (technically "(base)" isn't even a file). Glad to hear it's working, that's what really matters.
But for custom trait specific city improvements the best solution would be to have the option of wiping out all city improvements upon city capture. For a custom trait like "Administrative" that gives trait specific half priced "Courthouses (Ad)", you could make the regular courthouse obsolete with the custom tech "Administrative". But for regular civs capturing one of these "Courthouse (Ad)", they would be able to enjoy it while still building their regular courthouses on top of it. Wiping out all improvements upon capture solves this problem.
It should be pretty easy to destroy all improvements in cities when they're captured. That feels like overkill to me though, do you want that behavior just to get rid of trait-specific buildings? Because it probably wouldn't be much harder to add a list of never-kept improvements that are always destroyed on capture like ones that generate culture.
One is to have them require Code of Laws and a "Flag (Ad)" generated by a perfumed "Bonus (Ad)" SW requiring the non-era tech "Administrative".
You don't need the SW here, the "Flag (Ad)" resource could be generated by the palace and only revealed by the Administrative tech. The only downside I know of to doing that is players will get the popup message for their first strategic resource connection when they found their first city. (I discovered this by accident, I was experimenting with resource generation months ago and thought, instead of building a barracks, temple, etc. to test generation, I could just generate resources from the palace. I set that up then the game crashed as soon as I founded my first city, turns out it was due to that popup. I fixed the crash for R12.)
 
A "never keep upon capture" list would be really nice!

The "Flag (Ad)" is supposed to be a SW generated improvement. That idea came about when you enabled SW generated improvements in every city. Wouldn't a strat resource generated by the palace require trade connection to the capital?
 
Top Bottom