Could someone explain templates please?

Code: xml
  1. </P>
  2. <P>planetItemsTemplate
  3.  templateName "Template:LocalMilitiaStrong"
  4.  subTemplates 0
  5.  groups 10
  6.   group
  7.    condition
  8.     type "PlanetOwnerIsMilitia"
  9.     param ""
  10.    owner "PlanetOwner"
  11.    colonizeChance 0
  12.    items 35
  13.     item "Psi:Frigate:Light"
  14.     item "Psi:Frigate:Light"
  15.     item "Psi:Frigate:LongRange"
  16.     item "Psi:Frigate:LongRange"
  17.     item "Psi:Frigate:LongRange"
  18.     item "Psi:Frigate:LongRange"
  19.     item "Psi:Frigate:LongRange"
  20.     item "Psi:Frigate:LongRange"
  21.     item "Psi:Frigate:Heavy"
  22.     item "Psi:Frigate:Heavy"
  23.     item "Psi:Frigate:Heavy"
  24.     item "Psi:Frigate:Heavy"
  25.     item "Psi:Frigate:Heavy"
  26.     item "Psi:Frigate:Heavy"
  27.     item "Psi:Frigate:Heavy"
  28.     item "Psi:Frigate:Heavy"
  29.     item "Psi:CapitalShip:Colony"
  30.     item "Psi:CapitalShip:Carrier"
  31.     item "Tech:Module:GaussDefense"  
  32.     item "Tech:Module:GaussDefense"              
  33.     item "Tech:Module:HangarDefense"  
  34.     item "Tech:Module:MetalExtractor"              
  35.     item "Tech:Module:MetalExtractor"              
  36.   group
  37.    condition
  38.     type "PlanetOwnerIsMilitiaWithChance"
  39.     param "0.3"
  40.    owner "PlanetOwner"
  41.    colonizeChance 0
  42.    items 10
  43.     item "Psi:Frigate:LongRange"
  44.     item "Psi:Frigate:LongRange"
  45.     item "Psi:Frigate:Heavy"
  46.     item "Psi:Frigate:Heavy"
  47.     item "Psi:Frigate:Heavy"
  48.     item "Psi:Frigate:Heavy"
  49.     item "Psi:CapitalShip:Colony"
  50.     item "Psi:CapitalShip:Carrier"
  51.     item "Tech:Module:GaussDefense"      
  52.     item "Tech:Module:HangarDefense"      
  53.   group
  54.    condition
  55.     type "PlanetOwnerIsMilitiaWithChance"
  56.     param "0.3"
  57.    owner "PlanetOwner"
  58.    colonizeChance 0
  59.    items 13
  60.     item "Psi:Frigate:Light"
  61.     item "Psi:Frigate:Light"
  62.     item "Psi:Frigate:Light"
  63.     item "Psi:Frigate:Light"
  64.     item "Psi:Frigate:Light"
  65.     item "Psi:Frigate:Light"
  66.     item "Psi:Frigate:Heavy"
  67.     item "Psi:Frigate:Heavy"
  68.     item "Psi:Frigate:Heavy"
  69.     item "Psi:Frigate:Heavy"
  70.     item "Psi:CapitalShip:Colony"
  71.     item "Psi:CapitalShip:Carrier"
  72.     item "Tech:Module:HangarDefense"      
  73.   group
  74.    condition
  75.     type "PlanetOwnerIsMilitiaWithChance"
  76.     param "0.3"
  77.    owner "PlanetOwner"
  78.    colonizeChance 0
  79.    items 10
  80.     item "Psi:Frigate:AntiFighter"
  81.     item "Psi:Frigate:AntiFighter"
  82.     item "Psi:Frigate:AntiFighter"
  83.     item "Psi:Frigate:Heavy"
  84.     item "Psi:Frigate:Heavy"
  85.     item "Psi:Frigate:Heavy"
  86.     item "Psi:Frigate:Heavy"
  87.     item "Psi:CapitalShip:Colony"
  88.     item "Psi:CapitalShip:Carrier"
  89.     item "Tech:Module:GaussDefense"      
  90.   group
  91.    condition
  92.     type "PlanetOwnerIsMilitiaWithChance"
  93.     param "0.3"
  94.    owner "PlanetOwner"
  95.    colonizeChance 0
  96.    items 10
  97.     item "Psi:Frigate:Siege"
  98.     item "Psi:Frigate:Siege"
  99.     item "Psi:Frigate:Heavy"
  100.     item "Psi:Frigate:Heavy"
  101.     item "Psi:Frigate:Heavy"
  102.     item "Psi:Frigate:Heavy"
  103.     item "Psi:Frigate:Heavy"
  104.     item "Psi:CapitalShip:Colony"
  105.     item "Psi:CapitalShip:Carrier"
  106.     item "Tech:Module:HangarDefense"     
  107.   group
  108.    condition
  109.     type "NoPlanetOwner"
  110.     param ""
  111.    owner "RandomMilitia"
  112.    colonizeChance 0
  113.    items 5
  114.     item "Psi:Frigate:Light"
  115.     item "Psi:Frigate:LongRange"
  116.     item "Psi:Frigate:AntiFighter"
  117.     item "Psi:Frigate:Heavy"
  118.     item "Psi:Frigate:Siege"
  119.   group
  120.    condition
  121.     type "NoPlanetOwnerWithChance"
  122.     param "0.3"
  123.    owner "RandomMilitia"
  124.    colonizeChance 0
  125.    items 3
  126.     item "Psi:Frigate:Light"
  127.     item "Psi:Frigate:LongRange"
  128.     item "Psi:Frigate:LongRange"
  129.   group
  130.    condition
  131.     type "NoPlanetOwnerWithChance"
  132.     param "0.3"
  133.    owner "RandomMilitia"
  134.    colonizeChance 0
  135.    items 5
  136.     item "Psi:Frigate:Light"
  137.     item "Psi:Frigate:Light"
  138.     item "Psi:Frigate:Light"
  139.     item "Psi:Frigate:Siege"
  140.     item "Psi:Frigate:Siege"
  141.   group
  142.    condition
  143.     type "NoPlanetOwnerWithChance"
  144.     param "0.3"
  145.    owner "RandomMilitia"
  146.    colonizeChance 0
  147.    items 4
  148.     item "Psi:Frigate:AntiFighter"
  149.     item "Psi:Frigate:AntiFighter"
  150.     item "Psi:Frigate:Light"
  151.     item "Psi:Frigate:Heavy"
  152.   group
  153.    condition
  154.     type "NoPlanetOwnerWithChance"
  155.     param "0.3"
  156.    owner "RandomMilitia"
  157.    colonizeChance 0
  158.    items 4
  159.     item "Psi:Frigate:AntiFighter"
  160.     item "Psi:Frigate:Light"
  161.     item "Psi:Frigate:Siege"
  162.     item "Psi:Frigate:Heavy"</P>
  163. <P>
 

