Galaxy Creation – Reference Guide

Galaxy Creation – Reference Guide

I hope this reference guide helps others in making some great galaxies. I strongly suggest you start small, and learn the basics instead of jumping straight in to making 5 star setups with 40 planets from the beginning. Use the default galaxies for reference and follow the KISS Principle and you'll be just fine.

This guide uses the Close Encounters galaxy file as a point of reference in explaining the galaxy setup. You can find it in ..\Sins of a Solar Empire\Galaxy folder.

At the top of the Close Encounters Galaxy file you'll see the following

-------------------------------------------
TXT
versionNumber 0
isBrowsable TRUE
browsePictureName "ScenerioPicture-CloseEncounters"
browseDescription "IDS_CUSTOMGALAXY_DESCRIPTION_CLOSEENCOUNTERS"
hasStartingPlanetPirates TRUE
isFirstCapitalShipIsFlagship TRUE
artifactCount 0
planetBonusCount 3
recommendedGameTypeCount 1
recommendedGameType "Solo"
useRandomGenerator FALSE
galaxyWidth 112.000000
galaxyHeight 108.000000
metersPerGalaxyUnit 35000.000000
pixelsPerGalaxyUnit 9.439996
nextStarNameUniqueId 1
nextPlanetNameUniqueId 9
-------------------------------------------

isBrowsable: This sets whether your galaxy will be listed with the other galaxies currently available in the Galaxy Browser, such as the Aerolian Sector, Convergence, and so on.

browsePictureName: If set, it displays the picture in the in-game Galaxy Browser when you have a galaxy selected. It loads a .tga file from the ..\Textures folder. For the Close Encounters galaxy as shown above, it loads and displays the ScenerioPicture-CloseEncounters.tga file.
You should be able to make new .tga images using Photoshop, GIMP, or some other imaging program with support for .tga.

browseDescription: This text string is loaded from ..\String\English.str.
It displays a brief description of the selected galaxy in the browser. The displayed text will appear below the .tga picture. You are however able to freely write your own text here without adding it to the English.str file.
An example being "In a Galaxy far far away..." ect.

hasStartingPlanetPirates: This sets whether all non-home worlds/Gas Giants/Plasma Clouds ect. starts with Militia forces present or not.

artifactCount: Determines how many artifacts there are in the galaxy. Values are between 0-10, they are randomly distributed across the galaxy.

planetBonusCount: Determines how many planet bonus' there are throughout the galaxy.

recommendedGameTypeCount #: This sets how many recommended game types that will be listed in the Galaxy Browser. It'll be displayed on the right side of the .tga picture. Change this value accordingly to the number of GameTypes listed.

recommendedGameType: This will display the various GameTypes available for the selected galaxy in the Galaxy Browser. It's displayed to the right of the tga picture and shows up as "Best for:".
Parameters are “Solo”, “TwoTeamsOfTwo”, “TwoTeamsOfThree”, “TwoTeamsOfFour”, “TwoTeamsOfFive” and “FFA”.

useRandomGenerator: This sets whether the Galaxy is randomly generated or not. If set to True it will randomly generate the galaxy according to certain values as shown in the example below.

-------------------------------------------
isBrowsable TRUE
browsePictureName "ScenerioPicture-RandomLarge"
browseDescription "IDS_CUSTOMGALAXY_DESCRIPTION_RANDOMLARGE"
hasStartingPlanetPirates TRUE
artifactCount 3
planetBonusCount 12
recommendedGameTypeCount 1
recommendedGameType "FFA"
useRandomGenerator TRUE
planetCount 30
starCount 5
recommendedPlayerCount 10
playerStartingCredits 1000
playerStartingMetal 300
playerStartingCrystal 100
-------------------------------------------

galaxyWidth and galaxyHeight: These two determine how big the galaxy is. And in helping you visualize the layout, imagine the X and Y axis on a piece of paper. Along the bottom line you have the X axis or the Width, and along the Y axis you have the Height.
If you set those values to 100 each, you'll have values of 0-100 along the X axis, and 0-100 along the Y axis. If you write that down on a piece of paper, it'll be easier in mapping out your galaxy with planets. If you set them to anything else, you increase or decrease the width and height of your galaxy accordingly.

