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

Destroyable asteroids - possible?

The general place to discuss MOD''ing Freelancer!

Post Fri May 23, 2003 9:17 pm

Destroyable asteroids - possible?

I've been trying to make the large asteroids and debris destroyable, so far with no luck. Here's what I have found/modified:

Asteroids and debris have entries in both solararch.ini and asteroidarch.ini. The ones in solararch.ini are more detailed (asteroidarch.ini only has DA_archetype, material_library, and explosion data) but the "nickname =" entries between the two files aren't the same, almost as if they're unrelated.

The various ini files in DATA\SOLAR\ASTEROIDS have "Cube" fields that mention the nicknames in asteroidarch.ini, but not the ones from solararch.ini. They also have "asteroid_loot_container", "asteroid_loot_commodity", "asteroid_loot_count", and "asteroid_loot_difficulty" in the "LootableZone" fields

In solararch.ini, I tried lowering the hit_pts of each asteroid/debris entry to reasonable levels (around 6000), adding "destructible = true" lines, and adding "explosion_arch = dast_asteroid_explosion" lines. I also added the explosion_arch lines to the entries in asteroidarch.ini.

What I have not tried yet is adding "fuse =" entries (from the "fuse*.ini" files in the DATA\FX folder). Some fuses have "destroy_hp_attachment" or "drop_cargo" parts, but they require the use of hardpoints, and I haven't seen any hardpoints in the asteroids' 3db files. I can try adding hardpoints to the 3db files and creating asteroid loadouts in DATA\SOLAR\loadouts.ini that include "cargo =" entries, but I don't want to do all that if an easier method is possible.

Anyone have any suggestions?

Post Thu May 29, 2003 2:16 am

Very good idea, always hated large chunks.....

I would say just add some new hardpoints. It might take some work but, it will be worth it.

Dont mistake Santa for Santa Claus
()xxxxxxx{}:::::::::::::::::::::>

Post Thu May 29, 2003 2:23 am

Thats an excellent idea. No longer will the battleship play the ping pong ball in an asteroid field.

Post Thu May 29, 2003 2:25 am

Amen to that.....

U could just take the turrets and carve yourself a path!!!

Dont mistake Santa for Santa Claus
()xxxxxxx{}:::::::::::::::::::::>

Post Thu May 29, 2003 4:47 am

OK, it's settled then. I'll try adding hardpoints for cargo to some asteroids, and figure out how to make a fuse (in fuse.ini, in the DATA\FX folder) that destroys the hardpoints, turns what was on the hardpoints into loot, and destroys the asteroid. I wanted to see how the dynamic asteroids (little chunks that can be blasted) work and possibly port that function to the big asteroids, but whatever makes the dynamic asteroids destroyable is apparently hard-coded.

By the way, in case you're wondering, here's what the command that destroys hardpoints in the fuse.ini files looks like:

