[SDK MODCOMP] Building City Size Prereq

Shqype

Shqyptar
Joined
Nov 15, 2005
Messages
2,468
Location
New York + Shqypni
Building City Size Prereq SDK Mod Component
For BTS 3.13, made with Bhruic's unofficial patch 1.11

This was something that Civ 4 should have had in it, and I'm fairly certain it was either in Civ 3 or Civ 2 (I remember it being used somewhere). In any case, we need it for TAM, and I'm sure others have use for it since it could add some more depth to the game (at least in regards to city building and city diversity).

What it does: This mod allows you to set a city size prerequisite for a building so that your cities cannot construct those buildings unless you've reached the minimum population required. It's unrealistic for a city of size 3 to have its own airport, for example. With this mod component you just use the new tag I created, <iCitySizePrereq>, and set its value to 14, so only cities of size 14 or larger can construct airports. Public transportation system? Not for a village. Now only cities with a population to support it can construct such a building based on whatever city size you determine it requires.

As an example I have set the barracks to require a city size of at least 4 before it can be constructed:



To see what I changed in the source code, just search for "Shqype," as I have commented all my additions with either "Shqype Start" and "Shqype End" for multi-line additions, or "Shqype Add" for one-line additions. The new schema is also included, and conveniently the new tag I added is not required for the XML to load properly, so you can only apply it to the buildings you want to set city size prerequisites for.

I'd like to thank Seven05 for his help and explanation of classes, objects, pointers, and the like. Please let me know what you guys think of it and if there are any bugs you may encounter. Enjoy!
 
Yes I wanted this for a long time :). Maybe I should ask for the last commponent I want for my mod :p.
 
ripple01, I'm glad I could bring this to CIV 4.

Kalimakhus, I agree this modcomp is needed. I'll look further into more building prereqs, I like the idea of "fat-cross" resources needed.

jojoweb, thanks :)

Zuul, it won't hurt to ask! I'm not officially "taking requests" only coz I have a lot on my plate (TAM, Blood and Iron, my own mod), but if you put the idea in my head and it's within my grasp, or it's a vague concept I had that you helped flesh out further, then it might possibly get done. :)
 
This was something that Civ 4 should have had in it, and I'm fairly certain it was either in Civ 3 or Civ 2 (I remember it being used somewhere).
I believe it was in Colonization, but i do not remember it being in any of the Civ parts i played.

Maybe it could be expanded to require culture levels and similar?
 
Another great mod-comp. Good work. :goodjob:


ripple01, I'm glad I could bring this to CIV 4.

Kalimakhus, I agree this modcomp is needed. I'll look further into more building prereqs, I like the idea of "fat-cross" resources needed.

jojoweb, thanks :)

Zuul, it won't hurt to ask! I'm not officially "taking requests" only coz I have a lot on my plate (TAM, Blood and Iron, my own mod), but if you put the idea in my head and it's within my grasp, or it's a vague concept I had that you helped flesh out further, then it might possibly get done. :)

Well my idea... i guess don't call it a "request"... but my idea is for the expansion of a cities' borders to be controlled exclusively by creating a certain building, or inventing a certain tech, or something of that sort. One tech/building to expand the borders each level.

Maybe a building that grants a one-time culture bonus of 10, then 90, then 400, etc.

Controlling it by tech would be excellent too.

Better yet though would just be changing the city level, or perhaps redefining what city levels are, with each tech level reached.
 
Top Bottom