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

Can cities work more hexes? Can military be tied to population?

Discussion in 'Civ5 - Creation & Customization' started by JohnnyW, Dec 27, 2010.

  1. JohnnyW

    JohnnyW Gave up on this game

    Joined:
    Oct 8, 2010
    Messages:
    658
    Location:
    USA
    Is it possible to allow cities to work hexes in a larger radius? I'd like to have cities be able to reach farther then 3 hexes and also increase the minimum distance btween them.

    Also, is it possible to limit the number of military units allowed based on population size?

    I think combining these two ideas would address a few of the 1upt concerns, and I would desperately want to do that in my mod.
     
  2. aatami

    aatami Kuruth Urfarah, kuruth!

    Joined:
    Dec 21, 2010
    Messages:
    741
    Location:
    Finland
    Certainly a good suggestion at least. Create a poll, maybe? And then maybe, just maybe we could push it through to a patch.
     
  3. Zyxpsilon

    Zyxpsilon Running Spider

    Joined:
    Oct 29, 2009
    Messages:
    3,068
    Gender:
    Male
    Location:
    On Earth
    Strangely, the territorial grasp is already bigger than what is shown in the City-Screen.

    Your citizens' orbs do cover 37-61 hexes... but when a worker improves (needs to be within territory) a tile outside this range the actual yields are *added* to your empire (or city). The other day, i was upset by a precious Aluminum barely a tile away inside the 91 radius and sent one to investigate.
    Sure enough, plouck, 4 more of that strategic resources showed up on the top bar!

    I haven't checked more distant areas.

    I'd prefer total control over territorial shaping & sizes though instead of the default circular growth process. I've even pay 1000+Gold to reach a single tile 6,7,8+ hexes away for any of the central cities. Considering to Mod it all, as it happens. ;)
     
  4. cf_nz

    cf_nz Prince

    Joined:
    Mar 17, 2006
    Messages:
    414
    Location:
    New Zealand
    If I had the coding skills I wanted to experiment with limiting the number of military units by linking them to the food resources (e.g. cow, fish etc). The food resources would act as per strategic resources, in that they had a yield.
     
  5. JohnnyW

    JohnnyW Gave up on this game

    Joined:
    Oct 8, 2010
    Messages:
    658
    Location:
    USA
    The strategic resources are added to your empire whether they are worked or not, and the cultural borders of your city can expand to 5 hexes (default). As of now citizens can only work in a 3 hex radius however, which I would like to change (but I bet its hard-coded).
     
  6. JohnnyW

    JohnnyW Gave up on this game

    Joined:
    Oct 8, 2010
    Messages:
    658
    Location:
    USA
    Now this is interesting. I don't think it would work only allowing military from these resources however, but as a concept it is interesting.
     
  7. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    Each city can work a tile within 3 hexes of its core. This value is set within GlobalDefines, so you could increase it if you wanted. (I'm in the process of trying to code Lua to make a building that increases it to four for each individual city. It might not work, in which case my backup plan is to make a Wonder that boosts it for your whole empire.)

    However, tiles can be absorbed through culture if they're within FIVE tiles of a city. This value is also set within GlobalDefines. You might not be able to Buy tiles outside of the 3 (again, GlobalDefines I think), but you can still gain them through culture.

    Strategic and luxury resources are not tied to a specific city, they're empire-wide. (Yes, there are XML tables for requiring a specific local resource for a building, but that's a separate issue.) Improving a strategic or luxury resource tile adds its output to your empire, regardless of whether it's being worked, as long as it's within your empire's borders. So there's no need for it to be within the 3 as long as it's within the 5. You'll get the resource, but not the hammers, food, or gold associated with the tile.
    If a tile has no strategic or luxury resource on it, there's no point to improving the tile if it's not within 3 hexes of a city. Unless you plan to settle another city in that area at some future date, of course. (Or, maybe it's within 3 hexes of an ENEMY city across the border that you intend to conquer some day.)

    cf_nz: You can easily convert existing bonus resources into strategic resources. There are just two major problems:
    1> You'd have to heavily alter AssignStartingPlots, which is what sets the distribution of resources on the map (including the number of units in each deposit).
    2> The UI at the top of the screen (and its associated pulldown) wouldn't show those resources. It's handled through TopPanel.lua through some convoluted logic (which I had to override for my own mod).
     
  8. cf_nz

    cf_nz Prince

    Joined:
    Mar 17, 2006
    Messages:
    414
    Location:
    New Zealand
    Thanks, I appreciate the feedback.
     
  9. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
    I have tried to increase the tile buy distance outside of the 3, but it doesn't take effect. At least not when you only change it in globaldefines. Changing the culture acquire distance to 9 works though. :)

    I have also looked into changing the workable tiles, most specifically making mountains workable. Or even giving mountains yields. Seems to be hardcoded, though I would love to hear of a workaround.

    Also, to make resources show up on the top panel, you just have to have a unit that requires said resource. At least if you remove the strategics from units, those resources no longer show up on that panel.
     
  10. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    There's a little more to it than that. The logic for declaring a resource to be a Strategic also checks for Happiness. Specifically, anything that gives happiness is automatically NOT a strategic, as is anything that comes in 1-unit deposits.
    For my mod, I overrode this to have it display any resource of types "Rush" or "Modern", because I wanted to have a couple strategics that also added Happiness (and would therefore also show up in the Happiness pulldown). It's a 2-line change, not too difficult to do, but the point is that the existing logic isn't too flexible.
     
  11. Zyxpsilon

    Zyxpsilon Running Spider

    Joined:
    Oct 29, 2009
    Messages:
    3,068
    Gender:
    Male
    Location:
    On Earth
    Much better wording for a fact that i've been seriously delving into, thanks.
    I dunno if it's what Alpaca is working on (with some cultural range tiles, IIRC) but the actual big_hexy_circular pattern bugs the hell outa me.

    The MCD default setting at *2* is even more obvious when we realize that if a Capital gets surrounded by 6 cities (located on the 61_Range Hexes cups), they commonly could grab *ALL* workable tiles away from it & off each other's territory. ICS, anyone?

    Probably why i'm sooooo found of having the controllable territorial shape & sizes implemented - somehow. While thinking an MCD modded at 5 is probably the most optimal way to manage highest levels of Input by grouped Cities.
    Efficient grids could have sooooooo much more impacts with total control over hex assignments within highly variable cultural borders.

    One can always dream -- of corridors, :) if anything.

    (PS; Could you have a look at this too, when you have the time?)
     
  12. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    We used to DREAM of living in corridors. Would have been like a palace to us.

    Unfortunately, I haven't played a vanilla game of Civ5 in months. I pretty much exclusively play my own mod, which focuses on some future eras and heavily changes the victory conditions and such. So my own experiences wouldn't really help for the sort of survey you seem to be conducting.
     
  13. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    I don't think this would work out very well. If you just place a hard cap on units that depends on the number of food resources you have, this is yet another huge point in favor of large empires with small cities that grab them as fast as possible.

    Basing it on population has the same issue because the total population in a large empire of small cities is higher than in a small empire of large cities but you can easily do it using the existing supply mechanic (not a hard cap but a -50% production modifiers is quite enough to make you stay below the limit)
     
  14. MouseyPounds

    MouseyPounds Prince

    Joined:
    Nov 8, 2010
    Messages:
    417
    Location:
    Maryland, USA
    Although I'm wandering off-topic here, I've been thinking about both this and the population-based research rate. I wonder how things would work if the population-based mechanics worked more like the demographic population display -- i.e. the second citizen is worth more than the first citizen, and the third citizen is worth more than the second, etc. While it would probably require DLL access to implement, it would at least swing the balance more towards vertical growth and might prove quite interesting.
     
  15. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    Overcompensation in my opinion. Some kind of power law behaviour might make sense but the demographics population is exponential I think and this would swing the balance all the way through the middle and out the other end.

    It's probably not necessary, either: Adding pop multiplier buildings looks like a more natural way to achieve the same result. If you add buildings like the library that add things depending on the number of citizens, these provide an incentive to grow cities rather than found new ones, especially if they have a significant upkeep cost. For example a tax collector that adds +2 :c5gold: per :c5citizen: and 5 :c5gold: maintenance +2 :c5angry: When does it make sense to build this? Tough decision, which is good in my opinion, but definitely doesn't make sense for small cities below size 5 or so.
     
  16. cf_nz

    cf_nz Prince

    Joined:
    Mar 17, 2006
    Messages:
    414
    Location:
    New Zealand
    As I said though, this was experimental, there were no guarantees it work work in practice. The food resources would also be tradable and could obtained from city-states, if that would mitigate the issue.
     
  17. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Even better, you can make some buildings like that with minimum population, I believe (assuming that field of the DB works). It would make sense to me to put a population minimum on every 2nd-tier building or higher.
     
  18. JohnnyW

    JohnnyW Gave up on this game

    Joined:
    Oct 8, 2010
    Messages:
    658
    Location:
    USA
    Howso?
     
  19. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    There's an XML field in the <Buildings> table for CityClassPrereq, or something along those lines (I don't have the files in front of me). It's not a numerical size in terms of population, it's a 0/1/2 for small/medium/large. I don't know the exact numbers, but Medium means something like size 5+, and Large means 10+, although this might shift with era. Currently the game only uses this classification to determine how big of a graphic to place on the map, but you can tie buildings to it.
     
  20. JohnnyW

    JohnnyW Gave up on this game

    Joined:
    Oct 8, 2010
    Messages:
    658
    Location:
    USA
    Very cool.

    It appears that those classifications are unchangeable, but it is good to know. Thanks! LMK if I'm wrong about them being unchangeable too. ;)
     

Share This Page