Q of the Week

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
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?

Wed Feb 15, 2012 9:20 am

How exactly does <FillLocations> work?
I'm not sure if it has been documented enough.
For example, what does separateEnemies and stationCriteria do?
Do we have a list of all stations and their "alignment" in the fire/water/air/earth scheme?
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: 2979
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Thu Feb 16, 2012 12:20 am

RPC wrote:How exactly does <FillLocations> work?
I'm not sure if it has been documented enough.
For example, what does separateEnemies and stationCriteria do?
Do we have a list of all stations and their "alignment" in the fire/water/air/earth scheme?
A few things that may or may not help:

1. A "location" in this context is a point defined by a <Label> element. For example, if you look at the definition of <DesertWorld> you will see a <Label> element inside an <Orbitals> element. This is basically defining a location in orbit around the desert world. The label (or location) is given certain attributes (in this case, "desert, planet, planetary").

2. The way most systems are defined, we randomly generate the planets, moons, and asteroids first. Each one defines one or more locations with appropriate attributes. The second step is to fill those locations with stations.

3. The <FillLocations> element does the following:

3a. First it figures out how many locations to fill. It does this by figuring out how many labels/locations exist in the system that have NOT yet been filled. Out of this set, it uses the percentFull attribute to figure out how many it should fill. E.g., if percentFull=80, then it fills 80% of the empty locations in the system.

3b. We loop over all locations to fill in random order. For each location, it builds an array of all stationTypes and assigns a probability of the station being in that location. To compute the probability, we use the stationCriteria attribute in <FillLocations>. E.g., "!primary" means that any station with the "primary" attribute has 0 chance of being here (in contrast, "*primary" means that the station MUST have the "primary" attribute to be at the location).

3c. The probability is then adjusted by using the station's levelFrequency and locationCriteria. For example, if the station's levelFrequency says that the station is uncommon at this level, then its probability of appearing in the location will be 1/2 of a station that is common at the level. Similarly, if the station's locationCriteria specifies that it wants to be near asteroids ("++asteroids") and the location does not have the asteroids attribute, then the chance is reduced.

3d. This is also where "separateEnemies" comes in. If set to true, then we exclude stationTypes that are enemies of any stations near the location that we're trying to fill.

3e. Once we've built the probability table, we pick a random station and place it at the location.

4. You can use TransData to get a list of stations with particular attribute. For example, try:

Code: Select all

transdata /encountertable /criteria:"+envFire;"
This is used less as an alignment and more as way to determine which stations/sovereigns like which systems. For example, stations that have the "envFire" attribute have a greater chance of appearing in desert and volcanic systems. Some stationTypes have all the attributes, meaning that they have no preference.

p.s.: If this is helpful, please add to the wiki.

Post Reply