How to spawn units at start?

Galaxy Forge 3

Hello,

 

how can i spawn units at the beginning of a game...

 

Is it possible to create these default enemies with GF? And how?

 

 

thanks a lot :D

17,490 views 13 replies
Reply #1 Top

GameInfo\GalaxyScenarioDef.galaxyScenarioDef contains the templates used. There almost half way down. Here is TEC quick starts for any map. There are pre-made templates already including the NPC pirates and militias.

group
     condition
         type "PlanetOwnerIsRaceQuickStart"
         param "Tech"
     owner "PlanetOwner"
     colonizeChance 1
     items 9
         item "Tech:Module:FrigateFactory"
         item "Tech:Module:CapitalShipFactory"
         item "Tech:Module:MetalExtractor"
         item "Tech:Module:MetalExtractor"
         item "Tech:Module:CrystalExtractor"
         item "Tech:Frigate:Constructor"
         item "Tech:Frigate:Constructor"
         item "Tech:Frigate:Scout"
         item "Tech:Frigate:Scout"
  
It can also be done in GF for specific maps. Edit the planet and add a template or IIRC you cann create one with GF for a planet with Edit planet.

+1 Loading…
Reply #2 Top

or in GF  you can double left click on the planet you want the spawns at and add the spawns to the planet, but the template method is better.

harpo

 

+1 Loading…
Reply #3 Top

Quoting harpo99999, reply 2
or in GF  you can double left click on the planet you want the spawns at and add the spawns to the planet, but the template method is better.

harpo

 

 

Yes, i only wanted to know how it's used in GF :D

 

But how exactly can i spwan units. After cliking on a planet i get this prompt:

bild

 

I dont understand this at all... Can sb explain this to me? pls :D

 

Thanks a lot :)

Reply #4 Top

Links to various sites with helpful information.

Sins modding Wiki(has a pick for how to do planet bonuses)

Post with step by step for custom militia

And here is a pic for how to spawn 1 frigate for player 2 (player 1 newplayer0) at the selected planet (though you'll need my diplomacy forge addon or equivalent to select envoy frigates).

+1 Loading…
Reply #5 Top

Thanks a lot.

 

Last questions:

 

1. What does "Tech" "Psi" or "Phase" stand for? (I mean, what race is it?)

2. Can I disable the automatically building of the "small shipyard" on planets (i dont know it's definite english name sry ;))?

3. Can i affect the placement of this automaically buildings?

 

 

greetings... :D

Reply #6 Top

1.

Tech = TEC

Psi = Advent

Phase = Vasari

2. I answered that is post 1. There is a NormalStart and QuickStart template for each race in the GameInfo\GalaxyScenarioDef.galaxyScenarioDef

         item "Tech:Module:FrigateFactory"

remove the FrigateFactory line and change the items count.

3. No. There is a build radius in the structures entity. That might effect how far from the planet or other structures but thats all.

+1 Loading…
Reply #7 Top

Quoting myfist0, reply 6

2. I answered that is post 1. There is a NormalStart and QuickStart template for each race in the GameInfo\GalaxyScenarioDef.galaxyScenarioDef

         item "Tech:Module:FrigateFactory"

remove the FrigateFactory line and change the items count.

That requires you to mod the game though, not just make a map. Just disabling the "Use default template" checkbox may work, otherwise you will have to use to mod a game file that will effect every map you play.

+1 Loading…
Reply #8 Top

Ah yes. Thanks for clarifying  ;)

Reply #9 Top

Quoting GoaFan77, reply 7

Quoting myfist0, reply 6
2. I answered that is post 1. There is a NormalStart and QuickStart template for each race in the GameInfo\GalaxyScenarioDef.galaxyScenarioDef

         item "Tech:Module:FrigateFactory"

remove the FrigateFactory line and change the items count.
That requires you to mod the game though, not just make a map. Just disabling the "Use default template" checkbox may work, otherwise you will have to use to mod a game file that will effect every map you play.

 

Thank you both.

 

 

But what exactly does the checkbox "Use default template" effect? What means "default template" in this case?

Have a nice day :D

Reply #10 Top

Again, the GameInfo\GalaxyScenarioDef.galaxyScenarioDef holds that information. Any time you play a game each planet that has NPC (grey) units is called from a template.

orbitBodyType
    typeName "Ice"
    entityDefName "PlanetIce"
    defaultTemplateName "Template:DefaultStart_Ice"

which links to the templates at the bottom giving the planet units.

 

+1 Loading…
Reply #11 Top

arrgggg, double post.

 

Reply #12 Top

Means, that if i dont use the "default template" there are no planets with NPC's?

 

Quoting myfist0, reply 10
Again, the GameInfo\GalaxyScenarioDef.galaxyScenarioDef holds that information. Any time you play a game each planet that has NPC (grey) units is called from a template.

orbitBodyType
    typeName "Ice"
    entityDefName "PlanetIce"
    defaultTemplateName "Template:DefaultStart_Ice"

which links to the templates at the bottom giving the planet units.

 

Reply #13 Top

Quoting excit3r, reply 12
Means, that if i dont use the "default template" there are no planets with NPC's?
 

That is correct, the planet (you apply that setting to each one individually) will be completely empty when you first explore it (assuming your enemies haven't gotten their first!). I'm not sure if that works with the shipyard because home planet templates are a little bit different, but it could.