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

[MODCOM]Improvements Outside Borders

Discussion in 'Civ4 - Mod Components' started by TheLopez, Jun 26, 2006.

  1. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Improvements Outside Borders
    By: TheLopez

    Last Updated 11/08/06

    Version: 0.2w
    Patch Compatibility: Warlords v2.0.8.0
    MP Compatible: ?
    Download Mod v0.2w

    Version: 0.1.1
    Patch Compatibility: v1.61
    MP Compatible: ?
    Download Mod v0.1.1

    Description:
    The Improvements Outside Borders mod adds a new tag in the
    CIV4TerrainSchema.xml, <bBuildOutsideBorder>, that lets mod makers indicate if
    a particular plot improvement can be built by a worker outside of a players
    civilization's cultural borders. By using this mod, forts can now be built in
    neutral and enemy territory, improvements can be built on resources prior to
    culture borders expanding to include them, etc.

    Installation Instructions:

    1) Unzip this into the "civ4_install_folder\Mods\" folder.
    2) Open the CivilizationIV.ini configuration file
    3) Change the Mod line to read: Mod = Mods\Improvements Outside Borders
    4) Load the game.
    5) Then play as normal.


    -----Notes to Modmakers-----

    If you want to use this mod component in your mod I have tried to make things
    as easy as possible for you. In the XML files I have added
    <!-- Improvements Outside Borders Start --> and
    <!-- Improvements Outside Borders End --> in all of the places where changes
    were made. The only exception to this is the CIV4TerrainSchema.XML file where
    this isn't possible. In the SDK files I have added
    // < Improvements Outside Borders Start > and
    // < Improvements Outside Borders End > in all of the places where changes
    were made.

    All that needs to be done to allow an improvement to be built outside a
    civilization's cultural borders is for:
    <bBuildOutsideBorder>1<bBuildOutsideBorder> to be added before the
    <iTilesPerGoody> tag in a improvement info definition. The following sample
    would enable forts to be built outside of a civilization's cultural border:
    <ImprovementInfo>
    [TAB]<Type>IMPROVEMENT_FORT</Type>
    [TAB]<Description>TXT_KEY_IMPROVEMENT_FORT</Description>
    [TAB]<Civilopedia>TXT_KEY_IMPROVEMENT_FORT_PEDIA</Civilopedia>
    [TAB]...
    [TAB]...
    [TAB]<bBuildOutsideBorder>1</bBuildOutsideBorder>
    [TAB]<iTilesPerGoody>1</iTilesPerGoody>
    [TAB]...
    [TAB]...
    [TAB]
    [TAB]<bGraphicalOnly>0</bGraphicalOnly>
    </ImprovementInfo>

    As part of the changes to the SDK files I have also included two new methods in
    the CvImprovementInfo class and exposed them to python they are:
    [TAB]bool CvImprovementInfo::canBuildOutsideBorder() const
    [TAB]void CvImprovementInfo::setBuildOutsideBorder(bool bBuild)
    This way any improvement in the game can be updated via python so it can be
    built outside a civilization's cultural border.


    -----Version Information-----

    -----v0.1.1------

    - Added the fix suggested by Chinese American so the improvement mission info
    is displayed correctly. It was still showing the "Must be within our
    Cultural Borders" message

    Spoiler :

    -----v0.1------

    - Setup the Improvements Outside Borders mod infrastructure

    - Added the code needed in the SDK to enable building improvements outside of
    civilization cultural borders.

    - Updated the CIV4TerrainSchema.xml file with the new XML tag to allow players
    to indicate that an improvement should be allowed to be built outside of
    civilization cultural borders.

    - Updated the fort improvement info definition so it can be built outside of
    a civilization's cultural border.


    -----===Credits & Thanks===-----

    - Exavier
    [TAB]Composite Mod - readme.txt format
    [TAB]
    - Testers
    [TAB]Jeckel
     
  2. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    Ohhhhh.... it's my mom's birthday coming up, not mine :D
     
  3. Ooooh, you sly dog you, this is awesome news! Finally I can build a mine on that iron in the middle of tundra before the AI plants a "no good for nothing other than to claim that resource" city. :D

    So what happens, if another civ comes to that resource? Do they have to pillage before building their own? What happens if another civ's culture border grows to overlap it, does it automatically transfer to them?
     
  4. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    Probably doesn't affect those things... I mean, improved tiles trade from one civ to another all the time in the game. Nothing is changed when it comes under new administration.
     
  5. Dark Russell

    Dark Russell Octagonecologyst

    Joined:
    Dec 24, 2002
    Messages:
    344
    Location:
    Yuggoth
    This may make forts a bit more useful on larger maps.
     
  6. dh_epic

    dh_epic Cold War Veteran

    Joined:
    Feb 10, 2002
    Messages:
    4,627
    Location:
    Seasonal Residences
    Wow! You never stop working, do you?!
     
  7. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Not really, I try to have 2-3 mod components near the ready for release stage every two or three weeks.
     
  8. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Thanks so much TheLopez, this was my number one complaint about the game since I first played it. Now I can use my workers to improve the whole contonient and not just my nation. You rock. :D
     
  9. GenghisMike

    GenghisMike Chieftain

    Joined:
    Jul 9, 2006
    Messages:
    14
    As I'm reading this, this MOD is sounding an awful lot like the Civ3 concept of colonization. (please let it be) You can read this post two different ways. (please let it be like colonization) One way could be simply improving the area around the location of a town you want to build. (please not this way, please) The other could be like colonization, when your worker improves the area the resources for that improvement are sent to your capital.

    The lack of colonization in Civ4 is the single greatest oversight. (OH MAN, I hope this is colonization) So, is this colonization like in Civ3? Not that it matters to me ... you know, I don't really care. (but I do! I really hope it's colonization) :D
     
  10. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    Just incase anyone is interested, I "assimilated" this mod in the latests CCP release (see post by TGA). XML taging is identical so any ImprovmentInfos.xml used here will be compatable with both DLL's. The setBuildOutsideBorders was droped as this would have affected all players ability to build which I dont belive was the intent (at some later date it might be nice to include a boolean for the player which will get Anded with the improvment boolean, this would allow some interesting additions to Expansive Trait).

    Thanks for the great components Lopez, I look forward to using more of your Mods in the CCP.
     
  11. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Impaler, actually the setBuildOutsideBorders is meant to affect all the players. I added this as a utility method for the Great Options Mod so players could configure which improvements can be built outside of borders through the configuration file. You can see this in action in the latest version of the Great Options Mod, Core Editions.
     
  12. GenghisMike

    GenghisMike Chieftain

    Joined:
    Jul 9, 2006
    Messages:
    14
    We're on v1.61, downloaded and followed the install instructions. Unfortunately, our workers aren't allowing improvements to be built outside Cultural boundaries.

    Thoughts?
     
  13. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    What improvement are you trying to build outside your cultural borders?
     
  14. GenghisMike

    GenghisMike Chieftain

    Joined:
    Jul 9, 2006
    Messages:
    14
    Sorry ... should've included that. Was trying to build a Quarry for Marble.
     
  15. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Mike, did you add the tags to the definition for quarrys so you can build them outside of your cultural borders? Please understand that this is not a stand alone mod. It is just a component.
     
  16. OzzyKP

    OzzyKP Emperor

    Joined:
    Dec 16, 2000
    Messages:
    1,694
    Location:
    Washington, DC USA
    I know I'm good at meddling with your mods, but is it possible/desirable for a fort to put out culture?

    I'd love to see a fort built in neutral territory that produces culture for it's base square only (or maybe just one square out), then if an enemy sets up another city and their culture engulfs your fort, you don't necessarily lose the square. So you could try to hold squares for later or deny the AI resources.

    This would be realistic too in that if you have a well defended fort somewhere, your troops aren't going to just pack up and go home if a foreign city sets up in the area.

    Maybe just pump out 1 culture a turn. I wouldn't want it to expand too much, a fort shouldn't be able to block off a lot of territory, but maybe just a bit. If you want to get extra complicated, have the terrain give a bonus to the culture output. Like if you build on a hill then the fort gives off 1.25 culture.
     
  17. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Ozzy, well maybe it should be a configurable option with the default set to 0.
     
  18. GenghisMike

    GenghisMike Chieftain

    Joined:
    Jul 9, 2006
    Messages:
    14
    I see my error, TheLopez, I apologize for my ignorance. But now I think I've got the MOD bug ... ACK!
     
  19. GenghisMike

    GenghisMike Chieftain

    Joined:
    Jul 9, 2006
    Messages:
    14
    That's a GREAT idea. History is peppered with cities that are out-growths of large forts. Great idea.

    I would lobby that the fort should only produce culture if it were manned AND, while culture would continue to collect, the influence would only grow one space out. Thoughts? Would this MOD require work in the SDK?
     
  20. TheLopez

    TheLopez Deity

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Yep, it would definately require work in the SDK.
     

Share This Page