Resource icon

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

Could be the wrong type. There is industrial pollution and population pollution. From the sound of it, the blacksmith probably produces industrial pollution. Per haps the gymnasium only reduced population pollution?
 
Could be the wrong type. There is industrial pollution and population pollution. From the sound of it, the blacksmith probably produces industrial pollution. Per haps the gymnasium only reduced population pollution?
No, it literally minuses industrial pollution. As I said, the improvement works as it is meant to if it's built in a city, rather than given free by a wonder.
 

Attachments

  • gymnasium.png
    gymnasium.png
    222.9 KB · Views: 29
I might be the first one who actually test it. I had few attempts with Wars in Medditerrean mod before. It was one of those mods which attracted my attention to modding and this forum more than 10yrs ago. In fact I was not able finish playing this mod because during the turn change the game was slowing down untill completley freezed. I played again this weekend when I read what you added to your recent release and it looks like you finally fixed this horrible issuse which made lots of old mods with large maps unplayable. I haven't finish playing yet but the game is really advanced, 60-70% of map is conquered and time for turn change no more that 1-2 minutes. Without your addon I had to wait 15-20min for a turn to change untill game freeze to death. First time I made a progress in this mod much much bigger than ever before. And it looks I am going to finish it.
Fantastic work you're doing here Flintlock! I will say no more :)

I did not realize the new patch addressed this, really excited to hear it does! I stopped modding a few months ago because I became frustrated with insanely long turn times on certain maps, after I had increased map sizes to be, in all honesty, excessively large.
So far definitely an improvement! Still unfortunately rather a long wait, very noticeable when a city changes hands or a harbor or road tile gets destroyed, but nothing like before where the game became completely unplayable with around the 20 minute mark turn waits. Just testing it now, it took a turn about 5 minutes to resolve. Thats enough time for me to do a bit of multitasking with something else unless I get a diplomacy or something else pop up that interrupts, but oh well.
 
Another idea I've had, something a bit different:

Would it be possible to increase the varience in tile yields? Like maybe if a citizen is working a Silver resource it could also provide +1 Happiness (similar to an Entertainer Citizen) along with its gold value, or an Ancient Ruins recource could provide +2 Culture (similar to a city improvment) and +2 Science (similar to a Scientist citizen)?

Other values which could be cool would be pollution (similar to improvements and wonders) and corruption (similar to Policemen citizens).

Any thoughts?
 
@Flintlock, are there any chances to be able to eliminate Barbarians and create a normal 32nd player instead?
Sadly, no; it's been tried (by, as I recall, by @Civinator himself, and the results weren't pretty.

You must recall that the base game is from 1999, with Soren Johnson (whose most recent effort is Humankind) "parachuted in" midway through the development process. Much is hard-coded, with much beyond he amazing skills and insights of St. @Flintlock.

:lol: No sooner than I've written this that I discover that @Quintillus has addressed this in the new release of his Editor.
 
Last edited:
Thank you, @Ozymandias! I hoped that this could be solved somehow. 31 player is more than enough for everything I could think of... except of imitating the world from decolonisation until today.
:D Check out my now-edited Post
 
Following your instructions on the units, I have tried with two ships to enable the load as you say but it does not let me in the game once on top of the army and already at sea to load it...
Where is my mistake?
This is my mistake, Unit::can_load is preventing you from loading naval units into a naval army. There must be some condition restricting that that I missed when I looked over the method. For a little test, I tried editing it using a debugger to always return true, so anything can be loaded into anything. That change allows you to load naval units into a naval army. Here's what that looks like:
naval_army.jpg

