I create all of my ships using Hull Classes. This is the code I use
for( int32 l = 0; l < numberOfEnemies; ++l )
{
switch( PlayerClass )
{
case kClassFrigate:
enemyTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassFrigate, kClassFrigate, 7500, kStartPosition_V + l,
NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kStartPositionCanBeOffset ), raceOfEnemies );
break;
case kClassDestroyer:
enemyTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassFrigate, kClassDestroyer, 7500, kStartPosition_V + l,
NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kStartPositionCanBeOffset ), raceOfEnemies );
break;
case kClassLightCruiser:
enemyTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassDestroyer, kClassLightCruiser, 7500, kStartPosition_V + l,
NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kStartPositionCanBeOffset ), raceOfEnemies );
break;
case kClassHeavyCruiser:
enemyTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassLightCruiser, kClassHeavyBattlecruiser, 7500, kStartPosition_V + l,
NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kStartPositionCanBeOffset ), raceOfEnemies );
break;
case kClassHeavyBattlecruiser:
enemyTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassHeavyCruiser, kClassDreadnought, 7500, kStartPosition_V + l,
NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kStartPositionCanBeOffset ), raceOfEnemies );
break;
case kClassDreadnought:
enemyTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassHeavyBattlecruiser, kClassDreadnought, 7500, kStartPosition_V + l,
NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kStartPositionCanBeOffset ), raceOfEnemies );
break;
case kClassBattleship:
enemyTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassHeavyBattlecruiser, kClassBattleship, 7500, kStartPosition_V + l,
NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kStartPositionCanBeOffset ), raceOfEnemies );
break;
}
}
It's not as "efficient" as yours, but it's never failed yet, so I am loathe to change it.
I can't actually see a reason why your script isn't working, especially when you are specifying the hull class. Only thing I can think of is BPV, I always use the Player's BPV as the base level, because of my class definition, it's always pretty close to the Classes of ships I want to create. Outside of that, I can't think of anything else, it all looks fine to me.
There is one thing I forgot to ask - you didn't alter the RaceNames.gf file did you?