Building ships

Francesco Tormene

Chieftain
Joined
Apr 10, 2018
Messages
1
I cannot understand why i cannot build frigate and ship of the line. I think that the only ship i shouldnt be able to build is the man o war. I tried to look into the xml and python files and in the source code but i still dont understand where is the problem.
 
Hi Francesco,
Sorry for the late answer. The answer is purely historical. In the new world they did not have the infrastructure to build them.
You cannot edit it in the XML files because I have done an ugly hack long times ago


Code:
bool CvPlayer::canTrain(UnitTypes eUnit, bool bContinue, bool bTestVisible, bool bIgnoreCost) const
{
    ...
    if(!isEurope())
    {
        switch(eUnit)
        {
        case UNIT_FRIGATE:
        case UNIT_SHIP_OF_THE_LINE:
        case UNIT_MAN_O_WAR:
            return false;
        }
    }
        ...
}

I am not proud of this code :rolleyes:
 
Hi Francesco,
Sorry for the late answer. The answer is purely historical. In the new world they did not have the infrastructure to build them.
You cannot edit it in the XML files because I have done an ugly hack long times ago...

During the War of Independence the US did build Frigates, e. g.
https://en.wikipedia.org/wiki/USS_Alliance_(1778)
in Massachusetts. So late in the game, a fully developed colony with all dock upgrades should be able to build frigates.
 
Top Bottom