I haven't tested combat, but moving this unit around on water works at least. However if you order it to move onto land it asks you to disembark the galleys. Selecting one of the galleys to disembark does nothing, and selecting "unload all" freezes the game presumably in the same manner as the disembark immobile bug. So there is at least one issue to work out but this sort of thing could probably be made to work.
I think I've found something which may be worth considering - when a wonder puts a improvements with a negative pollution in a city, it seems to not actually counterract the pollution caused by buildings, unlike if it is built normally.
This applies to positive pollution too, right? Cities store a running count of building pollution that is increased when a building is built and decreased when a building is destroyed. Buildings that are granted for free don't go through the same process as those that are physically built so pollution isn't updated appropriately. This is similar to the bug with maintenance and obsolescence that I fixed previously.
Would it be possible to increase the varience in tile yields? Like maybe if a citizen is working a Silver resource it could also provide +1 Happiness (similar to an Entertainer Citizen) along with its gold value, or an Ancient Ruins recource could provide +2 Culture (similar to a city improvment) and +2 Science (similar to a Scientist citizen)?
Other values which could be cool would be pollution (similar to improvements and wonders) and corruption (similar to Policemen citizens).
Any thoughts?
This should be doable. The city economy code is fairly well compartmentalized so inserting some extra culture or happiness shouldn't be a problem. I'd be more concerned about the interface. To do this properly, the additional yields should appear over the tiles so it's clear where they're coming from. It might be difficult to make that happen. Speaking of extra kinds of police specialists, I was thinking a while back that it would be interesting to add a decorruption effect to military police, same as the specialists, to certain government types as a way to buff them. I looked into that a bit and again came away with the impression that the hardest part would be modifying the interface.
@Flintlock, are there any chances to be able to eliminate Barbarians and create a normal 32nd player instead?
Unfortunately not since the barbarians' player slot (index 0) is hardcoded as being barbarian. In order words, barbarian-ness is not a property of player objects but of the slot they occupy.
 
This is my mistake, Unit::can_load is preventing you from loading naval units into a naval army. There must be some condition restricting that that I missed when I looked over the method. For a little test, I tried editing it using a debugger to always return true, so anything can be loaded into anything. That change allows you to load naval units into a naval army. Here's what that looks like:
View attachment 674444
I haven't tested combat, but moving this unit around on water works at least. However if you order it to move onto land it asks you to disembark the galleys. Selecting one of the galleys to disembark does nothing, and selecting "unload all" freezes the game presumably in the same manner as the disembark immobile bug. So there is at least one issue to work out but this sort of thing could probably be made to work.

This applies to positive pollution too, right? Cities store a running count of building pollution that is increased when a building is built and decreased when a building is destroyed. Buildings that are granted for free don't go through the same process as those that are physically built so pollution isn't updated appropriately. This is similar to the bug with maintenance and obsolescence that I fixed previously.

This should be doable. The city economy code is fairly well compartmentalized so inserting some extra culture or happiness shouldn't be a problem. I'd be more concerned about the interface. To do this properly, the additional yields should appear over the tiles so it's clear where they're coming from. It might be difficult to make that happen. Speaking of extra kinds of police specialists, I was thinking a while back that it would be interesting to add a decorruption effect to military police, same as the specialists, to certain government types as a way to buff them. I looked into that a bit and again came away with the impression that the hardest part would be modifying the interface.

Unfortunately not since the barbarians' player slot (index 0) is hardcoded as being barbarian. In order words, barbarian-ness is not a property of player objects but of the slot they occupy.
Are you using the C3X mod? Because I have it installed and I can't do that... could you share the unit editor screen?

The general of the army is easy to change in principle since they are separated by eras, the only thing that would have to be done is to replace that general in this case with a naval flagship, if it is an old army, then an old ship, for example, Galleys. of leader training a Byzantine Dromon.

My idea was to create fleets initially only with offensive forces of naval superiority, that is, with ships that do not carry infantry troops. Maybe that will avoid that problem.

It looks wonderful!
 
Are you using the C3X mod?
Flintlock is creating this fantastic mod. So I hope he is using it, too. :D He made some changes in his mod, but the result seems to be not sufficient.
 
Flintlock is creating this fantastic mod. So I hope he is using it, too. :D He made some changes in his mod, but the result seems to be not sufficient.
Sid Meier's must be amazed by Civilization 3... with how old it is and there is still a great community that continues to contribute to this great game that honestly is most likely the best turn-based strategy game of all time... I I started in Civ2 and I went crazy and in my opinion 3 is the 2 God mode and on top of that apparently IT HAS NO END! Long live Civ3 :)
It is not that it is insufficient but that we have not yet discovered the limit of its potential and on top of that we have GODS like Flintlock and company.

There is no end to this game! :)

I am convinced that the day will come when you will be able to develop your civilization on LAND, SEA AIR, SEA FLOOR AND SPACE in a single mod...
 
Hi, Flintlock. Your work is still very much appreciated. I've limited myself in this thread to one request post a year and figured it's about that time again. :)

