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

Reintroducing 1 unit-per-tile

Discussion in 'Rise of Mankind: A New Dawn' started by dbkblk, Feb 15, 2015.

  1. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    Limited units per tiles... reloaded !

    While promoting this mod, many players said that it is difficult for them to play Civ. IV again because of the "Stack of doom" which consists to pile up a maximum of units in the same tile and attack (of course, some other players like that). Here at "A New Dawn", we love to give players the choice to play how they want.
    Many developers said that limited unit-per-tile (xUPT) system is buggy and cannot be solved, but Napoleon said a while ago "The word impossible is not French". So I listened to him and rewrited most of the existing xUPT code... and it works!

    The current implementation

    The implementation takes the good ideas from Civilization V and mixes them with Civilization IV core game mechanisms to get an hybrid system. So here is how it works:
    • Tiles can accept unlimited units or they can be limited from 1 to 100 units/tiles.
    • The tile limitation is applied independently on each civilization. This is made to remain compatible with Civilization IV mechanisms.
    • The limitation is applied independently on each of these 3 categories: Military land units, military naval units and Civilian. For example: A tile can accept an archer AND a worker, but not 2 archers or 2 workers (if you set it to 1UPT).
    • The limitation is not applied on air units, as the buildings already limit their uses. Please note that helicopters are considered as land units.
    • A city is considered as a sanctuary and can contains 4x the tile limit. For example, you can put 4 archers, 4 workers and 4 galleys at 1UPT (8 at 2UPT, etc.). This balances the attack and defence, considering there can be 9 tiles around a city.
    • A naval transport unit cannot enter a city for which his cargo is full (except if it's an air unit, in this case it cannot unload).
    • At each turn, if a city got accidentally more units than it can accept (for example, emerging barbarians, trade offers, etc.), these are dispatched to the nearest free tiles around (first owned, then friendly tiles, then neutral tiles). If any of tiles in the map can accept your unit, it will be destroyed. Those are the breaks.
    • According to the same logic, if a war emerges, all units in the current enemy territory will be distributed in nearest free tiles.
    • At each turn, city vicinity is checked. If all of the tiles in the working area cannot accept an unit because of the tile limit, the unit production will be cancelled (but production points are preserved). The AI has been told how to use that feature.

    Bugs and feedback

    Please report for bugs, abnormal behaviours or simply feedback here.
     
  2. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,854
    Location:
    Just wonder...
    Great work, I'm ok with your solution and I personally vote for "push back + kill them if it's not possible"
     
  3. Lord Bigfoot

    Lord Bigfoot King

    Joined:
    Aug 15, 2012
    Messages:
    830
    Location:
    My secret lair
    Hope this is an option I can check off. I loathed the 1UPT limitation in Civ 5 and its one of the reasons I never played Civ 5 that much.
     
    tommybabs likes this.
  4. Rezca

    Rezca The Greatest Jaggi

    Joined:
    May 3, 2013
    Messages:
    1,990
    Location:
    United States
    From the looks of it, it's the same UPT we already have (in the BUG options) but vastly improved over how Civ5 implemented it. 1UPT in Civilization was a horrible idea to begin, and one of the reasons I won't play Civ5 or Beyond Earth.

    Hopefully these optimizations don't end up causing problems elsewhere in the mod (Even with UPT switched off), new/changed features can do that surprisingly easily :sad:
     
  5. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    Of course this is optional ! You can even play with 2, 3, 4, 5 or unlimited UPT. I don't think this will cause problems as i've just added conditional checking into the AI part of the code. If there is enough room for units, that part of the code won't be launched.

    I work on that because i loved to play at 3 unit-per-tile and the n°1 criticize that was made on our mod during the reddit advertising was that stack of the doom thing (and i don't like it neither). I think this will uncap a negative point that some players have. Hopefully, all is drawn to be optional in this mod :)
     
  6. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    I'll try to reduce city factor to 4 to see if battles are more interesting.
     
  7. Rezca

    Rezca The Greatest Jaggi

    Joined:
    May 3, 2013
    Messages:
    1,990
    Location:
    United States

    I dislike the UPT - One unit or not - more than I dislike the Stack of Doom honestly. Which isn't even a feature that's coded in either - it just happens. UPT is put there intentionally whereas SoD is not. SoD's been around for as long as I can remember, but 1UPT in Civ5 was a terrible way of "solving" it.

    A limit but not just ONE unit would be one way, a "population cap" like Age of Empries / Warcraft / other RTS's would be another, but one unit per tile?



    Still, as long as it's optional it doesn't make any difference to me :p
     
  8. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    I understand your POV, but capping a tile to 3 or 5 units per tiles, make you to force using on-field tactics as you have to take care of the placement of all your units. It's not just about using the best tile for your stack.

    I don't really like the 1UPT limit, but i love 3UPT as it makes battle more interesting (to me :)).

    However, a population cap would be interesting and not so hard to code (now i have the nose in CvCity code). Let's discuss this. How do you conceive that ?
     
  9. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,346
    Location:
    In a constant brainstorm...
    I think a 5 or 10 UPT option may help the AI with Surround&Destroy, or even with Great Commanders (once it is willing to move the GC with its troops).
     
  10. Rezca

    Rezca The Greatest Jaggi

    Joined:
    May 3, 2013
    Messages:
    1,990
    Location:
    United States
    I tried it with 15 and 25 and still didn't like it :p

    Oddly enough I never really cared in Age of Wonders - but AoW was built around that limitiation from the start (It only allowed a total of eight units to occupy a single space - including cities)



    Well, how it'd work with Civilization I don't know. In Warcraft at least every troop is assigned a "Food Value" - how much population it takes up from your total allowed. Ordinary games your maximum caps out at 100 no matter how many houses or cities you build. Weaker units take up 1, and stronger units like Kodos, Dragons, and siege weapons can take up 5 ~ 7. So you'd not be able to just run around with a huge army of dragons with ease (And even if you tried to, everything has something else that can counter it, so a one-unit-type army is a no-no in most cases)

    Age of Empires was similar in that stronger more advanced units would take up multiple food slots, and researching Logistsics (In AoE 1 if I recall, I can't remember if there was a tech that did the same in II and III) reduced the amount of population military units ate up.
    Age of Mythology took the same approach as Warcraft in that production units (Villagers) only took up 1 space except for the Atlantean workers, human military units took up a small amount, and Mythological units would take up to 5 depending on their strength.


    Now this is all well and good, but how would this work here in Civ? A Light Sword is pretty advanced to someone still usign javelins, but how would you assign a value to something like a Hover Tank? Would it be Era-Dependent or would it be static? Would buildings or techs influence this any? etc etc
    Age of Empries it depends on how many cities you have (Combined with houses) but that would put smaller nations at a serious handicap - unless there was a minimum amount and cities just add onto that.
    Then again... I don't think it'd stop SoD's - since the AI could still just toss its entire population into one stack then just march it around like it always has. It'd just imit the effective upper size of it *shrug*
     
  11. nionios

    nionios Prince

    Joined:
    Sep 29, 2013
    Messages:
    421
    I haven't ever played CIV V and i've never tried the 1UPT option in RoMAND.On the other hand,i hate stacks of doom and the infinite number of units on a single tile.SoD give me a feeling of infiniteness which i don't like in the game.I can say that if i had to choose, i'd prefer the 1UPT to SoD.
    Another thing that is getting on my nerves even more is the fact that someone can create SoD from just 1 strategic resource.:mad:(for example: countless swordsmen from just one iron...).
     
  12. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,346
    Location:
    In a constant brainstorm...
    Age of E/M and Warcraft are RTS so it is hard to compare them with Civ. Age of Wonders I never played but afaik it is to imitate Heroes of M&M mechanics rather than Civ's.

    Basicly the UPT is to simply represent the fact that space is limited on any tile. Which makes it a bit funny to have more place for units in otherwise crowded city than in an empty field :lol:

    But true, I would never play with 1UPT, 5 maybe, 10 likely.
     
  13. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    In fine, global population limit is not adapted to this game. I think money naturally limit the number of units.

    Regarding xUPT, it's almost there but i can't fix the unloading bug for now (ships in cities can unload no matter if the tile limit is reached). EDIT: OH WAIT. Writing this gave me an idea.
     
  14. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    Can someone answer me about air units : Except helicopters, is there other units that can be stationary on a tile which is not a city ?
     
  15. nionios

    nionios Prince

    Joined:
    Sep 29, 2013
    Messages:
    421
    Perhaps global hawk,though it belongs in the category of helicopter units.
     
  16. Rezca

    Rezca The Greatest Jaggi

    Joined:
    May 3, 2013
    Messages:
    1,990
    Location:
    United States
    Age of Wonders you can get for less than $10 off GoG.com (Or even Steam, if that service appeals to you). Pretty fun game, though Shadow Magic has better features, I prefer the music and combat of the original :)

    I picked Age of Wonders over HoMM I guess because AoW seems more of an empire'ish sort of game to me (especially so in 2 and 2:SM where you can BUILD your own cities and forts from scratch), and with the exception of IV the HoMM series your troops can only be led by a Warlord - I mean, a hero - and can easily accumulate a Stack of Doom. Fond memory of having a stack of 128 red dragons and almost two thousand lizard men and 800+ basilisks.... Fun times. That hero has a limited number of slots, but an infinite number of troops can be in that slot ;)

    Age of Wonders it's a literal cap of eight units - hero included - on a single tile with no exceptions. Combat more units can be drawn in if they're adjacent to the tile being attacked (Surround and Destroy? :lol: ) whether or not they belong to you or the defender.
     
  17. Lord Bigfoot

    Lord Bigfoot King

    Joined:
    Aug 15, 2012
    Messages:
    830
    Location:
    My secret lair
    You know another way to get around this would be to limit what units can be on tiles with other units. Though how one would do that I have no clue. Anyways the reason I hate 1UPT is because i've always thought of SoD as entire army's and that's why the units stack to represent that.
     
  18. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    In fact, ships and land units share the same xUPT limit (to avoid to bring a ship full of units into a town to gain "space") but i think i'll give a separate limitation for air units. Including planes into the limitation give no space for them in the last eras, and there is no point prevent a helicopter to fly above an unit.
    Thank you for the answer nionios.
     
  19. dbkblk

    dbkblk Emperor

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    Another question: can air units be stationary on a water tile ?
     
  20. nionios

    nionios Prince

    Joined:
    Sep 29, 2013
    Messages:
    421
    Another problem with unit per tile feature was that the limit is ignored if units from different eras exist on a tile.For example: playing with xUPT somebody can place x units from classical and x units from medieval era on the same tile.
    I don't know if this problem is now fixed.
     

Share This Page