On the top of my head something like this should do the job for the starbase 12 scenario.
Imports
import App
import Foundation
import MissionLib
import loadspacehelper
import string
Code
# variables which need to be changed
sName = "shipName"
sScript = "script"
sLoc = "someLocation"
# pSet = # set you need, uncomment this
# create the ship
loadspacehelper.CreateShip(sScript, pSet, sName, sLoc)
pShip = MissionLib.GetPlayer()
if not pShip:
print 'bail'
return
pScript = pShip.GetScript()
if not pScript:
print 'no script'
return
pScript = string.split(pScript, '.')[-1]
if not Foundation.shipList.has_key(pScript):
print 'foundation doesn\'t contain such a ship'
return
sRace = Foundation.shipList[pScript].race.name
if sRace == "Romulan":
pMission = App.Game_GetCurrentGame().GetCurrentEpisode().GetCurrentMission()
pMission.GetEnemyGroup().AddName(sName)
print 'race is romulan assign the ai here'
else:
print 'do other stuff like adding other ai'