• 📚 Admin Project Update: Added a new feature to PictureBooks.io called Story Worlds. It lets your child become the hero of beloved classic tales! Choose from worlds like Alice in Wonderland, Wizard of Oz, Peter Pan, The Jungle Book, Treasure Island, Arabian Nights, or Robin Hood. Give it a try and let me know what you think!

C3X Districts

One more question popped up as I was adding some new natural wonders. Specifically I was trying to add Everglades to marsh terrain so that it would pop up next to another marsh terrain. In the settings the "terrain_type" is causing some issues. I tried to use the value "swamp" and "marsh" in there, but it doesn't seem to work. In the "adjacent_to" the "swamp" value works fine. I was just wondering what are the valid terrain types?
Ah - that was my unintentional omission. Thanks for catching and reporting it! I've fixed the bug and "swamp" will be supported as a terrain_type as well in the next release.

BTW Everglades sounds great!
 
Hmm, that looks like a possible bug. Thanks for sharing! In this case the distro hub you conquered looks like it is connected to the trade route (so it is "active") and thus the surrounding tiles should be unworkable. Is there any way you could share before & after save files?

Afraid not since I was relying on autosaves and I've since started a different game, but if I see it again I'll make sure to grab them.

A couple more questions:

1. it seems I can't road tiles with natural wonders on. Is this intentional?

2. if I were to build, say, Sun Tzu's, would the free barracks go to every city on the continent whether they have an encampment or not, or will they go only in cities with encampments?
 
Ah - that was my unintentional omission. Thanks for catching and reporting it! I've fixed the bug and "swamp" will be supported as a terrain_type as well in the next release.

BTW Everglades sounds great!
Excellent! While I was adding some more stuff, I noticed similar issues with "hills", "mountains", and "volcano" with the "terrain_type" not being valid values, there might be others too.
 
Afraid not since I was relying on autosaves and I've since started a different game, but if I see it again I'll make sure to grab them.
No problem, just thought I'd ask, thanks. I'll try to recreate this bug on my end as well.

Edit: I believe I found (and hopefully fixed) the bug for this. If you do happen to run into it again please feel free to post a save file and I'll make sure it'll be fixed for next release.

1. it seems I can't road tiles with natural wonders on. Is this intentional?
Yes, this is by design. It just seemed to me that we probably wouldn't build roads through Mt. Everest, etc., though obviously we could reason the other way as well. Do you think roads should be buildable?

2. if I were to build, say, Sun Tzu's, would the free barracks go to every city on the continent whether they have an encampment or not, or will they go only in cities with encampments?
Wow, this had never occurred to me. I'm not sure what would happen. It depends on if the underlying game runs the check that we patched to determine whether a building can be made in a city, or bypasses it, which I don't know offhand, unfortunately.

Excellent! While I was adding some more stuff, I noticed similar issues with "hills", "mountains", and "volcano" with the "terrain_type" not being valid values, there might be others too.
Hmm, this is tricky. "hills" I can definitely add. Visually I'm hesitant to do "mountains" and "volcano", as natural wonders are technically rendered as a building on top of the terrain. So the underlying terrain is still rendered. If we built a natural wonder on a mountain or volcano, depending on the art, the mountain or volcano underneath might poke out and look odd. I reasoned that thus setting adjacent_to would allow the natural wonder to look reasonable alongside a volcano or mountain, while avoiding the trouble of trying to paint it directly over those. If you have a specific reason to want to do that, I'd be happy to revisit that (we could of course enable this, but note the caveats I mention here)

Edit: and sorry, to answer your original question:
  • valid terrain_types: "desert", "plains", "grassland", "jungle", "tundra", "floodplain", "swamp"*, "hills"*, "coast", "sea", "ocean"
  • valid adjacent_to types: same as above + "river", "mountains", "volcano"
* next release
 
