1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice

Should the AI only use Ranged units for garrison duty?

Discussion in 'Community Patch Project' started by balparmak, Jan 13, 2022.

  1. balparmak

    balparmak Prince

    Joined:
    Sep 20, 2015
    Messages:
    314
    I found that the AI often uses melee units as garrisons, while Ranged units are superior for this role in the significant majority of cases, which I think should be our benchmark for the AI instead of the most optimal use for each individual case. During sieges melee units cannot target the second ring/the attacking ranged&siege units, so their higher CS provides little benefit compared to the missed chance to kill or significantly damage some siege units. The same goes for coastal cities under attack by ships. There's a case for using siege units instead (esp. during the late game) but they're more expensive and require resources, so it's not clear cut. I'd like to basically force the AI to use ranged garrisons, then maybe add conditionals to use siege units for exposed coastal cities (and land cities after 3 range units are unlocked), I think this would be a simple way to empower the AI. Am I missing anything here?
     
    Hinin, black213, Solic and 1 other person like this.
  2. Recursive

    Recursive Radiating Doom At 10x The Background Level Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,979
    Gender:
    Male
    They should still use a melee unit if no other garrison is available. Also, check with ilteroi before making any changes to tactical AI.
     
    JamesNinelives likes this.
  3. CppMaster

    CppMaster Emperor

    Joined:
    Feb 13, 2018
    Messages:
    1,402
    Gender:
    Male
    Location:
    Poland
    Melee units tend to have more CS, so they make cities more defensive. It's not that straightforward that garnisoning ranged units is better always.
     
    Bromar1, andersw, Skidizzle and 4 others like this.
  4. youngsteve

    youngsteve Prince

    Joined:
    Sep 10, 2007
    Messages:
    448
    Gender:
    Male
    Location:
    England
    I think this is a particular problem with CS. Time after time CS are attacked by AI, CS/You/Others send/build ranged units, which are thrown into the frontline to be killed, whilst the melee unit sits in the city.

    Another issue I have with CS/AI under siege, is how the city targets melee units just fortified around it whilst ignoring more dangerous ranged or siege ones. One trick I find when attacking them is never destroy their forts, but put a melee unit in it, & they will ignore everything but that unit. When the unit is severely injured replace with another.
     
  5. balparmak

    balparmak Prince

    Joined:
    Sep 20, 2015
    Messages:
    314
    As I said, the benefit gained by that doesn't cover the opportunity cost of not being able to disable siege or naval units. A stationed melee unit may tank one or two more turns of attacks, but killing enemy ranged units can save a city, or significantly increase siege duration to allow reinforcements. I can provide some concrete numbers if I find time, but consider that base CS values don't even make a significant difference (a pikeman has 17CS, crossbowman has 15, tercio 25 - musketman 22) and I'm not sure if promotion bonuses are added up in their full value to city strength.
     
    der_weihnachtsmann likes this.
  6. CppMaster

    CppMaster Emperor

    Joined:
    Feb 13, 2018
    Messages:
    1,402
    Gender:
    Male
    Location:
    Poland
    The biggest difference is early game between an Archer and a Horseman. It could sometimes makes the city 3 times stronger.
     
    JamesNinelives likes this.
  7. JamesNinelives

    JamesNinelives Emperor

    Joined:
    Mar 16, 2019
    Messages:
    1,667
    Gender:
    Male
    Location:
    Australia
    You need a decent ranged unit available to hit back meaningfully. It might be useful to implement a preference (that I agree would make sense), but not a hard rule.
     
  8. pineappledan

    pineappledan Deity

    Joined:
    Aug 9, 2017
    Messages:
    7,122
    Gender:
    Male
    Location:
    Alberta, Canada
    It gets hairier with land ranged units, but I don't know why CS don't at least build naval ranged units. naval ranged units are much better at defending than naval melee units, because they can contribute to defense in the event of a land invasion.
     
    Heinz_Guderian likes this.
  9. youngsteve

    youngsteve Prince

    Joined:
    Sep 10, 2007
    Messages:
    448
    Gender:
    Male
    Location:
    England
    The problem is they soon get destroyed if they do. I try sending them to beseiged CS, but they always leave them next to the coast to be destroyed by Skirmisher units. I can understand getting destroyed by non mounted range units, but putting them next to the coast is silly.
     
  10. Fluffball

    Fluffball Prince

    Joined:
    Sep 22, 2011
    Messages:
    419
    The best set up obviously depends heavily on the specific situation but in the case a city is on the front line and thus can be directly attacked by enemy melee troops i will generally have a melee in the city and ranged behind.

    When under intense siege i focus on enemy melee units as the enemy can't take the city with ranged units so if you kill the melee they are just stuck.

    When fighting the AI you want to make sure you get a kill as much as possible rather then let a wounded unit retreat and a melee unit can be much more effective at ensuring a kill of a enemy unit in dangering a city.i.e. next to the city. The unit is likely to have already attacked the city and thus taken more damage due to the higher combat score from the melee stationed in the city, the melee unit can attack from the city without leaving the city and exposing itself so can contribute offensive damage and the higher combat score for the city will allows it's bombardment to do more damage all increasing the likelyhood of gettinng kills or at least doing the maximum damage possible.

    If a ranged unit is in a city being attacked it will also take damage which can quickly severly reduce your firepower as you either have to remove them to heal which means you reduce your overall firepower reduce the speed they get xp or at least they do significantly reduced damge due to being injured and and injured ranged units can make it much harder to counter attack if/when the opportunity presents itself.

    Coastal cities under attack are obviously a very different case and in this situation i much prefer a mounted ranged be stationed in the city with a good road network and as many mounted ranged units as i can cycle through during a single turn in the vicinity. Under optimal circumstances i can cycle in 5 or 6 mounted ranged units to kill units adjact to the city and use my normal ranged units to harrass units further out too sea.

    Where possible i try to use that tactic also in normal city sieges and it can be devastating to enemy attacks but it can be particularly effective fighting amphibious attacks as you are less likely to need to have melee troops around unless you actually let them land so you can use mounted renaged trooped in place of melee.

    The only time i would say ranged are almost always better as a garrison is a border city which may be harrassed by passing scounts/barbarians where a ranged unit can fend off annoying visitors rather than haviing to simply play passively knowing they can't actually take the city but can bother your workers and pillage your tiles.
     
  11. azum4roll

    azum4roll Emperor

    Joined:
    Jul 17, 2018
    Messages:
    1,854
    Gender:
    Male
    A garrisoned ranged ship can't attack though.
     
    Skidizzle likes this.
  12. Rekk

    Rekk Emperor

    Joined:
    Dec 9, 2017
    Messages:
    1,457
    Units can defend the city without being in the city. Put a land unit in the city, naval ranged on the coast, and you've restricted areas that the sieger can be without taking fire from units.
     
  13. balparmak

    balparmak Prince

    Joined:
    Sep 20, 2015
    Messages:
    314
    PC was broken for a few days, thanks for all comments & sorry for replying late. One thing I should've been more clear on is that I don't claim ranged units to be the best garrison units in every case, rather that they are the ones with the most general usability, hence providing a benefit in every case. Even if melee garrisons indeed give more survivability, there are cases where they're practically useless. Ranged garrisons are useful and cost-efficient, unless idk if the city is placed on flat land with two-tile hills everywhere around it, in that case you're dead anyway

    So again, why not focus on the optimal case? Because that requires a lot more data, testing and is harder to code. Why have a hard rule? Because I don't think the AI garrison behavior is anything good right now and I haven't seen anyone praising the AI so far, with a hard and easy-to-implement rule we can boost the AI in a very efficient way.

    That said I won't be dragging this further as obviously there isn't a consensus. If I find the time I may run tests to compare city survival rate with melee garrison vs ranged, and re-start the discussion with hard numbers. Coastal cities may still get this though, I don't see anyone arguing against that. Maybe a check for how coastal a city is could be needed (how many water tiles are surrounding it), I'll need this to run this by ilteroi in any case.
     
  14. DanielSPoA

    DanielSPoA Chieftain

    Joined:
    Jan 3, 2022
    Messages:
    15
    Gender:
    Male
    my biggest issue is with CS that are behind mountains, city states that have a tight corridor leading to their cities on the coast.

    my opinion is that, if the enemy is just invading the CS territory, the melee should be on the front and the ranged behind (stationed in the city). Both fight and the city is not taking hits yet.

    also, more ranged ships and a bias towards ranged land units if they are on the coast. Having just tercios is a crime.
     
    JamesNinelives likes this.
  15. JamesNinelives

    JamesNinelives Emperor

    Joined:
    Mar 16, 2019
    Messages:
    1,667
    Gender:
    Male
    Location:
    Australia
    Yeah. I feel bad for them when they just have a bunch of melee land units floating around in the water lol.
     
    DanielSPoA likes this.
  16. MontyJava

    MontyJava Chieftain

    Joined:
    Apr 12, 2020
    Messages:
    97
    Wait, did CBO make tactical AI changes? I thought it was just diploAI. Where are those files in the mod structure/dll activation?
     
  17. Recursive

    Recursive Radiating Doom At 10x The Background Level Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,979
    Gender:
    Male
    It makes changes to unit AI types/flavors, which determine how the AI will use a unit.
     

Share This Page