1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Warrior/slinger maintance 1, stops ai spamming

Discussion in 'Civ6 - Creation & Customization' started by Littlebob86, Oct 31, 2016.

  1. Littlebob86

    Littlebob86 Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    329
    Hey so I also just changed the unit maintenance cost for warriors and slingers to 1, and so far it doesn't seem like the enemies are spamming them to ridiculous amounts, and I haven't noticed money being a terrible issue.. Although I did try looking for where starting gold was to maybe give an extra 10.

    Civ vi/base/assets/gameplay/data/units.xml

    Using notepad ++, line 627 and 628, I just had to add in 'Maintenance="1"'
     
  2. MeerHunter

    MeerHunter Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    21
    Gender:
    Male
    but you should aware deity difficulty AI have 100% gold income bonus.
    (though poor building management)
     
  3. Littlebob86

    Littlebob86 Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    329
    Yeah but I read that someone thought because the maintenance cost was 0, they just keep spamming them, and I hate seeing a screen full of basic troops running all over the place!

    I'm just passing this on in case anyone else is interested..
     
  4. nComrade

    nComrade Chieftain

    Joined:
    Oct 13, 2007
    Messages:
    10
    I'm going to try this too - it just makes no sense when Victoria comes with 30 warriors and 1 slinger against my 4 spearmen and 3 archers - she still loses!
     
  5. Littlebob86

    Littlebob86 Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    329
    Yeah the ai is terrible :(
     
  6. Horem

    Horem Chieftain

    Joined:
    Apr 1, 2010
    Messages:
    1,710
    Location:
    Wales, UK
    FYI:-
    UPDATE StartEras SET Gold ='20' WHERE EraType ='ERA_ANCIENT';
     
  7. Littlebob86

    Littlebob86 Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    329
    What file is that in?

    I've actually not had a trouble with starting gold so far
     
  8. Horem

    Horem Chieftain

    Joined:
    Apr 1, 2010
    Messages:
    1,710
    Location:
    Wales, UK
    I have no idea what file it is in TBH, I made the code from looking at the database in SQLite addon for firefox. (Tested and works btw)
     
  9. anansethespider

    anansethespider Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    289
    Gender:
    Male
    I wonder, if you changed it to a value like .1 or .2 would that still be enough to deter AI spam without changing the early game as much on the player end?
     
  10. isau

    isau Warlord

    Joined:
    Jan 15, 2007
    Messages:
    2,641
    Rather than edit the game's XML directly I'd recommend a mod. Here's the SQL code to change the Warrior to a cost of 1. I can put this in a mod and post here if people need help with that.


    UPDATE Units SET Maintenance='1' WHERE UnitType='UNIT_WARRIOR' ;
     
  11. Gyrofalcon

    Gyrofalcon Chieftain

    Joined:
    Nov 15, 2014
    Messages:
    80
    The whole maintenance should get reworked by Firaxis. After certain thresholds, the upkeep of units should increase, over time.
    Ex: 1 City with up to 7 citizens, may allow 7 units (including religious and civil units) = Threshold 1. When you build your 8 unit, all units (that have original maintenance cost), get a 50% increase. After 10 turns it goes up to 100% increase, and so on.
    When you reach Unit Threshold 2 (double # of citizens), the number of turns before reaching next % of increase, are fewer. Now you are forced to maintain your army size, and maybe reduce to avoid penalties.
    Of course; All this needs to be adjusted for AI level, game speed, and number of cities/sizes you are founding, plus the number of cities you occupy.
     
  12. Littlebob86

    Littlebob86 Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    329
    I've no idea how to make mods! Or edit these sql files :/
     
  13. Lechuza

    Lechuza Chieftain

    Joined:
    Oct 22, 2016
    Messages:
    7
    Gender:
    Male
    Setting the maintenance to 1 wont stop them from spamming warriors or slingers. I just tried a marathon and its exactly the same as before :(
     
  14. Littlebob86

    Littlebob86 Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    329
    That's a bummer , I've done 3 games since , and it's definitely noticeable less
     
  15. Tsarsies

    Tsarsies Chieftain

    Joined:
    Sep 12, 2008
    Messages:
    5
    The AI likes to keep the cheaper units around for as long as possible. I do not think changing the maintenance on the ancient era units is going to work all that well. I have noticed the AI still having ancient era units roaming the map in the late classical/medieval age. I think the problem is more directly related to the construction of districts and government policies that individually enhance recruitment. In that i don't think the AI is able to work with them properly.

    As a human player, you can dedicate a single city to specialize in recruitment. You can start by settling in an area that will allow for sufficient food, high production, and strategic resource proximity. Build an encampment, and boost its recruitment capabilities. Then choose government policies that enhance recruitment of the desired era's units. In addition, you can also use trade units to boost production, and use builders to optimize the city for production. All in all, you are capable of managing the city to recruit units reasonably fast, regardless of era. The AI however doesn't have such luxury. It is not able to think or reason through these processes. It just follows the preferences set out in the code. I have seen the AI settle cities in the most bizarre places, and have seen cities settled in the ancient era that still have no districts or improved land by the renaissance era.

    There is a steep change in cost of units from era to era, not only in their maintenance, but also in the turns to recruit them. A warrior has a cost of 40 while a swordsman 90 to a musketman at 240. An archer has a cost of 50 as opposed to 180 for a crossbowmen and the field cannon at 330. A Spearman has a cost of 60 and a Pikeman 200 and AT crew at 400. Now, i realize that unit costs need to scale up with each era, as each city produces more and more production. In addition, certain policies make this process faster. However, i think the AI is having trouble constructing the necessary buildings/districts to produce the new era units (and to maintain them in regards to building commercial hubs to capitalize on income, or an industrial complex to optimize production, etc), and/or not selecting the policies for increased production toward recruitment. Thus the AI is not capable of managing it's recruitment options very well.

    So I think the problem is deeply rooted in the base game, and not just related to ancient era maintenance. Most AI in games will grant the computer opponents bonuses periodically throughout the game. Such as a large sum of money, or free upgrades. Both of which would help solve the issue for the AI in regards this problem. So is there a way, possibly via lua scripting, to grant the AI such bonuses periodically?
     
    Littlebob86 likes this.
  16. Bigv32

    Bigv32 Chieftain

    Joined:
    Jun 27, 2008
    Messages:
    567
    No they don't. CIV 6 is the first civ game that actually has a good idea on how to handle unit maintenance. Previous civ games had inflation where a unit would cost more the longer into the game you went. It was aweful because it was an artificial cap on how long you could play the game.

    They do need to do something about the cheap unit spam in the early game, but changing the overall idea of maintenance (especially in the late game) is not the way to do it. Keep things flat and simple.
     
  17. Ramez Hachicho

    Ramez Hachicho Chieftain

    Joined:
    Oct 25, 2016
    Messages:
    22
    Gender:
    Male
    Could someone please put this in mod form? Covering the warrior,slinger and heavy chariot? I would love to test it. I really want to play this game the way I like to play it .. slow games. And at the moment the AI is a total troll on marathon. Outside my territory the whole world is a giant warrior rave .. The whole planet has a club. The only way I ever survive is when I can hole up in some mountains and bring em to a choke point "where their numbers count for nothing" lol.
     
  18. Littlebob86

    Littlebob86 Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    329
    Just for you ;)
     

    Attached Files:

  19. Ramez Hachicho

    Ramez Hachicho Chieftain

    Joined:
    Oct 25, 2016
    Messages:
    22
    Gender:
    Male
    Thanks a lot :) Will test it tommorow. I tried using the god of the forge fix .. and it DOES delay the dreaded unit spam. However it seems to be a common phenomena in any game where the ai's economy gets rolling before the ancient era units go obsolete. Sooner or later the AI reaches economic critical mass and BAM their territory fills with crap overnight lawl.
     
  20. Ramez Hachicho

    Ramez Hachicho Chieftain

    Joined:
    Oct 25, 2016
    Messages:
    22
    Gender:
    Male
    Unfortunatly this doesn't work. But it's not because the AI is dumb. This mod delays the dreaded unit spam for quite a bit. Especially when combined with the god of the forge tweak. But as soon as the ai gets it's hands on the unit maintenance production reduction civic. Bam! It gets free warriors again.

    Honestly I think this whole area of the game needs to be reworked with a mod or something. It needs to be impossible to **** out 1 turn warriors from all of your cities that cost 0 maintenance.

    After a while empires don't even expand anymore because the map is so full of enemy warriors that settlers can't move around.

    This whole mess seems to be a combination of several different factors.

    1. God of the forge pantheon was applying to all cities. (Fixed with mod)
    2. Ancient era unit maintenance 0 (Fixed with bod .. but broken again later by a policy)
    3. Unit maintenance reduction civic reducing many early game unit's maintenance to 0
    - Heavy Chariots,Spearmen and Archers made free or nearly free. And of course Warriors/Slingers with the mod suddenly become free again)
    4. Agoge policy making early game units ridiculously cheap to build. Especially in vanilla when combined with bugged god of the forge.

    Honestly do NOT know how this all wasn't picked up in testing.

    EDIT : I am now tweaking some other peoples mods to try and test my theory. God of the forge should be working as intended. I have nerfed agoge into uselessness. And I have increased the maintenance of ALL ancient units bar the scout to 1.5 so that conscription doesn't make them totally maintenance free .. But still has an effect. I haven't figured out how to nerf the maintenance reduction of conscription. I would probably reduce it to .5 rather than increasing base maintenance to 1.5 As that might make dealing with the barbs a little tricky.

    Wish me luck XD
     
    Last edited: Nov 8, 2016
    Littlebob86 likes this.

Share This Page