Resource icon

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

The barbarian unit could be a separate one created that has era specific graphics.
The problem is, as posted above, that the eraspecific graphics for barbarians in the normal game (without the option that barbarians can hold cities and do research there) are the graphics of era 1 during the whole game.
 
Interesting. That looks a lot more complicated than what I had in mind for Civ 3.
Every step in providing events to C3C in my eyes would be a big step forwards for C3C. A completely scriptable game is not necessairy. What kind of events for Civ 3 are you having in mind ?
 
The problem is, as posted above, that the eraspecific graphics for barbarians in the normal game (without the option that barbarians can hold cities and do research there) are the graphics of era 1 during the whole game.
That's why barbs need to have a trigger to where their era follows the tech leading civ like with the massive uprising.
 
If that's the case (bad pathfinding when Sea is off-limits) it sounds like something C3X may be able to fix ;)
it might be that the only reason ocean wheeled works when sea doesn't is that it's related to ships finding room to go around territory or something. Oceans rarely intersect with culture, at least not before better boats. - in which case C3X might aggravate it if you have the setting preventing ships entering territory.

The barbarian unit could be a separate one created that has era specific graphics. At least it won't look out of place. But its combat stats would still be the same. Unless Flinlock can remove the upgrade improvement requirement for barb camps. Then you have have these units upgrade into other units available to the barb civ. That would also require some kind of trigger like an age advance like that of stock game's massive uprising.
So... events? sounds like the lua events idea.
 
The barbarian unit could be a separate one created that has era specific graphics.
This is what I have been doing for a while now, or better said, tried to do. Maybe it's an easy fix by just defining "Barbarian Era = Human Player 1 Era", just to put it in a oversimplified way.
 
