Resource icon

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

I'm not sure if I've asked this before but how does the AI assign value to a tech or a resource? I have the feeling that by creating more units and assigning them to a tech and having them require resources would inflate the cost of these techs and res.

But many of my units are merely there for flavor. Others are there to give me cheaper options to avoid shield waste. These units are weaker than their main game versions and the AI would never build them. Yet it seems they inflate the cost of techs and esp strategic resources. I can't seem to be ever be able to purchase any strat resources early to mid game with just gold because of this.

This article might be helpful. It reveals most of the factors the AI uses to calculate the value of each tech:
https://civfanatics.com/civ3/strategy/game-mechanics/what-will-the-ai-research-next/
 
...but this is also already programmable in the Firaxis Editor -- at least as applicable all units included in a .biq. IIRC it's under the 'General Settings' tab, using the "unit experience" box.
Hmm, I'm not seeing how to remove certain levels of combat experience. Are you sure? All I see is a way to modify the hitpoints and retreat bonus.
 
Is there a way to designate an improvement as "uncapturable"? Right now the only way to do that is to assign it cultural output. And if you don't want it to create actual culture then there's only the SW Palace auto generating a negative culture improvement trick. But that trick only works for a certain number of improvements on the editor. Being able selectively have culturally flavored improvements being auto razed upon capture to prevent stacking of one's own culturally flavored version on top of that could open the door for each civ having their own unique set of architecture.
 
Is there a way to designate an improvement as "uncapturable"?
This ought to be easy to do, I'll add it to the Lua list. I could insert a call to Lua to get the chance to destroy each building when a city is captured, with the base value being 100% for buildings that produce culture and 67%, or whatever it is, for the rest.

I'll also make a note about perfuming resource values, but honestly I don't know when I'll get around to that. Right now I'm busy putting the the final touches on the first R25 preview.
 
Hi Flintlock, I'm going to clean my PC and then reinstall C3C and C3X. I hope it works!
I'll let you know if I succeeded, so that this topic can be closed. Anyway, it can remain as an indication for other users who are not very good at managing a computer or an operating program!
Thank you for your understanding, help and apologies if I bothered anyone!
YES!
FINALLY IT WORKS! :)

For those who I hope they don't have the problems I had:
- I searched and deleted the C3C file from (C-Users-PC(or whatever you called it)-AppData-Local-VirtualStore-ProgramFiles(x86) - (here Civinator guided me!);
- I searched in the antivirus for the blocked files (in this case C3X 24) and unblocked them;
- I searched in Settings/App for unusual installations - in my case I found Update Civ 1.22, 1.27 and 1.29) and uninstalled them.
Here I had to reinstall the updates in C3C, after which I uninstalled the game - that's the only way it worked!

If anyone knows what else can be done in such cases, maybe it would be good to share their ideas with us!

Many thanks to Civinator, Flintlock, ajb, jlvfr, for their patience and guidance!

All the best to everyone!
 
Last edited:
The first thing is already sort of possible in C3X, the catch is that the extra support cost must depend on each unit's shield cost. The config setting is named "extra_unit_maintenance_per_shields" and, for example, setting it to 100 means units that cost 100-199 shields cost double maintenance, 200-299 cost triple, and so on. The way it works under the hood is that more expensive units are counted 2, 3, etc. times for the purpose of maintenance so one unit's worth of free support from cities doesn't cancel them out completely. The problem with reinterpreting free city support as flat gold instead of number of units is that would be a big nerf to governments that charge 2+ gold per unit in maintenance.
This system is an interesting design, I'm liking it a lot. I feel the calculation has a very strange mathematical offset though. You'd think mod designers would have access to simple schemes like "shields/10" (where maintenance costs for a 10 shield unit would be 1 gold, a 50 shield unit would be 5 gold, a 100 shield unit would be 10 gold, and so on). But you can't really do "shields/10", you can only do "1 + shields/10". I feel there should be another config option to remove the offset (units between 0-9 cost zero maintenance, units between 10-19 cost normal maintenance, and so on)
 
I feel there should be another config option to remove the offset (units between 0-9 cost zero maintenance, units between 10-19 cost normal maintenance, and so on)
As I pointed out earlier, this is completely unnecessary to implement in C3X, because you can already set any given unit-type to cost zero maintenance in the basic Firaxis Editor.
 
Is there any way to change the defense bonus from the fortify command?
It's called "Fortifications" under the General Settings tab in the vanilla Editor. You can set defensive values for cities and other stuff there, too.
 
I feel there should be another config option to remove the offset (units between 0-9 cost zero maintenance, units between 10-19 cost normal maintenance, and so on)
The idea behind that option to was to give expensive late-game units additional maintenance costs on top of their normal cost. I think it would be very strange if setting that option made a bunch of units free. In any case, the ultimate solution will be for the mod to call out to a little Lua script to determine the maintenance cost for each unit type, that way you can implement whatever formula you like.
 
  • Like
