Author: Unknown
Dynamic asteroid fields require editing 4 separate files.
Solar\Asteroidarch.ini
Solar\Asteroids\Asteroid_field_name.ini
The system file you will place the field.
...and the hidden secret, FX\Explosions.ini
1. Asteroidarch.ini.
You will use the dynamic asteroid function to create the field. So you first make new archetypes for dynamic asteroids, but using larger 3dbs for the visual.
Code example:
[DynamicAsteroid]
nickname = DAsteroid_rock_10;<--- new name for the asteroid field file
DA_archetype = solar\asteroids\models\ast_rock_10.3db;<--3db found in the asteroids\models directory
material_library = solar\ast_rock.mat;<---corrensponding MAT file
explosion_arch = Explosion_DAsteroid_rock_10;<---custom explosion for the asteroid. You will need a custom explosion for every single dynamic asteroid archetype you make!
2. Asteroid_field.ini
Make a new field, and get rid of the cube, billboards and band sections. Also remove any loot sections, as the asteroids are supposed to be indestructible, not popping apart like balloons!
Example:
[TexturePanels]
file = solar\asteroids\rock_shapes.ini
[Field]
cube_size = 1000<--
fill_dist = 1<--only used for the cube section, so this these two are unimportant actually
diffuse_color = 255, 255, 255
ambient_color = 1, 1, 1
ambient_increase = 0, 0, 0
empty_cube_frequency = 0.400000<-- this does not matter, either
[properties]
flag = rock_objects
flag = object_density_high
[DynamicAsteroids]
asteroid = DAsteroid_rock_10<--our new DynamicAsteriod archetype
count = 100<--number of asteroids of that type to be generated at once
placement_radius = 5000.000000;<-- area around you in which they exist.
placement_offset = 0;<-- Just leave it zero, worked best for me
max_velocity = 100.000000<--self-explaining
max_angular_velocity = 1.000000<-- too
color_shift = 1.000000, 1.000000, 1.000000
3. Now build that field into a system
[Asteroids]
file = solar\asteroids\custom_asteroid_field01.ini;<---name of the file for the field created above
zone = Zone_Custom_Asteroid_Field01;<--name of the zone in the system, featuring the field
(...)
[zone]
nickname = Zone_Custom_Asteroid_Field01
pos = 0, 0, 0
shape = SPHERE
size = 20000
property_flags = 68
visit = 0
density = 10
sort = 1
interference = 0.500000
pop_type = nonlootable_ast_field
Defines asteroid field properties like position, shape and size, sensor efficiency reduced and appearance on the map, as usual.
4. Now the part that is the key to making them asteroids indestructible!
EXPLOSIONS.INI!
[Debris]
nickname = debris_explosion_DAsteroid_rock_10;<--debris type definition
death_method = vanishing
lifetime = 0, 0;<--lifetime 0, 0 makes the debris not disappear at all!
linear_drag = 0
angular_drag = 10, 10, 10;<--reduces spinning. For larger asteroid 3dbs you should set this higher
[explosion]
nickname = Explosion_DAsteroid_rock_10;<---the explosion archetype name from the first paragraph
lifetime = 0.000000, 0.000000
process = NONE;<-- all dynamic asteroids must use an explosion with process=none.
debris_impulse = 0;<--leave at zero
debris_type = debris_explosion_DAsteroid_rock_10, 1
innards_debris_start_time = 0.000000
innards_debris_num = 1
innards_debris_radius = 1
innards_debris_object = simple_explosion_DAsteroid_rock_10
[Simple]
nickname = simple_explosion_DAsteroid_rock_10<;--the appearance of the asteroid after you shot it is set here!*
DA_archetype = solar\asteroids\models\ast_rock_10.3db
material_library = solar\ast_rock.mat
Look carefully at the code. What does it do? When you shoot the asteroid, it is destroyed and triggers the explosion defined in asteroid_arch.ini. That explosion however, has no visual or sound effect, and just creates one single debris object with an unlimited lifetime. And that single debris object...
"DA_archetype = solar\asteroids\models\ast_rock_10.3db
material_library = solar\ast_rock.mat"
...has the very same appearance as the original asteroid!
That's the whole trick.
If you want to have different asteroid meshes, just overlay several fields over each other, all using a different dynamic asteroid (cut down the individual count then to save performance), each with its own archetype and explosion and simple_archetype. They can share the same debris_type, however.
Be warned, above 8 of those fields overlaying, Freelancer can't properly load the system, or it just takes ages to do so. I tried putting more and more fields with lots of different asteroids on top of each other, until that problem occurred. Removing one field again solved it, no matter which one it is.