Then I must have missed something somewhere. I know I added the starbase to the PlayerPirate.entity file... but it's entirely possible I forgot to rename it (added it as StarBaseTech until after I had finished my tweaks and actually renamed the entity file itself... possible I forgot to update the Player file). Cause otherwise, what you see in that file I pastebined, causes a MD when the delay time runs out.
Hmm... the ability of yours that creates that buff... what does it apply the buff to? Mine goes to the planet of the grav well. Just curious if that could be a difference....
Re: limits... essentially, again, seems the Pirates will not rebuild on their own, I want something that will simulate rebuilding after a failed assault on their base. In this way, I hope to make Pirate bases slightly tougher to crack because you can't just simply jump in, destroy a couple things, jump out to repair/replace, rinse & repeat. Obviously I'll have delays on things rebuilding so they are less inclined to respawn while the attacking fleet is still present (seems you can't block their construction like a normal AI), but if they linger long enough then they get to deal with the fact that they're "taking too long".
The issue (to me) becomes... if I have the structure itself (ie, the starbase) cast its own respawn buff on the condition of about to die, but then the attacking fleet is either defeated or withdraws before actually destroying it... well, then we'll have an extra that will spawn in the grav well a bit later. Starbases I want limited to 1, but then the other structures (hanger defense, gauss cannons, etc) should have a higher limit than that (the default base has something like 19 gauss, 3 hangers, and 2 repair platforms). I'm also adding in extra structures that "summon" reinforcements when the grav well is under attack, so these will need to be replaced and, of course, I don't want too many reinforcements in the grav well at once.
Yeah, it's probably a lot and pretty ambitious considering some of the limitations we have with modding this game, but it's my "end goal". Some of it I'm already expecting not being able to do (limit # of reinforcements) so have already worked up alternatives I hope will suffice. Course, now that I'm thinking about all of this, I think I'm starting to come up with interesting alternatives to the alternatives.... Hmm....