Explanation of the new planet designations?

Freeform discussion about anything related to modding Transcendence.
Post Reply
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

It's not in the API changelog so I was just wondering how this worked and if it affects station spawns.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

RPC wrote:It's not in the API changelog so I was just wondering how this worked and if it affects station spawns.
Do you mean the new +isPlanet:true special attribute? If so, then it does NOT affect station spawning.

Spawning uses system macros and labels. For example, if you look at StarSystems.xml you'll see a definition for <AsteroidBeltSystem>. This is a macro used to create an asteroid belt system. The macro defines (randomly) the position of several planets. Under <Orbitals ...> you can see a reference to a "DesertPrimary" macro.

If you look at the definition of the DesertPrimary macro (in Worlds.xml) you'll see that it places two things: a planet (stDesertTerrestrialSizeH) and a label.

A label is a point in space that may hold a station (friendly or enemy). This particular label has certain attributes, including the "planet" attribute, which means that the label is around a planet. When the system is created we may randomly put a station here, preferring stations that want to be around a planet.

In previous versions, the planet object itself (stDesertTerrestrial...) would ALSO have a "planet" attribute. This was useful in case you later wanted to enumerate all the planets in a system. But it turned out that some objects were being used both as planets and moons, so I couldn't put the attribute on the object itself.

Instead, I use a special attribute +isPlanet:true; which matches only if the object is a true planet (orbiting a star).

If you're interested in enumerating objects in the system, then here are a few tips:

1. You can use the special attribute +scale:world; to enumerate all planets, asteroids, and moons in the star system. +scale:star; matches all stars.

2. All worlds (defined in core) have an explicit size (in kilometers). They are split up into size classes:

Code: Select all

								Asteroid			< 1,000 km
						sizeA		Tiny			~ 10 km
						sizeB		Small			~ 50 km
						sizeC		Medium			~ 100 km
						sizeD		Large			~ 500 km

								Planetoid			~ 2,500 km
						sizeE		Small			~ 1,000 km
						sizeF		Medium			~ 2,000	km
						sizeG		Large			~ 4,000 km
		
								Terrestrial			~ 10,000 km
						sizeH		Small			~ 5,000 km
						sizeI		Medium			~ 10,000 km
						sizeJ		Large			~ 20,000 km

								Gas Giant			~ 100,000 km
						sizeK		Small			~ 50,000 km
						sizeL		Medium			~ 100,000 km
						sizeM		Large			~ 200,000 km
3. You can match a specific size class with +sizeClass:H; (for example) to match all sizeH worlds.

4. You can use normal attributes to match sets of classes:

+asteroid; Matches all size A, B, C, D worlds
+planetoid; Matches all size E, F, G worlds
+terrestrial; Matches all size H, I, J worlds
+gasGiant; Matches all size K, L, M worlds.

Hope that helps!

p.s.: If you're looking at this for planet parallax, my goal is still to give you an object property to set the parallax (so you don't have to create dynamic types for everything).
User avatar
LordSutekh
Commonwealth Pilot
Commonwealth Pilot
Posts: 87
Joined: Sat Mar 20, 2010 9:36 pm
Location: Bedlam

There we go. Thanks, George! This is exactly what I was asking about.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

this must go to the wiki :D
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Thanks George :D
I also added this to the wiki.

*edit:
George wrote:p.s.: If you're looking at this for planet parallax, my goal is still to give you an object property to set the parallax (so you don't have to create dynamic types for everything).
Also, I can't thank you enough :3
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Post Reply