Last edited:
Hmm, this is tricky. "hills" I can definitely add. Visually I'm hesitant to do "mountains" and "volcano", as natural wonders are technically rendered as a building on top of the terrain. So the underlying terrain is still rendered. If we built a natural wonder on a mountain or volcano, depending on the art, the mountain or volcano underneath might poke out and look odd. I reasoned that thus setting adjacent_to would allow the natural wonder to look reasonable alongside a volcano or mountain, while avoiding the trouble of trying to paint it directly over those. If you have a specific reason to want to do that, I'd be happy to revisit that (we could of course enable this, but note the caveats I mention here)

Edit: and sorry, to answer your original question:
  • valid terrain_types: "desert", "plains", "grassland", "jungle", "tundra", "floodplain", "swamp"*, "hills"*, "coast", "sea", "ocean"
  • valid adjacent_to types: same as above + "river", "mountains", "volcano"
* next release
Thanks for the list! I was thinking of "volcano" from the perspective of e.g. adding Krakatau as one natural wonder, but as you said, you would have to be careful with the artwork, especially considering when the volcano erupts. The "mountains" was more like having those mountainous natural wonders as part of a regular mountain line or within a cluster of mountains. Maybe those could indeed be enabled with the caveats in mind, but I'm fine either way.
 
Yes, this is by design. It just seemed to me that we probably wouldn't build roads through Mt. Everest, etc., though obviously we could reason the other way as well. Do you think roads should be buildable?


Wow, this had never occurred to me. I'm not sure what would happen. It depends on if the underlying game runs the check that we patched to determine whether a building can be made in a city, or bypasses it, which I don't know offhand, unfortunately.

With mount Everest and such, sure. I can also see situations (like SMAC style natural wonders) where tile developments would be the case - so a grand oasis or garden or something, I can see it.

Do natural wonders have civilian workable tile yields, or are they giving the yields just by existing in the city circle? Either way makes sense, but how important roads would be depends on if they give the commerce bonus. Personally I'd swing no-roads.

So, on building prerequisites, I don't know how you implemented districts, but the game absolutely does not care in vanilla. - If you set harbours to be produced by a wonder, they will on every city, even non-coastal ones. (and function as normal) - same with rivers and hydroplants if you get the hoover dam. Unless you added a special rule, it's almost certainly going to force a -rax into all cities, just something to keep in mind.
 
Thanks for the list! I was thinking of "volcano" from the perspective of e.g. adding Krakatau as one natural wonder, but as you said, you would have to be careful with the artwork, especially considering when the volcano erupts. The "mountains" was more like having those mountainous natural wonders as part of a regular mountain line or within a cluster of mountains. Maybe those could indeed be enabled with the caveats in mind, but I'm fine either way.
Great, sure.Yes, this makes sense. I think if you just set Krakatoa to terrain_type "grassland" and adjacent_to "mountains" it should fit in perfectly as part of a mountain chain, as the most important visual aspect is just them being alongside the other mountain tiles. This is how Everest and so on are configured.

Do natural wonders have civilian workable tile yields, or are they giving the yields just by existing in the city circle?
They're districts under the hood, so the tiles themselves are unworkable, but can give whatever special bonuses desired via config (by existing in the city circle)

Either way makes sense, but how important roads would be depends on if they give the commerce bonus. Personally I'd swing no-roads.
Right, unless there's a compelling reason otherwise, I'm thinking to keep them unworkable and "pristine".

So, on building prerequisites, I don't know how you implemented districts, but the game absolutely does not care in vanilla. - If you set harbours to be produced by a wonder, they will on every city, even non-coastal ones. (and function as normal) - same with rivers and hydroplants if you get the hoover dam. Unless you added a special rule, it's almost certainly going to force a -rax into all cities, just something to keep in mind.
Oh interesting, well this probably answers the question then, and I'd guess barracks and so on would be created regardless of districts. Thanks for the info!
 