Here's a crude illustration of the Width and Height on the X and Y axis.



metersPerGalaxyUnit, pixelsPerGalaxyUnit: A guess at these values function is believed to determine the length of the Galaxy Units in meters, and how many pixels represents one Galaxy Unit. (duh)
It's a bit like reading a map, two inches on a map may represent 10 kilometers in reality. It's not something that's recommended to tamper with as it seems better off left alone.

nextStarNameUniqueId and nextPlanetNameUniqueId: ???

-------------------------------------------
starCount 1
star
designName "Star0"
inGameName ""
type "RandomStar"
pos [ 50 , 50 ]
radius 50.000000
planetCount 9
-------------------------------------------

Moving on in the Close Encounters galaxy file, you'll see text describing a star setup.

starCount: This value determines how many stars are present in your galaxy. Change the value accordingly to match the amount of stars in your galaxy.

star: This designates the start of values for a star.

designName: This is a unique name of the star throughout the galaxy file, use Star0 for your first star, Star1 for your second, and so on. It is used later when making phase lane connections.

inGameName: You can use this field to name the star something uniquely instead of relying on the random generator. If you leave the field blank it'll generate a name randomly.

type: This determines if the star is generated as a specific color star such as a yellow, red, blue or green or whether it's generated randomly. Parameters are YellowStar, BlueStar, GreenStar, or RandomStar.

pos: This is the position along the X and Y axis of the star. If you set the galaxy to 100 by 100 Width and Height, and the star at [ 50 , 50 ], it'll be positioned dead center of the entire galaxy.

radius: Therax Quote "I believe the "radius" parameter attached to stars determines when the ships switch to the higher speed. If they are closer to the star than "radius", then they are considered to be inside the star system, and use the slower interplanetary speed."

planetCount: Set his value according to how many planets surround the star. If you have a star with 20 planets attached to it, set the value to 20.

-------------------------------------------
planet
designName "Planet1"
inGameName ""
type "HomeTerranPlanet"
pos [ 51 , 58 ]
playerId 0
isHomePlanet TRUE
isPiratePlanet FALSE
startingUpgradeLevelForPopulation 0
startingUpgradeLevelForCivilianModules 0
startingUpgradeLevelForTacticalModules 0
startingUpgradeLevelForShips 0
startingUpgradeLevelForArtifacts 0
raceItemsCount 1
raceItems
raceName "Tech"
itemCount 7
itemName "Tech:Module:FrigateFactory"
itemName "Tech:Module:CapitalShipFactory"
itemName "Tech:Module:MetalExtractor"
itemName "Tech:Frigate:Constructor"
itemName "Tech:Frigate:Colony"
itemName "Tech:Frigate:Scout"
itemName "Tech:Frigate:Light"
spawnProbability 1.000000
-------------------------------------------

Next, we move on to the making of a planet.

designName: this is the unique name for the planet in this galaxy setup. You'll need this value later when making phase lane connections. Name the first planet 0, the second 1, the third 2, and so on.

inGameName: You can use this field to name the planet something uniquely instead of relying on the random generator. If you leave the field blank it'll generate a name randomly.

type: This determines the type of the planet. The variables are Asteroid, AsteroidBelt, DeadAsteroid, DesertPlanet, HomeDesertPlanet, GasGiant, IcePlanet, MagneticCloud, PirateBase, PlasmaStorm, TerranPlanet, HomeTerranPlanet, VolcanicPlanet, WeightedNonIcePlanet, WeightedRandomPlanet, WeightedColonizablePlanet, AsteroidOrDead, RandomPlanet, RandomTruePlanet, RandomUncolonizable or if left blank it will be random.

playerId: This determines the ownership of the planet. If set to 0, playerId 0 has this planet at the start of the game.

isHomePlanet: This should be self explaining. Set it to TRUE for homeworlds, FALSE for others.

isPiratePlanet: This sets whether the planet is owned by pirates or not. You can make planets using this that aren't the pirate base, but instead a regular planet controlled by the pirates.