Reactions: ajb
Well I'm really liking the uniform system based on shield cost, I don't think I would use a Lua script to customize further even if it was available, even though I can't get exactly the maintenance costs I want. In case other people are interested, as a half measure one can use the formula "1 + [shields/11]" which approximates "[shields/10]" for multiples of 10 until you hit 120 shields.

Maybe it is weird that I'm trying to design a support formula wherein units built with 9 shields or less would require no support, but there would be no such units in my mod anyway. I can totally see though that when "extra_unit_maintenance_per_shields = 100", it makes more sense to include the offset. The most general thing we can say is that the player is going to be least confused when the most common/most basic unit(s) require normal support cost. For X=100, having units built with 0-99 shields cost 1 gpt (instead of being free) is the least confusing. For X=10, having warriors cost 1 gpt (instead of 2 gpt) is the least confusing. Funny how that works!

As I pointed out earlier, this is completely unnecessary to implement in C3X, because you can already set any given unit-type to cost zero maintenance in the basic Firaxis Editor.

I will have to test this later, but right now if I set the C3X config to be "extra_unit_maintenance_per_shields = 10", and if a unit is built with 10, 20, or 100 shields then the maintenance is 2, 3, or 11 gold respectively. If I also set these units to cost zero maintenance in the Firaxis Editor, I would expect all those units to cost 0 gold, not 1/2/10 gold, respectively. Maybe you didn't understand that was what I was aiming for though.
 
Thanks Flintlock!

Also, I'm very interested in the minimap resizing too!
On a somewhat related note, I wonder how feasible it would be to have the map resize and zoom in and out on mouse wheel scroll event? Essentially mimicking how more recent Civ UIs work (and ignoring the existing binary zoom).

Given that the game can render on both high and low resolutions and tracks the screen size internally, I wonder if this could be done by overwriting the internal screen size values and triggering a redraw. I suppose the tricky thing would to be ensure the rest of the UI elements would remain the same size.
 
Huge update time. Here's R25 Preview 1: https://github.com/maxpetul/C3X/releases/tag/Release_25_Preview_1
Changelog:
  • Increase city limit to 2048
    • Setting named lift_city_limit, included in new "Limits Removed" section with other limit increases/removals
  • Enable tile graphics to cycle over day and night, see "Day/Night Cycle" section of default config for details
  • Allow Civilopedia descriptions for units, civilizations, and game concepts to span multiple pages
  • Can adjust time to double building culture, setting named years_to_double_building_culture
  • Option to prevent units from upgrading past an intermediate type that does not have the upgrade ability
    • Setting named prevent_old_units_from_upgrading_past_ability_block
  • Can adjust times to generate tourism gold, setting named tourism_time_scale_percent
  • Option to put all human players in contact with each other at the start of a hotseat game
    • Setting named introduce_all_human_players_at_start_of_hotseat_game
  • Double size of minimap when running in high definition (>= 1920 horizontal pixels), setting named double_minimap_size
  • Option to show some popup messages as online-multiplayer-style notifications
    • Setting named convert_some_popups_into_online_mp_messages, off by default, see config for which popups are affected
  • Option to switch debug mode on or off for games in progress
    • Setting named enable_debug_mode_switch, off by default, see config for how to use in-game
  • Fix AI players being able to sacrifice units that don't have the sacrifice special ability set on their type
  • Option to tint coast and sea tiles on minimap based on cultural borders
    • Setting named show_territory_colors_on_water_tiles_in_minimap, off by default
  • Do not charge maintenance for buildings provided for free by shared wonder effects
  • Option to draw small shadows underneath city dots on the minimap to make them more visible
    • Setting named accentuate_cities_on_minimap, off by default because it doesn't quite work properly

At long last, the city limit is lifted. I'm quite happy with that, it was by far the most requested mod feature, and ended up being a fun little technical challenge. I'll write out all the details later when I have time.

Another big addition in R25P1 is the day/night cycle. This varies all the tile graphics through 24 stages from noon to midnight and back again. Here's what it looks like:
day-night-cycle-demo-optimized.gif

It can optionally be set to advance at the end of each turn, after a certain amount of time has passed, or based on real world time. This feature was developed mostly by @instafluff . It's the first time someone other than me has contributed code to this project, so that's remarkable. Thanks very much to instafluff. The day/night cycle graphics have to be downloaded separately as including them in the main download would add hundreds of megabytes:

The last thing I want to show off is the updated minimap. Here's what it looks like:
r25_minimap_changes.png

