How to add Planets to Sins.

I'm new to the Forum and not being a total noob have started a mod that is on Moddb. One of the Mods Major Goals is to add new Planet Types. I have made several Effects for the Space Stuff like Nebulae, Blackholes, and other strange things, but now i am at an Impass. I have the blackhole entity done, right now it is using the Plasma storm abilities and images cause i just want to get it ingame. Everything is correct like string names and such but now i find that i need to add it to the GalaxyScenarioDef.galaxyScenarioDef file. Sadly :( I'm not sure how to make sense of it. It has several things in it that i don't really understand like Orbit bodies and IDS strings that i don't know where the game is taking them from. Please Any help would be great.

My mod can be found here on Moddb as well http://www.moddb.com/mods/sins-of-a-solar-empire-revolutions

16,433 views 14 replies
Reply #1 Top

Alright, the GalaxySenarioDef file has several sections, two of them which are required to be modded for completely new planets. Here's the beginning of what the first section (might) looks like (minus formatting of course).

planetTypeCount 39
planetType
    designName "WeightedNonIce"
    designStringId "IDSGalaxyScenarioTypePlanetWeightedNonIce"
    orbitBodyTypeCount 31
    orbitBodyType "Terran" ...

The planetTypeCount is the line that appears first in the planetType section. It simply tells the game how many different planetType's their are so it can read the file correctly. Have the count equal to the number of planetType and this won't cause you any problems. The DesignName is simply what the planetType name is and from what I can tell is only used in the GalaxyForge (or editting .galaxy files by hand). I'm honestly not sure exactly where the string is used, probably galaxy forge as well, but honestly I don't think you have to use it. OrbitBodyTypeCount is important, like the planetTypeCount its used to get the game to read the file correctly. It is simply a count of what all the different orbitBodyTypes for each planetType. Again, make sure the number of orbitBodyType lines equals the count and it shouldn't cause any problems. The orbitBodyType is the name of the planet (or star) that you made and is defined in the next section.

For what I think you're trying to do, you'll probably want to create a new planetType (usually done right below the last one) that only contains an orbitBodyType for your black hole so you can use it in galaxy forge. You'll also want to add the black hole to the RandomUncolonizable planetType so that it can appear in the current maps. Remember to update the counts when you do this!

 

The next section is the orbitBodyType section, which tells the game where to find the files for the different types of entites we used in the last section. It will look something like this.

orbitBodyTypeCount 31
orbitBodyType   
    typeName "BlueStar"
    entityDefName "STAR_BLUE"
    defaultTemplateName ""...