startingUpgradeLevelForPopulation
startingUpgradeLevelForCivilianModules 0
startingUpgradeLevelForTacticalModules 0
startingUpgradeLevelForShips 0
startingUpgradeLevelForArtifacts 0

These values determines the state of the upgrades for the planet at the beginning of the game. If Population for example is set to 2, the planet will already have that upgrade when you colonize it. Home worlds automatically come with startingUpgradeLevelForPopulation at 1 and UpgradeLevelForArtifacts at 2.
Adjusting these values doesn't work at the moment however.

raceItemsCount: This designates the number of races that can start at this planet. Values are 1, 2 and 3.

raceItems and raceName: Lists the available races that can initially start on this planet. Tech, Psi, and Phase each representing one of the three races in Sins. It can be used to make exclusive planets which only one race can start at. It also determines available starting research and ships the planet owner starts with.
You can find the values for these in the GameInfo folder. All though they will be written differently then in the Galaxy file. For example the itemName "Tech:Frigate:Constructor" will be called FrigateTechModuleCostructor in the GameInfo folder. Or the itemName "Tech:Frigate:Light" will be called FrigateTechLight.
For a galaxy example, check the Areolian Sector file.

itemCount: This number must correspond with the number of listed itemNames for the given race. If there are seven itemNames, set this value to 7.

spawnProbability: A guess is that this sets the percentage chance of the planet appearing at galaxy generation. 1 being 100%.

-------------------------------------------
connectionCount 14
connection
planetIndexA 1
planetIndexB 0
spawnProbability 1.000000
-------------------------------------------

Next we move on to phase lanes and connecting the planets.

connectionCount: Thisdetermines the overall number of connections within the star. If the value is set to 14, it means the game expects there to be 14 connections between the various planets in your star system. This must be set precisely.

connection: This designates the beginning of the values of a connection

planetIndexA and B: This determines the point of origin and destination between two planets you want to make a connection between.
Example, if you set planetIndexA to 1, and planetIndexB to 2, you have made a phase lane connection between the planets with designId 1 and 2. Other values available are -1 to designate a connection to the Star in the system.

-------------------------------------------
playerCount 2
player
designName ""
playerId 0
teamIndex -1
startingCredits 1000
startingMetal 300
startingCrystal 100
overrideRaceName ""
-------------------------------------------

And last, there's player setups.

playerCount: This determines how many players the game expects there to be. If you set this to 4, you should make 4 players accordingly.

What's important here really, is the playerId, this is the value you use for giving players their homeworlds. Make sure when you make a homeworld, you give it a playerId that matches with one of the players you've made at the end here.

teamIndex: This makes it possible to setup pre-set teams, for example Player 1 and 2 are set as the same team, and player 3 and 4 are set as the other team. This however can be changed when starting the game, as normal. Use values 0-9 to represent team 1 to 10.

Starting resources is self explaining.

overrideRaceName, Aldarian and I believe this to effectively force players in to playing specific races. It's not possible to test currently however, since even if you change it, apparently you can only select Tec. (duh) Which might be explained by the lack of the other two races currently.

Credits: Novaburst, Vandenburg, Aldarian, Lordkosc.
161,164 views 64 replies | Pinned
Reply #1 Top
browseDescription, I'm uncertain where it loads this text string from. I however do know it's function, and that is to give a brief explanation of the selected Galaxy in the browser. It'll display some text below the .tga picture, and you can freely write your own stuff here. Such as "In a Galaxy far far away..." ect.


It's loaded from Sins of a Solar Empire\String\English.str. All text strings are located there.
planetBonusCount, I'm fairly certain this determines the maximum amount of bonuses that can be found on any given planet. A bonus is the effects you discover through planet exploration.


Actually it works like artifactCount. It sets how much bonus in total are there in a map. Distribution then is random.

radius, I'm uncertain what this function does. It possibly affects the size of the graphical representation of the star, but I'm not sure. It's not something I've experimented with.


