Thank you, Morlic
Everything works except the change of species, SetSpecies name = "SP_EXOBOT" doesn't seem to work, or probably I haven't changed something necessary in the Scope.
Anyway, the Human ships I made with the new warbot troop pod have the expected capacity (same as Exobots, half of Human's), so the basics do work.
Also, I haven't tried if it would work on NO_OFFENSE_TROOPS species (I have no such playable species right now), but I guess it would work with the modifications I've made (comment out "Not HasTag name = "NO_ATTACKTROOPS"" and "Troops low = X").
I did this:
Edit: corrected as per Ophiuchus advice
New ship part default/scripting/ship_parts/Troops/GT_WARBOT_POD.focs.txt :
Code: Select all
Part
name = "GT_WARBOT_POD"
description = "GT_WARBOT_POD_DESC"
class = Troops
capacity = 1
mountableSlotTypes = [External Internal]
buildcost = 3 * [[FLEET_UPKEEP_MULTIPLICATOR]] * [[SHIP_PART_COST_MULTIPLIER]]
buildtime = 3
tags = [ "PEDIA_PC_TROOPS" ]
location = OwnedBy empire = Source.Owner
effectsgroups = [
EffectsGroup
description = "WARBOT_OFFENSE_TROOPS_DESC" // There is no BAD/AVERAGE/GOOD/GREAT/ULTIMA_OFFENSE_TROOPS_DESC so I didn't do WARBOT's
scope = Source
activation = And [
Ship
Or [
DesignHasPart name = "GT_WARBOT_POD"
DesignHasPart name = "GT_WARBOT_POD_2"
]
]
stackinggroup = "WARBOT_OFFENSIVE_TROOPS_STACK" // Idem as above
accountinglabel = "WARBOT_OFFENSIVE_TROOPS_LABEL" // Idem as above
effects = SetSpecies name = "SP_EXOBOT"
]
icon = "icons/meter/warbots.png"
#include "/scripting/common/upkeep.macros"
Code: Select all
Part
name = "GT_WARBOT_POD_2"
description = "GT_WARBOT_POD_2_DESC"
class = Troops
capacity = 2
mountableSlotTypes = [External Internal]
buildcost = 6 * [[FLEET_UPKEEP_MULTIPLICATOR]] * [[SHIP_PART_COST_MULTIPLIER]]
buildtime = 3
tags = [ "PEDIA_PC_TROOPS" ]
location = OwnedBy empire = Source.Owner
effectsgroups = [
EffectsGroup
description = "WARBOT_OFFENSE_TROOPS_DESC"
scope = Source
activation = And [
Ship
Or [
DesignHasPart name = "GT_WARBOT_POD"
DesignHasPart name = "GT_WARBOT_POD_2"
]
]
stackinggroup = "WARBOT_OFFENSIVE_TROOPS_STACK" // Idem as above
accountinglabel = "WARBOT_OFFENSIVE_TROOPS_LABEL" // Idem as above
effects = SetSpecies name = "SP_EXOBOT"
]
icon = "icons/meter/warbots2.png"
#include "/scripting/common/upkeep.macros"
Code: Select all
GT_WARBOT_POD
Warbot Pod
GT_WARBOT_POD_DESC
'''Carries 1 units of warbot ground [[metertype METER_TROOPS]] and equipment that can be deployed onto a planet.
[[TROOP_POD_OPERATION_TEXT]]'''
GT_WARBOT_POD_2
Advanced Warbot Pod
GT_WARBOT_POD_2_DESC
'''Carries 2 units of advanced warbot ground [[metertype METER_TROOPS]] and equipment that can be deployed onto a planet.
[[TROOP_POD_OPERATION_TEXT]]'''
Code: Select all
Tech
name = "PRO_EXOBOTS"
description = "PRO_EXOBOTS_DESC"
short_description = "EXOBOT_SHORT_DESC"
category = "PRODUCTION_CATEGORY"
researchcost = 50 * [[TECH_COST_MULTIPLIER]]
researchturns = 5
tags = [ "PEDIA_PRODUCTION_CATEGORY" ]
prerequisites = "PRO_SENTIENT_AUTOMATION"
unlock = [
Item type = Building name = "BLD_COL_EXOBOT"
Item type = ShipPart name = "GT_WARBOT_POD"
]
graphic = "icons/species/robotic-01.png"
#include "/scripting/common/base_prod.macros"