Discovery Gaming Community

Full Version: [Tutorial] Beginner Weapon Editing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The purpose of this tutorial is to describe how to make or edit a weapon without any advanced techniques like modeling or fancy .ale editing. Sometimes that is all that is needed to make something interesting. It's intended for people that have good ideas but no knowledge of which files to edit and how. Disclaimer, I am not a real expert on this, this tutorial is about the basics only.

Before I start (and this should really be obvious): Do not alter files in your main discovery install.
Your install directory should look something like this: C:\Users\username\AppData\Local\Discovery Freelancer 4.88.1
That's for Win10, if you use another operating system you will have to look for it. Copy and paste the entire folder, and edit files in the duplicate.
I would then recommend using Discovery Launchpad to select and launch the other installation, since the new DSLauncher always uses a fixed file location.

Now we will look at the files we want to mess with. Most of them are in DATA\EQUIPMENT.
The main file which describes a weapon's characteristics is weapon_equip.ini. An entry for a gun consists of two parts, the ammo and the gun. It will look something like this.


This is the THUNDERWAVE codename. To find a specific weapon, use FLStat to find the weapon's internal nickname. Then, CTRL+F in weapon_equip and search for that nickname. To make a new weapon, start by finding something roughly similar to what you are making, copy both the [Munition] and the [Gun] text blocks, and paste them at the bottom of the file. As a general rule, don't change anything that does not need to be different. I won't be going through this line by line and most of the entries are really pretty self-explanatory anyway, but let's look at a few.

To make a functioning new weapon, you must change the internal nicknames and make the weapon refer to the correct projectile.

nickname = special_gun_extra01_ammo
nickname = special_gun_extra01
projectile_archetype = special_gun_extra01_ammo


It doesn't matter what the new names are, as long as they are unique and the gun has its correct new projectile assigned.
Now let's look at some of the other lines under [Munition].

hull_damage is pretty obvious, and energy_damage is the extra shield damage which pulses have in addition to half the hull damage, which all weapons have. So it's normal that this is 0.
weapon_type is the shield damage type, which you can look up in FLStat.
lifetime is how long the projectile flies in seconds which determines range. If it is 1 on a 600ms weapon like THUNDERWAVE, it will have a range of 600m.
force_gun_ori is what makes weapons like the SNAC aim in the way they do.

Now for some of the lines under [Gun].

ids_name and ids_info refer to the weapon's name and infocard as they appear in game. They can't be changed, because the infocards.txt file they're referred to does not exist in the client install, so leave these alone. You'll have to live with your weapon having the name and infocard of whatever you copied during your testing.
DA_archetype and material_library refer to the model of the gun. Copy these from the gun you want yours to look like.
volume (not mass!) is the cargo requirement of the weapon.
hp_gun_type is the weapon or turret class.

That should cover weapon_equip. If you don't know what something does, best not to change it. The other file required to make the weapon function is weapon_good.ini.
Again, Ctrl+F for the nickname of the weapon you're copying and you'll find something like this:

You shouldn't really be messing with this, all you need to do is copy the entry and replace nickname and equipment.
These should refer to the nickname you gave your weapon in weapon_equip. Of course, you might also change the weapon's price.

Once you have made new entries in weapon_equip and weapon_good, you should be able to launch the game and not have it crash. If it does crash, something went wrong and you will need to recheck both files.
Finally, to actually obtain your weapon to test, you will have to add it for sale on a base. To do this, open market_misc.ini, also in the same subfolder. In FLStat, you can look up the nickname of the base you want to use, which will look something like this: Iw05_01_base. That's Ames, which I always use for testing. Search for the entry of the desired base, and you will see all the stuff it sells.
A sale entry will look something like this: MarketGood = co_gun01_mark06, 10, -1, 10, 10, 0, 1 which tells the base to sell Adv. Flashpoints.
Simply copy this entry and paste it into a new line, and replace the gun with the nickname you gave yours in weapon_good.

Now you can launch the game, put cash 6745745756 and base Ames into chat, and you should be able to buy and test your weapon. Congratulations!


In part 2, I will write a similar tutorial on basic effects. Good luck with your project!
*reserved*
Quick note that came to mind after a brief skim, you want energy_damage rather than shield_damage.