Freelancer Community Network


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

**Tutorial** - Creating Wrecks AND Setting their loots

Here you find the different tutorials on editing and MODing Freelancer

Post Fri May 02, 2003 7:09 pm

**Tutorial** - Creating Wrecks AND Setting their loots

This is a tutorial for creating a new wreck from scratch. While actually creating the wreck itself is very simple, setting its loot is surprisingly troublesome. For all the gory but outdated details, refer to this thread.


I'll be splitting this tutorial into 3 parts:


1) Files you might need to modify to create a wreck


2) Creating the wreck


3) Setting its loot


4) Bonus section: Creating your own wreck archetypes


I'm assuming that you have basic editting skills, know how to convert nicknames to real names, and know the terminology used in-game well enough. If not....peruse the stickys in the Editting forums.


(PS: Yes, I know that the word is spelled "surprise", and not "suprise"...but apparently, the programmers took a spelling course with Bubbles the Chimpanzee. With a few exceptions, they use the word "suprise" in the nicknames and filenames.)

-- The Haen.

Edit: Due to popular demand, added bonus section! Cheers, all


Edited by - Chips on 10/31/2004 8:02:29 AM

Post Fri May 02, 2003 7:13 pm

Section I: Files modded/referenced in wreck and loot creation


In order to create a new wreck and set its loot, you'll need to modify a few files, as well as reference a few others. Here are the files you'll need to directly modify, and a brief description of why:




