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

Suggestion: Units upkeep/maintenence

Discussion in 'Civ4Col - We The People' started by Bandenere, Oct 15, 2019.

  1. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,894
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Well yes, but we - especially you - continue to work in it. :thumbsup:
    That will not change if we also give "Upkeep" a try.

    Then why don't we just give it a try. :)
    I could do the implementation, then we balance and improve it internally and then we publish a beta to get feedback for fine-tuning.

    If we apply "Upkeep" just during War it will become too easy to exploit again and will not really help AI.

    You could still build up a huge military and navy without consequences, then rush AI and conquer its cities.
    This might need only five turns and thus cost you only little Upkeep.
    Then you could declare peace again and prepare rushing the next AI without any Upkeep in the meantime.

    So please - if we implement Upkeep at all - then let us not limit it for "War" times only.
    The Wars themselves are over too fast if you prepared well.
    The preparation of your army and navy needs to also cost Upkeep already.

    But we could have "increased Upkeep" during War - e.g. 20%. (That would be configurable in XML of course as well.)

    But ok, let us wait for more feedback and ideas. :)
     
    Last edited: Jan 17, 2020
    OzzyKP likes this.
  2. Commander Bello

    Commander Bello Say No 2 Net Validations

    Joined:
    Sep 3, 2003
    Messages:
    3,858
    Location:
    near Koblenz, Germany
    I have to respectfully disagree.

    First of all, the highlighted part of the quote might need some rephrasing to make sense in the overall context, as I think.

    Second, the limitation of internal combat rounds had one main goal (and frankly, I think it mostly achieved that):
    to limit the number of outcomes where a much stronger unit would lose the fight due to "bad" RNG results as that was something many players complained about at that time (and I think they rightfully did so). This was especially a problem as that often went hand in hand with the unexpected weaker winner of the battle not having been hit at all. In the Civ4 section we even have a special emoticon for this: the spearman vs tank one.
    While this at first glance might seem to support your case, there is another aspect to be considered: the stronger unit isn't as likely to win either. In many cases the combat now will result in a draw, thus preventing the stronger unit to simply annihilate the opponent. Which in turn leaves that opponent at least some options for the next game turn.
    The real problem is that those options are not correctly considered by the AI.
    Saying that this effect was introduced by me however seems to be a bit strange, but of course you are entitled to think so.

    Third, fully admitting that unfortunately I have never finished the complete combat system as I planned (and I am the one who is most sorry about that) , I did (small) things to make the AI more competitive in combat. It was just a first, preparatory step to make the AI consider survival chances instead of winning (= killing the other unit) chances when deciding whether she will attack or not. In fact it should be a bit more likely now that an AI controlled unit attacks then it was before.
    In addition to that I introduced the healing process being based on available food, something which never made it into RaR.
    In short: a unit would heal only if there was enough food stored in the colony's warehouses. 10% heal rate would equal 20 food, as a new unit needs 200 food to be created.
    For the AI that was cut into half and for the natives it didn't apply at all.

    The problem is that the AI in all RaR-based mods seems to be less inclined to attack (especially settlements) then it ever was before. I remember brutal fights in TAC, where the natives would throw unit after unit after unit at me until they consumed my defending forces. I remember two wars in particular. In one I lost four border settlements in the first turn of the war while having killed more than 200 (!) native units. It was an epic massacre, where the screen flipped back and forth switching from one fight to the other. This was going on for like two minutes and quite an experience.
    However, it didn't change the outcome of the war as such. By killing that many attackers, I had broken the Sitting Bull's strength and was able to regain control over that territory again as luckily those settlements hadn't been in my mainland. And I did have the advantage of all of it taking place on plains where the mounted units are strongest and quickest.
    The second incident was when I lost a fortress protected city on a small land connection, guarded by almost 10 defensive units against a native attack. I was completely baffled since I didn't expect them to attack said fortress in the first place. Let alone expecting them to succeed.
    This pattern of behaviour had completely changed in RaR, and I admit that I have never found out why. My assumption is that the higher number of native tribes leads to the effect of the individual tribe being less powerful measured by total numbers of villages and therefore, braves. And that might have some influence somewhere in the AI logic, but as I said, I was never able to identify the exact reason nor the area in the code where the problem might reside.
    This is even more interesting as for the local fight that should not make that much of a difference, assuming that the AI might have a local superiority in terms of number of units present at a given battle area.

    All that being said, has the limitation of internal combat rounds really harmed the AI?
    I think there isn't a clear answer to that.
    Yes, it has given the human player the advantage of not losing that many "safe battles" than before.
    No, as very often the human player may find that his attack results in a "draw" as he did run out of internal combat rounds before he could kill the enemy unit.
    In general, an attacker now needs more units to achieve taking a given position in a given number of turns.

    The main problem however seems to be the AI not sending reinforcements to an endangered area nor to make preventive strikes and that most certainly is not caused by my changes.

    And finally, if you think that completely randomized combat results as before lessen the burden of the AI, you are free to return to the previous combat system. :dunno:
    Hail to the spearman :spear:
     
    Schmiddie likes this.
  3. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,295
    Location:
    Germany
    I like the current combat system - you should not return to the old one. I ever hated that a fight means the death of a unit in any case.
     
  4. rah

    rah Deity Supporter

    Joined:
    Sep 12, 2005
    Messages:
    9,625
    Location:
    Chicago
    Unit maintenance would not be the path I would prefer. I usually play for domination on large maps so armies get quite large. I would hate to lose the ability to do that. I do like a simple settlement cost to slow down expansion, (if you guys don't slow it down enough by requiring materials)
    A generic war tax wouldn't be bad. (offensive wars only, defensive wars could be tax free) and maybe half tax if king requests it.

    And good to see you Ozzy.
     
  5. OzzyKP

    OzzyKP Emperor

    Joined:
    Dec 16, 2000
    Messages:
    1,667
    Location:
    Washington, DC USA
    Howdy Rah. :) I see Guynemer kicking around here too.

    A war tax from the king is an interesting idea (though different than a general maintenance request). Paying for the French & Indian War is what led to the taxes that we Americans revolted against. I think in general it would be nice to have some sense of how our actions impact the raising tax rate. It is quite opaque to me and I have no idea whether it is just random or impacted by my actions in the game.
     
  6. Krohon

    Krohon Chieftain

    Joined:
    Jun 28, 2013
    Messages:
    3
    It is not easy to imagine a taxman stopping an army and telling them "You have not paid the tax! I will destroy you now!", so I would like better not have taxes on the military. But armies have to eat so perhaps we can a similar "maintenance" effect by setting a negative rate of healing each turn, unless they can consume some food.

    If the units are located inside the cultural borders then the food cost might be skipped.

    It should play similarly as having a tax on units that are attacking enemies outside cultural borders.
     
  7. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,894
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Hm, I am completely confused now if "Upkeep for Units" (e.g. as suggested here) should be implemented or not. :dunno:
    Simply because topics became too mixed and there is no poll to visualize a clear community oppinion.

    For Release 2.8 this is now however off my planned "todo list".
    I do not feel that we yet have a clear community majority and team consense for this.
     
    Last edited: Jan 22, 2020
  8. rah

    rah Deity Supporter

    Joined:
    Sep 12, 2005
    Messages:
    9,625
    Location:
    Chicago
    Yeah, probably needs to be fleshed out more.
    But it does seems like some version of penalizing is supported by most.
    But it's not like there's not a lot of other things that could be worked on . :lol: :lol:
     
  9. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,774
    I think it’s a good idea to allow upkeep; implementing this as int tags in units, professions and promotions would make it as flexible as possible to define where/when modders wanted to apply the upkeep.

    Civeffects tags for the following would add even better scope for modding flexibility and could be used in handicapinfos difficulty levels for balancing:
    % modifier to upkeep globally
    % modifier to upkeep when inside cultural borders
    % modifier to upkeep when within cities

    This would also enable interning military tech/civics choices such as Citizen Militia (much lower upkeep within borders and cities but full upkeep when abroad in foreign territories).
     
  10. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,894
    Gender:
    Male
    Location:
    Stuttgart, Germany
    In fact I do now as well. :thumbsup:

    Not because the game mechanic in itself is so much fun considering gameplay - it is mainly just a background calculation that substracts some money.
    But it does have some nice side effects considering gameplay (for my personal taste) and also allows to build other more interesting game features on top.

    1) We could e.g. build Civics (or maybe also Techs) on Top of it that add strategic gameplay choices.
    2) It would add more strategic choices considering which Units and Professions to acquire. (Because of different Upkeep Costs.)
    3) It would help AI (e.g. Natives) a bit because Human Players could not simply build up huge armies and roll over the complete continent.
    4) It would help weaker Players (with smaller armies) a bit to catch up since they would have to pay less Upkeep than stronger Players (with huge armies)
    5) And yes, I see the point considering immersion as well.

    Remark:
    Gold is much easier to implement and balance than e.g. Food.
    (It is also easier to explain to Players.)

    We would have this very configurable.
    Not only in Units / Professions but also in GameDifficulties, GameSpeeds and GlobalDefinesAlt (for global balancing modifiers).

    I would not like to have it as GameOption because then it would have side effects on all game concepts we want to build on top.
    (e.g. specific Civics or Techs could become pointless.)

    ----

    As I said, it is generally not difficult to implement and balance compared to other ideas / concepts currently discussed. :)
    But we need to find a team consense on it of course and community needs to like it as well.

    Let us simply wait for more feedback. :dunno:
     
    Last edited: Jan 24, 2020
    OzzyKP likes this.
  11. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,273
    I have to say I'm still not totally sold on the idea. It's easy enough to code and code ways to configure. I'm more worried about the AI and also the risk of backfiring on gameplay as in the risk that it will be annoying rather than fun to play with. Maybe the normal usage is ok, but there are all the stuff, which might not happen in each game, which should be considered too. For instance:

    • What should happen if the player doesn't have the needed money?

    In order to keep this simple, we should skip supporting maintenance in human units. Otherwise we can end up paying for colonists working inside the colonies and it will be a pain to track down. The cost of units should be for those, which are unit/profession hybrids like ships.

    I rewrote the promotion cache in CvUnit, which in addition to better performance will also make it easier to handle regarding savegame compatibility and updating CivEffects can force recalculating the cache in all units. This means it is doable with reasonable effort to cache the cost of a unit in CvUnit and include xml info from unit, profession, promotion and CivEffects. In other words performance shouldn't suffer just because we add multiple ways to set the same number in xml.

    Also we should consider storing the unit cost in 1/100 of a gold. If we each turn add that together for all units and only subtract the combined value from the player, then stuff like 0.5 gold or 1 gold -5% can be allowed to stack to end up as int sized discounts when the player has to pay.

    I would say we should put it in CivEffects. Difficulty level can be made to provide a CivEffect, same with game speed, even though I haven't actually considered that until now. Instead of GlobalDefineAlt, I would place the last one in the default CivEffect. We do have a bunch of CivEffects, which are given automatically (all, native, AI, etc), which we can use to easily control stuff like this without having to code an additional way to configure.
     
  12. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,894
    Gender:
    Male
    Location:
    Stuttgart, Germany
    That is why I want to make "Upkeep" a "Human only" feature. :dunno:
    I also want to code it to help AI a bit and increase the challenge.

    Currently I was planning to have the Players loose Military Units (by Desertion) until he can pay the Upkeep again. (Cheapest Units first.) :dunno:
    That way the feature would then balance itself again.

    I only want to have Upkeep for Military and Combat Navy. :thumbsup:
    (Definitely not for workers in Cities, Buildings, Improvements, Wagon Trains, normal Trade Ships.)

    But basically the XML configuration would allow us to also use the system different if we should ever consider otherwise later. :dunno:

    Nono, don't worry. :thumbsup:
    I would not want to configure it that way either.

    I am not sure yet it is necessary, but I don't mind at all either. :dunno:
    Players will not notice such internal calculations anyways.

    The "Upkeep" per Unit / Profession is probably easier to understand if it is a XML-tag in the UnitsInfos.xml / ProfessionsInfos.xml itself. :dunno:
    I would also rather add the game setting balancing modifiers for Game Difficulty or Game Speed in the corresponding HandicapInfos.xml and GameSpeedInfos.xml.
    Some global balancing modifiers I would also like to add to GlobalDefinesAlt.xml like it was always supposed to be done.

    But all the later game concepts that modifiy Upkeep (Civics, Techs, Traits, Promotions, ... whatever should use the CivEffects of course. :thumbsup:
     
    Last edited: Jan 24, 2020
  13. ConjurerDragon

    ConjurerDragon Warlord Supporter

    Joined:
    Dec 13, 2012
    Messages:
    196
    Gender:
    Male
    Location:
    Rhineland-Palatinate
    Upkeep should not simply be a matter of paying a set amount of food or gold for a unit. Some players build just one city and still field large armies.

    Having lots of units should require to have a large population too (historically having more than 4% of your population be a standing army was unheard of).

    Would it be possible to have say:
    1 military unit located on a city = free (the town itself feeds and houses the unit that defends their homes)
    More units require upkeep in food and/or gold and
    a hard limit (original Col had e.g. a maximum number of units due to old computers limitations at 255) on the number of military units, that you can not produce more military units than you have levels of cities (e.g. City with population 10 and you can produce a maximum of 10 military units).
    Excempt of that would be Militia (civilian units who grab a rifle from the storage to defend their home city).
     
  14. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,894
    Gender:
    Male
    Location:
    Stuttgart, Germany
    You indirectly need to because otherwise you will not generate enough money. :)
    I would simply like to keep the concept a bit easier to implement and to explain to players.
    Already part of my implementation concept. (see E here) :thumbsup:
    I do not like that idea personally because, I am not a big fan of hard limits. :(
    Militia would have low Upkeep (by XML balancing) :thumbsup:
    But I personally think they should still cost a little bit.
     
    Schmiddie likes this.
  15. OzzyKP

    OzzyKP Emperor

    Joined:
    Dec 16, 2000
    Messages:
    1,667
    Location:
    Washington, DC USA
    As for what happens when you can’t pay the troops, isn’t the BTS mechanic that the troops go on strike? I.e. you can’t move them till they get paid?
     
  16. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,295
    Location:
    Germany
    I generally like the idea of upkeep for military units (combat units). Nevertheless it needs to be balanced well (different for easy and hard game modes).

    It was always unrealistic having armies that do not need any food or other supplies. However, we need to manage the AI. I understand that it might be helpful just to make the feature a "human feature". But I definitely don't like features which are only made for the player. I would prefer that we implement a feature that can be handled by the AI as well - somehow.
     
    Commander Bello likes this.
  17. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,894
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Nice. :)
    Definitely. :thumbsup:
    I currently don't think it is a good idea to activate it for AI because it would weaken AI. :dunno:
    (For the moment I would prefer to give AI a small advantage with this. But once AI is really strong we can remove that small advantage again.)
     
    Last edited: Jan 26, 2020
  18. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,273
    I think it would be best to make a standard price for everybody and then use a multiplier in CivEffects. We could have one for your team's colonies, your team's plots (non-colonies), neutral plots and plots where you are at war with the owner. We can then give the AI some -100% cost if we want to, making it free for the AI without introducing AI specific code. It will also be the easiest to maintain and has the fastest runtime. We can then in the default CivEffect (or default human CivEffect) control the price modifiers for each of the plot categories, making units in your colonies free of charge, but cost something when placed in enemy plots.

    Another bonus is that it will be easily configurable in xml. Not only is that a benefit for gameplay balancing, it also means people can grant -100% to everybody if they end up hating the feature. While we should aim at making one game, which we think is good and well balanced, we should at the same time allow people to edit as much as possible in the xml files. I will not judge how people play the game.

    Come to think of it, we can actually make GameOptions be applied by simply adding a single CivEffect. This way we can do something like disabling unit maintenance cost without adding a runtime overhead, which will slow down the game even if the GameOption isn't used.
     
  19. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,774
    That sounds like a good system. :king::goodjob:

    It could also be nice to let there be a civeffect modifier tag for fortified units, and/or for units on a city tile (ie military units defending a city.) This would allow techs/civics to apply discounted or free upkeep from techs/civics applying to better military fortifications / logistics or specifically to City Guard or Minutemen civic arrangements.

    In colonial history the British really saved on their upkeep costs by passing laws forcing citizens to host occupying soldiers for free in their houses or in inns/taverns etc when in the countryside. This was so unpopular that it caused a constitutional amendment specifically forbidding it lol. Could be interesting for a civic choice that saves greatly on local upkeep at the cost of some strategic trade off (e.g. slightly worse city happiness or liberty production).

    https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=13&ved=2ahUKEwiepN2W7KHnAhVCUs0KHUpHDNsQFjAMegQIAxAB&url=https://en.wikipedia.org/wiki/Third_Amendment_to_the_United_States_Constitution&usg=AOvVaw0Bdr6fk-aW4XwEBtVNtZgh

    Also might be neat to have some early royal military units you can get from the King be useful early on against natives and defending against other civs, but their relatively higher upkeep (& fact that they are lost after revolution) make you want to eventually replace them with your own homegrown forces.

    p.s I really like the idea of letting a civeffect be switchable via a gameoption! There are so many possible gameplay features that some may like but others won’t, so this would be great for allowing some interesting Civeffects that players are able to “opt out” of.
     
    Last edited: Jan 26, 2020
    OzzyKP likes this.
  20. ConjurerDragon

    ConjurerDragon Warlord Supporter

    Joined:
    Dec 13, 2012
    Messages:
    196
    Gender:
    Male
    Location:
    Rhineland-Palatinate
    As far as I read that it only forbid the military to quarter soldiers in private homes during peacetime. So while at war (e.g. French&Indian war/7-Years-War) it woud have been legal. And it was enforced only where no dedicated barracks were present.

    I always wondered why the troops from the King are and stay under your command. They should only be leant to you and - at the Kings whim, depending on your standing with the King - be sent away to drive his majesties colonial enemies into the sea (e.g. if a nation at war in Europe has established a colony nearby) or return to the King´s command as soon as you declare Independance, creating a hostile force in the middle of your colonies.
     

Share This Page