Losing units - bug or normal?

Baconator

Chieftain
Joined
Mar 15, 2016
Messages
6
I've been playing Civ1 probably since it was released (I don't remember when I started but I was much, much younger) and by far, my favorite game. Anyway, glad to find this forum and see there are still people out there passionate about the game!

I'm not sure if what I am experiencing is a bug or just normal game play but I'll explain what's happening... I'll take an enemy's city - and it will have a size of lets say 5. I usually "starve" the city and pillage the improvements/resources. In a couple of turns the city will be reduced down to a size of 1. I'll wait for a Barbarian or enemy to take the city and destroy it. I want this to happen because I don't want the city.

But this is the odd part. I'll have a Naval unit that's home city is "City A". I'll take enemy city "City B". I'll let the City B drop down to size 1 and wait for it to be captured by an enemy and destroyed. As soon as that happens, I lose a Naval unit. The Naval unit is still home to City A, is nowhere near City B. This also only seems to happen at random times. So I have to make sure I unload all my ships before I know a city is going to be conquered because if I don't, I can lose a lot of units at once.

Any idea why this is happening?
 
This has happend to me but very rarely. It is most certainly some sort of bug and I believe it is related to stacking units. Try moving that ship around, move it out of city B's range before you let the barbarians take it. Oh, and you don't need to actually let somebody take a city to destroy it. You can just build a settler when the city is size 1 and it'll disband and give you a NONE settler (unless city B is nearer to your empire than it is to somebody else's).
 
Ok, so I'm glad to know it's not just something I am doing that is causing that to happen. But it's weird too because the Naval unit can be on the other side of the map and it still happens, so at least for me, proximity to the city has nothing to do with it. I was playing the game this afternoon and had two cities captured and no problems. So who knows!

But I tried the settler "cheat" in the past with no luck. After you mentioned it, I tired it again for the heck of it and it worked! I pretty much have to build the settler, starve the city, and disband the settler one turn before I would lose it. Then the city magically disappears! Thanks for that reminder!
 
In all probability, you had a unit homed to city B in the boat, and when the game tried to erase that unit when the city fell, it also erased the boat and everything on that square. If it wasn't a unit, then the game still has to have a reason to delete the boat, e.g. it has some sort of connection to that city, possibly formed even just by having entered it to unload troops. I'm sure if you provide saves from the turn before it happens, the hackers here could see what's really going on.
 
I'll have a Naval unit that's home city is "City A". I'll take enemy city "City B". I'll let the City B drop down to size 1 and wait for it to be captured by an enemy and destroyed. As soon as that happens, I lose a Naval unit. The Naval unit is still home to City A, is nowhere near City B. This also only seems to happen at random times. So I have to make sure I unload all my ships before I know a city is going to be conquered because if I don't, I can lose a lot of units at once.

Any idea why this is happening?

Just an effect of the unit number limit. A civ (yours, a rival's, doesn't matter) can only have 127 units in play at one time. But even before you grow that large, you may only have as many units as you have citizens. What is happening, is that you take City B, and then your civ is able to support more units because City B has citizens. As you starve down City B, you are shrinking your unit limit and likely building other units in other cities. When City B blinks out, you lose a citz and can't support as many units as you have, so one must go.

Don't know the method the game uses to choose which city loses a unit, try saying that 3x fast, but whichever city is affected, it will lose its furthermost unit... most likely a ship if that city owns one. When this happens, you may witness another effect of rubbing up against the unit limit: check some cities where you know there are two units garrisoning, and you may find that one of them has simply disappeared. Then the next time you found a city, or toss a Caravan into a city, or lose a battle, or for whatever reason you drop a unit, check again and the AWOL garrison will have returned to duty.

An odd effect is that this missing guard does not increase the city's unhappiness, under those governments which allow for martial law. They're not really missing, the guys just nipped off to the Wharf District with a month's pay, so they're still protecting the city... by drawing every cutpurse to the docks.
 
you may only have as many units as you have citizens.

Ummm, no? A size 1 city can support as many units as it has shields (+1 for free under despotism/anarchy), size 2 with 3 shields can have 5 units, etc.

