Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

bouncing asteroids?

The general place to discuss MOD''ing Freelancer!

Post Tue Aug 21, 2007 4:12 pm

bouncing asteroids?

how do you make asteroids bounce of your ship rather then you bouncing off them? much like in the tng mods

Edited by - Jonesie85 on 8/21/2007 6:24:11 PM

Post Tue Aug 21, 2007 8:29 pm

The asteroids you see in a field are part of the field as a whole, which is why they don't move. There may be a simpler way to do this, but my solution would be to do with those small asteroids that move around, the ones you mine for commodities, to make them bigger.

I haven't tampered with the asteroid fields myself, but first you'll need to swap this part

[DynamicAsteroids
asteroid = DAsteroid_mineable_small1 <----- this will need to be one of the large asteroids
count = 12 < ----- Must be something to do with the amount of asteroids
placement_radius = 150.000000
placement_offset = 90.000000
max_velocity = 10.000000 <------ This would make the asteroids faster, I think
max_angular_velocity = 3.000000 < ------ same with this
color_shift = 1.000000, 1.000000, 1.000000

Then you'll need to do the opposite with the other, solid asterois. Either make them a blank asteroid or a small asteroid

[AsteroidBillboards
count = 400
start_dist = 1000
fade_dist_percent = 0.350000
shape = mine_rock_tri
color_shift = 0.800000, 0.800000, 0.800000
ambient_intensity = 1.000000
size = 60, 120

I think this is the entry?

Anyway, hope I've been helpful even if those weren't the right entrys.

Post Wed Aug 22, 2007 12:27 am

Doesn't TNG just dispense with normal asteroid entries and keep the dynamic entries instead?

Essentially they're normal asteroid fields, but with all the big static ones removed, and only the small dynamic ones left.

You should be able to make changes to make the dynamic ones bigger in that case though, and have proper sized asteroids moving about, but never personally tried it.

Post Sat Aug 25, 2007 3:11 pm

Indeed, TNG is a bit of a hack job with the asteroid fields and just replaces the existing DynamicAsteroid type with only one large asteroid type. If my memory serves me correctly, fields with mines weren't even edited.
If you've got the time, you can convert every asteroid field to dynamic asteroids without changing the actual look of the field at all (FL supports multiple [DynamicAsteroid sections per asteroid field).
For example, here's the Badlands from my Flak mod. I wouldn't use this code directly as it probably wouldn't work with your mod, and I'm assuming you have basic knowledge of how fields work:

[TexturePanels
file = solar\asteroids\rock_shapes.ini

[Field
;cube_size = 355 ;<-This doesn't matter, no real asteroids under [cube
;fill_dist = 1250 ;<-Nor does this matter
tint_field = 15, 15, 15
max_alpha = 1.000000
;empty_cube_frequency = 0.200000 ;Or this

[properties
flag = badland_danger_objects
flag = danger_density_low

[Exclusion Zones
exclusion = Zone_Li01_badlands_low_density_asteroids
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01_to_Li04_hole
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01_Benford_to_Iw03_gate
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01_Tradelane_20
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01_013_Station_Li01_05
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01_012_Station_Li01_04
exclude_dynamic_asteroids = 1
exclusion = zone_Li01_Jumpgate_to_Iw03
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01_Badlands_exclusion_asteroids_01
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01_12_exclusion
exclude_dynamic_asteroids = 1
exclusion = ZONE_Li01_vignette27_exclusion
exclude_dynamic_asteroids = 1
exclusion = ZONE_Li01_vignette28_exclusion
exclude_dynamic_asteroids = 1
exclusion = ZONE_Li01_vignette53_exclusion
exclude_dynamic_asteroids = 1
exclusion = ZONE_Li01_vignette60_exclusion
exclude_dynamic_asteroids = 1
exclusion = Zone_Li01a_to_Li01b_hole
exclude_dynamic_asteroids = 1

[DynamicAsteroids
asteroid = badlands_large1
count = 20
placement_radius = 1500.000000
placement_offset = 0.000000
max_velocity = 0.000000
max_angular_velocity = 0.300000
color_shift = 1.000000, 1.000000, 1.000000

[DynamicAsteroids
asteroid = badlands_medium2
count = 20
placement_radius = 1500.000000
placement_offset = 0.000000
max_velocity = 0.000000
max_angular_velocity = 0.300000
color_shift = 1.000000, 1.000000, 1.000000

[DynamicAsteroids
asteroid = badlands_small1
count = 20
placement_radius = 1500.000000
placement_offset = 0.000000
max_velocity = 0.000000
max_angular_velocity = 0.300000
color_shift = 1.000000, 1.000000, 1.000000

[Cube

[DynamicAsteroids
asteroid = dasteroid_badlands_small1
count = 10
placement_radius = 200 ;200.000000
placement_offset = 0 ;150.000000
max_velocity = 50.000000
max_angular_velocity = 3.000000
color_shift = 1.000000, 1.000000, 1.000000

As you can see, I simply took every asteroid type line from the [Cube section and put each one in its own [DynamicAsteroid section, which Freelancer is completely happy with. This requires you to change asteroidarch.ini though, but the edit there is extremely simple; just change [Asteroid to [DynamicAsteroid for the asteroids in question.

Mines, however, are a different story, as they no longer explode on collision when in Dynamic form (but do explode and cause damage when shot, but that wasn't enough for me). I ended up setting up my asteroid fields with mines in them like this:

[TexturePanels
file = solar\asteroids\rock_shapes.ini

[Field
cube_size = 1000 ;400 ;<-Notice how these are needed now, because I still have mines under [cube
fill_dist = 5000 ;1650 ;<-Same here
tint_field = 255, 255, 255
;empty_cube_frequency = 0.600000 ;<-FL does not support empty_cube_frequency with mines. If you did put empty cubes in a mined field, the spots where mines would normally be will still hurt you; only with no visual effect, which can be pretty annoying.

[Exclusion Zones
exclusion = Zone_Br05_05
exclude_dynamic_asteroids = 1

[properties
flag = rock_objects
flag = Object_density_med
flag = DANGER_DENSITY_MED

[DynamicAsteroids
asteroid = mineable2_asteroid30
count = 20
placement_radius = 1500.000000
placement_offset = 0.000000
max_velocity = 0.000000
max_angular_velocity = 0.300000
color_shift = 1.000000, 1.000000, 1.000000

[DynamicAsteroids
asteroid = mineable2_asteroid60
count = 20
placement_radius = 1500.000000
placement_offset = 0.000000
max_velocity = 0.000000
max_angular_velocity = 0.300000
color_shift = 1.000000, 1.000000, 1.000000

[DynamicAsteroids
asteroid = mineable2_asteroid60
count = 20
placement_radius = 1500.000000
placement_offset = 0.000000
max_velocity = 0.000000
max_angular_velocity = 0.300000
color_shift = 1.000000, 1.000000, 1.000000

[Cube
asteroid = mine_spike_mineable, -0.200000, -0.100000, -0.600000, 105, 160, 25, mine
asteroid = mine_spike_mineable, 0.500000, -0.200000, -0.600000, 75, 30, 70, mine
asteroid = mine_spike_mineable, -0.900000, 0.600000, -0.800000, 75, 30, 70, mine

[Band
render_parts = 6
shape = asteroid_belt_04
height = 3000
offset_dist = 2000
fade = 1.000000, 1.350000, 15, 17
texture_aspect = 1.000000
color_shift = 0.800000, 0.800000, 0.800000
ambient_intensity = 1.000000
vert_increase = 2

[AsteroidBillboards
count = 1000 ;400
start_dist = 2500 ;1000
fade_dist_percent = 0.5 ;0.350000
shape = mine_rock_tri
color_shift = 0.700000, 0.700000, 0.700000
ambient_intensity = 1.000000
size = 60, 70

[DynamicAsteroids
asteroid = DAsteroid_gold
count = 10
placement_radius = 200 ;150.000000
placement_offset = 0 ;90.000000
max_velocity = 15.000000
max_angular_velocity = 3.000000
color_shift = 1.000000, 1.000000, 1.000000

[LootableZone
asteroid_loot_container = lootcrate_ast_loot_gold
asteroid_loot_commodity = commodity_gold
dynamic_loot_container = lootcrate_ast_loot_gold
dynamic_loot_commodity = commodity_gold
asteroid_loot_count = 0, 0
dynamic_loot_count = 1, 10 ;1, 1
asteroid_loot_difficulty = 3 ;40
dynamic_loot_difficulty = 3 ;2

Notice how only mine archetypes are kept under [cube section. Doesn't this defeat the purpose of a bouncy-asteroid field? Normally, yes, however just toss "phantom_physics = true" on the mine in asteroidarch.ini so if you were to take a Capital Ship through this asteroid field, the only problem you'd have would be damage, but no bouncing around. For example:

[Asteroid
nickname = mine_spike_mineable
DA_archetype = solar\asteroids\models\mine_spike_mineable.3db
material_library = solar\ast_mineable.mat
explosion_arch = explosion_large_mine3
detect_radius = 80
explosion_offset = 0
recharge_time = 2.000000
explosion_impulse = 6500
phantom_physics = true

Hope this is handy in some way. I have implemented this style for every field in Freelancer for my mod, and so far the result is beautiful and bug-free. The only real un-professional aspect of this is that asteroids bounce off any ship, even fighters, regardless of mass (set your fighter to 0.1 mass, still push asteroids around no problem).

Edited by - fox Unit 01 on 8/25/2007 4:17:28 PM

Post Sat Aug 25, 2007 6:10 pm

did you try reducing total fighter engine force/drag? i have been using much smaller numbers (8k-11k as opposed to 48k) for fighter force/drag (wrote a xml script to tweak it on the fly as i go) and i find that the asteroids have a proportionately greater effect on fighters when the stats are deflated.

Post Tue Aug 28, 2007 10:25 pm

Yeah, my engine force / drag for Light Fighters is 12000 / 150 on average (drag varies slightly for each house's class engine, but only by 25% at most)

Using 0.1 mass is no joke; for some reason, normal engines will put you easily over 1000m/sec or so, and cruise, no matter what speed it's set at, will throw you to max velocity (by default 2500, in this case my Patriot was flying at 10000 lol). I think the acceleration engine in the physics just freaks out. I'll try it using fractional force/drag though.

Return to Freelancer General Editing Forum