"respawning" destroyed starbase
So, long story short, I've given Pirates a starbase in a mod I'm working on, but want it so when it's destroyed (after a delay) a new one will spawn in (seems the Pirates won't construct another on their own).
I've already got an ability setup that I'm fairly sure will work (haven't actually fully tested it, yet) that when the starbase is about to die, it should throw a buff to the planet (assuming the planet hasn't already been lost). After a timed delay, I want that buff to then spawn in a new starbase. I already have something similar working for spawning in orbital structures.
Unfortunately, it almost seems as though the buffInstantActionType "CreateStarBase" was meant for use directly from an ability, not a buff. Of the lines that seem as though they should matter:
buffInstantActionType "CreateStarBase"
instantActionTriggerType "AlwaysPerform"
starBaseType "StarBasePirate"
placementRadius
Level:0 1000.000000
Level:1 1000.000000
Level:2 1000.000000
Level:3 1000.000000
If I do not include the placementRadius, dev.exe complains that it is missing. If I include it, the game MDs. Was wondering if anyone had some suggestions? I'm open even to completely alternate methods. It'd actually be good to find a way to limit it to 1 starbase per grav well, but not sure how to get the ability/buff to check prior to applying. The whole point behind this is to make it so the Pirate bases are not only harder to defeat, but also make it so one can't simply "whittle" away at it and expect it to remain the same as how they had left it. ![]()
Pastebins of a few relevant files:
FrigatePirateStarBaseConstructor.entity
AbilityDeployStarBasePirate.entity
AbilityPirateStarBaseRespawn.entity
BuffPirateStarBaseRespawnPlanet.entity (this version spawns constructor frigate. Frigate spawns, but never builds starbase)
BuffPirateStarBaseRespawnPlanet.entity (this was supposed to be the version that spawned the starbase directly, but doesn't work)