Last edited:
Also just for reference, here are a list of bugs I've fixed and should be working for the next release of C3X.
  1. user.districts_config.txt not properly overriding settings in default.districts_config.txt
  2. District buttons not being shown if worker is on a mine
  3. Clicking Automate worker crashing the game
  4. The AI can build roads on natural wonders
  5. Add support for swamp & hills in natural wonders
  6. Tiles around distro hubs not being made unworkable after conquest
  7. Natural wonders not being rendered if enable_districts is false
  8. Barracks being shown (but grayed out) as an option in city screen at start of game, even if tech for encampments not yet known
  9. Players and AI may possibly spawn on a natural wonder tile at start of the game
If you see more please report here.
 
Last edited:
Quick question for everyone, regarding the C3X Districts config files, as I need some input:

I designed C3X districts to check for
  1. default.districts_config.txt
  2. user.districts_config.txt (if available, it overrides [1])
  3. scenario.districts_config.txt (if user is starting a scenario & the file is available, it overrides [1] & [2])
After my recent fixes, this works fine for starting a new game or loading a scenario from scratch. The problem is with loading saved games. In a nutshell, when we load a saved game, C3X doesn't actually know at that point whether it was originally a scenario or a vanilla game. Civ 3 doesn't actually even distinguish them at that point, as the relevant information is all in the .SAV file.

So when C3X loads a .SAV file, as far as I can tell it's not possible to know whether to use user.districts_config.txt or scenario.districts_config.txt.

I could implement some really complex logic to try to check the districts in the SAV against both of those config files to try to figure out which to use, but this would be quite messy and difficult.

As a result, I'm actually thinking to just remove support for scenario.districts_config.txt entirely and just use [1] and [2].

Thoughts? Is this is a bad idea? If I did this, you'd basically just need to always make sure user.districts_config.txt is configured for whatever you intend to play. On the plus side, conceptually this all gets simpler: just edit that one file.

Also, to make it clear when there may be a problem, I added a check that will let you know if things are off when you open a SAV:

1763760332827.png


----

Edit: After thinking this through, I may have a better solution: keep the 3 configuration files (default/user/scenario) and use them for when starting a new game or scenario. ALSO, however, save the districts configuration directly to the SAV file. When a user loads a saved game, there is no dependency on having the local config files exactly the same; the districts are simply loaded as they were and the user doesn't need to do anything. This should actually dramatically simplify things.

The only downside I can think of is that one wouldn't be able to change the configuration after a game is started (e.g., change a given district's food bonus from +1 -> +2), but this doesn't seem like a bad thing. I just tested and it seems to work well.

Can anyone can think of a good reason not to do this?
 
Last edited:
That sounds like it would make districts substantially less usable for scenario modding, because we'd be asking users to juggle and reset their personal configs whenever they change mods.
 
That sounds like it would make districts substantially less usable for scenario modding, because we'd be asking users to juggle and reset their personal configs whenever they change mods.
Right, that's my concern. However I think I have a solution in just saving the configs directly to the SAV file (see details in my edit above)
 
Right, that's my concern. However I think I have a solution in just saving the configs directly to the SAV file (see details in my edit above)
Save file would, if possible, be perfect, I think - since the game basically bakes biq's into saves already, in progress games can't be safely updated.

Since we can't patch other game rules, being unable to change district rules isn't too bad.
 
Hi all,