[destroy_hp_attachment
at_t = 0.000000, 1.000000 <---???
hardpoint = random <---replace with specific hardpoints if you prefer
fate = loot <---what the item attached to the hardpoint turns into

I noticed that many destroy_hp_attachment entries had the "fate" set to "debris". When I changed them to "fate = loot", the amount of lootable items left over after a ship explodes seemed to increase a bit.

Post Thu May 29, 2003 6:01 pm

I still haven't figured it out. I've been experimenting with the "debris_large01", "debris_xlarge01", "debris_med01", and "debris_med02" entities in solararch.ini, so far the only conclusion I could make is that whatever asteroids are (or, in this case, the stationary chunks of metal in the debris fields), they aren't defined in solararch.ini.

Here is what I tried so far:
- lowering the hit_pts
- adding "destructible = true"
- adding "explosion_arch = dast_asteroid_explosion"
- changing the "type = " to a known destroyable object
- adding "fuse = death_comm"
- added HpMount hardpoints (complete with Position and Orientation, with proper tree structure) to the debriszone*.3db files with UTF editor
- created loadouts like this one:
[Loadout
nickname = debris_large_loadout
cargo = commodity_scrap_metal, 500, HpMount
- added the "loadout = " lines like:
loadout = debris_large_loadout

I'll keep experimenting, I just wanted to mention that solararch.ini is apparently the wrong place to look.

Where the heck are the dynamic asteroids defined... I can find them in a few ini files, but so far I can't see anything they have that is really different from the big asteroids. Perhaps someone else might have better luck.

Post Thu May 29, 2003 6:01 pm

Did your solution work?? I was going to suggest looking at the info for the small explodable ones, but you already did that. Some of the recent large mods are making bases and whatnot destructable, perhaps the modders have some ideas.

I am very interested in your modification, and so would everyone else be if it works.
Can this be made into a mod for use with FLMM? If not, could you provide a summary of what to do?

Much appreciated
************************************************

Get right with God; one day you are going to meet Him.

Post Thu May 29, 2003 8:10 pm

yes please, i'm tired of going 400 in regular thrust and bouncing off of asteroids.....plus it would be fun in dogfights in asteriods ^_^ adding more realism.

Heretic

Post Thu May 29, 2003 11:03 pm


Did your solution work?? I was going to suggest looking at the info for the small explodable ones, but you already did that. Some of the recent large mods are making bases and whatnot destructable, perhaps the modders have some ideas.I am very interested in your modification, and so would everyone else be if it works.
Can this be made into a mod for use with FLMM? If not, could you provide a summary of what to do?


Wow, you posted at the exact same time as my previous update. ^_^

My solution didn't work. Adding hardpoints and setting loadouts doesn't do anything with the asteroids. Could mean the asteroids and debris in solararch.ini aren't used, or I'm just editing the wrong things.

As I said before, someone else might have better luck finding the right entry in the right ini file. I'll keep trying of course, but I'm saying that if anyone else wants to try figuring out how to make the big asteroids destroyable, go ahead. The more modders who work on this, the better.

As for making a mod (if I do find something), I'm not quite sure how to that yet, tho I can try. Most of my mods so far have been directly editing the ini files with Notepad and Wordpad, and editing the infocard dlls with FLEd-Ids.

Post Fri May 30, 2003 2:00 am

Could be that it uses a different settings from that which we are used to, debris fields are placed based on a field setting in the ini's if i remember correctly. Would it be possible to replace the field type with a custom asteroid and tell the system to treat it like a ship? Its a bit vague now but i'm going to take a closer look at it later.

Post Fri May 30, 2003 4:08 am

Still nothing. After looking through universe.ini in DATA\UNIVERSE and the field ini files in DATA\SOLAR\ASTEROIDS, I found references to the entries in asteroidarch.ini. Adding hit_pts and "destroyable = true" to each Asteroid in that ini did nothing, and changing each Asteroid to DynamicAsteroid just crashes the game.

The key might be in the field inis in DATA\SOLAR\ASTEROIDS. I noticed that in the field inis , the asteroids appear to be defined under "Cube", like this (from br01_southampton_debris_field.ini):

[Cube
asteroid = debris_med1, -0.700000, 0.300000, 0.200000, 0, 20, 190 <---I see the Asteroid asteroidarch.ini reference, but what are the numbers for??
asteroid = debris_large1, 0.200000, 0.800000, 0.300000, 45, 20, 0
asteroid = debris_large3, 0.400000, -0.700000, -0.200000, 15, 90, 120
asteroid = debris_med2, -0.300000, -0.300000, 0.800000, 85, 0, 185
asteroid = debris_large1, -0.200000, -0.100000, -0.600000, 105, 160, 25
asteroid = debris_small2, 0.000000, -0.900000, -0.800000, 35, 110, 60

while the dynamic asteroids are defined under "DynamicAsteroids", with very different parameters:

[DynamicAsteroids
asteroid = dasteroid_debris_small1 <---DynamicAsteroid asteroidarch.ini reference
count = 20 <---max number that can be in visual range at once. Increase this to get more of them (duh), just be careful not to slow down the game
placement_radius = 150.000000 <---how close they have to be before they appear?
placement_offset = 90.000000 <---how far apart they appear?
max_velocity = 5 <---how fast they can go
max_angular_velocity = 2.000000 <---how fast they can turn?
color_shift = 0.900000, 0.900000, 1.000000 <---adds color variety?

And at the end of the field inis for mineable zones is the really confusing "LootableZone": there are entries for both asteroids and dynamic asteroids, but only the dynamic_* entries appear to be used.

[LootableZone
asteroid_loot_container = lootcrate_ast_loot_metal <---??!!
asteroid_loot_commodity = commodity_scrap_metal <---??!!
dynamic_loot_container = lootcrate_ast_loot_metal <---what loot container appears after dynamic asteroid is blown up
dynamic_loot_commodity = commodity_scrap_metal <---what's in the loot containers left by dynamic asteroids
asteroid_loot_count = 1, 1 <---??!!
dynamic_loot_count = 1, 1 <---first number, ??; second number, how much of dynamic_loot_commodity you get in each dynamic_loot_container (increase this to make the little rocks really profitable, if you have the cargo space)
asteroid_loot_difficulty = 1 <---??!!
dynamic_loot_difficulty = 1 <---?

(??!! = unimplemented???)

There is another place to look that I haven't tried yet... in the DLLs (or worse, in the game EXEs themselves). I'm not sure how to look in those files, other than opening them up in a hex editor. I do have Micro$oft Visual Studio 6, though I don't know how to use any of the tools; if there's a tool in that software package that can aid in searching the DLLs, please let me know how to use it.

I just thought of another alternative... what if we replace the DA_archetype entries in the asteroidarch.ini's DynamicAsteroids with ones that point to the 3db files used by the bigger Asteroids? There will still be the stationary, indestructible rocks and debris, but at least the floating blastable rocks will be bigger.

Post Fri May 30, 2003 5:43 pm

I don't know much about moding at all, but I will spray my ideas anyway.

Maybe you can make the small destroyable asteroids really large.
This would make it necessary to remove the large ones from the map.

Maybe the reason you can't make the\ large ones destroyable is that the program might be considering the large asteroids as an unalterable part of the terrain. Like a planet. I hear you can add planets, so maybe you can subtract asteroids and replace them with modified small asteroids that appear big.

Also, it seems to me that the small asteroids are generated around the ship and not there until a ship is close.

Modifying the small ones if possible would probably require changing several of there features to make them more real. Like mass so they don't bounce off the ship as easily, and they would have to blow up if hitting the ship too hard. Also, when you blow them up, they come back. It might be necessary to change there regeneration rate and density.

Just an idea.

Ed Martin - Regulator

Post Fri May 30, 2003 7:16 pm


I don't know much about moding at all, but I will spray my ideas anyway.Maybe you can make the small destroyable asteroids really large.
This would make it necessary to remove the large ones from the map.
Maybe the reason you can't make the\ large ones destroyable is that the program might be considering the large asteroids as an unalterable part of the terrain. Like a planet. I hear you can add planets, so maybe you can subtract asteroids and replace them with modified small asteroids that appear big.
Also, it seems to me that the small asteroids are generated around the ship and not there until a ship is close.
Modifying the small ones if possible would probably require changing several of there features to make them more real. Like mass so they don't bounce off the ship as easily, and they would have to blow up if hitting the ship too hard. Also, when you blow them up, they come back. It might be necessary to change there regeneration rate and density.


I just tried your idea, and it seems to work, at least a little bit. This time I experimented with the lava asteroids in the Schwefelwolke Lava Field (the diamond-rich field in Dresden).

First, I tried commenting out the 3db file referenced by the "DAsteroid_lava02" dynamic asteroid in asteroidarch.ini and replaced it with the 3db file for the "lava02_asteroid90" asteroid. The dynamic asteroids in the Schwefelwolke field were no longer little rocks, but HUGE rocks that crowded around the ship.

To fix the crowding problem, I changed the "placement_radius" in the rh05_schwefelwolke_lavafield.ini file's "DynamicAsteroids" field to something a bit farther. This made the enlarged dynamic asteroids appear farther away, no longer crowding around the ship.

I then restored DAsteroid_lava02 in asteroidarch.ini to its original state (correct 3db file reference) and created a new DynamicAsteroid, "DAsteroid_lava02_big", that used the big asteroid 3db. I went back into rh05_schwefelwolke_lavafield.ini and created a new DynamicAsteroids field for the new DAsteroid_lava02_big and restored the old DynamicAsteroids field to normal. And when I loaded the game and explored the field, both of the dynamic asteroids were there!

Finally, I went into rh05_schwefelwolke_lavafield.ini again and commented out the entire "Cube" section. I loaded the game, went into the field, and there were no more stationary, indestructible asteroids; just the dynamic asteroids, big and small.

In summary, if we can't make the big asteroids (defined as "Asteroid" in asteroidarch.ini) destructible, just get rid of them and create bigger DynamicAsteroid objects, and include as many of them as you want in an asteroid field by using multiple DynamicAsteroids entries in each asteroid field ini

There are two problems with all this, though; I still don't know how to change the hit_pts of dynamic asteroids, so shooting at the big ones has the feel of "popping balloons". Also, I haven't figured out how to make the bigger dynamic asteroids cough up more loot; all dynamic asteroids' loot appears to be controlled by the LootableZone field in the asteroid field ini files.

Here's what my new DAsteroid_lava02_big in asteroidarch.ini looks like:

[DynamicAsteroid
nickname = DAsteroid_lava02_big
DA_archetype = solar\asteroids\models\ast_lava02_90.3db <--huge lava asteroid 3db
material_library = solar\ast_lava.mat <--material/texture (no need to modify)
explosion_arch = dast_asteroid_explosion <--replace with a different (bigger) explosion effect if you want, I just didn't change mine
particle_effect = gf_dynamiclavaast <--lava particle effect?

And here's what the new DynamicAsteroids entry in rh05_schwefelwolke_lavafield.ini looks like:

[DynamicAsteroids
asteroid = DAsteroid_lava02_big <---new DynamicAsteroid ref
count = 120 <---higher count than normal (increase or decrease to control field density)
placement_radius = 1500.000000 <---farther placement radius
placement_offset = 90.000000
max_velocity = 100.000000 <---faster velocity
max_angular_velocity = 0.500000 <---slower turning
color_shift = 1, 0.500000, 0

You can create additional entries for dynamic asteroids in asteroidarch.ini and each asteroid field's ini file to add variety. Just remember to comment out the Cube fields to get rid of the indestructible rocks.

Post Fri May 30, 2003 8:52 pm

Wow! That's cool. I am glad my idea wasn't totally stupid.

Another thing that might need to be changed, which I am sure you know, is the way they effect your ship when you hit them. Like the asteroid weight. The bigger they are the more they should bump/damage your ship. You don't want huge rocks bouncing off like balloons too. Is this what the Max_Angular_Velocity change is for?

Maybe you could make some of them nearly stationary, Especially big ones and some medium rocks flowing through bumping into the nearly stationary ones.

Can you make totally different looking asteroids too? If you could make them rigid like the indestructable ones with flat sides that would make them even more like the indestructible ones that you have been working on. Not that you need to design a bunch of them, but info others to try out.

Concluding my longwinded comment, I guess the main problems that have to be dealt with, like you said, are the hitpoints and the loot capacity. It would be kinda sucky if you felt like you were popping bubbles or had a huge rock that took 5-10 seconds of shooting to detroy and all you got was 1 Diamond. etc.

Post Fri May 30, 2003 11:15 pm


Wow! That's cool. I am glad my idea wasn't totally stupid.Another thing that might need to be changed, which I am sure you know, is the way they effect your ship when you hit them. Like the asteroid weight. The bigger they are the more they should bump/damage your ship. You don't want huge rocks bouncing off like balloons too.


I'll see if it's possible to add mass to dynamic asteroids, but I doubt it if hit_pts can't be added.


Is this what the Max_Angular_Velocity change is for?


The Max_Angular_Velocity determines how fast the asteroids spin when they first appear. It doesn't determine what affect they have on your ship, though you can make them spin faster or slower by hitting them at the right angles.


Maybe you could make some of them nearly stationary, Especially big ones and some medium rocks flowing through bumping into the nearly stationary ones.


Just change the Max_velocity and Max_angular_velocity to zero. I think.


Can you make totally different looking asteroids too? If you could make them rigid like the indestructable ones with flat sides that would make them even more like the indestructible ones that you have been working on. Not that you need to design a bunch of them, but info others to try out.


Just define different .3db files in new DynamicAsteroid entries in asteroidarch.ini


Concluding my longwinded comment, I guess the main problems that have to be dealt with, like you said, are the hitpoints and the loot capacity. It would be kinda sucky if you felt like you were popping bubbles or had a huge rock that took 5-10 seconds of shooting to detroy and all you got was 1 Diamond. etc.


I agree. It's not much fun shooting the big asteroids if one shot from a Class 1 weapon will make them explode. As for how much loot you get, just increase the dynamic_loot_count in the LootableZone portion of the asteroid field inis. For instance, to increase the amount of loot you get from 1 to 100, just change:
dynamic_loot_count = 1, 1
to
dynamic_loot_count = 1, 100
I'm still not sure what the first number does, but changing the second increases the amount of loot you get from shooting each dynamic asteroid. The loot still appears as a single crystal/debris fragment, but it contains 100 units.


By the way, Integer Man has just released a mod called "Destructable Universe v1.0" that makes the New York Badlands asteroids destructible using the same method I mentioned, and also includes something in the Cube fields of the li01_badlands_asteroids and li01_badlands_low_density_asteroids ini files:

xaxis_rotation = 0, 0, 180, 180
yaxis_rotation = 0, 30, 90, 195
zaxis_rotation = 0, 0, 180, 180

I haven't tried out the mod yet, so I'm not totally sure what those lines do, but I think they might add variety to the orientation of the asteroids (keeps them from all being aligned in the same direction).

Return to Freelancer General Editing Forum