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

Investigation: Setting loots in wrecks

The general place to discuss MOD''ing Freelancer!

Post Thu Apr 24, 2003 3:52 pm

Investigation: Setting loots in wrecks

Hello all,

I thought that it'd be a neat idea to be able to create your own secrets wrecks in your mods. While creating one is easy enough, I found that setting their loots to be yielding quite different results than expected. I've looked through the forums searching using the keywords "wreck" and "derelict", but found surprisingly little info.

As an example, take the Edward Kane wreck from the Cortez system. If you look at the loadout given for the wreck, you'll see that it is supposed to give out 9 Starbeam Turrets, plus 10 gold. However, in the actual game, you only get 6 Starbeam Turrets, plus the 10 gold. What happened to the other 3?

Another example are all those wrecks that carry the Paralyzer missiles. The loadouts for all those wrecks includes the launcher as well as the missiles. At first, I thought I wasn't getting the launcher because its lootable flag was set to "false". However, a quick check shows that the Paralyzer missile launcher actually has its lootable value set to "true"! So why aren't we able to get those?

I actually have a theory on why this is so, but I'd like to hear your thoughts first before sharing mine....so...any of you have any idea what's going on?

-- The Haen.

Post Thu Apr 24, 2003 4:41 pm

Perhaps your cannons are a bit "hot" and you are destroying the first bits of loot?


.sig/ Wild guesses are sometimes more fun that safe ones, but still guesses.

Post Thu Apr 24, 2003 5:31 pm

LOL...that was my very first thought, actually! But then I re-loaded from an old save game, and tried looting the same wreck 3 more times, and still got the same result. I was also very careful to fire only one shot from one gun, and to fire at a section of the ship that (according to the wireframe target view) has no turrets on it.

So I don't think I'm blowing up my own loot. Once, maybe...but the next three times in a row when I was specificly trying to avoid blowing loot up? I don't think so.

Besides, that still doesn't explain the Paralyzer missile launchers...by now, it is well known that the launchers themselves are on the wreck, but they always flame away when you shoot at the wrecks...unless we're all accidentally shooting them off.

-- The Haen.

Post Thu Apr 24, 2003 9:18 pm

as posted in this thread it seems that 1 out of 3 weapons that are listed in the ini wont get dropped when a wreck is shot.
i noticed that when i tried to make the paralyzer missile launcher available, it was listed as the 3rd weapon (launchers are considered as guns) and it wouldnt drop until i set it to be weapon 1 in the list.
interesting is that now the weapon listed on 3rd position didnt drop aswell.
i tested this on the Vorlung in Omega-41 and on the Bounty Hunter in Omega-11.

