Controlling Stations in Systems

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

This is a brief explanation of the way to control how many and what type of stations get placed in a System.

Systems can appear very complex at first glance, and the parts that are controlling stations are buried in a few small elements of the system element structure.

Random systems use a <RandomLocation or <FillLocations element to control all the stations that get built. For unique systems such as Eridani and St. Katharine's, the stations are placed directly in the position they are intended for.

I will explain how to adjust the random systems to build specific stations through modifiers, and hopefully that will help expand your understanding of the way that systems work:

One type of station placement is done like this-

Code: Select all

			<RandomLocation probability="90" locationCriteria="++LifeZone,*planet">
				<RandomStation stationCriteria="*friendly,*primary"/>
			</RandomLocation>
In most systems this sets a station up as the "primary" station. This general selects a CW station such as a DryDock, Fortress or Commonwealth Station. If you look in those stations you will find that attributes="" contains the strings "friendly" and "primary". This enables them to make the stationCriteria. Any stations with the proper criteria are chosen for this placement.

If you alter the criteria to match something else, such as "enemy" and perhaps "myCustomFaction" you would get a list of stations that had those attributes getting placed.

The locationCriteria is referencing the labels in the planet tables, btw.

That only places a single station, and you can add more of these to place more stations, but there is another station placement element to use for more stations, called FillLocations:

Code: Select all

			<FillLocations
					percentFull=		"80" 
					stationCriteria=	"!primary,!debris,+envWater,-envAvoidsWater" 
					percentEnemies=		"65"
					separateEnemies=	"true"
					/>
This places both enemy and friendly stations- notice that you can adjust the percentage there. stationCriteria excludes primary stations and debris ( using a ! ), and in this example places an envWater type station. Find the envType in the station attributes. There are four elemental divisions of the sovereign models for some reason I have never understood. (Why four elements as a model? Isn't that a little archaic and typical of too many games already? Just my opinion, best ignore it.)

Fill Locations place stations up to the percentFull for available labels in the system. separateEnemies allows more than one "enemy" type (again, look in the station attributes and you will find either "friendly" or "enemy" in there.)

You can adjust the percentFull to less to create a less developed system, or you can adjust the percentEnemies to increase the number of enemies.

If you want just one specific kind of enemy to appear, use the stationCriteria to choose the attribute they possess (or add a custom one).

In addition to these, there is a FillLocations for debris in most random systems.
User avatar
Mutos
Militia Lieutenant
Militia Lieutenant
Posts: 218
Joined: Thu Aug 14, 2008 3:31 am
Location: Near Paris, France
Contact:

Hi Periculi,


Thanks for the tuto. Should be of much help for many stellar systems designers !
Fill Locations place stations up to the percentFull for available labels in the system.
About the <FillLocations> tag, what exactly does the percentFull property refers to ? Namely, what is a 100% full system ? Your sentence speaks of "available labels". What are these labels ?
@+

Benoît 'Mutos' ROBIN
Hoshikaze 2250 Project
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

You should take a look in Transcendence.xml, where you will find that the Systems have global tables that define a planet station, they are set up with sometimes moons, and in addition there are <Labels applied that define a position to place a spaceObject according to the criteria in the label. You can put "mutosLabel" in there, or any other custom label as well as the generic labels, and these get chosen for positions according to the criteria that the RandomLocation and FillLocation use.

In short-

<FillLocations and <RandomLocation target <Labels according to criteria which are strings that must be in the label:

Code: Select all

<Label attributes="planet"/>

Code: Select all

locationCriteria="++LifeZone,*planet">
Now within some stations you can see a

Code: Select all

			locationCriteria=	"+planetary,-OuterSystem"
Where the label strings are also used to define where that station will like to be placed. This is what the fill locations uses to determine what gets placed where.

The percentFull is based on the number of Labels in the system, I believe, which generally equates to the number of planets and asteroid groups a system has.

InnerSystem, LifeZone, and OuterSystem are distance from the star that also can determine placement, but they are not used in Labels- you will find them in RandomLocation and station locationCriteria.
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Thanks a LOT Periculi!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

I have a question say you have a table for filling out stations like FriendlyStations. What happens when one of those has a unique= "inSystem" tag? When it is chosen does it just skip over that station? Does it pick a new station? Does it place the station anyway?
Crying is not a proper retort!
Post Reply