The orbitBodyTypeCount works like the planetType count except its for the orbitBodyType. The typeName is the name that is used for the other parts of the GalaxySenarioDef file (so if you call your new planet "Black Hole" make sure its always spelled like this for the rest of this file). The entityDefName is the name of the .entity file that contains your new planet (you obviously don't need to include the .entity at the end). The defaultTemplateName tells if the planet type will have a default template (usually used to spawn militia or pirates) that will load at the start of the game. If you don't want to use one, keep it like it is above.

All you should need to do is add a new orbitBodyType, fill in your planet's info, and then update the counts. Hopefully that should get the game to start including the planet type in its maps (provided everything else works).

Reply #2 Top

I've done all that just so you can make sure i have both of them here ~~

planetType
 designName "Blackhole"
 designStringId "IDSGalaxyScenarioTypePlanetBlackhole"
 orbitBodyTypeCount 1
 orbitBodyType "Blackhole" 

and my orbitbody type

orbitBodyType 
 typeName "Blackhole"
 entityDefName "PlanetBlackhole"
 defaultTemplateName "" 

But i get a mini-dump each time i play on my galaxy forge test map. Looking further i used the Dev version and it says First on startup "Invalid EntityDefName(PlanetBlackhole) found for 'Blackhole'." then on game launch with my test map "GalaxyScenario type name is not valid. The EntityDefName is not available. TypeName:'Blackhole' -> EntityDefName:'PlanetBlackhole'."

I've rechecked all of my stuff and it still doesnt seem to work no matter what i do. Any Ideas?

 

Reply #3 Top

Did you add 1 to the GalaxyScenario count?

Reply #4 Top

Let me check..... Well if you mean the PlanetTypeCount and the OribitbodyCount then Yes i Did the PlanetTypeCount was 26 and i made it a 27 and the OrbitBodyCount was 19 and i made it 20.

Reply #5 Top

Quoting droideka95, reply 2
I've done all that just so you can make sure i have both of them here ~~

planetType
 designName "Blackhole"
 designStringId "IDSGalaxyScenarioTypePlanetBlackhole"
 orbitBodyTypeCount 1
 orbitBodyType "Blackhole" 

and my orbitbody type

orbitBodyType 
 typeName "Blackhole"
 entityDefName "PlanetBlackhole"
 defaultTemplateName "" 

But i get a mini-dump each time i play on my galaxy forge test map. Looking further i used the Dev version and it says First on startup "Invalid EntityDefName(PlanetBlackhole) found for 'Blackhole'." then on game launch with my test map "GalaxyScenario type name is not valid. The EntityDefName is not available. TypeName:'Blackhole' -> EntityDefName:'PlanetBlackhole'."

I've rechecked all of my stuff and it still doesnt seem to work no matter what i do. Any Ideas?

 

 

Well literally its telling you the game can't find a file called PlanetBlackhole.entity in the mod folder. The only thing I can think of is to make sure you've got the file name exactly correct. Is this for Entrenchment?

Reply #6 Top

Checking... It seems to be in order the name is correct and it's in the right folder. Yes I'm running it on Entrenchment 1.141 that is what the mod is for as well.

Reply #7 Top

You'll need to add the planet file "PlanetBlackhole.entity" to the entity.manifest file which should be in the root of your mod :)

Reply #8 Top

OOOOOOOOO!! I tottaly forgot about that thank you very much. k1 for you and Goa.

Reply #9 Top

:'(  Still wasn't the problem (you still get your karma though you deserve it) and now i get this weird error along with the first error.

Assert @ c:\gs\entrenchment\CodeSource\Engine/DataStructures/DynamicVector.h(172)

i >= 0

 

"EDIT" Fixed turns out i needed to make the entity count go up one and the same with the string ID count.

<a href="http://www.moddb.com/mods/sins-of-a-solar-empire-revolutions/images/blackhole-in-game" title="Blackhole In-game - Mod DB" target="_blank"><img src="http://media.moddb.com/cache/images/mods/1/13/12481/thumb_300x150/ScreenShot_16.jpg" alt="Blackhole In-game" /></a>

 

"EDIT" "EDIT" Grrrr stupid moddb embed code!>:(

Reply #10 Top

Probably won't get a response but any one know how to get the coordinates for your Buttons and thumbnails for the .brushes files i believe they are called? :grin:

Reply #11 Top

Quoting droideka95, reply 10
Probably won't get a response but any one know how to get the coordinates for your Buttons and thumbnails for the .brushes files i believe they are called?

 

This is from memory, but hopefully it's close enough. Open the appropriate brushes file and use a program to find the X and Y pixels of the upper leftmost corner of the graphic in question. If its like the other files where you define the brushes file, the first number is the X pixel, the second is the Y pixel, the third is the how long the X axis is, and the 4th is the length of the change in the Y axis.

Reply #12 Top

Hmph! :annoyed: Well i guess i'll have a looksy and see if i can't make sense of it. I appreciate all the help you've given me Goa. \o/

Reply #13 Top

Quoting droideka95, reply 12
Hmph! Well i guess i'll have a looksy and see if i can't make sense of it. I appreciate all the help you've given me Goa.

No problem,

 

Also, I got a little bit confused for a minute, the brushes files are where you define the coordinates of the graphics, which are located in one of the several texture files with buttons in its name are the actual file where the coordinates are taken from (buttons_interface.tga for example).

+1 Loading…
Reply #14 Top

Yes of course, Well i think that is all i need for planets if not i'll figured it out on my own again Goa thanks for all the help my next post will most likely be abot abilities as i do not understand them whatsoever:thumbsdown: o and i forgot to do this k1 again for you.