Resource icon

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

But with that setting (or with the flag "allows size 3 settlements") the building can be built in size 2 and in size 3 cities and therefore is not limited only to size 3 settlements.
 
I think you might have misunderstood me.

If the building(s) to be limited to Size3 settlements requires the Hospital to be built first (or another building(s) which is dependent on the Hospital), and you don't build the Hospital, then none of the Hospital-dependent building(s) will ever appear in the town's build-list.

And no-one with any sense starts building the "Allows Size3" building until shortly before they expect to need it anyway, surely? For me, that would be (1) when my town reaches Pop12, and (2) I want it to grow further, and (3) I've learned about Sanitation. I mean, why pay maintenance on a building you're not getting any use out of?

Of course, no-one ever successfully accused the Civ3 AI of having any sense, either...
 
That would be most excellent. It was one of the major hiccups I am having at the moment. I am trying to jury rig resources and improvements that obsolete to make it work at the moment. The only downside is that if a civ doesn't have the resources to build tanks, yet Cavalry becomes obsolete by a tech, they are SOL for a mobile unit. But that is a better "problem" then having obsolete units still in the build queue long after they should be gone.
I do not have Cavalry going obsolete, as it is the only way to get a unit with greater mobility through either a Mountain or Jungle tile without building a road.
 
I think you might have misunderstood me.
I posted the fact that each building with the flag "allows city size 3" can been built in any city with city size 2, and therefore each building that needs a building that allows city size 3 as a prerequisite, can be built in each city with city size 2 that holds that prerequisite building. Therefore such a setting is not reducing the possibility that the other building can only been built with city size 3 to zero. :dunno:

Despite these facts the thesis, that no one would construct a building that allows city size 3 if not beeing close to reach that city size, in my eyes is not fitting, too. In no case it is fitting for the AI, but it is also not fitting for the human player. The decision of a human player to construct a building that allows city size 3, is massively influenced by the other values that such a building holds, and we are here writing about modding C3C in general and not about modding Civ 3 only limited to the standard C3C epic game.

The last case when a civer in the RARR thread asked, why he is not able to construct a building in a size 1 city that he wants to build, not being informed, that this building has the "allows city size three flag", was only some days ago: https://forums.civfanatics.com/threads/rise-and-rule-revisited-epic-mod.549166/page-79#post-16712652 The civer wanted to construct that building even without knowing, that it also holds the "allows city size 3 flag".
 
Last edited:
I think you might have misunderstood me.

If the building(s) to be limited to Size3 settlements requires the Hospital to be built first (or another building(s) which is dependent on the Hospital), and you don't build the Hospital, then none of the Hospital-dependent building(s) will ever appear in the town's build-list.

And no-one with any sense starts building the "Allows Size3" building until shortly before they expect to need it anyway, surely? For me, that would be (1) when my town reaches Pop12, and (2) I want it to grow further, and (3) I've learned about Sanitation. I mean, why pay maintenance on a building you're not getting any use out of?

Of course, no-one ever successfully accused the Civ3 AI of having any sense, either...
A lot depends on how large you set your towns and cities to be using the General Setting in the editors. For most of my mods I have the towns set for from 9-12, and the cities set for a range of 24-28. That does greatly reduce the need to build hospitals. I also really speed up progressing through the tech sequence early in the game.
 
Extended ZoC could be useful. I just thought of something I might try. Have the Coastal Fortress auto-produce coastal batteries, but make them invisible with their own ZoC. I'd remove the ability from the CF itself so maybe the AI ships won'y avoid like they do now and can be hit by the batteries?
I don't think the AI knows how to move to avoid the CF's ZOC, which is the same as an immobile unit's. It's that ZOC at 1 range is very niche. A unit would need to literally move right past that unit to get bombarded. Just moving in and then back to bombard doesn't trigger it. So the CF is mostly useful in guarding a 1 tile strait. If ZOC was any unit entering the radius of 1 tile being bombarded it would be so much more useful.
 