On the 'missing garrison' bug, there's another nasty side effect to that. If it happens to a lone guard, the city is effectively undefended. Sometimes you will even lose control of such a city, will be unable to open its menu, etc. and you will end up either recaputring it from yourself at some cost of improvements or waiting for it to build whatever it is building, which will give you access to the menu or pop a second unit out that takes control.
 
Ummm, no? A size 1 city can support as many units as it has shields (+1 for free under despotism/anarchy), size 2 with 3 shields can have 5 units, etc.

If i have five units all homing in a city which produces 3 shields under Monarchy, the game takes two of them away, saying "City A is unable to support Xxxxxxx unit." Invariably, they are the furthermost units. Most often, this means i have bribed away a juicy rival city, and it comes with 5 Phalanxes and an underdeveloped hinterland.

In any case, what i mean is that the civ-wide unit limit is what Baconator is up against when he offers City B up to the dogs, and he/she is unlikely in Desp/Anch at that point. Lose the city, lose the citizen. Double the effect if you build a Settler in a 1-city. Then you not only lose a citz, but gain a unit, another unit closer to your current unit limit number.

On the 'missing garrison' bug, there's another nasty side effect to that. If it happens to a lone guard, the city is effectively undefended. Sometimes you will even lose control of such a city, will be unable to open its menu, etc. and you will end up either recaputring it from yourself at some cost of improvements or waiting for it to build whatever it is building, which will give you access to the menu or pop a second unit out that takes control.

Yes, have seen all of these things happen. Annoying, so now whenever i hit the unit limit i over-react. Switch all cities to improvements, keep track of pops and builds/trades/battles to know where the unit limit number is now. Pain in the rear, if you're right at the limit and you have the cash to bribe an enemy Cannon, but you can't because it'd just disappear with your bribe.

In a game late last year, had a terrible time with the unit limit number. Was at a crossroads where i had prepped a dozen citysites and was just waiting on the Railroad to pounce on those squares and double my empire, knowing that a city founded on a RR has a huge advantage later in the game. But holding those dozen Settlers in development meant i couldn't produce a dozen Caravans, which was how i was lumping on the lightbulbs for tech advances and GP's for funding the empire. Longer i waited for the Railroad, the slower the advances came, and the treasury slowly dried up. Difficult cycle to break, all because of the unit limit number.
 
Naturally, under monarchy a 3-shield city can only support 3 units, this is not related to unit limits, but production. Otherwise, I'm not really sure how the pop-based unit limit works, or if it really does, it may be based on population size (in the millions), and not on citizen count. But that still doesn't solve the case.

When this happened to me I was playing OCC and starved down a size 1 enemy city. I lost 1 citizen (less than 5% of my citizen count, less than 1% of total population count). I also lost a transport, the units inside it and a battleship on the same square. Disproportionate, and I believe unrelated to unit limits, because:
A) those were all units I'd already built in my lone city-state before I even got the city;
B) I managed to reload the game from a few turns before that, and the bug didn't happen when I moved the units about.

Also, not sure if NONE settlers and units count towards unit limits. When playing OCC I'll actively engage in campaigns of enslavement, sometimes having as much as 20 NONE settlers cleaning up pollution, building strategic roads and forts on my continent or just manning the forts alongside the defenders (so I can only use one defender there and not be afraid of enemy bribes).
 
When this happened to me I was playing OCC and starved down a size 1 enemy city. I lost 1 citizen (less than 5% of my citizen count, less than 1% of total population count). I also lost a transport, the units inside it and a battleship on the same square.

If you starved it down and made a Settler of NONE, then that's a 2-unit swing against your current cap. Lose a citz + gain a unit. If, in the time it took to starve the place out, you have built another unit, then your civ is super-saturated with units, and you may witness the AWOL garrison effect even before the unit limit affects your away teams. This has happened to me before, i noticed a disappearing garrison and knew i was at the unit limit, and got a city founded (-1 settler) before anyone got eliminated the next turn.

Since it's OCC, there is only one city which can be affected by the 2-unit swing. We already know what city's units are going to be bleeped. Boats are most likely to be furthest, thus more vulnerable. The units on the Transport? That's not due to the unit limit number, that's just simple drowning.