As a civ player since Civ I on my Amiga 500 at that time (I'm a 56 year old dude :)), and I played all Civs till now Civ VI, including "Call to power" 1 and 2.
For now, from what I see I stay away from CIV VII, and maybe I will ever buy it when it becomes a kind of Antholgy state like Civ VI.
That been said for some variety I started back with playing some Civ III.
Normal 90% of time I play without mods but here and there I try some.
So I found out about the C3X mod and installed version 25.
Played with it a few hours and really enjoying the improvements.

I want to say a big thank you, to all involved in creating this mod!

And now, this Version 26 about importing Civ VI mechanics catches my attention.
It looks great (allthough my opinion is more is not always better) but my wondering here is, how does AI handle this all?

But for now I enjoy a bit further the version 25 and maybe later I will try the latest version. Thank You again!
 
As a civ player since Civ I on my Amiga 500 at that time (I'm a 56 year old dude :)), and I played all Civs till now Civ VI, including "Call to power" 1 and 2.
For now, from what I see I stay away from CIV VII, and maybe I will ever buy it when it becomes a kind of Antholgy state like Civ VI.
That been said for some variety I started back with playing some Civ III.
Normal 90% of time I play without mods but here and there I try some.
So I found out about the C3X mod and installed version 25.
Played with it a few hours and really enjoying the improvements.
Welcome, and that's great! I played Civ 3 back in high school and have come back to it a bit later in life :). And I actually am quite similar in how I play; about 90% without mods. This was a case where I liked the realism and slightly different dynamic that districts bring in Civ 6, but wanted to simplify it to better fit Civ 3. Whether I succeeded or not, I'm not sure. And regarding C3X in general, Flintlock is the brains of the operation and has done the vast majority of the work, and my contributions are lesser and much more recent. But I'm glad you are enjoying it!

I want to say a big thank you, to all involved in creating this mod!
Speaking for myself, absolutely! My pleasure.

And now, this Version 26 about importing Civ VI mechanics catches my attention.
It looks great (allthough my opinion is more is not always better) but my wondering here is, how does AI handle this all?
I agree that more is certainly not always better. That was constantly on my mind as I worked on this. I really want to keep what we all fundamentally enjoy about Civ 3 and just add slightly to it. Again, I'm not sure if I succeeded in that, but that was the goal. And in any case, it's all designed to be modular, so you can keep what you like and disable the rest.

Regarding the AI, I'm actually quite proud of that piece. The core game AI drives the need for districts and builds them quite quickly with nearby workers. When an AI city decides it wants a temple, for example, it notes that that may require a holy site, and immediately finds a worker to build it (on a nearby tile with the least productive capability). So it keeps the core AI largely as-is and leverages the existing AI decision-making as to when-to-make-what. The AI also defends districts reasonably well. I've personally found the AI to be quite capable, all in all, but perhaps others have had a different experience. That's definitely what I'd like feedback on.

-----

Also, regarding the scenario configs, @Virote_Considon and @Android Assembly I spoke with Flinklock, who set me straight on how C3X loads the scenario configs both afresh and in in-progress games. It turns out there were some nuances to the code I hadn't caught. Flintlock was also somewhat hesitant to bake the configs into save files, as the rest of C3X doesn't work like that.

Anyway, what if a scenario folder with districts just looked like this: the usual C3X scenario file, configuration files for districts, wonders, and natural wonders, and what I'm renaming scenario.districts.txt. This is the file that lists which districts are at which coordinate at the start of the scenario, and is output by the Quintillus Editor as <scenario_name>.c3x.txt. So essentially that file would just need to be renamed and moved to this folder.

1763838303171.png


In my testing now (finally), this system works for both new scenarios and saves. Thanks for helping think this through and sorry there are so many moving parts. Hopefully this structure would be intuitive and simple(ish).
 
Last edited:
First of all thank you for such a quick response!
An secondly, oh boy what a dedication from you!
If I continue playing Civ III now for a while, I will definitely try out this districts or the latest version.

Thank you very much once more!
 
Hello!
A few observations, maybe useful:
1. ... maybe it would be good to assign a color/border or something else, so that the buildings that can be built/viewed in Districts can be better distinguished from those that will be built in the city?
I have seen that those that need a District to be built appear blurred, but when the district already exists, I don't really notice immediately which will be built in the district and which will not... maybe I'm wrong...
2. ...maybe when viewing the city it would be good if the city borders also included the Districts, because they appear as if they were no longer part of the city's buildings/tile...
3. The Districts can also be built outside the city limits, for example Districts for Wonders, but they are not active, which seems correct to me, but you can still build them!
4. ... Distribution Hub, it's great for what it does, but I'd like to be able to build it outside the city limits, how to say... like a distribution center but outside the city limits... without "biting" the city tiles! :) It is posible?
- maybe a mini distribution hub inside the city limits that would distribute the surplus from that city to all the other cities...?
5. - I built a Distribution Hub one tile away from the city but... The Hub has 9 food units distributed, and in the tiles on the city border it has food: 5(potatoes)+ 9(3x3) from grassland + 1 from the hill - the 9 food units appear in all cities... its ok?
6. Natural Wonders do not appear with resources:
7. I have a city stagnated at 4, without growth but the message to build a Neighboring District does not appear.
- I built a Neighboring District but... nothing
... the city started to grow when we entered Anarchy/Revolution to change to Monarchy...
Is that ok?
8. The message that tells you that you need to build the Neighbors District disappears very quickly, is not very visible, and is not repeated every turn.
9. The city asks me to build the Neighborhood District -> I build it -> the city starts to grow, then I destroy the Neighborhood District, the city continues to grow, how much it should have grown (one point).. the growth is reactivated if I rebuild the Neighborhood District plus another Neighborhood District (how many there should be).
So the population does not decrease and does not stop growing if I destroy the Neighborhood District!

Thanks for your attention and understanding!
 
Last edited:
Hello! I'm glad you are enjoying Districts. Thanks for the feedback.

Before I answer the questions below specifically, I should mention that my goal with most of the design was to stick with the vanilla game behavior and UI wherever possible - everyone is used to that, and I want Districts to be minimally disruptive and consistent with the regular game (and fun, hopefully).
1. ... maybe it would be good to assign a color/border or something else, so that the buildings that can be built/viewed in Districts can be better distinguished from those that will be built in the city?
I have seen that those that need a District to be built appear blurred, but when the district already exists, I don't really notice immediately which will be built in the district and which will not... maybe I'm wrong...
Right, Districts are grayed out when a city *could* build them if a required district existed. I know what you mean, but am hesitant to add anything to this, mostly because the base game does not remind us or give other hints when new buildings or Wonders become available. Because the game doesn't do that, I would prefer Districts do the same.
2. ...maybe when viewing the city it would be good if the city borders also included the Districts, because they appear as if they were no longer part of the city's buildings/tile..
I think you mean that in the city screen, Districts are dark? (unworkable). Unfortunately this would be hard to do. The base game makes unworkable tiles appear that way, and Districts are by-design, unworkable.
3. The Districts can also be built outside the city limits, for example Districts for Wonders, but they are not active, which seems correct to me, but you can still build them!
Yes, this is by design. Just like you can build farms & mines outside of your territory.
4. ... Distribution Hub, it's great for what it does, but I'd like to be able to build it outside the city limits, how to say... like a distribution center but outside the city limits... without "biting" the city tiles! :) It is posible?
- maybe a mini distribution hub inside the city limits that would distribute the surplus from that city to all the other cities...?
If you could build Distro Hubs outside of your territory, what if another civ built one next to it? Or, what if you built one in another civ's territory? What should happen?
It's unclear how the game *should* behave in such situations, and anyway it would be inconsistent with how the rest of the game works, unfortunately.
5. - I built a Distribution Hub one tile away from the city but... The Hub has 9 food units distributed, and in the tiles on the city border it has food: 5(potatoes)+ 9(3x3) from grassland + 1 from the hill - the 9 food units appear in all cities... its ok?
I really need pictures here, as this is somewhat difficult to follow. Please share those if you would like me to take a look.
6. Natural Wonders do not appear with resources:
I'm unclear on this one. Are you observing that Natural Wonders don't appear *on top* of resources? (e.g., Mt. Everest on top of oil). Or something else? Again, pictures would be helpful if you see an odd case.
7. I have a city stagnated at 4, without growth but the message to build a Neighboring District does not appear.
- I built a Neighboring District but... nothing
... the city started to grow when we entered Anarchy/Revolution to change to Monarchy...
Is that ok?
This is somewhat difficult to understand without more information or pictures. Do you have maximum_pop_before_neighborhood_needed = 4 ?