It either does nothing, or it does set how far away a background texture is bound to a star. It doesn't change the stars size or something like this, of that I'm sure.

The variables are Asteroid, AsteroidBelt, DeadAsteroid, DesertPlanet, HomeDesertPlanet, GasGiant, IcePlanet, MagneticCloud, PirateBase, PlasmaStorm, TerranPlanet, HomeTerranPlanet, VolcanicPlanet, or if left blank it will be random.


Further possibilities are:
Code: html
  1. designName "WeightedNonIcePlanet"
  2. "PlanetTerran"
  3. "PlanetDesert"
  4. "PlanetVolcanic"
  5. "PlanetAsteroid"
  6. "PlanetAsteroid"
  7. "PlanetDeadAsteroid"
  8. designName "WeightedRandomPlanet"
  9. "PlanetTerran"
  10. "PlanetTerran"
  11. "PlanetIce"
  12. "PlanetDesert"
  13. "PlanetDesert"
  14. "PlanetVolcanic"
  15. "PlanetVolcanic"
  16. "PlanetAsteroid"
  17. "PlanetAsteroid"
  18. "PlanetAsteroid"
  19. "PlanetAsteroidBelt"
  20. "PlanetGasGiant"
  21. "PlanetDeadAsteroid"
  22. "PlanetDeadAsteroid"
  23. designName "WeightedColonizablePlanet"
  24. "PlanetTerran"
  25. "PlanetTerran"
  26. "PlanetTerran"
  27. "PlanetIce"
  28. "PlanetDesert"
  29. "PlanetDesert"
  30. "PlanetDesert"
  31. "PlanetVolcanic"
  32. "PlanetVolcanic"
  33. "PlanetVolcanic"
  34. "PlanetAsteroid"
  35. designName "AsteroidOrDead"
  36. "PlanetAsteroid"
  37. "PlanetDeadAsteroid"
  38. "PlanetAsteroidBelt"
  39. designName "RandomPlanet"
  40. "PlanetTerran"
  41. "PlanetIce"
  42. "PlanetDesert"
  43. "PlanetVolcanic"
  44. "PlanetAsteroid"
  45. "PlanetDeadAsteroid"
  46. "PlanetAsteroidBelt"
  47. "PlanetGasGiant"
  48. designName "RandomTruePlanet"
  49. "PlanetTerran"
  50. "PlanetIce"
  51. "PlanetDesert"
  52. "PlanetVolcanic"
  53. designName "RandomUncolonizable"
  54. "PlanetGasGiant"
  55. "PlanetAsteroidBelt"
  56. "PlanetPlasmaStorm"
  57. "PlanetMagneticCloud"


I believe these values determines the state of the upgrades for the planet. If Population for example is set to 2, the planet will already have that upgrade when you colonize it. It's not something I've tested however. Home worlds automatically come with the UpgradeLevelForArtifacts at 2, irregardless of the value listed it seems.


Doesn't work atm.

raceItems, comes together with the raceName which lists the available races that can use this planet. Tech, Psi, and Phase each representing one of the three races in Sins. It can be used to make exclusive planets only one race can use.


Not really. Other races can still use this planet (if they have the necessary tech). It works (when used on a homeplanet) to force a certain race to the corresponding player.

teamIndex, I'm not sure what this does. Possibly there to make forced teams, so player 1 and 2 are always teamed if the index is set to 0 for both playerId 1 and playerId 2. It's a guess at best.


Exactly, it sets the teams. Although you can still change the teams when loading the map.

A 0 means team 1, a 1 means team 2, etc. until a 9 means team 10.

-----------

Nice work.
Reply #2 Top


Nice work.


Jopo




Thanks goes to Aldarian on IRC for confirming my initial suspicions and answering my questions.


No Problemo
And thanks to Kosc too
Reply #3 Top
Thanks for the reply Vandenburg, took some of your corrections and edited the OP.


Actually it works like artifactCount. It sets how much bonus in total are there in a map. Distribution then is random.


Isn't that redundant then if the values are the same?

