Example XML configuration file
This is an example configuration file for the Bylen ring in the Perdiso system, with asteroids dense enough to bring many systems to their knees. You will likely want a lower density than this.
Global options
The below options are generally configured globally in the ringDefaults.xml file, but can be overridden per planet.
Per-planet options
The below options are configured per-planet. At the moment only one ring is support per planet (though zones can be used to divide it into sub-rings, as is done with the Bylen ring in the Ares at War system).
Ring zones
A ring can be split into zones – e.g. gaps can be carved out of rings, or zones with different heights, densities, or size makeups can be created.
Predefined defaults
I have created pre-defined defaults for the following planets:
- Bylen (from e.g. Paradise)
- Bylen as it is in Ares at War part 2/3
- Demus
The ring around this planet has an inclination of slightly less than 22.5 degrees, crossing the equator slightly off the X axis.
The ring texture also suggests an area of lower density
Zone 1:
The ring around this planet has zero inclination (it is on the planet’s equator), and has two notable gaps.
Zone 1:
Zone 2:
Zone 3:
The ring around this planet is a smaller version of the one around Bylen.
More detail on various parameters
Some ring parameters probably deserve a more detailed description.
This mod measures distances in metres and angles in degrees.
The planet radius, if defined in the ring configuration, is the radius for which the inner radius, outer radius, ring height, and sector size are defined. If the actual planet’s radius is different, then these will be scaled accordingly.
The inner and outer radii of a ring are simply the distance of the inner and outer edges of the ring from the centre of the planet in metres.
Conversely, the inner and outer radii of a ring zone are the distance of the inner and outer edges of the zone from the centre of the planet in metres.
The ring height is the distance between the ring’s centre plane and its upper and lower bounds in metres. Therefore a ring height of 3500 means that the upper and lower bounds of the ring are 3.5km from its centre plane, or the ring is 7km thick.
The inclination of a ring is the maximum latitude of the path its plane draws on the surface of the planet, while the longitude of ascending node is the longitude where this path crosses the equator (X/Z plane) on the planet going north (Y+). In this instance, zero longitude is taken as where the planet-relative X+ axis comes out of the planet, and longitudes increase in a counter-clockwise direction (as viewed from above the north pole).
The Space Engineers procedural voxel generation has gone through a few changes from its initial early access versions in 2013. In order to prevent drastic changes to asteroids in old saves, Keen has versioned the voxel generation for asteroids. This version number is stored in the VoxelGeneratorVersion element in Sandbox.sbc (with no element being assumed to mean version 0).
In order to be able to select which of these generator versions is used to generate asteroids in rings, separate to the version configured in the world configuration file, the VoxelGeneratorVersion element was added to the ring configuration. Note that specifying non-existent versions could have undefined results (though will probably just cause asteroid generation to fail).
Asteroid generation
You may be wondering how this mod is able to have asteroids that aren’t just nickel and ice (as would be the case with MyAPIGateway.Session.VoxelMaps.CreateProceduralVoxelMap(int, float, MatrixD)) or specify what generator version to use.
This mod uses the MyAPIGateway.Session.VoxelMaps.CreateStorage(byte[]) and MyAPIGateway.Session.VoxelMaps.CreateVoxelMap(string, IMyStorage, Vector3D, long) calls to load in a procedural asteroid file that is created in memory using the given parameters.
Note that unlike the normal procedural generation, where untouched asteroids are not added to the world file or written to disk when the game is saved, the asteroids created by this mod are added the world file and written to disk when the game is saved. Using default values of 50 asteroids per ring sector, this could result in a few thousand asteroids being saved to disk on world save, and being loaded on world load. It can also take a few minutes to generate all of the asteroids within visual range.
At the moment the asteroid generation only checks for other asteroids in the sector, and not grids or players, so it’s possible for generated asteroids to entomb grids or players if added to an existing world.
That’s all we are sharing today in Space Engineers – Planetary Asteroid Rings Configuration Options, if you have anything to add, please feel free to leave a comment below, you can also read the original article here, all the credits goes to the original author Bravada Cadelanne
Related Posts:
- Space Engineers Advanced Automatic Elevator Control Script Guide
- Space Engineers – How to Find Ores (Updated)
- Space Engineers: How to Find Ores Post-Survival Update
- Space Engineers: Block Troubleshooting Guide