1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[SDK MODCOMP] Building City Size Prereq

Discussion in 'Civ4 - Mod Components' started by Shqype, Mar 16, 2008.

  1. Shqype

    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!
     
  2. Shqype

    Shqype Shqyptar

    Joined:
    Nov 15, 2005
    Messages:
    2,468
    Location:
    New York + Shqypni
  3. ripple01

    ripple01 Chieftain

    Joined:
    Mar 7, 2006
    Messages:
    1,246
    Location:
    New York City
    Great idea, glad to see someone finally brought this to Civ4!

    Cheers,
    ripple01
     
  4. Kalimakhus

    Kalimakhus Chieftain

    Joined:
    May 8, 2007
    Messages:
    1,249
    One of the most needed modcomps. I actually hope to see more buildings reqs. In particular I would like a building to require some resource or some terrain feature in the city fat cross.
    :goodjob:
     
  5. jojoweb

    jojoweb Chimpa-Z

    Joined:
    Jun 6, 2004
    Messages:
    490
    Location:
    Lyon, France
    Good idea :goodjob:
     
  6. Zuul

    Zuul Mod lister!

    Joined:
    Nov 13, 2005
    Messages:
    1,117
    Location:
    Sweden
    Yes I wanted this for a long time :). Maybe I should ask for the last commponent I want for my mod :p.
     
  7. Shqype

    Shqype Shqyptar

    Joined:
    Nov 15, 2005
    Messages:
    2,468
    Location:
    New York + Shqypni
    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. :)
     
  8. Eddi

    Eddi Chieftain

    Joined:
    Mar 20, 2008
    Messages:
    78
    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?
     
  9. OzzyKP

    OzzyKP Chieftain

    Joined:
    Dec 16, 2000
    Messages:
    1,544
    Location:
    Washington, DC USA
    Another great mod-comp. Good work. :goodjob:


    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.
     

Share This Page