I believed artifactCount to mean the global number of artifacts in the entire galaxy. And planetBonusCount to mean the maximum number of bonus any given planet can have. I derived at this conclusion based on the bonus available for planets, seeing as the bonus are the "effects" you discover through planet exploration.
I believe the bonus to be the the files that are located in the GameInfo folder, and called "PlanetBonusXXXX".

Secondly, the other variables you listed for planet type. Am I to understand it such that you can set the type to say "WeightedNonIcePlanet", and it'll randomly pick from the list below?

"PlanetTerran"
"PlanetDesert"
"PlanetVolcanic"
"PlanetAsteroid"
"PlanetAsteroid"
"PlanetDeadAsteroid"

I re-worded the raceItems entry. I didn't mean that they were excluded from the planet throughout the entire game. Just that it's meant to set the initial race allowed for that planet.
Reply #4 Top
Isn't that redundant then if the values are the same?


Nope.

I believed artifactCount to mean the global number of artifacts in the entire galaxy. And planetBonusCount to mean the maximum number of bonus any given planet can have. I derived at this conclusion based on the bonus available for planets, seeing as the bonus are the "effects" you discover through planet exploration.
I believe the bonus to be the the files that are located in the GameInfo folder, and called "PlanetBonusXXXX".


Your right, that bonus are the ones called PlanetBonusXXXX, while artifacts are what is called RESEARCHSUBJECT_ARTIFACT_XXXXX. Artifacts are different, since they give empire wide bonus, while PlanetBonus only gives the planet it resides a bonus.

Artifacts are handled differently since they were there since earlier betas and we had to research them in beta 1+2.

artifactCount 4
planetBonusCount 20


The above means, that 4 artifacts (out of 10 iirc) are there on the map and a total of 20 planet bonus (which get distributed randomly on all possible planets). So if you set the planetBonusCount to a very high amount, each planet will have multiple bonus, but if you set it to a low amount, only few planets will have bonus at all.

Secondly, the other variables you listed for planet type. Am I to understand it such that you can set the type to say "WeightedNonIcePlanet", and it'll randomly pick from the list below?

"PlanetTerran"
"PlanetDesert"
"PlanetVolcanic"
"PlanetAsteroid"
"PlanetAsteroid"
"PlanetDeadAsteroid"


Exactly.

Take a look at Sins of a Solar Empire\GameInfo\GalaxyScenerioDef.galaxyScenerioDef. This is one of the most important files in my opinion. It defines what can be used in maps and which definition file from the GameInfo folder goes together with which name.


Reply #5 Top
Nice write up!
Reply #6 Top
Artifacts makes sense now Vanderburg. Thanks for clarifying.
Reply #7 Top
This was a great help! I Should have my first map made by the end of tonight   
Reply #8 Top
*stickied*
Reply #9 Top
The head code has changed
isFirstCapitalShipIsFlagship
has been added
And you dont have to add the file extension in
browsePictureName "picturename"
Old version browsePictureName "picturename.tga"
Just make sure that your picture is tga.
Reply #10 Top
The guide has been updated for the latest updates, plus I reworded a couple things. Lemme know if anything needs changing.
Reply #11 Top
There is a difference in speed between when ships are phase jumping between stars (actually, when they are passing through the void between star systems), and when ships are phase jumping between planets at the same star. By default the interstellar jump speed is 35 times the interplanetary jump speed.

I believe the "radius" parameter attached to stars determines when the ships switch to the higher speed. If they are closer to the star than "radius", then they are considered to be inside the star system, and use the slower interplanetary speed.
Reply #12 Top
anyone get the message "is missing \n in .\Galaxy\FILENAME" ? what does it mean? otherwise I seem to start getting the hang of it. thanks for the write up.
Reply #13 Top
Probably a line break.
Reply #14 Top
anyone tried making a star's grav well smaller than the size of the star?
Reply #15 Top

Probably a line break.


in the code? hmm, strange, it happened when I just modified some stats on a large map and renamed it afterwards. wouldnt see any specific candidate for that.
Reply #16 Top
this is good stuff. we need to put this on a sticky thread. this is similar but not the same as making a hw symmetrical map. i use to make maps for hw1 and hw2 but this should be something a step to a similar concept.