planetItemsTemplate
 templateName "Template:LocalMilitiaStrong"
 subTemplates 0
 groups #
  group
   condition
    type "PlanetOwnerIsMilitia", "NoPlanetOwnerWithChance", "NoPlanetOwner", "PlanetOwnerIsMilitiaWithChance", "Always", "PlanetOwnerIsRace"
    param "#=%?"
   owner "PlanetOwner", "RandomMilitia", "Pirate"
   colonizeChance 0, 1
   items #
    item "Psi:Frigate:Light"

 

I get Groups, Items, Item.

Group I assume means a chance as defined by "param" of that group within a template is used.

  group
   condition
    type "NoPlanetOwnerWithChance"
    param "0.3"

I am guessing the above example means there is a 30% chance that group will be applied to a planet if this template is assigned to the planet as long as there is no planet owner. But what defines whether or not there is a "chance"? Or is it that there will be 30% of that group applied to a planet, or am I just up in the night?

I suspect Owner is Planetowner = defined under planet in .galaxy files' Pirate/RandomMilita sets it to owner Pirate/RandomMilita.

I have no idea what "colonizeChance" defines.

 

5,921 views 6 replies
Reply #1 Top
I'm total lost with what you've said, could you ask it again, in a simpler way, what you'd like to know? I know most of the workings of the GSD file, so I can help.
Reply #2 Top
You can find all this stuff in GalaxyForge, plus it's far easier to work with.

A template is a predetermined set of units that can spawn at a planet. The units can be neutral, pirate, or owned by a player(not sure about neutral race). You can choose to have units spawn based on a percentage chance, based on the identity of its owner, or the owner's race.

A planet may have many templates, allowing you to build a system like a series of puzzle pieces to your liking. Or you can have a single complex template, like the kind used to determine a starting player's units.

As far as I've seen, templates to not determine a planet's attributes, asteroids, or chance of neutral facilities. I've only seen those in the planet type's details.

Anything I miss?
Reply #3 Top
You can find all this stuff in GalaxyForge, plus it's far easier to work with.A template is a predetermined set of units that can spawn at a planet. The units can be neutral, pirate, or owned by a player(not sure about neutral race). You can choose to have units spawn based on a percentage chance, based on the identity of its owner, or the owner's race.A planet may have many templates, allowing you to build a system like a series of puzzle pieces to your liking. Or you can have a single complex template, like the kind used to determine a starting player's units.As far as I've seen, templates to not determine a planet's attributes, asteroids, or chance of neutral facilities. I've only seen those in the planet type's details.Anything I miss?
End of quote




Exactly what I would have said... with a few different words, mind you. Anybody actually able to see what's in the big white box in the OP? It's empty from here.

Templates are pretty diverse, anything from a few ships to fully colonized planets. And it does apply to the neutrals.

IIRC, In GalForge, right clicking on a planet and choosing edit (???) brings you to the place you can add a template. It will initially look all blank, you have to poke around a little to get it all to show up.

T
Reply #4 Top
"Anybody actually able to see what's in the big white box in the OP?"

if you use your magical text selector it highlights and is visible. at least with firefox/windows
Reply #5 Top
Unfortunately it was all completely unnecessary. He just quoted a massive chunk out of the GSD file for no reason. The only relevant bit was the end bit, which we could see anyway :D
Reply #6 Top
I actually went back and "viewed source"... It was rather unnecessary... I use Firefox also, but it didn't show up for me highlighted... Odd.

T