SystemTypes.txt (SEV)
Creating a Red Giant System
Lets say you want to create a special type of system, like a Red Giant system. This system would have a larger than normal star, and no planets in the first several rings. When stars go into the Red Giant phase, they expand to about 1 AU, and swallow the inner planets. The first step is to create the star object in StellarObjectTypes.txt and a corresponding entry in XFileClasses_Stellar.txt. Lets assume the star object is named "Star Red Giant." This is what a possible Star Red Giant entry might look like:
Stellar Object Name := Star Red Giant Physical Type := Star XFile Class Name := Star Red Giant Maximum Model Size := 80.0 Hex Size := 4 Blocked Hex Radius := 4 Picture Index := 679 Portrait Filename := star_red.bmp Large Portrait Filename := star_red_lp.jpg Description := Old star that has exhausted the supply of hydrogen in its core and switched to fusing hydrogen in a shell outside the core. Star Size := Huge Star Age := Old Star Color := Red Star Luminosity := Bright
Next, let's take a look at how SystemTypes.txt calls a star:
Obj 1 Physical Type := Star Obj 1 Position := Ring 1 Obj 1 Stellar Abil Type := Normal Star Obj 1 Specific Stellar Obj Name := Any Obj 1 Size := Any Obj 1 Age := Any Obj 1 Color := Any Obj 1 Luminosity := Any
This overly-generic entry can potentially cause our Star Red Giant to appear in any system type, which is not the intention. To remedy this, more stringent restrictions will have to be enforced. We want regular solar systems to be able to have any type of star, except the Star Red Giant. To do this, we will have to choose one of the attributes as a limiting factor. Since all red giants are old stars, we could choose the Age attribute for this purpose.
We can change how systems are "defined," and call all regular stars main cycle stars. Thus, their age would be "Average," instead of the pseudo-random setup in the stock game. Back in StellarObjectTypes.txt, every star object, save the Star Red Giant, must have its Star Age property set to Average. No regular star should have Young, Old, or Ancient age.
In SystemTypes.txt, set all Star entries to have an Obj X Age of Average. Now, the mod will be just like stock, in that any star entry can still occur in any system. The only difference is that we have a new Star Red Giant type of star, which cannot be used anywhere due to its invalid Age.
Now, we are ready to create the Red Giant System. We need to have 1 star object for this system. We can leave the 4 attributes to Any, and set the Specific Stellar Obj Name to Star Red Giant. This will cause the system types to always have a red giant star. Here is a sample partial entry:
Name := Red Giant System Description := An old star system where the star has entered the red giant stage of its life. ... Obj 1 Physical Type := Star Obj 1 Position := Ring 1 Obj 1 Stellar Abil Type := Normal Star Obj 1 Specific Stellar Obj Name := Star Red Giant Obj 1 Size := Any Obj 1 Age := Any Obj 1 Color := Any Obj 1 Luminosity := Any
The last step is to add the new Red Giant System to all of the quadrants in QuadrantTypes.txt.