Most issues on the stack limit seem to have been sorted. Have to ask this one though: is it uniform across every tile or is it possible to do by terrain type? I guess it depends if the original code checks the terrain type at the appropriate point (I'm no programmer). Just wondered, seems to fit logically that you can't move huge armies across a desert as easily as you can grasslands which makes the terrain more important to strategy.
With the code I've inserted, it's possible to set the stack limit on a per-tile basis, so yes, it could easily be made to vary based on terrain type. This is again one of those features that would be easy to make work in terms of game logic but hard to read in from the config file. I suppose the best way to do it would be to have a list of percentages by terrain type so you could set something like [Desert: 50, Mountain: 50] so deserts & mountains have half the stack limit.

Is there a way to make it impossible to capture city improvements if the capturer doesn't have the technology for it?
Probably. I could probably modify whatever logic checks for culture and other building characteristics when deciding whether a building is lost on city capture to include additional criteria.

This may have already been done, but is it possible to limit the unloading/loading of a unit in different transport ships during the same game turn (this would multiply the unit's movement, which is completely illogical)?
I remember someone requested this earlier but I didn't end up doing it. It probably wouldn't be difficult to do, though it does depend on how specifically it's to be done. The simple way would be to make it so that units lose all their remaining moves when loaded into a transport. The more complex way, but truer to the original game rules, would be to allow units to load only once per turn without spending moves. That's more complex since you have to track what units have been loaded and keep that data in the save.

Unit healing, I wonder if there is any room to play with this? Units that don't heal at all (battleships at sea), units that heal double-quick (partizans) etc. Barracks is currently all or nothing, variation would add spice.
Unit healing is awkward to modify but doable. I think the best approach would be to reimplement the game's heal-at-start-of-turn method in the mod's own code. I generally try to avoid doing that sort of thing but in this case the original logic is awkward to modify and it's a relatively small method anyway. This is where I'd really like to have Lua integrated so I could call out to a Lua script to get a healing amount for each unit. I'm sure once healing is moddable, I'll get a dozen requests for different healing rules.

Every step in providing events to C3C in my eyes would be a big step forwards for C3C. A completely scriptable game is not necessairy. What kind of events for Civ 3 are you having in mind ?
My plan is to scatter script hooks everywhere that can be used to create whatever events people want. I don't have many events in mind myself. But for a simple example, with a hook that runs a script at the start of every turn, it would be possible to have events that trigger based on the in game time. Those events could spawn in a bunch of units for some player, spawn cities, really whatever you want as long as there's a good interface with the game logic. I remember someone a long time ago asked for an event that adds a new civ to the game, and though that might be difficult to do properly, you could simulate it by leaving a settler on a mountain off in the corner of the map then having the event script move it into its real starting position at the appropriate time.

I'll add hooks for all sorts of things like city founding/destruction, unit creation/destruction, city production, technology unlocks, government changes, and more things I'm not thinking of at the moment. So you could have an event be triggered by the fall of a particular city. This also reminds me I was at one time planning to insert hooks into the map generator. I already did a little proof of concept of that, calling a Lua script after the base terrain was generated so it could be customized before the generator goes on to place forests, resources, starting locations, and so forth. In principle every part of the map generation pipeline could be made moddable, and in fact the whole thing could be replaced by a Lua script if desired. The only limitation is that I haven't worked out completely how the generator works so there are some parts I wouldn't be able to swap out right now without breaking it.

This is what I have been doing for a while now, or better said, tried to do. Maybe it's an easy fix by just defining "Barbarian Era = Human Player 1 Era", just to put it in a oversimplified way.
Swapping out the barbarian unit graphics for different eras ought to be easy. I remember doing something similar for their city graphics, which were bugged because barbs don't have a valid culture group. I agree that using the human player's era for the barb graphics is the simplest approach.
 
I was also wondering to what extent diplomacy could be extended or improved.
For example, to be able to exchange units (mercenaries), to increase the possibility of exchanging small towns (size < 6 for example), to offer protectorates (automatic war if a vassal country is attacked), vassalization offers (get part of a country's per-turn gains and part of its resources in exchange for military protection and defense of the integrity of its territory).
Personally, I find diplomacy too simplistic: the money limits for a civ are easily identified... From my point of view, it would be more important to be able to introduce the possibility of not knowing the amounts that can put an end to discussions and to introduce bluffing into negotiations.
 
@Flintlock
Have you looked into that? One button to solve all rioting cities at once?
When playing a game on larger map, I have 100+ cities under control, it is very hard to tackle civil disorders manually in every city picking it one-by-one if I have riots in most of the cities. Could this be resolved by a button or function auto-resolve by removing one labourer from production to entertainment or tax collection?
Flintlock(I don't think it would be too difficult to add a button to the domestic advisor screen that reassigns all your citizens to fix happiness issues.)
 
There is already such a button! Contact the governor in any (rioting) town, and set him to "Manage happiness moods" in "All towns". It's not a great solution, because the city-governor routine is kinda borked, but it does work as a short-term response.

The trick that I would like to see implemented (and which would vastly improve the AI-Civs' management of their own empires) would be to teach the city-governor AI that "Happy citizens = Unhappy citizens + 1" is a perfectly acceptable solution to stave off potential riots -- rather than the current solution of "Unhappy citizens = 0"
 
Last edited:
Yes, I meant "Manage moods", sorry.

But C3X already provides riot-warnings before the interturn, so if it's telling you that 100 towns are about to riot -- and changing the Lux-slider won't fix that -- activating the governor is already a 1-step means of reassigning all citizens to quell the impending unhappiness. If you don't mind doing a little MM on top of that, you can turn off the governor again in some/ all of your 15-20 core-towns, since your Lux-slider setting should be (more) effective there.

Conversely, if the happiness-situation suddenly changes over the interturn, e.g. because you unexpectedly lost a Lux-import(s), then the first warning you will get will be when the first unhappy town (based on your town-list) riots, so a button wouldn't help before that point -- but when that first riot happens, you can immediately "Zoom to city" and activate the governor for "All towns", which should prevent all your remaining towns from rioting.
 
Does choosing the "Give them some entertainment" option automatically reassign citizens? If so, then yes -- but only in that one town, so you'd have to click it again for each new town that riots.

But I always "Zoom(ed) to city" to do the reassignments myself -- or, these days, activate the Governor (if it's a core city that rioted, because that usually means there's a high risk that all the rest of my towns will riot as well).
 
The AI seems to have a build priority logic for longbowman. All their cities near the front lines would make them over knights or medieval infantry no matter how much I've negatively perfumed them. I guess giving the longbowman amph. attack has something to do with it. But I've also given archers that and the same issue doesn't occur. I guess that's because the longbowman ties in attack strength with the highest fast mover of its era. So when that's in place, amph attack and defense bombard values will take priority over defense regardless of perfuming. Is there a way to check that logic?

Screenshot (397).png
 
I was also wondering to what extent diplomacy could be extended or improved.
For example, to be able to exchange units (mercenaries), to increase the possibility of exchanging small towns (size < 6 for example), to offer protectorates (automatic war if a vassal country is attacked), vassalization offers (get part of a country's per-turn gains and part of its resources in exchange for military protection and defense of the integrity of its territory).
Based on what I've seen of the trade logic (which isn't all that much), it should be possible to allow for trading of more unit types than just workers. That's just a condition that needs to be deleted. It's probably the same for making cities tradable outside of peace treaties. Although the reason the devs restricted that to begin with is the AI wasn't able to properly value cities, so that also ought to be fixed if they're allowed to be traded again. Adding new kinds of diplo arrangements would be much more difficult, of course.

Have you looked into that? One button to solve all rioting cities at once?
This is the sort of thing that I'd like to leave for after Lua is integrated because it's a pretty straight forward and self contained thing. It'll also be a test for the Lua bindings. If they're properly done, this will be easy to implement.

The AI seems to have a build priority logic for longbowman. All their cities near the front lines would make them over knights or medieval infantry no matter how much I've negatively perfumed them. I guess giving the longbowman amph. attack has something to do with it. But I've also given archers that and the same issue doesn't occur. I guess that's because the longbowman ties in attack strength with the highest fast mover of its era. So when that's in place, amph attack and defense bombard values will take priority over defense regardless of perfuming. Is there a way to check that logic?
That's interesting. Perfume wouldn't apply if the AI is skipping its normal production logic entirely. I know of one case where it does that, when its city is undefended. It runs a special bit of logic to pick a defender to build and skips over the main loop covering all unit build options where perfume gets applied. I don't know why the longbowman would get special treatment there. I'd have to take another look at the production logic. Unfortunately it can be difficult to follow simply because there's so much of it, the function with the main loop is 3000 lines alone.
 
I think when the city has enemy units within its borders, it too will have priority logic to pick the highest attacking unit with the cheapest price. The longbowman wins over the the medieval infantry because of its defensive bombard value and in my case, amph. attack. But when I added another unit called the firelancer (4/1/1 at 30 shields) the AI would built these instead of longbowmen.

This turns out to be quite a headache. Since a good number of the AI's cities are on the frontline due to their scattered style of warfare a lot of their cities end up producing cheap frail attackers that get picked off the turn after instead of retreating back to their cities to heal when they could all be producing knights instead.
 
Sorry for interfering, but to be honest, stack limit doesn't look like a good idea for me, for example it exists in ctp/ctp2 and it's just more micromanaging and less fun in my opinion since you have to move units around certain tiles, and in general, introducing any hard limits for UPT makes game less flexible. In my unimportant opinion, just adding disadvantage to overcrowding a tile would be enough, for example if unit in tile dies from attack, every unit has a small chance to receive 1 point of damage and flee to random tile, like when retreating. Also add weight penalty for AI to put units on tiles after certain amount.
In my personal experience, hard limits of this type in games are kind of boring.
 
Sorry for interfering, but to be honest, stack limit doesn't look like a good idea for me, for example it exists in ctp/ctp2 and it's just more micromanaging and less fun in my opinion since you have to move units around certain tiles, and in general, introducing any hard limits for UPT makes game less flexible. In my unimportant opinion, just adding disadvantage to overcrowding a tile would be enough, for example if unit in tile dies from attack, every unit has a small chance to receive 1 point of damage and flee to random tile, like when retreating. Also add weight penalty for AI to put units on tiles after certain amount.
In my personal experience, hard limits of this type in games are kind of boring.
Everything in C3X is togglable. On/off. So, if there is a feature you don't like, you don't turn it on in the config file.
 
Just to add an observation from a game on monarch difficulty. Playing on huge maps with city limit reached, always war, the enemy regularly pops up with big stacks of defender/artillery combos. This can be quite frightening, when the enemy pops up with 12 infantry and 12 artillery, being able to reduce your defenses dramatically.
Great job!

Edit: Playing same settings on emperor difficulty, the AI surely plays much better. No longer just blindly throwing things at you. Invading the other continent is not just a steamroll as my own armies are under real threat from those infantry/artillery stacks as well armies. Need to move a lot more carefully.
 
Last edited:
Double Happiness Of, Gain in Every City and Gain in Every City on Continent. Would it be possible for these three features to switch the targeting from your own cities to everyone else's player cities on the continent or in the world? Which improvements this switched targeting applies to would be told in the config file. Or is it better to wait for LUA?
 
Back
Top Bottom