Here are previous requests that you have already fulfilled since creating CXE.
  • Buildings that produce resources
  • Buildings as requirements to build specific unit(s)
  • Stealth bombardment
  • Armies fixed
  • Artillery fixed
  • AI Leader Use Fix
  • Sub Bug
  • Science Age
  • Interception Bug
  • Adjustable city spacing
  • Decoupling city icons from current building mechanics and assigning them elsewhere
Here's the wishlist in order of priority.
  • Bonuses from buildings - (e.g. +1 food, +1 shield), either added straight on top or applied to tiles, or really anything that works. Right now I think building abilities and not the 256 limit are the bottleneck in modding, especially in comparison to the newer games where they can pretty much do anything you can type. If there is any way to have buildings add on (or subtract even) food, shields, science, etc. this would be a game changer for modding instead of the same tired old +50% bonuses. Definitely my #1 feature after everything else you've already completed.
  • Changes to on-map improvements (mines, fortresses, etc.) - Era graphics changes for mines and radar towers, especially radar towers as we could make castles or whatever else through the eras. In addition, I don't know if it's possible for units outside cities to be upgraded, such as within friendly borders like Civ 4 & 5 or even have the radar towers/fortresses be able to upgrade like barracks. This could help big time with obsolete stacks of doom. Not sure about AI logic in building forts and airfields as it seems they aren't really programmed to do so, although they will build radar towers everywhere. Is it possible for map improvements to provided food, shields, or commerce? :dunno:
  • Diplomatic Options - buildings or techs that can affect trade rep or diplo rep, MPPs that only trigger for defensive wars, starting alliances or agreements in scenarios other than locked alliances.
Thanks!
 
Are you using the C3X mod? Because I have it installed and I can't do that... could you share the unit editor screen?
That's not part of C3X, it's just a quick modification I made to the Unit::can_load method as an experiment. It's easy to make the same modification through C3X, though. Here's how that can be done in case you or anyone else is interested in a quick look under the hood:
First you would have to instruct the patcher to replace Unit::can_load. To do so, you'd append the following line to civ_prog_objects.csv:
Code:
inlead,       0x5C5BD0,    0x5D4970,    0x5C58E0,    "Unit_can_load",                "byte (__fastcall *) (Unit * this, int edx, Unit * passenger)"
"inlead" in what instructs the patcher to perform the replacement. The next three items are the addresses of the method in the GOG, Steam, and PCGames.de executables. The fifth item is the name. The sixth item is the type. In this case the type is a function that takes a unit and a possible passenger and returns a single byte value that will be 1 or 0 depending on whether or not the passenger can be loaded into the unit.
Second you have to supply the replacement function. For this little experiment the replacement will simply return 1, in other words it always answers "yes" to the question "can load?". Here's the code, this would be placed in injected_code.c:
C:
byte __fastcall
patch_Unit_can_load (Unit * this, int edx, Unit * passenger)
{
    return 1;
}
That's it! All that's left to do is reinstall the mod if you've already installed it. That modifies the game logic so that any unit can be loaded into any other. Obviously you shouldn't play the game like this since that change is likely to cause nonsense situations and crashes, but it might be fun to experiment with. I played around with the naval army of galleys a bit more and found that it can sink in ocean tiles. I still haven't tested combat but I expect that would work.

Hi, Flintlock. Your work is still very much appreciated. I've limited myself in this thread to one request post a year and figured it's about that time again. :)
Here's the wishlist in order of priority.
Hello. Glad to hear you're enjoying the mod. Food, shield, and commerce yields from buildings is something I've had in the back of my mind for a while now. The way I would do that would be to make it so that buildings that generate resources could optionally add the resource's extra tile yields to the city. You could always make the generated resource a bonus one if you want the yields but don't want the resource itself to appear in the interface. The advantage to that approach is that it means the building yields could be set up more in the editor than the INI file. Although the disadvantage is there would be no way to configure bonus science points. Anyway this is something I've been thinking about and hopefully will get around to soon.