If you avoided the naval disaster by a restart a few turns beforehand, perhaps the extra move from the restart allowed a couple Caravans to reach their destination earlier? That would back you a couple notches away from the unit limit number.

Also, not sure if NONE settlers and units count towards unit limits. When playing OCC I'll actively engage in campaigns of enslavement, sometimes having as much as 20 NONE settlers.

Wow, that makes my mouth water. Twenty? Hands down, a Settler of NONE is the single most valuable piece on the board. I did a game where it was double-yolk of Settlers in 4KBC, and kept the second as a guy of NONE for 6040 years. 500+ turns of laying roads, mining hills, watering horses, and more, and all for free. If you want to give a gold mountain the full Brazilian treatment with Mine-Road-Railroad, you don't want to tie up a Settler who's costing you a shield and two veggies.

Don't know if units from NONE count against the limit, but suspect they do, since bribing an enemy unit on the other side of the world from your cities will not succeed if you are at the limit. Also wonder if SS parts count against the limit? Seems that the unit limit grows tighter as the SS is assembled, but that could be just a coincidence. Just as well could be, that the ability to build a SS means that you have the production to swamp the unit limit more easily too.
 
If i have five units all homing in a city which produces 3 shields under Monarchy, the game takes two of them away, saying "City A is unable to support Xxxxxxx unit." Invariably, they are the furthermost units. Most often, this means i have bribed away a juicy rival city, and it comes with 5 Phalanxes and an underdeveloped hinterland.

In any case, what i mean is that the civ-wide unit limit is what Baconator is up against when he offers City B up to the dogs, and he/she is unlikely in Desp/Anch at that point. Lose the city, lose the citizen. Double the effect if you build a Settler in a 1-city. Then you not only lose a citz, but gain a unit, another unit closer to your current unit limit number.

You are somewhat mixing together two separate phenomena, both correct, but neither of which supports your previous assertion that you can only have as many units as your city has population.

The first is that under Monarchy or higher government, a city cannot cannot support more units than it has resources (shields) available. Units supported by that city will be disbanded (starting with the most remote units) until the number of units supported by that city equals the number of resources.

The other is the limit of 128 units, which is the number of unit slots available for each of the 8 civs.

Actually, although 128 units is a hard limit, a civ might nominally have more than 128 units! This is because each city has two bytes available (offsets 26 and 27) that may be used to store fortified units supported by that city. These units are not included in the 128-unit count. However, if you go to such a city and activate those units they will be inserted into any vacant slots in the units list. I'm currently playing a test game where I have created a mega-city that punches out 177 "shields" per turn, and I am playing through until I hit my unit limit, because I want to find out what happens when I activate two "ghost" Mech Infs I can see there once my units are maxed out! I don't know exactly what will happen when I do that - probably I will lose two units, but I don't know which ones. Hence the experiment.

FWIW, when you bribe a city, units supported by that city that are beyond the city's 20-square cross are simply destroyed. The units assigned to your new city will be either units that were supported by that city that happened to be close to home, or else random other enemy units that happened to be in the cross at the time. If you so acquire more units than the city can support and you are below the 128 units limit, the excess units are NOT instantly destroyed. You are given the opportunity to adjust the city's workers, because the game tries to maximise food but it is possible that you may be able to move workers from e.g. grasslands without shields to forests, thus supporting all your new units after all. Units left unsupported will only be destroyed when you end your turn. I'm not yet absolutely sure what happens if you are at or near your 128-unit limit. Logically when you bribe a city the game would discard (not add) units once your unit roster is full, but I think you are arguing that it will add them, discarding some of your existing units that are far from their homes? Well, I'm hoping to test that in my current game.

See attachments - two showing 26 militia supported by a population 4 city, and one showing a city in my current game that has two "ghost" Mech Infs (the top two in the units columns, prefaced with "-"). (This city, population 31, currently supports over 80 units and is busy pumping out more. Total population from all my cities in that game is currently about 50.)
 

