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

Civ 5 Extended city radius

Discussion in 'Civ5 - Mod Components' started by Pep, Nov 6, 2013.

  1. Pep

    Pep King

    Joined:
    May 28, 2002
    Messages:
    688
    Location:
    Spain
    This is my first Civ 5 mod. It's a trivial one: it only extends the default city maximum cultural radius from 5 to 8, by changing the default value of MAXIMUM_ACQUIRE_PLOT_DISTANCE global define. With this change, your city can now acquire (by culture expansion) tiles at 8 tiles of distance from your city. It doesn't change anything else: the default city maximum purchase radius remains at 3 tiles and the default minimum distance between cities in the same mass of land remains at 4 tiles. I've searched for a mod component that could do the same thing but I haven't found anything, so I've decided to do it myself.

    I think people who likes to play OCC could greatly enjoy it. You can easily set MAXIMUM_ACQUIRE_PLOT_DISTANCE to other reasonable value if you want. I have decided to leave it at 8 because it's the maxium radius you can see in City View. There, you can also see the next tile that would be acquired in the next cultural expansion of the city, even with values greater than the default. I've tested even with a value of 10, and it seems to work properly (although with this value you can't see the next tile expansion on some cases, due to the limits of the viewable area in City View). I suppose a very long value could lead to a memory overflow or only work at a hard cap established in the DLL source code (I haven't investigated it). You can easily increase the new value of 8 by modifying it in the file "GlobalExtCityRad.xml" in the mod folder.

    You can download it from CivFanatics Database: http://forums.civfanatics.com/downloads.php?do=file&id=21969.
    Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=192572093
     
  2. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,360
    Location:
    Near Portsmouth, UK
    IIRC acquire distance is not capped in the DLL, only the working distance (in numerous places)
     
  3. Pep

    Pep King

    Joined:
    May 28, 2002
    Messages:
    688
    Location:
    Spain
    Ok. Thank you for the info :) .

    BTW, you're doing a great job with your mod components!. Now I can't play without some of them!. Currently, I'm using only several of them that doesn't require the modded DLL (because I prefer to maintain save compatibility with the unmodded game).

    If you have enough time to give it a look, I've posted several ideas that could be implemented in modcomps here: http://forums.civfanatics.com/showpost.php?p=12880429&postcount=393.

    Currently, I've compiled the official DLL and looked at the souce code to see if I could implement some of these ideas. Compiling it has been easier than compiling the Civ 4
    one, but the code seems harder to understand, at least for me (as you can see in my signature, I developed several mods for Civ 4 a few years ago).

    As I've seen, Civ 5 seems to have better and easier modding capabilities than Civ 4. I used to work as a C/C++ programmer in Unix environments and I've also done some Unix shell scripting (mainly to launch SQL queries against Oracle databases), but I have almost no knowledge in Windows game programming. I suppose I'll have to learn Lua some day :lol: .
     
  4. Pep

    Pep King

    Joined:
    May 28, 2002
    Messages:
    688
    Location:
    Spain
    I've just edited the OP to further clarify the mod description and add a Steam Workshop link.
     

Share This Page