Page 1 of 1

Naval transport

Posted: Thu Nov 01, 2018 8:16 pm
by Admiral_Horthy
Is there a way to use naval transport other than the default? What determines for example which unit uses LCVP and which use the LCT? Class? Chassis? What does LandingCraft trait mean, both type use the same trait..
I'm trying to configure Daihatsu/Tokudaihatsu here...

Re: Naval transport

Posted: Thu Nov 01, 2018 8:45 pm
by Horst
Transport alternatives are hardcoded:

Code: Select all

    public static UnitType GetUnitTransportType(Unit unit, GameState gameState)
    {
        if (unit.State(gameState).originalType.uClass.id == 0 && GameSpecialisations.HasFactionSpecialisationEffect(unit.faction, GameSpecialisations.effects.landing_craft_infantry))
        {
            return App.GetUnitTypeByName("lcvp");
        }
        if (unit.State(gameState).originalType.uClass.id != 2 || !GameSpecialisations.HasFactionSpecialisationEffect(unit.faction, GameSpecialisations.effects.landing_craft_tank))
        {
            return App.defaultTransportNaval;
        }
        return App.GetUnitTypeByName("lct");
    }