The only flaw i can see atm is the Avenger in Texas, which drops 2 weapons and 2 missile launchers (according to Haenlomal's list) and doesnt "swallow" the guns. all 4 are listed in the ini aswell...

this ofc needs further investigation

Post Fri Apr 25, 2003 9:35 am

Maybe the loadout is always two thirds?

Post Fri Apr 25, 2003 9:38 am

I'm more inclined to think this somehow ties into the ship's hardpoints defined in shiparch.ini and its corresponding .cmp file.

Post Fri Apr 25, 2003 5:52 pm

I don't think shiparch.ini has anything to do with it, since all wrecks are defined as Solars...so it should be in solararch.ini. But I'm jumping ahead here...seeing that apart from sp00n (thanks for your testing in the other thread, btw), no one else seems to have really looked into this. So I'll give my own theory, and see if you have any comments on it. So sit and and relax and prepare to read a long post.

(I assume you all know how to uncompress and read .ini files...if not, there are plenty of other threads here that beats this issue to death. )

SUMMARY:

Loot behaviour is tied to <sysname>.ini, solararch.ini, loadouts.ini, loadouts_utility.ini and fuse_suprise_solar.ini (under the /Data/FX directory)

<sysname>.ini -- creates the actual wreck itself and specifies its location
in the system
solararch.ini -- the archetypes used to define the wrecks are all found here
loadouts.ini and loadouts_utility.ini -- the potential loot that is carried by the wreck. If the wreck is a transport, the loot should be defined in loadouts_utility.ini. Otherwise, it should be in loadouts.ini
fuse_suprise_solar.ini -- defines what components of the archetype disappears (and hence, any hardpoints and equipment that goes with those components)

DETAILS:

I'll walk this through using the Griffin wreck as an example. The Griffin is located in Tau-37, which is nicknamed Ew01 by the game internally. So we open up Ew01.ini and get the following entry:

<pre><font size=1 face=Courier>

[Object
nickname = Ew01_suprise_bh_elite2_1
ids_name = 261764
pos = 363, 74, -26430
rotate = 40, 30, 20
archetype = suprise_bh_elite2
visit = 16
ids_info = 66429
loadout = SECRET_bh_bh_elite2_ew01

</font></pre>

This is pretty straightforward. Since this is a Hammerhead wreck, it is not a transport, so we open up loadouts.ini to get the potential loot details. This is what we find:

<pre><font size=1 face=Courier>

[Loadout
nickname = SECRET_bh_bh_elite2_ew01
archetype = bh_elite2
equip = special_gun09, HpWeapon01 <--- DARK BLOSSOM
equip = special_gun09, HpWeapon02
equip = missile03_mark04, HpWeapon03 <--- Paralyzer Missile Launcher
cargo = missile03_mark04_ammo, 10 <--- Paralyzer missiles (10)
equip = gd_bh_turret01_mark01, HpTurret01 <--- Gunslinger Mk I Turret

</font></pre>

So far so good, except for the fact that we know from gameplay experience that we get no Paralyzer missile launcher!

Time to look into solararch.ini and look up the definition for suprise_bh_elite2:

<pre><font size=1 face=Courier>

[Solar
type = MISSION_SATELLITE
nickname = suprise_bh_elite2
LODranges = 0, 80, 150, 1000
DA_archetype = ships\bounty_hunter\bh_vheavy_fighter\bh_vheavy_fighter.cmp
material_library = ships\liberty\li_playerships.mat
surface_hit_effects = 0, small_hull_hit
mass = 100000.000000
solar_radius = 800
shape_name = NAV_surpriseX
explosion_arch = explosion_li_elite
hit_pts = 3600
destructible = true
fuse = fuse_suprise_bh_elite2, 0.000000, 3601
fuse = fuse_suprise_drop_loot, 0.000000, 3590

[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
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

[CollisionGroup
obj = bh_star_wing_lod1
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

</font></pre>

This is pretty similar to the definition found under shiparch.ini for the Hammerhead. In fact, they both use the same graphical model as evidenced by the DA_archetype entry. However, the two fuse entries stick out as being quite different.

Took me a while to locate the fuse definitions, but finally tracked them down to the file fuse_suprise_solar.ini....since there are two fuses, we look them both up, and tackle each one in turn.

For fuse_surprise_bh_elite2:

<pre><font size=1 face=Courier>

[fuse
lifetime = 0.100000
name = fuse_suprise_bh_elite2

[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

[destroy_group
fate = disappear
at_t = 0.100000
group_name = bh_star_wing_lod1

</font></pre>

Notice that the bottom wing of the Hammerhead gets removed! That's why whenever we take a good look at the Hammerhead wrecks, we don't see any wings...because this file removes them all.

This is a problem because the Hammerhead has 6 weapons hardpoints...and 4 of them are on the wings. Our immediate concern are Hpweapon01 and Hpweapon02, which carries the DARK BLOSSOMS in the Griffin....those two hardpoints are defined on the bottom wing. Ironicly, the Paralyzer Missile Launcher seems to be fine because it is located on HpWeapon03, which happens to be located on the main Hammerhead body. So how come the guns aren't missing, but the launcher is? I wasn't able to answer that until now, but sp00n's experiments helped me to develop a theory.

I theorize that because the game can't map the first two hardpoints on the wreck (no more bottom wing), it mapped them to the next available slots, HpWeapon03 and HpWeapon04. This would have pushed HpWeapon03 and HpWeapon04 back into the slots occupied by HpWeapon05 and HpWeapon06. The problem here though is that HpWeapon05 and HpWeapon06 are defined on the top wing...which also have been removed. Effectively, then, the wreck can only carry two weapons, which would have to be at HpWeapon01 and HpWeapon02. This would explain the behaviour we have been getting.

A look at fuse_suprise_drop_loot also yields some interesting details:

<pre><font size=1 face=Courier>

[fuse
name = fuse_suprise_drop_loot
lifetime = 20.000000
death_fuse = true

[make_invincible
turn_on = true <--- explains why you can't blow up most wrecks

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpWeapon01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpWeapon02
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpWeapon03
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpWeapon04
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpWeapon05
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpWeapon0 <--- typo is *in* the game files!!
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpShield01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpThruster01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpMine01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpCM01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpCD01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpTorpedo01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpTurret01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpTurret02
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpTurret03
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpTurret04
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpTurret05
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpTurret06 <--- last Turret Hardpoint mentioned
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpCargo01
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpCargo02
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpCargo03
fate = loot

[destroy_hp_attachment
at_t = 0.000000
hardpoint = HpCargo04
fate = loot

[dump_cargo
at_t = 0.000000
origin_hardpoint = HpMount

</font></pre>

Two things to note:

1) Thanks to the typo at HpWeapon06, even if that weapon slot is available on the wreck, the weapon on it probably won't be lootable.

2) Only HpTurret01 to HpTurret06 are defined in this fuse. This explains why a wreck yields only a maximum of 6 turrets when you loot them.

3) make_invicible is turned on...this explains why most wrecks are indestructible...and creates new questions as to when sometimes we can destroy the wreck! (Timing bug?)

So, to create a wreck, you have to select a wreck, look up its corresponding fuse entry under fuse_suprise_solar.ini, determine how many (if any) hardpoints get displaced, where they are displaced to, then create the loot loadout accordingly..in other words...UGH!

If you're still reading here, I tip my hat to you...you have good patience! Anyway, this is the theory...anyone have any comments?

-- The Haen.

Post Sat Apr 26, 2003 10:16 am

hm, sounds interesting...
did you try to comment out the "fuse =" in the solararch.ini? (place a ";" before the line incase you dont know )

Post Sat Apr 26, 2003 10:24 am

LOL, i just tried with the Volsung, i commented out
fuse = fuse_suprise_bw_elite2, 0.000000, 3601
and
fuse = fuse_suprise_drop_loot, 0.000000, 3590

and guess what happened?
the wreck exploded and ALL 4 loot entries were dropped...

-------

replacing HpWeapon0 with HpWeapon06 didnt help though

-------

removing only fuse = fuse_suprise_bw_elite2, 0.000000, 360
helped, the wreck behaved just like normal, eg it didnt explode, yet all items were released.
(i still had HpWeapon0 repleaced with HpWeapon06, dunno if this made any difference)


so it really seems that the disappearance of the wings causes several items not to be released, thus removing this command makes all appear.

---------

Edited by - sp00n on 26-04-2003 11:49:59

Post Sat Apr 26, 2003 11:22 am

i heard that the paralyser launcher was actually left out of the game by the devs, so maybe the reason you cant get it is because it doesnt even exist. Unless someone has actually got it, and can prove me wrong, it was just a rumour i heard after all....




-Nomega-

Post Sat Apr 26, 2003 11:51 am

nope, it does exist.
doing like i wrote will release it, aswell as doing explained in here

Post Sat Apr 26, 2003 4:00 pm

So, all we have to do is comment out each [destroy_group for every wreck that carries a Paralyzer launcher? That's just GREAT! *sarcasm intended*

Post Sat Apr 26, 2003 5:23 pm

hm, no, you gotta comment out any
fuse = fuse_suprise_**ship**, 0.000000, 3601
in the solararch.ini.

i already did so, if u want the file, mail me

Post Sat Apr 26, 2003 7:26 pm

That won't be necessary, I gave it a shot myself. Pretty neat toys, those Paralyzers - when they hit their target (which is to say, not often). I'd still rather have a pair of TDC's with me.

Post Mon Apr 28, 2003 3:20 pm

sp00n wrote:


replacing HpWeapon0 with HpWeapon06 didnt help though


Well, seeing that for the example you used (Volsung), there isn't any equipment defined at HpWeapon06, I doubt we'll notice a difference. A better wreck to test this out would be the Storm wreck in Dublin. Be careful of the mines, though...I can't count how many times I had to loot that wreck because the mines set off (and destroyed) the loot as I got close to it...

On a related note, I think it is clear from sp00n's fiddling around with the fuse file, my theory is more or less correct. I'll post a tutorial on the tutorials forum shortly on how to make and set loot in wrecks.

Thanks for all the help, people.

-- The Haen.

Return to Freelancer General Editing Forum