<system_name>.ini (for example, if the wreck is in New York, you'd be modifying Li01.ini)


This will create the wreck in the system of your choice, and determine things such as its location, the direction the wreck is facing, and what the wreck would look like. If you want to make your wreck radioactive (for example, like all the wrecks in the New York system), this is also where you'd define the radioactive zone. You'll also be making the link to the loadout (i.e. loot) here.




Data\Ships\loadouts.ini OR Data\Ships\loadouts_utility.ini OR Data\Solar\loadouts.ini


Which one of these two files you modify depends on the type of wreck you are making. If the wreck you are making is a transport wreck, then you'd need to modify loadouts_utility.ini. If it's a storage container, then it's Data\Solar\loadouts.ini. Otherwise, it's Data\Ships\loadouts.ini. It is in these files that you set the loot for your wreck...but the process is not as straight forward as it seems!




Exe\nameresources.dll (Optional)


Sets the name for your wreck. If you're not into dll hacking, just "borrow" the name of an existing wreck.




Exe\infocards.dll (Optional)


Sets the description for your wreck. If you're not into dll hacking, just "borrow" the description of an existing wreck.




(Note: I won't go through .dll hacking here...it's already well covered enough by quite a few other posts, so go read those instead if you need to.)




Data\Solar\SolarArch.ini (Optional, but mandatory for storage depot wrecks)


If you want to create your own type of wreck instead of the wrecks pre-defined in the game, this is the file to do it in. Note that if your wreck is a storage depot, the link pointing to the loot for your wreck is set in here, and not in the <system_name>.ini file! In other words, if you want to create a wreck that is a storage depot, you MUST modify this file.


Note also that I won't be going through how to create your own wreck archetype here, since it's outside the scope of the topic. But it's really not that hard to figure out.




Data\FX\fuse_suprise_solar.ini (Optional)


Even though we won't be going through how to create your own wreck archetypes here, it should be noted that if you created your own type of wreck, then you may also want to modify this file. However, this is strictly speaking not absolutely necessary. It's also worth mentioning that this file is single-handedly responsible for why we don't always get the loot we are expecting from the wrecks.


(cont.)

Post Fri May 02, 2003 7:15 pm

Section II: Wreck creation


Creating the wreck itself without actually setting the loot is very easy to do...basically, the game treats each wreck as simply another Solar Object, so you create the wreck almost like the same way you create a base, a planet, etc.


So, the basic layout is thus:


[Object
nickname = Li01_suprise_bh_fighter_badlands
ids_name = 261709 ;name of the wreck -- borrow another wreck's number, or use the one you generated
pos = -4870, -1000, 39426
rotate = 6, 38, -61
Archetype = suprise_bh_fighter ;defined in SolarArch.ini...read on to see pre-defined types
visit = 16 ;a value of 16 is a "normal" wreck...each player can loot only once...set to 0 if you want them to regenerate
ids_info = 66458 ;description of the wreck....same idea as for ids_name
loadout = SECRET_bh_bh_fighter_li01 ;the nickname for the loadout for your wreck


If you want radiation to surround your wreck, you have to define a zone of radiation around the wreck. Intuitively, we want to set a sphere of radiation centered on the wreck itself. And if we look at the .ini files, that's exactly what happens:


[zone
nickname = Zone_li01_badlands_radiation2
pos = -4869, -1000, 39427 ;note this is almost the same co-ordinate as the wreck
shape = SPHERE ;makes the zone a sphere shape
size = 2000 ;radius of your sphere in metres
edge_fraction = 0.300000
damage = 50 ;sets radiation damage...the more the merrier!
visit = 128 ;leave this value alone
interference = 0.400000
sort = 99.500000


And that's it! Congratulations, you've created your own wreck. Of course, right now, it gives no loot, since you haven't defined it yet, but that problem will soon be taken care of.


If your wreck is a depot, the process is similar to above, but there are a few differences.


1) Under the Object tag, do NOT include the line loadout=<loadout_nickname>. For depots, that line is defined in SolarArch.ini.


2) For the Archetype line, you'll have to supply your own unique Archetype. To do this, you'll need to create the archetype in SolarArch.ini. Here's how to do it:


[Solar
nickname = surprise_superconductors ;name your Archetype here, and use this name in the system ini file
type = DESTROYABLE_DEPOT
DA_archetype = solar\dockable\space_depot_frame.3db
material_library = solar\Solar_mat_tink.mat
LODranges = 0, 1800
mass = 10000.000000
solar_radius = 800 ;not sure what this does, but all wrecks have 800 here...
loadout = surprise_superconductors ;here is where you define your loadout link for depots!
shape_name = NAV_surpriseX ;this should be left alone too so that navmap icons are consistent




The following are valid pre-defined wreck archtypes found in solararch.ini. The names are pretty much self-documenting, though I have taken the liberty of clarifying a few of the more obscure ones.

suprise_li_elite
suprise_transport
suprise_transport_large
suprise_li_fighter
suprise_li_freighter
suprise_br_fighter
suprise_br_elite
suprise_br_freighter
suprise_ku_fighter
suprise_ku_elite
suprise_ku_freighter
suprise_rh_fighter
suprise_rh_elite
suprise_rh_freighter
suprise_bh_fighter
suprise_bh_elite
suprise_bh_elite2
suprise_pi_fighter
suprise_pi_elite
suprise_pi_freighter
suprise_co_fighter
suprise_co_elite
suprise_co_elite2
suprise_ge_fighter ;starflier
suprise_ge_fighter2 ;startracker
suprise_ge_fighter4 ;hawk
suprise_ge_fighter5 ;falcon
suprise_ge_fighter6 ;eagle
suprise_bw_fighter
suprise_bw_elite
suprise_bw_elite2
suprise_bw_freighter
suprise_no_fighter ;nomad fighter <-- entry in solararch.ini seems a bit bugged, use with caution
suprise_ge_armored ;armored transport
suprise_ge_train
suprise_ge_csv

Note that there is no large train wreck pre-defined, but as I wrote earlier, it's relatively simple to create your own type of wreck. But like I also wrote earlier, you're on your own if you want to do this.


(cont.)

Post Fri May 02, 2003 7:24 pm

Section III: Loot creation


Now we come to the favourite part of the tutorial...setting up the goodies in your wreck!


Note that this part is purely optional, if you want a wreck with no loot. There are numerous examples of wrecks in the game with no loot....the many wrecks around the Unknown Jumphole in Omicron Alpha comes to mind.


If your wreck is a fighter, heavey fighter, very heavy fighter, or freighter, then your loot must be defined in the Data\Ships\loadouts.ini file. If your wreck is a transport, large transport, armored transport, or a train, then your loot must be defined in the Data\Ships\loadouts_utility.ini file.

(If you create your own wreck archetype based on the large train, then the loot for that wreck must also be defined in loadouts_utility.ini)


Regardless of which file you end up modifying, the actual definition for the loot is the same in both cases, and is pretty straightforward:


[Loadout
nickname = SECRET_bh_bh_fighter_li01 ;nickname for loot, must match with the entry in the system ini file
archetype = bh_fighter ;see note below
equip = gd_bh_gun01_mark01, HpWeapon01
equip = gd_bh_gun01_mark01, HpWeapon02
equip = gd_bh_gun01_mark01, HpWeapon03
equip = gd_bh_gun01_mark01, HpWeapon04
equip = gd_bh_turret01_mark01, HpTurret01
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20 ;you can also place weapons here, which is useful if you want your wreck to pop more weapons than it has hardpoints


IMPORTANT NOTE: Under the archetype entry, notice that you are using the definition from shiparch.ini!!! Whereas in the system ini file, you use the equivalent "wreck" archetype found in solararch.ini. Make sure that both archetypes are ultimately refering to the same ship, or else you'll get very, um, interesting results.


In our example, notice that in the system ini file, we had used the solar archetype of suprise_bh_fighter, which is the Piranha Bounty Hunter Light Fighter. Therefore in our loadouts.ini file, we used the corresponding ship archetype definition for the Piranha Bounty Hunter Light Fighter, which happens to be bh_fighter.


In your loadout, make sure you assign equipment to the proper hardpoint type. (So, no guns attached to the thruster hardpoint!)


But here's an important cavaet: not all equipment that you place on your wreck might actually show up in the game! The following conditions dictate whether or not your loot will appear in the game. (These conditions are based on settings found in fuse_suprise_solar.ini)


1) As a general rule of thumb, if you place any equipment on a hardpoint located on a wing or extension of the wreck in question, you can kiss it goodbye. Hardpoints on wrecks are NOT mapped the same way as hardpoints on ships, though they ultimately do use the same physical location. (i.e. HpWeapon01 on the ship may be, say, HpWeapon03 on the wreck). You'll have to experiment to find out which hardpoints are available, and which aren't, and plan accordingly


2) Thanks to a typo in the fuse_suprise_solar.ini file, any equipment placed on HpWeapon06 will NOT show up. If you want, you can correct the typo yourself, but I'll leave that up to you.


3) No equipment placed on HpWeapon07 or higher will show up


