Draw ship towards planet (impulse buff)

Ok, I've been trying to get this to work all day today, but I think it's about time for me to admit I've fried my brain on it.

As part of the mod I'm working on for the pirates, I have a Starbase that will spawn in after a delay to the base or any world they happen to colonize.  I was using a "CreateFrigate" buff thrown at the planet and then has the "impulse" value on that buff set so it'll push the starbase constructor a little ways away before a timer on the constructor expires that causes it to auto-create the Starbase.

The Problem?  "CreateFrigate" always created the constructor on the "north" side of the planet.  So I wanted to find a way to add a bit of variety into this, thus switched "CreateFrigate" to "SpawnShipsAtPlanet".  This works great for creating a bit of variety to the spawn location, but (obviously) the constructor sits at the phase jump line.  So, I wanted to try to use an impulse buff to pull it in at the planet.

The thought was that I could use the Maw buff as inspiration.  I had hoped that I could introduce a buff into the same ability-buff chain that creates the starbase to somehow apply impulse to the constructor in the direction of the planet.  I tried having the constructor throw a buff at the planet, which then throws one back at "lastspawner" to apply the "ApplyImpulseFromSpawner".  Alas, I think this buff was set by the devs to mean the originating caster... the one with the ability that triggered it all, regardless of anything else.

I've tried a few different things at this point to try to get it to work, but have had no success.  I figure before giving up on this idea and going back to "CreateFrigate" I'd ask around here to see if anyone else had a solution.  At least the saving grace to "CreateFrigate" is that the Starbase has the BlockColonize upgrade, meaning the player has to seek it out at some point if they want to kick the pirates off the rock they are presently occupying.

6,509 views 2 replies
Reply #1 Top

Another work around is to allow the star base to move.

Reply #2 Top

Yeah... thanks for the suggestion, but I kind of didn't want to do that.  Yeah, it's a mod and the point is to make the pirates... more interesting... I'm also trying to (mostly) do things within a certain rules and guidelines.

 

Another thought I've had, too (after a night's sleep), that might be a bit more complex....

Instead of having the initial buff that hits the planet be what spawns the constructor, have it spawn a module, instead.  That module is what then in turn does the "CreateFrigate" on itself with no impulse.  In this way, the randomization of where the module spawns randomizes where the Starbase goes.

I'm almost thinking that this might be better, now, as this will not only randomize where around the planet it is, but also the distance from the planet (to a degree).  Using the impulse method, it'd always be the same set distance away.