Re-spawning Militia

Hi!  I'm relatively new to this forum but I've been playing Sins a while and been messing around with Galaxy Forge as well as some modding.  I'm trying to alter the Militia so that they respawn on worlds regardless of ownership after set intervals of time.  I thought I'd look in the Game.Constants file where the pirates were to get some idea of how it works but I'm still unsure of how to make this happen for neutral milita. 

 

Just to reiterate, I'm well aware of how to make Militia spawn in Galaxy Forge.   The problem is ensuring they re-spawn after certain intervals of time, regardless of planet ownership.  Thank you for your time!

3,923 views 11 replies
Reply #1 Top

You can't use just the galaxy forge (which to say the GalaxyScenarioDef file) and Gameplay.constants. The pirate raid behavior is hard coded just for them.

What you'll need to do is make a new ship to give to the militia, and give it an ability that spawns in new ships either with fleet beacons like the Dark Fleet for the Vasari (better for larger and more diverse groups) or the various turret abilities that produce ships (better for smaller, more often occuring abilities). Both have their pros and cons but you can do it, but you'll have to figure out how to add new ships and abilities.

Reply #2 Top

Okay... sounds complicated lol.   If only life were as simple as flipping a boolean to TRUE but I supposed that's too much to ask :P.   

Alright well, I guess I've got my work cut out for me.  My line of thought is creating a planet where say-- every 180 seconds, neutral ships will respawn unless neutral ships are already there, in which case nothing happens.  It'd be an area where one could level their capital ships fighting away from normal battles. 

 

Alright, I've another question to bother you with, one that may, depending on the answer, make this idea of mine a hell of a lot simpler to execute.  Is it possible to keep pirates in the game but turn off the ability of AI factions to blow their cash on them?

Reply #3 Top

Quoting allen_h_b, reply 2
My line of thought is creating a planet where say-- every 180 seconds, neutral ships will respawn unless neutral ships are already there, in which case nothing happens.
End of allen_h_b's quote

I don't think that's possible.

Reply #4 Top

Quoting allen_h_b, reply 2
Okay... sounds complicated lol. If only life were as simple as flipping a boolean to TRUE but I supposed that's too much to ask .

Alright well, I guess I've got my work cut out for me. My line of thought is creating a planet where say-- every 180 seconds, neutral ships will respawn unless neutral ships are already there, in which case nothing happens. It'd be an area where one could level their capital ships fighting away from normal battles.
End of allen_h_b's quote

Hmm, it would be harder to test if they were still there. The pirates have no limit on their ships either, at one point a bug that caused some pirate raids to never be carried out lead to pirate bases having hundreds of ships. You could do what you want, but you could end up with some very large fleets at these areas.

What you could do is make these ships you fight there spawn another ship after a delay when they are destroyed, but that requires even more abilities.

Quoting allen_h_b, reply 2
Alright, I've another question to bother you with, one that may, depending on the answer, make this idea of mine a hell of a lot simpler to execute. Is it possible to keep pirates in the game but turn off the ability of AI factions to blow their cash on them?
End of allen_h_b's quote

I am not sure. I have plans for a future mod that would change the pirate system so that this would be the case, but again it requires some fancy new ship and ability work. I guess what you could try is in the gameplay.contant file, there are some line that control how many credits it costs to purchase a pirate raid (and how many ships you get). You might be able to set these to zero and not spawn any ships to effectively disable them. For the regular bounty missions, you can also control what ships get sent, but I'm not sure if there is a similar line to control how much the AI spends on bounty.

Reply #5 Top

Quoting GoaFan77, reply 5
For the regular bounty missions, you can also control what ships get sent, but I'm not sure if there is a similar line to control how much the AI spends on bounty.
End of GoaFan77's quote

Under playerAISharedDef in Gameplay.constants there's MaxBountyBidCount, though that might just control how much they spend on bids.

Reply #6 Top

Hmm, well I suppose I'll find out.  I may just let the pirates act as the "respawning" vessels for this map I'm creating by letting them spawn as they normally would then attack the planet.  Once they attack a planet, if no resistance is provided, they tend to stay there (I think.  It was that way in Diplomacy) so it'd be a crude way of "respawning" units to sit on a planet.  I can also control the number of pirates, what ships they use, and their strengths as well so it could work out.  But it would be very annoying for this game type (and utterly useless for my purposes) for the AI to bid for the pirates and waste their money unnecessarily.  I'll give what you guys have provided a shot.  See what happens.  :)

Reply #7 Top

Quoting Lavo_2, reply 6

Quoting GoaFan77, reply 5For the regular bounty missions, you can also control what ships get sent, but I'm not sure if there is a similar line to control how much the AI spends on bounty.

Under playerAISharedDef in Gameplay.constants there's MaxBountyBidCount, though that might just control how much they spend on bids.
End of Lavo_2's quote

 

If it controls that, that would be good too.  I'm looking to avoid having the AI spending all their money in a bid war that'll be most useless to them.

Reply #8 Top

Quoting allen_h_b, reply 7
(I think. It was that way in Diplomacy)
End of allen_h_b's quote

No, pirates will return to the pirate base once everything has been destroyed at the pirate planet.

 

Reply #9 Top

Quoting GoaFan77, reply 9

Quoting allen_h_b, reply 7(I think. It was that way in Diplomacy)

No, pirates will return to the pirate base once everything has been destroyed at the pirate planet.

 
End of GoaFan77's quote

Ugh are you kidding me?  I can't believe I'm begrudging an improvement...  I do remember it was that way in Diplomacy.  I had some fun with that little novelty, though I'm sure the game creators never intended for that. :D. Is there any way to turn that off? 

Reply #10 Top

Quoting allen_h_b, reply 10


Ugh are you kidding me?  I can't believe I'm begrudging an improvement...  I do remember it was that way in Diplomacy.  I had some fun with that little novelty, though I'm sure the game creators never intended for that. . Is there any way to turn that off? 
End of allen_h_b's quote

I believe you are mistaken, and if they didn't it was a bug. The intended behavior is that they return to the pirate base when they have no more targets at the planet they are that. Note this may mean they get stuck their attacking tradeships and the like, since more arrive before they can destroy them.

Pirate behavior is pretty hardcoded beyond those constants in the constants file.

Reply #11 Top

We're hoping map triggers will permit events, but that's something that might make people try to make the campaign this game sorely lacks.