05-21-2018, 08:23 PM
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!
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.
[Munition]
nickname = special_gun_extra01_ammo
hp_type = hp_gun
requires_ammo = false
hit_pts = 2
hull_damage = 336
energy_damage = 0
weapon_type = W_Neutral01
one_shot_sound = fire_laser5
munition_hit_effect = dsy_twave_impact
const_effect = dsy_twave_proj
lifetime = 1
force_gun_ori = false
mass = 1
volume = 0.000100
[Gun]
nickname = special_gun_extra01
ids_name = 520131
ids_info = 520132
DA_archetype = equipment\models\weapons\co_proton_cooker.cmp
material_library = equipment\models\ge_equip.mat
HP_child = HPConnect
hit_pts = 5000
explosion_resistance = 0.33
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 1
mass = 10
hp_gun_type = hp_gun_special_9
damage_per_fire = 0
power_usage = 68
refire_delay = 0.120000
muzzle_velocity = 600
use_animation = Sc_fire
toughness = 17.600000
flash_particle_name = dsy_twave_flash
flash_radius = 15
light_anim = l_gun01_flash
projectile_archetype = special_gun_extra01_ammo
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 40, 80, 150
nickname = special_gun_extra01_ammo
hp_type = hp_gun
requires_ammo = false
hit_pts = 2
hull_damage = 336
energy_damage = 0
weapon_type = W_Neutral01
one_shot_sound = fire_laser5
munition_hit_effect = dsy_twave_impact
const_effect = dsy_twave_proj
lifetime = 1
force_gun_ori = false
mass = 1
volume = 0.000100
[Gun]
nickname = special_gun_extra01
ids_name = 520131
ids_info = 520132
DA_archetype = equipment\models\weapons\co_proton_cooker.cmp
material_library = equipment\models\ge_equip.mat
HP_child = HPConnect
hit_pts = 5000
explosion_resistance = 0.33
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 1
mass = 10
hp_gun_type = hp_gun_special_9
damage_per_fire = 0
power_usage = 68
refire_delay = 0.120000
muzzle_velocity = 600
use_animation = Sc_fire
toughness = 17.600000
flash_particle_name = dsy_twave_flash
flash_radius = 15
light_anim = l_gun01_flash
projectile_archetype = special_gun_extra01_ammo
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 40, 80, 150
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:
[Good]
nickname = special_gun_extra01
equipment = special_gun_extra01
category = equipment
price = 10000000
item_icon = equipment\models\commodities\nn_icons\EQUIPICON_gun.3db
combinable = false
ids_name = 520131
ids_info = 520132
shop_archetype = equipment\models\weapons\co_proton_cooker.cmp
material_library = equipment\models\ge_equip.mat
nickname = special_gun_extra01
equipment = special_gun_extra01
category = equipment
price = 10000000
item_icon = equipment\models\commodities\nn_icons\EQUIPICON_gun.3db
combinable = false
ids_name = 520131
ids_info = 520132
shop_archetype = equipment\models\weapons\co_proton_cooker.cmp
material_library = equipment\models\ge_equip.mat
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!