Bonus: Section IV: Creating your own wreck Archetypes
Ok...I know I wrote that I won't do this, but due to many e-mails about this issue, I've decided to post details on how to create your own wreck archtypes. I thought it would be easy to figure out, but apparently not....and since I'm in a charitable mood, I figured, "What the heck...why not?"
All right, enough ranting...onto the good stuff.
Files you need to modify:
solararch.ini
fuse_suprise_solar.ini
First, you'll need to decide what existing ship you want to "wreck". For the purposes of demonstration, let's say we want a new Hammerhead (the Bounty Hunters' Very Heavy Fighter) wreck.
Next, you'll have to decide what you want your wreck to look like. If you look at Hammerhead wrecks in-game, you'll notice that all of them are missing their wings and their top and bottom fins. Let's say instead you want to create a Hammerhead wreck that miraculously still has its port side wing left intact.
Having made those critical design decisions, you can now begin to make your own wreck archetype!
Open up solararch.ini, and add the following lines at the bottom of the file. Actually, you can add these lines anywhere immediately before a [Solar tag, but putting it at the bottom of the file makes things easier to track. Don't forget about the closing brackets where appropriate!!
[Solar
type = MISSION_SATELLITE ; This MUST be here
nickname = my_new_surprise_wreck ; make up your own nickname here
LODranges = 0, 80, 150, 1000
DA_archetype = ships\bounty_hunter\bh_vheavy_fighter\bh_vheavy_fighter.cmp ; the ship model..replace this line if creating wrecks from different ship
material_library = ships\liberty\li_playerships.mat
surface_hit_effects = 0, small_hull_hit
mass = 100000.000000
solar_radius = 800
shape_name = NAV_surpriseX ; makes your wreck appear like a red X on map...experiment if you really want to have different icons here
explosion_arch = explosion_li_elite
hit_pts = 3600 ; how tough is your wreck
destructible = true ; overridden by fuse_suprise_solar.ini file
fuse = fuse_my_new_surprise_wreck, 0.000000, 3601 ; make up your own nickname here, but copy it down as you'll need to use it later
fuse = fuse_suprise_drop_loot, 0.000000, 3590 ; absolutely necessary if your wreck is to drop ANY loot! Don't change
Now, you'll have to define the separable components of the ship, which mostly consists of things like wings/fins/tails/spoiler/etc. of the ship. You can do this by looking at the .cmp file, or by looking that the shiparch.ini file. I recommend the latter since you can easily copy and paste the nicknames for the parts defined there, and you will be using those same nicknames. Technically speaking, all you really have to do is to define the components you want your wreck
NOT to have. In our case, we don't want the two fins, and the right wing. So, we need a minimum of 3 component entries. These are as follows:
[CollisionGroup
obj = bh_topfin_lod1
dmg_hp = Dptopfin
dmg_obj = bh_fighter_dmg_topfin_cap
separable = parent_impulse = 0
child_impulse = 0
debris_type = debris_small_ship
hit_pts = 1800
[CollisionGroup
obj = bh_btmfin_lod1
dmg_hp = DpBtmfin
dmg_obj = bh_fighter_dmg_btmfin_cap
separable = parent_impulse = 0
child_impulse = 0
debris_type = debris_small_ship
hit_pts = 1800
[CollisionGroup
obj = bh_port_wing_lod1 ; yes, this name seems to be a mistake, but read important note below
dmg_hp = DpPortwing
dmg_obj = bh_fighter_dmg_port_wing_cap
separable = parent_impulse = 0
child_impulse = 0
debris_type = debris_small_ship
hit_pts = 1800
Add these lines immediately below wherever you added your new wreck archetype. The names found in the obj lines are same as those found defined in shiparch.ini, which is why I recommended earlier that you look through that file and use copy and paste, and delete any unnecessary lines.
IMPORTANT Note: Yes, I know that I defined the port wing as a component, even though in our example we wanted to preserve this. Why? Because due to a design screw-up, the port wing for the Hammerhead model was accidentally given the label bh_star_wing_lod1, and vice versa (oops)!! I haven't looked up each component to see if they were designed properly, so be sure to take an actual in-game look at your wreck when all is said and done, and see if the results are what you wanted. If not, you'll have to experiment and adjust.
Now save and exit solararch.ini, and waddle over to fuse_suprise_solar.ini. Up to now, all you have done is define your wreck and the components it have. Now, you'll have to make those unwanted components disappear. For our example, adding the following lines at the bottom of the file will do the trick:
[fuse
lifetime = 0.100000
name = fuse_my_new_surprise_wreck
[destroy_group
fate = disappear
at_t = 0.100000
group_name = bh_topfin_lod1
[destroy_group
fate = disappear
at_t = 0.100000
group_name = bh_btmfin_lod1
[destroy_group
fate = disappear
at_t = 0.100000
group_name = bh_port_wing_lod1
And there you have it, a Hammerhead wreck with no fins, and only its left wing and main body intact!
One final question needs to be addressed: What happens if, in solararch.ini, we actually defined a component of the wreck, but did not mention it in the file fuse_suprise_solar.ini? Going back to our example, let's say we actually defined the port wing too in solararch.ini. as thus...
[CollisionGroup
obj = bh_star_wing_lod1 ; Remember that due to the screwup in Hammerhead design, the wing labels were reversed!
dmg_hp = DpStarwing
dmg_obj = bh_fighter_dmg_star_wing_cap
separable = parent_impulse = 0
child_impulse = 0
debris_type = debris_small_ship
hit_pts = 1800
...but left out fuse entry in fuse_suprise_solar.ini unchanged. What happens now?
Good question, and the answer is that you've got a wreck that can have parts of it blown off...woo hoo!
In the specific case of our example, the port wing of our wreck can now be destroyed with enough shots from our guns. Increasing its hit_pts value under the CollisionGroup tag will make the component tougher to shoot off, so you can play around with this to make more "realistic" behaviour for your wrecks. If you do play with the hit_pts value of your components, I'd suggest adjusting the hit_pts of the main wreck archetype itself to compensate appropriately, thus creating even more "realistic" behaviour, but that's entirely up to you.
A word of warning, though: Shooting a component part of your wreck will NOT release the loot from your wreck, unless your other shots happen hit the main body of the wreck itself. And if you had an piece of equipment on your wreck that happens to be mounted to that component, and you shoot of that component, you can kiss that loot good-bye! Fortunately, shooting the main body of the wreck before destroying the component will still allow you to loot the piece of equipment.
And once again, that's it!
Go nuts, folks.
-- The Haen.
Edit: Added Bonus section header to pretty things up...
Edited by - Haenlomal on 12-05-2003 17:36:02