Attachments

  • Militia26.png
    Militia26.png
    6.7 KB · Views: 81
  • Athens4.png
    Athens4.png
    61.7 KB · Views: 94
  • GhostUnits.png
    GhostUnits.png
    21.9 KB · Views: 92
You are somewhat mixing together two separate phenomena, both correct, but neither of which supports your previous assertion that you can only have as many units as your city has population.

What i was saying was not about a single city's ability to support more units than citz, but your whole civ, overall, not being able to. Appears i'm wrong about that as well, haha!

The last time i was at the unit limit, kept a record of units lost (founding cities, Caravans trading, disbanding, etc.) and also changes in population (making Settlers, starving unwanted cities, foodbox pops, etc.)

It really looked like changes in population affected the unit limit just as much as losing/adding units. At one point, a newly starved-out city turned into a Settler and that unit immediately disappeared. In another case, i thought i had confirmed that this ploy amounted to a 2-unit swing in the civ-wide unit limit, via this test: with all other variables held steady, it produced three failed builds the next turn, and a restart where that city did not convert to a Settler, there was only one failed build the next turn.

I must be wrong, though. Thank you for setting me straight, as Mize was unable to do because i did not understand what he (she?) was saying. Part of my misunderstanding is that i never build more units than citz in a particular city, because then (under Despotism) the overage costs you a shield, which makes suffering Despotism pointless, its only boon being free units = high production.
 
So ... I hit the limit. Got the "Sire, our population can not support so many military units" message. Actual limit was 127 units, using slots 0 to 7E (126). Perhaps 7F is unusable.

Now here's the interesting part. First time I hit the limit, 300 BC, I'd 127 units on the prior turn (320 BC) but no city had any "ghosts". After I got that message in 300 BC I had only 125 units - but now Atlantis had two "ghosts"!

Screenshots show that units 6E and 74, visible in the unit list in 320 BC, were removed from the list in 300 BC - presumably they become the two Atlantis "ghosts".

So I pressed on. No complaints from the game, but next time I reached 127 units I still had the two "ghosts".

So I went to open Atlantis's city screen - and then the advisor popped up to complain about too many units! When I saved after that, the ghosts were still there and I still had 127 units. So when it can't turn a ghost into a real unit, it leaves the ghost as is.

Next I activated the four MI I could see in Atlantis and moved them out of town, saved again. Atlantis showed as empty of units, but the ghosts were still there. Hmmm!

Finally I deleted one of the four out-of-town units, reopened the city screen - I still had 127 units and now there was a fortified MI visible in the formerly empty town, while one of the "ghosts" (the one from offset 26) was gone. I think we know what became of it.

MAP/SVE from 320 BC attached, in case anyone wants to play around with the scenario.

Now it's time to bribe a Russian city or two ... to see if we can answer Baconator's original puzzle!
 

Attachments

  • 320bc_U.png
    320bc_U.png
    18.5 KB · Views: 68
  • 300bc_U.png
    300bc_U.png
    17.7 KB · Views: 63
  • CIVIL2.SVE
    37 KB · Views: 56
  • CIVIL2.MAP
    12.6 KB · Views: 45
  • 320bc_C.png
    320bc_C.png
    19.3 KB · Views: 70
  • 300bc_C.png
    300bc_C.png
    18.8 KB · Views: 76
OK, I have now bribed Kiev so many times it feels like home! There are four units within its city cross - three Phalanxes (two fortified in town, one just outside) and a Chariot. There's also a Kiev-supported Settler just outside the cross.

The Kiev-supported Settler is always destroyed when I take Kiev. I get from 0 to all 4 of the other units depending how many unit slots I have available. No matter what, I never lose any of my own units, I just don't acquire any new ones once my roster is full.

The unit check is performed before my Diplomat unit is destroyed, otherwise I would always have at least one slot available. If my roster fills up during the subversion, I end up with 126 units after the Diplomat is removed.

