Capital Ship Wrecks
-
So I’ve been working on creating capital ship wrecks as we want to replicate vanilla capital fuses. We’re using dummy groups in the .cmp but the collision groups do not spawn damage objects.
Can the engine only spawn debris if is actually part of the ship? Or is it something in my coding?
********SHIPARCH.INI******** [CollisionGroup] obj = debris_zomgbayz01 separable = true debris_type = cap_ship_piece parent_impulse = 0 child_impulse = 10.000000 dmg_obj = m90_wreck_forward dmg_hp = DpWreck01 fuse = mc90_death, 0.000000, 1 mass = 200.000000 hit_pts = 69300 root_health_proxy = true [CollisionGroup] obj = debris_zomgbayz02 separable = true debris_type = cap_ship_piece parent_impulse = 0 child_impulse = 10.000000 dmg_obj = m90_wreck_main dmg_hp = DpWreck02 fuse = mc90_death, 0.000000, 1 mass = 200.000000 hit_pts = 69300 root_health_proxy = true [CollisionGroup] obj = debris_zomgbayz03 separable = true debris_type = cap_ship_piece parent_impulse = 0 child_impulse = 10.000000 dmg_obj = m90_wreck_rear dmg_hp = DpWreck03 fuse = mc90_death, 0.000000, 1 mass = 200.000000 hit_pts = 69300 root_health_proxy = true [Simple] nickname = m90_wreck_forward DA_archetype = TOW\solar\wrecks\mc90\mc90_wreck_forward.3db material_library = TOW\ships\mc90\mc90.mat Mass = 1000 LODranges = 0, 20000 [Simple] nickname = m90_wreck_main DA_archetype = TOW\solar\wrecks\mc90\mc90_wreck_main.3db material_library = TOW\ships\mc90\mc90.mat Mass = 1000 LODranges = 0, 20000 [Simple] nickname = m90_wreck_rear DA_archetype = TOW\solar\wrecks\mc90\mc90_wreck_rear.3db material_library = TOW\ships\mc90\mc90.mat Mass = 1000 LODranges = 0, 20000
The .cmp have the appropriate entries. The .3db are dummy pieces, though.
I have the collision groups attached to our fuse.ini references, too.
-
Sushi, all wrecks are described in the solararch.ini (not shiparch)
as an example, this is one I did for the Osiris a while back
[Solar]
nickname = suprise_or_osiris
type = MISSION_SATELLITE
DA_archetype = ships\order\or_osiris\or_osiris.cmp
material_library = Ships\order\or_ships.mat
LODranges = 0, 600, 800, 1000, 1500, 2000, 3000, 20000
surface_hit_effects = 0, small_hull_hit
mass = 100000.000000
solar_radius = 800
shape_name = NAV_surpriseX
explosion_arch = explosion_instant
hit_pts = 3600
destructible = true
fuse = fuse_suprise_or_osiris, 0.000000, 3601
fuse = fuse_suprise_drop_loot, 0.000000, 3590[CollisionGroup]
obj = osiris_cntrltwr_lod1
separable = true
child_impulse = 0
parent_impulse = 0
debris_type = debris_vanish
dmg_hp = DpCntrltwr
dmg_obj = or_osiris_tower_cap
hit_pts = 15000[CollisionGroup]
obj = osiris_front_lod1
separable = true
child_impulse = 0
parent_impulse = 0
debris_type = debris_vanish
dmg_hp = DpFront
dmg_obj = or_osiris_neck_dmg_cap
hit_pts = 15000[CollisionGroup]
obj = osiris_interior_lod1
separable = true
child_impulse = 0
parent_impulse = 0
debris_type = debris_vanish
dmg_hp = DpNose
dmg_obj = or_osiris_head_dmg_cap
hit_pts = 15000[CollisionGroup]
obj = osiris_nose_lod1
separable = true
child_impulse = 0
parent_impulse = 0
debris_type = debris_vanish
dmg_hp = DpNose
dmg_obj = or_osiris_head_dmg_cap
hit_pts = 15000wrecks then have their fuses described in the fx/fuse_suprise_solar.ini
like so
[fuse]
name = fuse_suprise_or_osiris
lifetime = 0.100000[destroy_group]
group_name = osiris_cntrltwr_lod1
fate = disappear
at_t = 0.100000[destroy_group]
group_name = osiris_front_lod1
fate = disappear
at_t = 0.100000[destroy_group]
group_name = osiris_interior_lod1
fate = disappear
at_t = 0.100000[destroy_group]
group_name = osiris_nose_lod1
fate = disappear
at_t = 0.100000All parts above in [destroy_group] will be removed and replaced by dmg_obj from the solararch
Give it a loadout in solar/loadout.ini, put it in system, use another wreck as a template, make changes as needed and youre done.
Hope that makes sense
Looking at a bit more, the [simple] blocks only seem to be needed in the shiparch.ini
-
So, if I place this only in the solararch, it will still work for player ships? That’s what I am interested in recreating.
I’ll give it a go now and let you know if I’m more successful.
-
Wrecks (and bases) are seperate items, you still have to have your usual entries in shiparch for npc/player ships for them to become flyable. I think solararch only references the [simple] .3db models from shiparch
-
It should reference whatever you define, be it 3db or cmp. It’s always shiparch entries for flyable ships and solararch entries for custom wrecks. I’ve got dead marsfliers and all manner of custom ships defined as wrecks without any problems, even a nice spinning Discovery from 2001 in orbit of my planet Io.
-
Maybe it’s just me but I am a little confused here. I was under the impression Sushi was not talking about Freelancer’s definition of wrecks but instead wrecks as in various ship pieces separating as the ship is destroyed. Everyone here seems to be talking about the Freelancer style wrecks as in the solars that just sit there in space.
-
Why485 wrote:
Maybe it’s just me but I am a little confused here. I was under the impression Sushi was not talking about Freelancer’s definition of wrecks but instead wrecks as in various ship pieces separating as the ship is destroyed. Everyone here seems to be talking about the Freelancer style wrecks as in the solars that just sit there in space.Indeed. Sushi’s speaking of the damage objects you see when you destroy vanilla capitals. The ship visibly breaks up in pieces.
-
Why485 wrote:
Maybe it’s just me but I am a little confused here. I was under the impression Sushi was not talking about Freelancer’s definition of wrecks but instead wrecks as in various ship pieces separating as the ship is destroyed. Everyone here seems to be talking about the Freelancer style wrecks as in the solars that just sit there in space.Aye, that’s what I am talking about.
That being said, thanks for the help so far. I can now get the .3dbs showing up. The problem is that they blow up with the fuse and they don’t move at all, which is what I’m trying to get them to do. This is what it looks like as of now :
<object width=“560” height=“340” id=“lsplayer” classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”><param name=“movie” value=“http://cdn.livestream.com/grid/LSPlayer.swf?channel=fwtow&clip=pla_266388d3-422c-4492-937c-4f4503ed69bf&autoPlay=false&mute=false”><param name=“allowScriptAccess” value=“always”><param name=“allowFullScreen” value=“true”><embed name=“lsplayer” wmode=“transparent” src=“http://cdn.livestream.com/grid/LSPlayer.swf?channel=fwtow&clip=pla_266388d3-422c-4492-937c-4f4503ed69bf&autoPlay=false&mute=false” width=“560” height=“340” allowscriptaccess=“always” allowfullscreen=“true” type=“application/x-shockwave-flash”></object>Watch live streaming video from fwtow at livestream.com
(sorry for the mic, I had it on the wrong settings)
It seems once the death fuse goes, though, the models disappear; that’s why the death fuse is delayed. -
Think we might’ve hit a dead end.
Right now what we do is use dummy groups to link wrecks to them. In this way, we can quickly refactor ships to have wrecks instead of having to split up the model into the appropriate groups.
The problem with that technique is that when the wrecks are created in the fuse through a destroy_group block, the wrecks are added to an otherwise intact main model. Hence, we’d need to also have the main model disappear when all the wrecks are spawned. Unfortunately, using destroy_root destroys all wrecks that were spawned, too, so we’re back to square one.
The only way for this to work would be to somehow “unlink” the created debris from the root so that when destroy_root is called the debris still keep on living for their defined period of time.
-
The most obvious and simplest solution, (and originally what I thought you were doing in the first place) would be to just have the explosion that kills the ship spawn the various debris pieces. That won’t give you very much control over where each piece of debris ends up unfortunately, but it’s the closest thing I can think of.
Also a minor unrelated niggle, but can’t you just use YouTube like everyone else? Livestream is kind of annoying with all those ads.
-
Why485 wrote:
The most obvious and simplest solution, (and originally what I thought you were doing in the first place) would be to just have the explosion that kills the ship spawn the various debris pieces. That won’t give you very much control over where each piece of debris ends up unfortunately, but it’s the closest thing I can think of.Also a minor unrelated niggle, but can’t you just use YouTube like everyone else? Livestream is kind of annoying with all those ads.
Ya, that’s what I did originally by placing the wrecks into the explosion.ini. The results were less than convincing of capital ship wrecks and there was very little control of how the debris reacted and were presented. Considering the pieces are so large (some are 2km in length) I need to have very precise control of how the wrecks breaks apart, thus we decided to go the more direct route.
As for the vid, sure. I’m just lazy and it’s an easy method for me to show people for a WIP wreck that is bjorked.
-
What ads?
Oh wait… AdBlock
-
FriendlyFire wrote:
The only way for this to work would be to somehow “unlink” the created debris from the root so that when destroy_root is called the debris still keep on living for their defined period of time.Thinking about this, I remembered a specific incident where a piece of debris survived the root explosion. Or at the least, that what it appears to have happened. Luckily I just happened to have it on video.
After the Bretonian Destroyer is destroyed, it goes through its death fuse, and and what is presumably the root is destroyed by the end of it. However a piece is still left over. You can see the big loop piece just sitting there after the ship has been completely destroyed.
It’s very possible that may only have happened because of the way Freelancer splits up its models, (the method you were specifically avoiding) but that’s the only lead I can give.
-
Ya, that’s exactly what we wanted. Well, lets hope one of the gurus of FL can figure this one out. If not, it’s back to the drawing board.
-
Just to add:
Three things must happen in sequential order; the explosion, the swapping of the main model for the wrecked model and finally, the separation of the parts.
Control over speed and direction of the wrecked pieces is part two of the [d]problem[/d] challenge.:-)
The “holes” in the model seen are my fault and will be corrected shortly.
-
@ why: isnt that a random mission solar rather than a wreck? capship solars in mission regularly leave debris destroying only the root. Seems to be control by fate = debris line in the main fuse. I like where this is going, always thought it was a bit rubbish having an indestructable wreck
-
So I talked to Dev and he recommended we try a different way. I’ll post the code here so everyone can follow. Sadly, we don’t get a result at all and we’re both at a loss as to why:
This is the code in our solararch/shiparch:
fuse = mc90_wreck, 0.000000, 1 ----------------------- [CollisionGroup] obj = debris_zomgbayz01 separable = true debris_type = debris_mc90_wreck_forward hit_pts = 10000 root_health_proxy = false [CollisionGroup] obj = debris_zomgbayz02 separable = true debris_type = debris_mc90_wreck_main hit_pts = 10000 root_health_proxy = false [CollisionGroup] obj = debris_zomgbayz03 separable = true debris_type = debris_mc90_wreck_rear hit_pts = 10000 root_health_proxy = false
This links to both the explosion.ini and fuse.ini
Explosion.ini;---------- MC90 [Debris] nickname = debris_explosion_mc90_main death_method = exploding lifetime = 60, 120 linear_drag = 10000 angular_drag = 10, 10, 10 rotation_inertia = 100, 100, 100 [Debris] nickname = debris_mc90_wreck_forward death_method = exploding lifetime = 0, 0 linear_drag = 1000 angular_drag = 10, 10, 10 rotation_inertia = 100, 100, 100 explosion = explosion_mc90_wreck_forward [explosion] nickname = explosion_mc90_wreck_forward lifetime = 0.000000, 0.000000 process = shatter debris_impulse = 100 debris_type = debris_explosion_mc90_main innards_debris_start_time = 0.0 innards_debris_num = 1 innards_debris_radius = 1 innards_debris_object = mc90_wreck_forward strength = 100 radius = 500 hull_damage = 20000 [Debris] nickname = debris_mc90_wreck_main death_method = exploding lifetime = 0, 0 linear_drag = 1000 angular_drag = 10, 10, 10 rotation_inertia = 100, 100, 100 explosion = explosion_mc90_wreck_main [explosion] nickname = explosion_mc90_wreck_main lifetime = 0.000000, 0.000000 process = shatter debris_impulse = 100 debris_type = debris_explosion_mc90_main innards_debris_start_time = 0.0 innards_debris_num = 1 innards_debris_radius = 1 innards_debris_object = mc90_wreck_main strength = 100 radius = 500 hull_damage = 20000 [Debris] nickname = debris_mc90_wreck_rear death_method = exploding lifetime = 0, 0 linear_drag = 1000 angular_drag = 10, 10, 10 rotation_inertia = 100, 100, 100 explosion = explosion_mc90_wreck_rear [explosion] nickname = explosion_mc90_wreck_rear lifetime = 0.000000, 0.000000 process = shatter debris_impulse = 100 debris_type = debris_explosion_mc90_main, 1.0 ;debris_large_capship_piece_explode, 1.0 innards_debris_start_time = 0.0 innards_debris_num = 1 innards_debris_radius = 1 innards_debris_object = mc90_wreck_rear radius = 500 hull_damage = 20000 [Simple] nickname = mc90_wreck_forward DA_archetype = TOW\solar\wrecks\mc90\mc90_wreck_forward.3db material_library = TOW\ships\mc90\mc90.mat Mass = 5 LODranges = 0, 20000 [Simple] nickname = mc90_wreck_main DA_archetype = TOW\solar\wrecks\mc90\mc90_wreck_main.3db material_library = TOW\ships\mc90\mc90.mat Mass = 5 LODranges = 0, 20000 [Simple] nickname = mc90_wreck_rear DA_archetype = TOW\solar\wrecks\mc90\mc90_wreck_rear.3db material_library = TOW\ships\mc90\mc90.mat Mass = 5 LODranges = 0, 20000
and our fuse.ini
[fuse] name = mc90_wreck lifetime = 20.00000 death_fuse = true [destroy_group] group_name = debris_zomgbayz01 fate = debris at_t = 0.000000 [destroy_group] group_name = debris_zomgbayz02 fate = debris at_t = 0.000000 [destroy_group] group_name = debris_zomgbayz03 fate = debris at_t = 0.000000 [destroy_root] at_t = 1.0
Considering the other way worked, I’m at a loss to why this method doesn’t and was wondering if anyone could shed some light on the topic.
Thanks for all the help thus far, fellas.
-
Yay double post
So I attached the hardpoints to the collision groups (debris_zomgbayz01, 02 and 03) and was able to get the debris render. It even continued to render after the root was destroyed. FF and I are currently working on getting the debris to move properly and we’re hoping we’ll have good results from that as it’s somewhat erratic at the moment. More updates to follow, hopefully.
-
i’d suggest to add impulses to the fuse to get the wrecks moving. also more realistic if nearby objects unaffiliated with the ship get thrown away a bit, too. about the wreckages and root, another idea would make the root a dummy object which you have enough of in your cmp (hopefully this suggestion had not been made making me a careless reader xD)
-
Impulse blocks don’t seem to work in fuses.
We’ve already tried.