Editing the Randommap.galaxy files, how can I change a planet to usedefaulttemplate or not like I can in Galaxy Forge?

Thanks to help here, I was able to edit the Randommap.galaxy files and change the starting credits/metal/crystals permanatly for every random map I make. Now I want to edit the randommap.galaxy files to sometimes have militia on some planets and sometimes not. I noticed in the Galaxy Forge map editor I can specify if a planet uses the default template or not which in ture enables or disables militia around a planet. How can I change a planet group in the randommap.galaxy files to usedefaulttemplate or not like I can in Galaxy Forge? I tried this but it didn't seem to do anything: (this is a snippit from the smallrandommap.galaxy file)

ring
   starRadiusRange
         minPercentage 0.3
         maxPercentage 0.7
    militiaColonizationPerc 0
    planetGroupCount 1
    planetGroup
         minCount 5
         maxCount 5
         planetTypeCount 1
         planetType "Random"
         useDefaultTemplate FALSE <--- I put this in its not normaly there.

This is a snippit from the .galaxyfile generated by Galaxy Forge. Notice how it has the option useDefaultTemplate at the end of each planet group without me adding anything via notepad like I tried to with the smallrandommap.galaxy file that comes with the game.

planet
  designName "Planet1"
  inGameName ""
  type "TerranHome"
  pos [ 250 , 150 ]
  owner "NewPlayer1"
  isHomePlanet TRUE
  startingUpgradeLevelForPopulation 0
  startingUpgradeLevelForCivilianModules 0
  startingUpgradeLevelForTacticalModules 0
  startingUpgradeLevelForArtifacts 0
  planetItems
   templateName ""
   subTemplates 0
   groups 0
  spawnProbability 1.000000
  useDefaultTemplate TRUE    <--- This was already there.
   

2,721 views 3 replies
Reply #1 Top
Well, if what I am asking is too confusing, I simply want to know exactly how I can change the fact that local militia are on every planet you find in a random map. For example: a game created random small map has militia in the entire system. I want militia to only be on a few planets if any. Please advise with details and thank you.
Reply #2 Top
Short of modding the default templates, I don't think there is any way to have a 'true' random map with non-default templates--the only way to define templates is on a per-planet basis.
Reply #3 Top
Thanks. Now I am trying to figure out where exactly in the default templates you would change this. I saw stuff like this in GalaxyScenarioDef.galaxyScenarioDef in the game data folder:

planetItemsTemplate
templateName "Template:DefaultStart_Terran"
subTemplates 2
template "Template:DefaultHomePlanetSetup"
template "Template:LocalMilitia_Terran"
groups 0
planetItemsTemplate
templateName "Template:DefaultStart_Desert"
subTemplates 2
template "Template:DefaultHomePlanetSetup"
template "Template:LocalMilitia_Desert"
groups 0
planetItemsTemplate
templateName "Template:DefaultStart_Volcanic"
subTemplates 2
template "Template:DefaultHomePlanetSetup"
template "Template:LocalMilitia_Volcanic"
groups 0

So I thought if i just change it to this then no local militia would be around that planet type by putting a ; so it would ignore that line but it still does it:

planetItemsTemplate
templateName "Template:DefaultStart_Terran"
subTemplates 1
template "Template:DefaultHomePlanetSetup"
;template "Template:LocalMilitia_Terran"
groups 0

I figured I could limit it to just having militia around certain planet types. So for example here, any terran type planets would now not load the militia template. It just ignored my attempts. Any advice?