To be thorough, I also switched all the Russian units to get their support from Smolensk instead of Kiev. This makes no difference to the outcome, except that now the Settler outside the city cross survives (but I still don't acquire it).

I have units parked all over the map but none have vanished. Next step: over to the Barbarians!

Baconator's BUG REPRODUCED.

If the Barbs simply capture Kiev, all is as it was, but if the city population is reduced to 1 so that the city is destroyed instead of captured, some units I have parked up by a distant island disappear! I lose a Battleship, a Transport, an MI and an Armor.

MAP/SVE attached. Note the units by the island at 71 E, 6 S. Play one turn, let the Barbs capture Kiev, then look again. They're gone!

However, it appears to have nothing to do with how many units I have as I also tested this after deleting many dozens of units. The Battleship and the Transport still vanished. I also tried starving the city to death - the city was destroyed, but the Transport and Battleship survived. So it's something specific to having the city captured and destroyed, not just destroyed.
 

Attachments

  • CIVIL1.MAP
    12.6 KB · Views: 64
  • CIVIL1.SVE
    37 KB · Views: 49
Update: I activated the Transport and unloaded one/both units onto the island. This time no units were lost when Kiev was destroyed by the Barbarians. Activated and moved it but didn't unload: all units lost. Moved the Battleship away from the Transport: Transport lost but Battleship survived. Moved all units much closer to home: lost. At any rate, whatever the cause of the bug, it has nothing to do with unit limits.
 
I don't believe a population limit for units even exists in the game. AFAIK, the citizens to military units ratio is only used to calculate the 'military service' part of your demographics.

Anyway, I tried out the save, and weirdly the ships didn't disappear when I starved the city and built a settler. The settler appeared as the 127th unit, I got the 'too many units' message, but no units seemed to disappear. The ships were there, etc. I say it's weird, because I'm almost completely sure that when this bug happened to me I didn't let the town be captured, but starved it for a settler. Maybe I remember wrong, IDK. In all certainty, it really couldn't have been due to unit limits, since I was playing OCC and had at most 60-70 unites, with all the diplomats, slave settlers and mercenary NONE armies included in the count.

I'm no hacker or coder, but I know Civ is very prone to overflows and similar small memory glitches. Here's another buried little gem of a bug Valen and I first reported and darkpanda decyphered:

The short story is that, indeed, if CIV selects (randomly) your Mfg Plant to be destroyed by an earthquake, then the following buildings will be wiped out as well, if the city has them: SDI Defense, Recycling Center, Power Plant, Hydro Plant and Nuclear Plant.

Whole post.

So maybe wiping a city off the playing field sometimes produces a similar effect? I have no clue. What's in memory after that routine?
 
I encountered a similar bug in my current game. Unfortunately, the preceding autosave (1000 BC) was ten turns earlier and I was not able to reproduce it from there. I will try to attach the save files in case someone wants to try and as background to the following description.

In 1000 BC, my English civilization has recently founded the overseas city of Brighton on the eastern coast of a continent already occupied by the Americans. The only naval unit is a trireme currently loaded with horsemen and a phalanx. The city of Dover on the English home continent has just begun to produce the first sail.

In the following ten turns the trireme sailed again to "America", dropping the phalanx on an island off the American east coast to help garrison the English colonies of Liverpool and Oxford and the horsemen to the north of Brighton. The horsemen proceeded to explore the continent and make contact with the French who have a city (Tours) maybe 7 or 8 tiles west of Brighton. The French were at war with the Americans. After we refused both to join that war and to pay tribute, they declared war on us. In 800 BC, French horsemen attack Brighton, defeating its phalanx garrison and using its second move to conquer and destroy the empty city.

In the same turn, a sail (whose construction started in 1000 BC in Dover on the English home continent) had reached the western tip of that continent near Birmingham, carrying settlers and a diplomat. When the French destroyed Brighton, that sail and its load disappeared from the game.

I had nowhere near 127 units when this happened.
 

Attachments

  • CIVIL6.MAP
    13.3 KB · Views: 48
  • CIVIL6.SVE
    37 KB · Views: 57
I'll have to admit I got a little lost there but think I understand what you all are saying! But just to clarify, I like to keep a small number of cities (usually 3-5 original cities) and keep my military small. I always watch how many military units I have supported by each city and never produce more than the city population - so if my city size is 6, I keep 2 in the city for defense and never have more than 4 out and about. I also play the game entirely under Despotism.
 
Top Bottom