i hope they (IC,DEVs) make it a lot easier to use than using missionman note pads and relying on numbers and y, x, locations. those where the day's where you really need to makesure that every single one of your map made notepads had the right symbols on them else it will crash the whole game and not even work. i had that problem before where i thought my hw cd was lost but found out it was one of my maps that i tried to create was missing a (,) symbol. i would hope that an error detector and locator of that error would make it a lot simpler. i'm pretty sure some of you map makers out there know what i'm talking about.

but then again, i'll have to find a time to do such a thing. i'm not the young space warrior i used to be when i was younger during the hw series. time passes, you get older and you get less time on your hands. the things we adults do for you young kids is always unappreciated. hehh... not like i really cared about that stuff when i was younger.

all in all, good stuff there Novaburst.
Reply #17 Top
I believe the "radius" parameter attached to stars determines when the ships switch to the higher speed. If they are closer to the star than "radius", then they are considered to be inside the star system, and use the slower interplanetary speed.

sounds about right

and apparently this applies for ships "grazing" the edge of a galaxy, so if you're playing in a 10 star map and you want to get to the star on the other side (with say, 5 galaxies DIRECTLY between you) get ready for a very... very... very long trip
Reply #18 Top

Probably a line break.


in the code? hmm, strange, it happened when I just modified some stats on a large map and renamed it afterwards. wouldnt see any specific candidate for that.


You need a line break at the end of almost every file in Sins. So it could be that you deleted one without realizing.


anyone tried making a star's grav well smaller than the size of the star?


It's currently not possible to change the grav well of stars.
Reply #19 Top
one other question: what is the difference between "WeightedRandomPlanet", "RandomPlanet" , "RandomTruePlanet" and just leaving it blank?
Reply #20 Top
one other question: what is the difference between "WeightedRandomPlanet", "RandomPlanet" , "RandomTruePlanet" and just leaving it blank?


Hint: Read the thread again.

Or just open the file GalaxyScenerioDef.galaxyScenerioDef and see for yourself.
Reply #21 Top

connection
planetIndexA 1
planetIndexB 0
spawnProbability 1.000000


This got changed to

connection
planetIndexA 1
planetIndexB 0
spawnProbability 1.000000
type "PhaseLane"


The new addition is type.

I haven't tested it, but I guess also a possibility would be type "PhaseGate".
Reply #22 Top
I may just be crazy and doing something wrong but doing phase lanes atm seems to be a very tricky process atm. It seems that planetIndexA and IndexB are not running off of the planet ID. and it resets for each star. Again I might just be crazy but this seems to be what its doing to me atm.
Reply #23 Top

I may just be crazy and doing something wrong but doing phase lanes atm seems to be a very tricky process atm. It seems that planetIndexA and IndexB are not running off of the planet ID. and it resets for each star. Again I might just be crazy but this seems to be what its doing to me atm.



I'm not sure if I understand your problem correctly.

Planets are numbered from 0 on and on a per star basis. So your first planet of each star has an Id of 0, the second planet has an Id of 1, etc. The first planet of the next star has again an Id of 0, etc.

The Star has always an Id of -1 for connections and you can't connect planets from different stars to each other. (Sadly)
Reply #24 Top
yea I finnaly figured that out. The really screwy part is that if I put my planets in like this way.

1 Terran Home
2 Desert Planet
3 Dead Asteroid
4 Ice Planet
5 Asteroid Belt
6 Desert Planet

When I do phase lanes their number changes, This is pretty much the last star I did. The planets when into like that there phase lane numbers are below however.

6 Terran Home
1 Desert Planet
3 Dead Asteroid
2 Ice Planet
5 Asteroid Belt
4 Desert Planet

I don't know why. Is this the way it has been for you guys. If it has I'll just suck it up, and work it out. It has been making something that should be fairly simple into a minor project.
Reply #25 Top
Hmm... that's pretty strange and shouldn't happen.

I can't test it right now, but will do it later. Could you perhaps upload your mapfile, so I could take a look at it?

It defenitely sounds like a bug.