(In case you're wondering how many cities that is, it's 1317.) You'll get the double size whenever the game is running at an HD resolution, defined as a horizontal resolution of at least 1920 pixels. But the larger minimap can be configured also to appear all the time or never. There's also the option to accentuate the city dots on the minimap with a subtle drop shadow. I like how that looks and it helps make the city dots more visible against light colored territories. Unforunately it doesn't work quite right so that option is left off by default. The issues it has are (1) that it sometimes doesn't fully appear until you refresh the minimap by switching from territory to geography mode and back, and (2) the shadows appear in geography mode. Rather than delay R25P1 to deal with those minor issues, I left it off by default.


Well I'm really liking the uniform system based on shield cost, I don't think I would use a Lua script to customize further even if it was available, even though I can't get exactly the maintenance costs I want. In case other people are interested, as a half measure one can use the formula "1 + [shields/11]" which approximates "[shields/10]" for multiples of 10 until you hit 120 shields.
One of my hopes for Lua is that it will let me handle small requests like this much faster, even if you aren't interested in writing a script yourself. Changing the formula for unit maintenance in such a small way should be possible with a script of 10 lines or less. With Lua, I could very quickly write that for you and post the script file to be dropped in your scenario's scripts directory. Then we wouldn't have to wait weeks or months for the next release and wouldn't have a new config option with its own name and description for something so minor.

Given that the game can render on both high and low resolutions and tracks the screen size internally, I wonder if this could be done by overwriting the internal screen size values and triggering a redraw. I suppose the tricky thing would to be ensure the rest of the UI elements would remain the same size.
I doubt the game would then scale the image to the actual screen size. You'd likely have to do that part manually, have the game draw the map to an off-screen canvas then scale and draw that in place of the map on the actual screen. Another problem is that you'd have to modify the logic for clicking on tiles, which was only written for the two zoom levels. There may be other things like that that would need to be modified, though I can't think of any right now.
 
No city limits! The holy grail of civ 3 modding after all these years. Astonishing work, can't wait to try it out (and that day night cycle looks nifty too)
 
Huge update time. Here's R25 Preview 1
Amazing. :clap: :clap: :clap: A lot of work has been done. And we even have a very nice surprise. Good job to you too, @instafluff. The ability to cycle between day and night is a very unexpected addition. :thumbsup:
If this is now possible, the question arises as to whether it will be possible in the future to simulate the actual cycling of day and night for different parts of the world? Let's say, for example, that 1/3 of the world has day, 1/3 of the world has night, and the remaining 1/3 of the world transitions from day to night in one place (1/6) and from night to day in another place (1/6). Of course, these four time zones (dawn, day, dusk, night) would shift (based on the current four options: timer, user-time, every-turn, specified) to mimic the Earth's rotation around its axis.
I'm also curious if, in addition to the basic terrains and resources, you plan to expand with other popular and frequently used terrains and resources that are not part of the base game?
And last but not least, I'm also wondering if this will just be an aesthetic element or if it will potentially be a real new game element in the future that affects other game elements? For example, if units attack or bombard during the day or at night, they have certain advantages or disadvantages, and so on.
 
Good job to you too, @instafluff. The ability to cycle between day and night is a very unexpected addition. :thumbsup:
My pleasure! I'm glad you like it.

If this is now possible, the question arises as to whether it will be possible in the future to simulate the actual cycling of day and night for different parts of the world?
I think this would be straightforward to implement on a technical level. To be honest, I'd be more concerned about it straining people's eyes, as the difference between midnight and noon, for example, can be a bit striking. But I could give it a try.

I'm also curious if, in addition to the basic terrains and resources, you plan to expand with other popular and frequently used terrains and resources that are not part of the base game?
There's a few scripts that need to be run and variables tuned to do this for a given set of terrain, which unfortunately makes this difficult for others to jump in and generate them. I'm happy to do this on a limited basis, but would prefer to have a small list of such terrains to run it for. Also, terrains and resources are currently bundled together, so in the future I may have to consider splitting those into separate folders to make this more modular. Not sure.

And last but not least, I'm also wondering if this will just be an aesthetic element or if it will potentially be a real new game element in the future that affects other game elements?
Flintlock discussed this when we were developing the feature as well. I think this is a good use case for the Lua implementation. I suspect it would be straightforward to have Civ 3 reach out to Lua and implement some special logic for a scenario at runtime, but will defer to Flintlock on that one.

As an aside, I'll set up a separate forum for the Day/Night Cycle as well (mostly for discussing the art implementation and support for other terrains).
 
The idea of changing brightness depending on the time of day is brilliant. It's an original advance for the game (but for now, we have to stick with the basic terrain, which unfortunately isn't very realistic or attractive). A big thank you to Flintlock and instafluff.
Could we imagine the same principle with the seasons (with a snow-covered terrain in winter and movement restrictions, for example)?
 
Back
Top Bottom