Also, it's important to distinguish a city's (1) population increasing (e.g., from 4 -> 5) versus (2) stockpiling more food. So when you say started to grow I'm not sure which you mean.

Neighborhoods are designed to mimic the behavior of aqueducts and hospitals, i.e., you are able to continue stockpiling food up to a limit, but the city cannot grow in population without sufficient neighborhoods. If you see something inconsistent with that, please post pictures.
8. The message that tells you that you need to build the Neighbors District disappears very quickly, is not very visible, and is not repeated every turn.
Well, again the goal is to use the system the game already provides. The vanilla game uses that brief message system for "We love the King", day, disease, etc. so the speed should be the same. And I believe hospitals/aqueducts show only one "popup" message per city (ever) when growth is blocked by them, so in that sense, the Neighborhood-needed message is *more* obvious than hospitals/aqueducts, I would think.

As to the frequency of turns, when I first developed it, every turn felt somewhat annoying so I set it to every 4 turns. I could change that of course, but I also want to make sure people don't find it annoying.
9. The city asks me to build the Neighborhood District -> I build it -> the city starts to grow, then I destroy the Neighborhood District, the city continues to grow, how much it should have grown (one point).. the growth is reactivated if I rebuild the Neighborhood District plus another Neighborhood District (how many there should be).
So the population does not decrease and does not stop growing if I destroy the Neighborhood District!
I may reconsider this is the future, but I designed Neighborhoods not to reduce population if destroyed, just block further population increases. Maybe just imagine the people become refugees, etc.