Swapping out graphics for tile improvements should be pretty easy. Same with adding bonus yields to fortresses, etc. I'm not sure about upgrading units outside cities, but I doubt there's anything too complicated there. I'm not sure about modifying diplomacy as I haven't looked into the diplo code much. Speaking of modifying diplomacy, one thing I'd like to add is the ability to repair your trade rep by paying off the AI you've "wronged". The way it would work is, when a player ruins their trade rep by breaking an agreement with an AI, the AI would calculate the value of the remaining turns of the agreement and add a cancellation penalty, say 25-50%, then offer to sell a trade rep reset for that amount. I'm not sure if it's practical to implement that but I like the idea.
 
@Flintlock
I tested another mod Age of Heroes 2 which was completely unplayable at the beginning of the game after certain number of turns and now eventually I played until its end, so you nailed it with your new update. :)
I know it might sounds boring but I need to ask about the treasure cashing again and again. I noticed you bouncing around it and it's working sometimes and sometimes doesn't.
In release 4, 15 and few others, do not remember what ones, it didn't worked but r7 and 16 made that work. However it is only working when you start a game as a New Game, when I start as Conquest or Scenario it doesn't.
I hope the description will give you a clue.
Small request from me. Would it be possible to add Clear Wetlands stack button?
/edit/ something came to me this morning. When the factions are destroyed all their troops remaining somewhere on the map dying with it them. What about turning reaming troops into barbarians or at least abandoned units, so they can make some damage to the other factions?
 
Last edited:
Hello. Glad to hear you're enjoying the mod. Food, shield, and commerce yields from buildings is something I've had in the back of my mind for a while now. The way I would do that would be to make it so that buildings that generate resources could optionally add the resource's extra tile yields to the city. You could always make the generated resource a bonus one if you want the yields but don't want the resource itself to appear in the interface. The advantage to that approach is that it means the building yields could be set up more in the editor than the INI file. Although the disadvantage is there would be no way to configure bonus science points. Anyway this is something I've been thinking about and hopefully will get around to soon.

Swapping out graphics for tile improvements should be pretty easy. Same with adding bonus yields to fortresses, etc. I'm not sure about upgrading units outside cities, but I doubt there's anything too complicated there. I'm not sure about modifying diplomacy as I haven't looked into the diplo code much. Speaking of modifying diplomacy, one thing I'd like to add is the ability to repair your trade rep by paying off the AI you've "wronged". The way it would work is, when a player ruins their trade rep by breaking an agreement with an AI, the AI would calculate the value of the remaining turns of the agreement and add a cancellation penalty, say 25-50%, then offer to sell a trade rep reset for that amount. I'm not sure if it's practical to implement that but I like the idea.

Thanks for the responses. Adding a building-produced resource to the city's yield sounds like a great solution. I would think it could just build upon the work you've already done there. And the resource would show the bonus at least in the civilopedia if it can't show on the city screen. This would really change the way I would handle production and food in my game, for sure. A while ago in the thread it was mentioned about mutually exclusive buildings, which could complement this as well.

Tile changes would be fantastic, and these would allow bonuses to appear on the map. I don't know what makes the AI check for unit upgrades, or how that logic would be affected if upgrading were possible outside of cities.

Civ III already has a decent Diplomacy system, I think, especially compared with some of its contemporaries and predecessors. The ability to repair a trade rep would be a great addition, although I see it getting blatantly abused by high-level players.
 
Flintlock,
Would it be possible in the diplomacy screen to have a scrollable city list, instead of having to click once to go up or down the list for every single city?

Thank you for all your work!
 
Flintlock,
Would it be possible in the diplomacy screen to have a scrollable city list, instead of having to click once to go up or down the list for every single city?

Thank you for all your work!
I would like to add this idea:

As in Civ2, could it be possible to deliver military troops to your allies in case you want to support them but without resorting to war? You can deliver gold, resources, cities, workers, maps, technologies and why not military aid? . I think it would be a good improvement to add to the diplomatic options. :)

Thanks Flintlock, great work!
 
I would like to add this idea:

As in Civ2, could it be possible to deliver military troops to your allies in case you want to support them but without resorting to war? You can deliver gold, resources, cities, workers, maps, technologies and why not military aid? . I think it would be a good improvement to add to the diplomatic options. :)

Thanks Flintlock, great work!
That would be something, trading or sending troops like workers. I have a feeling Flintlock said sometime before that this is not possible.
 
An idea I had a long time ago was to create a fake worker unit that you could give to another civ. That other civ would have to research a tech that would allow him to upgrade that fake worker into a tank or a jet fighter for example.
 
Top Bottom