Again, maybe just an old unworkable idea that I'm sure someone before me brought up, but what about consumable strategic resources? Sort of the opposite of generating strategic resources by building, which would subtract a global/local strategic resource from the trade network. I'm sure there are already built-in mechanics for losing a resource in the game, as you can send a resource to another civilization, which basically has a similar effect.

EDIT: This is probably a bit of a nitpicky suggestion, but how about adding to the retreat rules: if-not-slower (if-faster-or-equally-fast) applied only to units with more than 1 movement, in other words swordsman vs swordsman will never retreat, but knight vs knight or cavalry vs cavalry could retreat.
EDIT2: The thing is, I really like the retreat rule if-faster, but I would like to extend it from a certain technology to units that are equally fast. So practically a technology that would switch from if-faster to if-not-slower.
 
Last edited:
Thank you for looking into the code. Also, does the code also show how much value having a buildable unit have to a tech to the AI? I tend to add lots of different units whose purpose doing the same thing as a main unit line but being weaker and cheaper and occupying different shield costs so that I can avoid wasting shields without having to micro too much. But I have the feeling this badly inflates the cost of techs and strategic resources. Speaking of techs, could there be a way to perfume up or down?
Unfortunately it's not easy for me to see how much value unlocked units contribute to techs in the eyes of the AI since the decompiler made a mess of that bit of code. I'd have to go through it slowly to figure it out. It looks like the AI especially likes techs that unlock units with new AI strategies, and AIs leading military civs put more emphasis on unlocking units.

Perfuming techs is doable and relatively easy. There is a single function inside the game that evaluates the worth of any given tech for the AI. It's a simple matter to modify it to add some perfume at the end. Conveniently, the valuations produced by that function are roughly equivalent to the amount of gold the AI would ask for in exchange for the tech, so that gives some reference for how much perfume to apply. That's unlike governments, which have a single evaluator function, but it returns some number of points and who knows how much each one is worth.

It occurred to me that it would be useful to allow perfume to be specified as a percentage instead of a flat amount of points. That way you could do something like [Fascism: -25%, Republic: 25%] for the govts. That's nice not only because it means you don't need to know how much a point is worth, it also helps with the issue that the AI's govt evaluations depend on the size of its empire. I haven't worked out the full formula yet, but I can see for example that the contributions from corruption and tile penalty are multiplied by the AI's city count.

The percentage perfume is something for the future, though. The last thing I'm going to do for R20 is going to be tech & govt perfume. For sure this time. Earlier I looked into extra healing on fortress tiles but that turned out to be quite awkward unfortunately due to how the code is structured. There's no separate function that determines how much each unit heals, instead that's determined inside the function that does the healing, where it's much more difficult to modify.

This should be an easy request since it is already possible with Hospitals. How about making to so certain improvements can only be made by cities of a certain size? For example, a Barracks can only be built in size 2 city or a Factory only in a size 3 city.
Yes, that ought to be easy.

Again, maybe just an old unworkable idea that I'm sure someone before me brought up, but what about consumable strategic resources? Sort of the opposite of generating strategic resources by building, which would subtract a global/local strategic resource from the trade network. I'm sure there are already built-in mechanics for losing a resource in the game, as you can send a resource to another civilization, which basically has a similar effect.
This is maybe doable. It feels like the kind of thing that I could get basically working but then would be getting bug reports about for the next year or two. Resource generating buildings were like that, and this would add another layer of complexity onto the resource and trade logic.

EDIT: This is probably a bit of a nitpicky suggestion, but how about adding to the retreat rules: if-not-slower (if-faster-or-equally-fast) applied only to units with more than 1 movement, in other words swordsman vs swordsman will never retreat, but knight vs knight or cavalry vs cavalry could retreat.
EDIT2: The thing is, I really like the retreat rule if-faster, but I would like to extend it from a certain technology to units that are equally fast. So practically a technology that would switch from if-faster to if-not-slower.
Those would be easy to implement, at least at the point where the retreat rules are applied. Not sure how I'd incorporate a technology into the config format to specify the rules, though.
 
