V119 Barb Corsair Bug?

Txurce

Deity
Joined
Jan 4, 2002
Messages
8,297
Location
Venice, California
I just discovered that when playing Germany, captured Corsairs can enter deep water before I've researched Compass. I can rationalize this in terms of being a captured vessel, but wanted to note it anyway.

Also possibly reported before, Mercenaries (pikemen) do not upgrade to Musketmen, although I believe they do upgrade to Riflemen.

Edit: killing a settler in a barb camp turns him into a German settler - not a worker.

Edit: barb ships don't cost any gold maintenance - only land units.
 
Thank you for bringing this up, I forgot to give barbarian caravels the same "requires astronomy to enter deep water" promotion as regular caravels. I've fixed the other problems too. :goodjob:
 
Thank you for bringing this up, I forgot to give barbarian caravels the same "requires astronomy to enter deep water" promotion as regular caravels. I've fixed the other problems too. :goodjob:

So you're telling me not to write a new "Germany" strategy guide based on this game?!?
 
I'm puzzled about barbarian ships. I don't understand why those particular units have no maintenance. There don't seem to be any logic errors in the code... this might be difficult to solve.

Code:
UPDATE Units
SET ExtraMaintenanceCost = MAX(1, ROUND(Cost / 50 + MAX(Combat, RangedCombat) / 5 - 1, 0))
WHERE Cost > 0 AND (Combat > 0 OR RangedCombat > 0);

UPDATE Units
SET ExtraMaintenanceCost = MAX(1, ROUND(1.5 * ExtraMaintenanceCost, 0))
WHERE Type IN (
    SELECT UnitType FROM Civilization_UnitClassOverrides
    WHERE CivilizationType = 'CIVILIZATION_BARBARIAN'
);

UPDATE Units
SET ExtraMaintenanceCost = MAX(1, ROUND(0.75 * ExtraMaintenanceCost, 0))
WHERE ExtraMaintenanceCost > 0 AND (
    CombatClass = 'UNITCOMBAT_RECON'
    OR Domain = 'DOMAIN_SEA'
    OR Domain = 'DOMAIN_AIR'
);
When I select a barbarian caravel ingame, I can confirm it has:

  • 70 Cost
  • 15 Combat
  • 10 RangedCombat
The first code block should therefore set ExtraMaintenanceCost to (70/50 + 15/5 - 1) = 3, and the second code block increases it to 5. However, ingame ExtraMaintenanceCost of this unit is 0. This is very puzzling.

Edit: Duh! I found the problem... I simply was loading the unit maintenance file before the file that creates new barbarian units. :lol:
 
I'm puzzled about barbarian ships. I don't understand why those particular units have no maintenance. There don't seem to be any logic errors in the code... this might be difficult to solve.

Code:
UPDATE Units
SET ExtraMaintenanceCost = MAX(1, ROUND(Cost / 50 + MAX(Combat, RangedCombat) / 5 - 1, 0))
WHERE Cost > 0 AND (Combat > 0 OR RangedCombat > 0);

UPDATE Units
SET ExtraMaintenanceCost = MAX(1, ROUND(1.5 * ExtraMaintenanceCost, 0))
WHERE Type IN (
    SELECT UnitType FROM Civilization_UnitClassOverrides
    WHERE CivilizationType = 'CIVILIZATION_BARBARIAN'
);

UPDATE Units
SET ExtraMaintenanceCost = MAX(1, ROUND(0.75 * ExtraMaintenanceCost, 0))
WHERE ExtraMaintenanceCost > 0 AND (
    CombatClass = 'UNITCOMBAT_RECON'
    OR Domain = 'DOMAIN_SEA'
    OR Domain = 'DOMAIN_AIR'
);
When I select a barbarian caravel ingame, I can confirm it has:

  • 70 Cost
  • 15 Combat
  • 10 RangedCombat
The first code block should therefore set ExtraMaintenanceCost to (15 / 5 - 1) = 2, and the second code block increases it to 3. However, ingame ExtraMaintenanceCost of this unit is 0. This is very puzzling.

That is odd. Guess I'll keep my strategy notes for the time being. I had never taken coastal cities by bombardment before, but you can imagine what happened in this game. To add insult to injury, I would use a nearby captured barb as the amphibious unit.
 
Back
Top Bottom