Cargo capacity?

Ahriman

Tyrant
Joined
Jun 8, 2008
Messages
13,266
Location
Washington, DC
Some units seem to be listed as having cargo capacity? The spearman has capacity 4.

I'm guessing that this is a side effect from trying to improve compatibility with some other mods?
 
Looks like a bug, I've been playing with the latest beta and it does weird stuff to embarked units. Like allowing the embarked units to promote and stacking several embarked units on-top of each other which causes them to bug out.

Removing the following code from CEA__End.sql removes the problem:

PHP:
UPDATE UnitPromotions
SET CargoChange = CargoChange + 2;
 
I noticed that my spearman had cargo capacity, and I don't think it had ever embarked.
 
The code in my previous post seems to be giving the cargo capacity property to all units (land military, civilian, sea units) regardless of embarkation. What I was referring to by embarkation is that is where the cargo capacity property seems to be causing bugs.

Cargo capacity is a property normally associated with aircraft carriers and when you give non sea units this property, it allows the AI units to stack embarked units on top of each other like you would with aircraft on a carrier. I noticed this in-game when fending off multiple sea based invasions in a strait.

As an aside, when CargoChange is 1 you get a cargo capacity of 2. So it seems that the cargo capacity values can only increment by 2.
 
I assume aircraft carriers and submarines (for missiles) are the only units that need cargo capacity?
 
I believe so.

Anyway there are two sets of promotions that use cargo capacity, the default PROMOTION_CARGO_X for missile cruisers/nuclear submarines and carriers that determines the starting capacity of the unit and PROMOTION_FLIGHT_DECK_X for carriers that increases the capacity further from the default.

I assume Thal wants to increase cargo capacity somewhere by 2? So either default starting capacity increases from 1 -> 3 or 4 -> 6 or each flight deck promotion would increase max capacity by 3/6/9 instead of by 1/2/3.
 
i'm playing this mod for a few days and also was wondering about this 'cargo'. It looks like it allows to load one units into another like in older version of Civs, so i was able to load my horseman into bireme and move it much faster. Is it a bug or just feature(i can't find any mention about it in wiki)
 
As mentioned in this thread, this is most likely a bug and can be fixed by following the post below:

Looks like a bug, I've been playing with the latest beta and it does weird stuff to embarked units. Like allowing the embarked units to promote and stacking several embarked units on-top of each other which causes them to bug out.

Removing the following code from CEA__End.sql removes the problem:

PHP:
UPDATE UnitPromotions
SET CargoChange = CargoChange + 2;
 
The intention of that code block is to provide units that have a cargo capacity gain additional slots through promotions.

It was however too broad in its scope and gave cargo capacity to ALL units. I have already made the change in GitHub, as yet it has not made its way into the main download.

For those that want to fix it before the official release this is the code that does what is intended:

Code:
UPDATE UnitPromotions
SET CargoChange = CargoChange + 2
WHERE CargoChange >= 1;

You'll notice the WHERE clause applies this change only to units that have an existing CargoChange value that isn't 0.
 
Top Bottom