4) No turrets placed on HpTurret07 or higher will show up


5) Any equipment placed in the cargohold WILL appear. There seems to be no limit here, but I haven't stress tested this yet....


6) For transports and trains, you can define loot to come from cargo pods if you first define the cargopod to the cargo hardpoints, and then placing the cargo itself in the cargo pods. Remember that different transports have a different number of cargo hardpoints, and there is no rule that says that each cargo pod has to hold the same amount! (Read on if you need a solid example, since depot cargo pods and loot settings are defined exactly the same way.)


And that's it! Go nuts.


For depots, again the rules are similar, but slightly different. The loot for depots are defined in the /Data/Solar/loadouts.ini file (note the different directory path!). Other than the different file, the format is pretty much the same, as illustrated from the following example, and is pretty much self-explanatory:


[Loadout
nickname = surprise_superconductors
equip = cargopod_green, HpCargo04
cargo = commodity_superconductors, 40, HpCargo04


For the equip line, valid depot hardpoints are HpCargo01 to HpCargo04, and you can define more than one cargo pod as long as it is on different hardpoints. The following is a list of valid cargo pod colours:


cargopod_green
cargopod_blue
cargopod_white
cargopod_yellow
cargopod_drab
cargopod_red
cargopod_grey


Note the in the game, different types of commodity are associated with different coloured cargo pods (details found in the same loadouts.ini file), so try to make sure your colour matches the cargo it contains for the sake of gameplay consistency.


Have fun creating your wrecks!


-- The Haen.

Edit: corrected error in file name, and highlighted point 2 above to (hopefully) prevent any more unnecessary questions.


Edited by - Haenlomal on 12-05-2003 17:24:21

Post Fri May 02, 2003 9:25 pm

Truly Outstanding!!!

Wow!

Thanks for the hard work, can't wait to try it.



.sig/ Ya never know when you will be suprised.

Post Sat May 03, 2003 1:23 pm

Good Tuturial ill be trying it out later today

Post Wed May 07, 2003 10:48 am

Good jod. Just so you know that your hard work and the hours required to put this together are appreciated.

Edited by - Keith on 07-05-2003 11:50:59

Post Mon May 12, 2003 4:32 pm

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

Post Wed Jun 18, 2003 9:04 am

Great tutorial! Didnt want you to feel unappreciated!

Post Mon Jul 07, 2003 3:33 pm

Wow nice stuff u have keep it up!!!

Post Mon Jul 12, 2004 5:24 am

Great tut man! Nice job!

Post Wed Feb 02, 2005 12:38 pm

REALLY nice tut. I sent u an email a wee whiel back, though I doubt I explained who I was and from where, so it was likely ignored.
Would it be possible for you to write some script for me, that puts a shipwreck in the middle of newlondon, within 10 k of new london, at the same level, with no radiation round, and carrying lots of diamonds. I dont mind what sort of ship it is, but I need to know 1) what sort so I can look for it, and 2) It needs to carry enough cargo to fill the hold of a Clydesale. Ideally, I would like the ship to be in free space, and I would very much like it to regenerate.
I will also need to know where to insert the code, ie exactly where, cuz im a bit <rap at the code side of things.
Something else I want to know, is how to change the tarting credits of the multiplayer games, and also the ship. And is it possible for the server to pick random location for each player to start in (a random base).
Cheers, though the most important bit is the first bit
Thankee sai Haenlomal

Edited by - WizardTizzle on 2/4/2005 2:05:56 PM

Post Sun Jun 18, 2006 3:40 pm

God I finally found this, after four days of searching.

Sorry, for the grave dig but more then myself wanted to see this thread.

Does anyone have any updates to this topic, or is this as good as our current knowledge has evolved?

"It doesn’t matter what universe you’re from. That’s got to hurt!"

Post Tue Dec 19, 2006 11:46 am

Also apologies for the gravedig - I've been hearing that multiplayer FL sets a status flag somewhere that says "this wreck has already been shot at by player x" in player x's multiplayer file. As a result when they go back and fire again at the wreck, the guns flame out before they can tractor them in.

Now on the plus side this keeps people from racking up Codename weapons every time an automaintenance occurs, but on the minus side, if someone shoots the wrecks in, say, Hokkaido, they can't get the guns more than once, which sucks if you want to get some primo class 7s.

So my question is, is there a way to set a wreck as "always grabbable for infinite times" or a kludge where I can script a player file ini cleanser which strips all the wreck obtained status flags?

Post Thu Dec 21, 2006 2:17 am

Hahukum Konn did you try setting the wrecks to visit = 0 they respawn It works in SP I know that for a fact, but never tried it in MP.
Next

Return to Freelancer Editing Tutorial Forum

Hosted by The-Starport
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.