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

Small modmod - No infinite units

Discussion in 'C2C mod mods' started by Fermongu, Aug 10, 2018.

  1. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    I was annoyed of seeing AI build massive stacks of 30-50 Atlatist plus 30-50 log rams. I was also annoyed of infinite scouts roaming around everywhere. So I have tweaked some numbers and put limits to buildable units.

    I hoped to gain some performance gain this way, but sadly I have failed to see any :(

    This is experimental, but I hope to see more balanced armies and less massive doom stacks.

    Some general rules I followed are like this:
    - city defense & law units: 40-50 unit limit
    - land scouts: 3 unit limit (2 for aerial and sea scouts)
    - hunters: 3
    - canines: 10
    - felines: 5
    - early infantry: 8 unit limit each different unit type (spearman, crossbowman, swordsman, etc)
    - mid game infantry: 80 (musketman--->infantry)
    - late infantry: 16-32 (marines, tesla, clones, robots, etc)
    - cavalry & tanks: 10
    - grenadiers, flamethrowers: 5
    - anti-air, machine gun: 10
    - siege: 15
    - merchants: 3
    - sea transport, pirates, subs, carriers: 5
    - navy: 8
    - fighters, helicopters: 8
    - bombers: 5
    - healers: 10-40
    - entertainers: 10-25
    - workers & space stuff: untouched, no limit
    - "bad boys": untouched, limited to 2-5 units in base mod
    - cultural units: 10 (unless being scout, hunter, merchant, pirate, etc)

    I don't think this will have much effect on early game, probably more when there are a big number of cities to defend. As I said, this is experimental, numbers can be changed if i get feedback, because I have never been able to make a game past classical era :(

    You may be compelled to make more strategic decissions when building your army, in mid-late game. Having cultural units available is more noticeable, as you can surpass normal unit limits with them if you want a bigger army.

    Effects on AI long term are unpredictable. I think the AI is more willing to declare war early on, but I may be wrong, I have only started 1 test campaign so far.

    Edit: I played in GEM map until classical era and no problems. I saw more varied units on AI cities, less stacking of units.

    Edit: I made version 2, adding +10% upscaling costs to combat units (cultural units had upscaling costs of 2%, I made them 10% too). Again, experimental. I'm starting new campaign on standard map so maybe i can reach further than classical era.

    Edit: increased a bit city defense and infantry limits. Reduced upscaling costs to +5%. Simplified criminals upgrading paths.

    Edit: healers and entertainers now have limits too. Tweaked and increased mid and late units limits. Streamlined late game upgrading paths. Added animal spawn file with max density of animals reduced a bit.

    To install, unrar on main C2C folder.
     

    Attached Files:

    Last edited: Dec 8, 2018
  2. makotech222

    makotech222 Chieftain

    Joined:
    Mar 18, 2012
    Messages:
    222
    Honestly, the problem is far better fixed in the AI that decides to create tons of units instead of buildings and such. Fixing the code in the dll will probably be more worth your time.
     
  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    24,728
    Gender:
    Male
    Location:
    Las Vegas
    Or just don't see it as a problem... when you have a lot of unit types, you will need the AI to train a lot of units. If the AI were to build any less of a force than it currently does, many players would easily stomp them on the basis of being simply choosing to train far more units for their attacks and defenses. 'too many' is a subjective term that I've always found is best reserved for the point at which we start seeing crashes that can't be corrected without turning down the unit populations in the game.

    Limiting in this manner is disastrous for the AI btw. If it cannot build what it thinks it needs for an attack force it will never be able to invade. Establishing limits does nothing to change its mind about what it thinks it needs but it CAN keep it from ever being able to reach what it believes it should be building up to.
     
  4. makotech222

    makotech222 Chieftain

    Joined:
    Mar 18, 2012
    Messages:
    222
    I let my game run with AI taking over for about 20 turns. Within that time, it created like 30+ story tellers, a bunch of out-of-date units, etc, while in peace-time. I think it should at least react to its' environment a bit instead of just pumping out units.
     
  5. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    24,728
    Gender:
    Male
    Location:
    Las Vegas
    It would be important to understand why this happens so as to be able to try to theorize how to address the cause without allowing it to overreact. It's been very difficult to tool properly.
     
  6. Trantor

    Trantor Chieftain

    Joined:
    Mar 31, 2014
    Messages:
    56
    can we upscale the unit cost like it is currently for national units (2% increase in cost for every unit build). more units slow down the game. the limit should be same for AI and human players to let the games move to later ages
     
  7. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    The unit limit should already apply to both AI and human player.

    The upscale in cost I think can be done adding a specific tag in the XML's that national units already have have.

    <UnitClassInfo>
    <Type>UNITCLASS_BARUD_WARRIOR</Type>
    <Description>TXT_KEY_UNIT_BARUD_WARRIOR</Description>
    <iMaxGlobalInstances>-1</iMaxGlobalInstances>
    <iMaxTeamInstances>-1</iMaxTeamInstances>
    <iMaxPlayerInstances>10</iMaxPlayerInstances>---------- This is max. number of units
    <iInstanceCostModifier>2</iInstanceCostModifier>---------- I think this is upscaling cost
    <DefaultUnit>UNIT_BARUD_WARRIOR</DefaultUnit>
    </UnitClassInfo>

    I can probably add that tag to all units, maybe increase it a bit too, I think +2% has no real impact on recruiting costs. In the next version, but I have to study a lot in the next month :(
     
  8. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    You're right. This is just a bandaid to not let the game run out of control with units. Or that is my intention at least.
     
    KaTiON_PT likes this.
  9. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    24,728
    Gender:
    Male
    Location:
    Las Vegas
    That may be the better way to approach things to create limitations that the AI would respect but not be destroyed by. I'd be intrigued to see this planned out and implemented and tested.
     
  10. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    What % increase do you suggest? I was thinking of giving it a notable boost (10-15%)

    I still think a hard cap must be put to avoid AI building insane number of units, if some bug affect AI to spam them.
     
  11. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    24,728
    Gender:
    Male
    Location:
    Las Vegas
    Hard caps are really not very good for the AI. As for the %increase, it's cumulative so I wouldn't go overboard. 5% might be effective plenty.
     
  12. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    Added version 2 with upscaling costs to combat units.
     
  13. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    Version 3: Increased a bit city defense and some infantry limits. Reduced upscaling costs to +5%. Simplified criminals upgrading paths.
     
    KaTiON_PT likes this.
  14. Fermongu

    Fermongu Chieftain

    Joined:
    Oct 27, 2017
    Messages:
    154
    Gender:
    Male
    Version 4:

    - now healers and story-tellers line of units have limits too (but no upscaling costs).
    - tweaked and increased some limits from mid and late game units, so you can upgrade your units even if you build all available.
    - streamlined upgrading paths, particularly in late game units. I think they make more sense now.
    - added animal spawn file with max density of animals reduced a bit.
     

Share This Page