About the "not stop growing" part, again, I think this depends on if you mean population increase or more stockpiling of food. If you could please share screenshots that would help.
 
Last edited:
NottinghamDistrict.png

cities_with_mutual_district_receive_buildings is set to true, and Ta-Tu has a marketplace, but for some reason Nottingham isn't sharing the district. I'm guessing this is a bug.
 

Attachments

First of all, thank you for your understanding, patience and for your answer!
1. I understand!
I think it can be specified in Civilopedia which building will be built in the District, not in the city - in Civilopedia it can be bolded, colored with fireworks... :) it's just an idea!
2 and 3. Ok, I understand!
4. I understand and you're right, but I'm thinking about building a Hub in my territory, for example instead of building a city I build a Hub, or destroy a city and make two Hubs... to gain resource distribution... but I understood your explanation! Thank you!
5. Unfortunately I don't have the save anymore... but I'll build another Hub and see if it behaves the same as the previous one and I'll let you know if there's anything strange!
-- The first image is with the start of the Hub construction, where there are 5+5(potatoes)+3+3+3(grasslands) = 19 food units in the 6 tiles covered by the future Distribution Hub!
1764591826056.png

Below is the food distribution in the other cities - I have 4 cities and in all of them 6 food units appear from the Distribution Hub! It is ok?
1764592166056.png

1764592260456.png

1764592826161.png

1764592915204.png

6. I'm attaching two Printscreens - about Natural Wonders, in this case it's Everest!... is it okay how it appears?
1764590392722.png

1764590469679.png

7. No I didn't set anything, I just enabled District + Natural Wonder...
I'm attaching a Printscreen, for a city with 7... it doesn't grow...
...Is it okay? Am I doing something wrong?
1764590645806.png

1764590725471.png

8. I understand and you are right, thank you!
9. I understand and I like how it works! It is like a boost for growth if you also have enough food for growth! Kind of like the Aqueduct... Thank you!
 
Last edited:
One more thing... A small suggestion if it possible...
1. Can you add a Costal Hub or Naval Hub or Doc Hub or something like that so that naval-specific buildings can be built in that Hub, for example a Harbor, Port, Shipyard, etc. even if a city is not exactly on the coast? In this way, the coast/sea tiles are also maximized, for a city located one tile away from the coast! Maybe a ship could shelter/repair there!
What do you think about this idea? Is it possible?
2. Could District Hub also share the money from occupied tiles? It's a bit of a waste of money... :)

It would be interesting if it could somehow be possible to build a campus or how to say, a war camp, so that when you go to besiege a city, you can recover faster in that war campus... Hmm... maybe with the worker option to make fortresses...!?

Thank you for your attention and understanding!
 
Last edited:
Back
Top Bottom