god - enenra/x4modding GitHub Wiki

Overview

This xml determines object, station, and product (production module) spawns at the start of the game. Depending on the modding goal, one may also have to tweak corresponding values in modules.xml and parameters.xml.


Base XML structure

/god/object/object[@id='object_id']

/god/stations/defaults

/god/stations/station[@id='station_id']

/god/stations/products[@id='product_id']


Defaults

/stations/defaults - sets default station placement parameters

Element Attribute comment
/stations/defaults/location newzonechance Chance (0.0 to 1.0) of the god entry to not attempt to be placed in an existing zone and instead create a new zone. No effect if a zone macro is specified.
/stations/defaults/location coreboundaryzoneheight Height range in meters of which new zones are allowed to be placed in the sector at the core boundary. Allowed height range reduces within the core boundary and increases out of it.

Per SirNukes (04/2020): " I tried adding 20 extra zones to each sector manually, to see if god would use them, but it is still complaining about not being able to place stations (actual placement count being unchanged)...okay, I figured it out: when newzonechance triggers, it forces the station to use a new zone or completely fail, and has no fallback to use existing zones, dropping newzonechance to 0 has things being placed now...because it couldn't place a new zone inside of [the] coreboundary" Per DeadAir (06/2020): "it will only put so many stations per zone, and every time it places a station it has a chance to create a new random zone in the sector (based on newzonechance). And it tries to limit where that new zone will be by the coreboundaryzoneheight and core range. If you set new zone chance too low, you may run into errors of god being unable to find a suitable location"

Element Attribute comment
/stations/defaults/location/corerange min/max Default placement range for god objects based on the core of the sector which is based on jumpgates and highways. 0 to 1 is within the core. Values exceeding 1 will place the object beyond the core boundary by that factor
/stations/defaults/location/region allowhazardous allow placement in hazardous regions, default=false
/stations/defaults/location/region allowgravidar Allow or disallow whether spaces containing gravidar affecting regions can be considered for placement if the god entry does not define any gravidar region rules
/stations/defaults/modules production impacts initial station module limit
/stations/defaults/modules storage impacts initial station storage limit
/stations/defaults/quota zone impacts initial number of stations placed per zone?
/stations/defaults/quota zone impacts initial number of stations placed per sector?

Notes

Objects

Element Attribute comment
/god/objects/object id a unique name
/god/objects/object/quota/quotas galaxy total # to spawn, ignoring any global defaults
/god/objects/object/quota/quotas sector/zone out of the total to spawn, how many per sector or zone
/god/objects/object/location galaxy>cluster>sector>zone location to spawn object in
/god/objects/object/location macro location macro; e.g. galaxy_name (i.e. xu_ep2_universe_macro), cluster_#, cluster_#_sector#, or zone#_cluster#_sector#
/god/objects/object/location/corerange min/max Location filter by the range to the sector core which is based on jumpgates and highways. 0 to 1 is within the core. Values exceeding 1 will place the object beyond the core boundary by that factor
/god/objects/object/location/region allowhazardous if true, allows placement in a hazardous region
/god/products/object/position x="" y="" z="" used if one wants to specify specific coordinates
/god/products/object/object macro macro reference for object type, e.g. "wormhole_v1_macro"

Stations

Element Attribute comment
/god/stations/station id a unique name
/god/stations/station owner faction or player
/god/stations/station race faction
/god/stations/station type factory
/god/stations/station/quota/quotas galaxy total # to spawn
/god/stations/station/quota/quotas sector/zone out of the total to spawn, how many per sector or zone
/god/stations/station/location galaxy>cluster>sector>zone location to spawn object in
/god/stations/station/location macro location macro; e.g. galaxy_name (i.e. xu_ep2_universe_macro), cluster_#, cluster_#_sector#, or zone#_cluster#_sector#
/god/stations/station/location faction faction - note: not recommended to use this, relation, and comparison unless you have a specific reason to. these values require the faction to have ownership of the sector, which may not be the case at the point the station tries to load in.
/god/stations/station/location relation need description
/god/stations/station/location comparison need description
/god/stations/station/location matchextension Only use locations for the corresponding extension (default is true - base game locations for base game god entries, locations defined in the same extension for god entries defined in an extension); if true, the god entry only puts stations in the sectors of the mod the god entry belongs to? review description
/god/stations/station/location/region corerange min/max
/god/stations/station/location/region allowhazardous if true, allows placement in a hazardous region
/god/stations/station/location/region allowgravidar Allow whether object can be placed within a gravidar limiting region but not necessarily at an effecting position. Defaults to the value defined in defaults/locations/region
/god/stations/station/position x="" y="" z="" used if one wants to specify specific coordinates for the spawn
/god/stations/station/station macro used in vanilla god.xml, used for some specific Xenon and Khaak spawns
/god/stations/station/station/select/level exact needs verification: The percentage level to which this station should be fitted out with randomly generated equipment. Given as a float between 0 and 1.
/god/stations/station/station/select/variation exact needs verification: The variation in level (ignored if level not supplied). Given as a float between 0 and 1 (uses default from parameters if not supplied).

Products

Element Attribute comment
/god/products/product id a unique name
/god/products/product owner faction or player
/god/products/product race faction
/god/products/product type factory
/god/products/product/quota/quotas galaxy total # of production modules to spawn
/god/products/product/quota/quotas sector/zone out of the total to spawn, how many per sector or zone
/god/products/product/location galaxy>cluster>sector>zone location to spawn object in
/god/products/product/location macro location macro; e.g. galaxy_name (i.e. xu_ep2_universe_macro), cluster_#, cluster_#_sector#, or zone#_cluster#_sector#
/god/products/product/location/region ware need description
/god/products/product/location/region max The maximum distance the location should be from a region of the specified type.
/god/products/product/location/economy min/max a loadout value that helps partially spawn some modules regardless of allotments set in god.xml and modules.xml
/god/products/product/location/economy maxbound Is the location rejected if its economy level exceeds the 'max' value? If false, location is treated as if it has the 'max' value (defaults to true)
/god/products/product/location/security min/max need verification: minimum and maximum values define the acceptable placement range in locations matching an economy value within that range
/god/products/product/position x="" y="" z="" used if one wants to specify specific coordinates for the spawn
/god/products/product/module/select ware specify ware, e.g. "quantumtubes"
/god/products/product/module/select race faction

Examples


<object id="tharkascascade_anomaly_01">
  <quotas>
    <quota galaxy="1" />
  </quotas>
  <location class="sector" macro="cluster_32_sector001_macro">
    <corerange min="1.2" max="1.6" />
    <region allowhazardous="true"/>
  </location>
  <object macro="wormhole_v1_macro" />
</object>
  • This entry adds one wormhole to Tharka's Cascade XV.
  • allowhazardous is required in this case as this sector has a sector-wide hazard.

<object id="pathtoprofit_anomaly_01">
  <quotas>
    <quota galaxy="1" />
  </quotas>
  <location class="zone" macro="zone001_cluster_05_sector001_macro" />
  <position x="-48574.027" y="-1351.621" z="-6598.546" />
  <object macro="wormhole_v1_macro" />
</object>
  • This adds a wormhole to Path to Profit. Note the difference between location class and macro from the prior example. This entry narrows down the location of the spawn to a zone within the sector. While not necessary, this takes it even further by define a specific position within the zone.
⚠️ **GitHub.com Fallback** ⚠️