View Single Post
Old 05-04-07, 11:23 AM   #15
Yanaran
Watch
 
Join Date: Apr 2007
Posts: 29
Downloads: 0
Uploads: 0
Default

Well that seems a bit more complicated than I thought, what I'm trying right now instead is sort of reverse what you did for destroyers... In every SubHunter group I check if it's a patrol craft and then set that units shipclass to subchaser. I think that should turn all gunboats into subchasers, which is good enough for me until I learn more.


Code:
if group.groupName.find("SubHunter") != -1:
    if group.groupName.find("Jap") != -1:
        # less subhunter groups
        group.spawnProbability *= 0.5
        for unit in group.units:
            if unit.type == UnitType.PATROL_CRAFT:
                unit.shipClass="SCSubchaser"
Yanaran is offline   Reply With Quote