The unit number limit has a problem: Even if the limit number has been reached it doesn't stop the unit appearing in the menu. The AI will attempt to build it and then not be able to complete it and be stuck there, not building anything. So right now the only good application for it is auto production. Ideally the AI would not even be able to attempt building the unit once the unit limit number is reached. But that still leaves the situation where multiple AI cities build them so some cities will still be stuck.
 

Attachments

  • Screenshot (705).png
    Screenshot (705).png
    1.5 MB · Views: 24
  • Screenshot (706).png
    Screenshot (706).png
    839.7 KB · Views: 14
  • Screenshot (707).png
    Screenshot (707).png
    1.3 MB · Views: 14
  • Screenshot (708).png
    Screenshot (708).png
    141.4 KB · Views: 20
Last edited:
Interesting, is that what the AI sees only? From my perspective (human player), the unit does not appear and then if I reached the limit, a pop-up shows up saying I have to build something else because the limit has been reached.
 
Interesting, is that what the AI sees only? From my perspective (human player), the unit does not appear and then if I reached the limit, a pop-up shows up saying I have to build something else because the limit has been reached.
The AI doesn't switch its build. So it's stuck there with the shield box full and not be able to complete the unit.
 
I have the problem of the local improvement generated strategic resources not showing on screen. What may caused that?

Screenshot (682).png
 
The unit number limit has a problem: Even if the limit number has been reached it doesn't stop the unit appearing in the menu. The AI will attempt to build it and then not be able to complete it and be stuck there, not building anything.
I'll have to look into this. The unit limits are supposed to apply to the AI, and the AI is supposed to be forced to choose another unit build when it's building a unit type that's already reached the limit. That's how I programmed it, but evidently it's not working.

I have the problem of the local improvement generated strategic resources not showing on screen. What may caused that?
The display in the top left for generated resources should work just like for map resources. Are you sure this isn't just a problem with your resources.pcx and/or the resource's icon index?
 
I'll have to look into this. The unit limits are supposed to apply to the AI, and the AI is supposed to be forced to choose another unit build when it's building a unit type that's already reached the limit. That's how I programmed it, but evidently it's not working.


The display in the top left for generated resources should work just like for map resources. Are you sure this isn't just a problem with your resources.pcx and/or the resource's icon index?

I see, I used Iron to represent this resource. But the icon the editor has to be set to 1 for that to appear. It was set at 26. That's why.
 

Attachments

  • Screenshot (709).png
    Screenshot (709).png
    261.4 KB · Views: 19
@Flintlock
Are you able to use your magic to make a thing like a randomly spread resource or unique building which would appear on a map after certain tech is researched and show only within the borders of a faction which researched it?
 
The AI doesn't switch its build. So it's stuck there with the shield box full and not be able to complete the unit.
Fixed. The problem was I neglected to actually set a new build in the AI city when it's forced to switch due to the limit. As it is, the mod calls the function that chooses a new build for the AI but then never switches the city to building what was chosen. A sloppy mistake.

Are you able to use your magic to make a thing like a randomly spread resource or unique building which would appear on a map after certain tech is researched and show only within the borders of a faction which researched it?
Adding a new tile building would be difficult. Limiting resource visibility to within borders is probably doable, I believe there's only one function I'd need to modify there.
 
Fixed. The problem was I neglected to actually set a new build in the AI city when it's forced to switch due to the limit. As it is, the mod calls the function that chooses a new build for the AI but then never switches the city to building what was chosen. A sloppy mistake.

Legend. :D
That was my favourite added feature. I thought I was doing something wrong writing the limits.
 
Flintlock updated C3X with a new update entry:

Release 20

New in this version:
- Remove city improvement limit
--- Controlled by config option remove_city_improvement_limit
- Polish precision striking by cruise missiles
--- Now plays the correct animations and despawns the unit afterward
--- Controlled by the polish_precision_striking config option, which used to be named polish_non_air_precision_striking
- Enable cruise missiles to perform stealth attack bombard
- Add ability to perfume technologies and governments
--- Options named...

Read the rest of this update entry...
 
Top Bottom