Creating new dynamic weapons

  • This tutorial will cover (as the title implies) creating completely new weapons from scratch. First you will need a decompressor so you can read the .ini files correctly (Note that if you use Freelancer-SDK the files will already be decompressed). There are tons on The Lancers Reactor, just look in the utility or downloads section. After you've downloaded the program you can go ahead and open it. If you are using BiniQDU (which is what this tutorial will refer to) press the Open button and go into your root Freelancer folder. From there you can go into Data/Equipment. You will find a file there called weapon_equip.ini. This file is the heart of all weapons. All data concerning weapons will trace back to this file. Each gun (I.E. Justice, Stealthblade) has two main tabs, The first tab is Munition, notice they are always surrounded in brackets, the second tab is Gun, also surrounded in brackets.

    Here is an entry for a Justice Mk I

    nickname = li_gun01_mark01_ammo
    hp_type = hp_gun
    requires_ammo = false
    hit_pts = 2
    hull_damage = 16.299999
    energy_damage = 0
    weapon_type = W_Laser01
    one_shot_sound = fire_laser1
    munition_hit_effect = li_laser_01_impact
    const_effect = li_laser_01_proj
    lifetime = 0.800000
    force_gun_ori = false
    mass = 1
    volume = 0.000100

    nickname = li_gun01_mark01
    ids_name = 263357
    ids_info = 264357
    DA_archetype = equipment\models\weapons\li_heavy_ion_blaster.cmp
    material_library = equipment\models\li_equip.mat
    HP_child = HPConnect
    hit_pts = 400
    explosion_resistance = 1.000000
    debris_type = debris_normal
    parent_impulse = 20
    child_impulse = 80
    volume = 0.000000
    mass = 10
    hp_gun_type = hp_gun_special_1
    damage_per_fire = 0
    power_usage = 5.090000
    refire_delay = 0.120000
    muzzle_velocity = 750
    use_animation = Sc_fire
    toughness = 1.300000
    flash_particle_name = li_laser_01_flash
    flash_radius = 15
    light_anim = l_gun01_flash
    projectile_archetype = li_gun01_mark01_ammo
    separation_explosion = sever_debris
    auto_turret = false
    turn_rate = 90
    lootable = true
    LODranges = 0, 20, 40, 80, 100

    Lets break this down though, what does it all mean....Well first under the Munition tab you have nickname = li_gun01_mark01_ammo. This is simply the nickname for the ammo as it says. If you are making a custom gun you may want to make the nickname [your guns name_ammo (destroyer_ammo for example). The next line is hp_type = hp_gun, just leave this line alone as it wont have any bearing on your weapon. Next line, requires_ammo = false...Self explanatory, if it is set to false then it needs no ammo, if it is set to true then you need to buy ammo to use the gun. Moving along to hit_pts = 2, this just says how much damage your ammo can sustain after launch before being destroyed, but it doesnt exactly matter because I dont think anyone is a good enough shot to hit a "bullet" moving 600 m/s. The next two parts are fairly self explanatory...hull_damage = [the flat sum (for example if you wanted a gun to do 1000 damage to the hull you would put hull_damage = 1000). energy_damage refers to the amount of damage it does to shields. This is a bit trickier than hull damage, when energy damage is set to 0 it will automatically do half the hull damage, so if you had it as hull_damage = 1000, energy_damage = 0, the weapon would do 500 damage to shields. If you put hull_damage = 1000, energy_damage = 200, the weapon would do 700 damage to shields, in simpler terms it adds the value you entered onto half of the hull damage. The next for lines deal with weapon types and effects, I will cover those in detail after this part of the tutorial. Skipping down do the lifetime = # line, lifetime means the range of your weapon, but of course they had to be confusing with it, instead of entering a flat number you need to know the equation to get range. Well here it is, 1L = 700M, in non-algebraic terms, lifetime = 1 will give you a range of 700 m, lifetime = 2 will give you a range of 1400, if you have trouble getting the correct number for your range simply open your calculator on your computer and enter the range you want on your gun and divide it by 700, the solution will give you the value to plug in for lifetime. Next line is force_gun_ori = false, I'm pretty sure that this tells you if your weapon is able to rotate. force_gun_ori = false will allow your weapon to rotate in its arc, force_gun_ori = true will make your gun fixed (not able to rotate, like the main gun on the liberty cruiser). The following two lines, mass and volume do not have much bearing on the gun, but though I havent tried it, I'm fairly confident that if you increase them, they may be able to push ships.

    New tab, new paragraph. The first line in the new tab is nickname =, just like in the other. For the nickname put the same nickname as the previous nickname you used (destroyer_ammo) but without the _ammo suffix (so it would just be destroyer). Ids_name and Ids_info both cover the names and infocards of your weapons. Typing a tutorial on that would take a long time, so here is a Tutorial that will cover it (Look at the second post for infocard information). The next line is DA_archetype, this line covers the model that the weapon uses, to find names of other weapons, go into your equipment folder, then into models, and from there go into turrets or weapons, after you find the model you want to use type the path for it after DA_archetype =, starting with the equipment folder (DA_archetype = equipment\models\weapons\li_heavy_ion_blaster.cmp) . The next is material_library, this covers the .mat file (where textures are stored), I do not recommend changing this unless you are changing the DA_archetype accordingly. HP_child, again, leave this along as it has no bearing. The next line could be important depending on the role of the weapon you are making, hit_pts = 400, here covers the amount of damage the weapon itself can take (as opposed to the ammunition of the weapon), change accordingly, there are no weird equations here its just a flat value. The next four lines will also not hurt to avoid. Volume and Mass will also not really effect the gun as they cannot move things because they are attached to your ship. The next line decides the type of hardpoint(s) your weapon can mount on, I will type a list of all the types later in the tutorial, all you need to do is paste them in after hp_gun_type =. damage_per_fire, I've never tested it but my assumption was that it controlled if your ship gets hurt if you fire the weapon, my guess is it would be a flat value (if you plug in 300, then your ship gets damaged 300 when you fire). Power_usage is obviously the amount of energy the gun uses each time it fires, again this is just a value, if you want your gun to use 50 energy just type in 50. Refire_delay controls your gun's refire rate, this is something you need an equation for. The equation is S/R=RD. This means, Second (which is just 1) divided by Refire Rate (we'll use 10) = Refire_delay. So, 1 divided by 10 = .10, so that would be your refire delay. refire_delay = 0.120000 means a refire rate of 8.33. Muzzle_velocity is the speed your ammo travels at, this is another incident where you just need to enter the value you want. Leave the next two lines alone. flash_particle_name refers to the effect that appears at the tip of your barrel when you fire, more on that and the next line at the end of the tutorial along with the effects. Every weapon uses the same light_anim line (light_anim = l_gun01_flash) so you can leave that alone also. projectile_archetype tells the weapon which munition tab to refer to, make sure you put in the nickname of the ammo you just created (it would be destroyer_ammo in this case). The following three lines should remain the same. Lootable simply says if you can tractor it in from destroyed ships, lootable = false means you cannot tractor it in, lootable = true means you can.

    Ok that'll do it for weapon_equip.ini, now onto weapon_goods.ini

    Dont worry this part is much easier.

    Again I will use the Justice Mk I as an example

    nickname = li_gun01_mark01
    equipment = li_gun01_mark01
    category = equipment
    price = 500
    item_icon = equipment\models\commodities\nn_icons\EQUIPICON_gu n.3db
    combinable = false
    ids_name = 263357
    ids_info = 264357
    shop_archetype = equipment\models\weapons\li_heavy_ion_blaster.cmp
    material_library = equipment\models\li_equip.mat

    Yes, that's all this time...Ok let's tackle this one. First of all make sure you have the [Good at the top of your entry. The first two lines are nickname = and equipment =...put the same thing under both (remember destroyer). Leave category = equipment alone. Price...thats straight forward enough isnt it. The line Item_icon just means the icon you'll see (the small picture of the gun) while you are in the dealer. combinable = false, every weapon uses the same line so keep it as is. The next part is very important. For the last for lines, you will notice they are the same lines that were in weapon_equip.ini, make sure you have the same entries under all of them in weapon_equip.ini and weapon_good.ini. IE, if you used ids_name = 263357 in weapon_equip.ini make sure you use ids_name = 263357 in weapon_good.ini. Any mistype here will make your game crash was loading. Make sure you do the same thing for shop_archetype (same thing as DA_archetype from weapon_equip.ini) and material_library.

    That's it for weapon_good.ini....but don't worry there is still more!!!

    Now for the last necessary part to making your gun...You need to be able to buy it!!! With Bini open up market_misc.ini (make sure you arent opening market_ships.ini). Dont worry if it all looks Greek to you at first.

    base = Br01_01_base
    MarketGood = br_gun01_mark01, 6, -1, 10, 10, 0, 1
    MarketGood = br_gun01_mark02, 10, 0, 10, 10, 0, 1
    MarketGood = br_gun02_mark01, 6, -1, 10, 10, 0, 1

    That is the first part from Planet New London. Notice they have the [BaseGood] at the top, make sure you keep that at the top of all of your entries as it keeps them separate. the next line is base = Br01_01_base. That just tells us which base they are talking about. To download a complete list of all the bases nicknames click here. The next part is the heart of the file. MarketGood...Make sure you have that at the start of each line. If you are following the destroyer gun it should look like this. MarketGood = destroyer. Make sure you put a comma at the end of that part as you will soon be needing to type in a few critical numbers. The first number tells which level you need to be to buy the gun. Make sure you separate them all with a comma and a space. The next number tells how your reputation with the faction running the base needs to be to purchase the weapon. -1 means you can buy the weapon at any reputation level. 0 means you have to be exactly neutral with them...So on. The last four numbers need to remain the same. They are 10, 10, 0, 1. It will not work if they are not in that order. So assuming you can buy the destroyer at any level with any reputation it will look like this. MarketGood = destroyer, 1, -1, 10, 10, 0, 1. Just place your gun at whichever base(s) you want them to be sold at, keep in mind that you can set it so you need a good reputation at one base and can be completely hostile at another (pending you find a way to dock..hehe) and still be able to buy it at both bases.

    That'll do it for this file...Your gun will now work, but now we gotta pretty it up right...who wants a boring weapon?

    At this point I'd like to remind you to be saving your work. Save it in a separate folder first, and make sure the file name is correct as sometimes it messes them up.

    To start making new visual effects go back to your Data folder and then go into FX. If you are using BiniQDU you can open up to four files at once. Open up beam_effects.ini and effects.ini. Then go into the FX/Weapons folder and open weapons_ale.ini.

    First we need to start by making the basic effect. Once again I will use the Justice Mk I for an example.

    nickname = Li_laser_01_beam
    tip_length = 5
    tail_length = 60
    head_width = 2
    core_width = 2
    tip_color = 0, 0, 0
    core_color = 255, 255, 255
    outter_color = 200, 200, 255
    tail_color = 55, 55, 155
    head_brightness = 1
    trail_brightness = 1
    head_texture = ball
    trail_texture = thin
    flash_size = 3

    There are two types of tabs you can put in this file, your choice. You can use [BeamSpear or [BeamBolt. Ok, the nickname again, its easiest to just put the name of your gun_beam (destroyer_beam). The next four tabs all discuss the size of the effect. Tip Length I assume is the "nose" of the effect, tail_length refers to how long the trail of the effect is, head_width means how wide the front is, and core_width I assume means how wide the middle of the weapon is. Now for color. These are all in RGB (Red, Green, Blue) order. Use MS Paint to find the RGB value for the color you want. Head and Trail_brightness both explain the....well...brightness of the effect. Head texture, it can be either ball or star, your choice. Trail_texture can be wide or thin, again your choice. Flash size refers to the size of the flash that occurs on the barrel when you fire the weapon. Once you are done with this save it in your WIP (work in progress) folder.

    Done with move onto effects.ini...this is much simpler.

    Here is another example...and once again I'm using the Justice Mk I

    nickname = li_laser_01_proj
    effect_type = EFT_WEAPON_PROJ
    vis_beam = li_laser_01_beam

    Simple huh. Just take the name of your effect (destroyer_beam), and paste it in the vis_beam section over li_laser_01_beam. then take destroyer_beam and remove the _beam suffix and replace it with _proj. Then paste that in the nickname spot. make sure you keep the line effect_type = EFT_WEAPON_PROJ.

    That's all in this file...That didn't take long. Once again, save this in your WIP folder.

    Now move onto weapons_ale.ini

    This'll almost definitely look like Greek to you if you are new to this.

    nickname = li_plasma_01_proj
    alchemy = fx\weapons\li_plasma_01.ale
    effect_crc = -154178588
    textures = fx\planetflare.txm

    That's from the Lavablade. First matter of business is to remove the li_plasma_01_proj and replace it with yours (destroyer_proj), dont remove anything else after that. Now it is time to add effects.

    Here is a list of effects you can add on, add the entire line i paste in to add the effect, keep in mind too many effects could slow down or freeze the game, 8 is probably a safe number.

    textures = fx\planetflare.txm
    textures = fx\sarma.txm
    textures = fx\standardeffects.txm
    textures = fx\miningship.txm
    textures = fx\hexagon.txm
    textures = fx\lightbeam.txm
    textures = fx\planetflare.txm
    textures = fx\smoke.txm
    textures = fx\beam.txm
    textures = fx\photon.txm
    textures = fx\newglows.txm
    textures = fx\sidedistortion.txm
    textures = fx\debrisdust.txm
    textures = fx\ice.txm
    textures = fx\rain.txm
    textures = fx\missleeffect.txm
    textures = fx\kioncannon.txm
    textures = fx\lightbeam.txm
    textures = fx\metallic.txm
    textures = fx\lightning2.txm
    textures = fx\organism.txm
    textures = fx\storm.txm
    textures = fx\snow.txm
    textures = fx\animated.txm
    textures = fx\holomap.txm

    Once again, just paste them under effect_crc.

    Once the effect is created go back to weapon_equip.ini.

    nickname = li_gun01_mark01_ammo
    hp_type = hp_gun
    requires_ammo = false
    hit_pts = 2
    hull_damage = 16.299999
    energy_damage = 0
    weapon_type = W_Laser01
    one_shot_sound = fire_laser1
    munition_hit_effect = li_laser_01_impact
    const_effect = li_laser_01_proj
    lifetime = 0.800000
    force_gun_ori = false
    mass = 1
    volume = 0.000100

    Don't worry, not alot of work, just showing the Munition section again so you dont have to look back. In the const_effect line change li_laser_01_proj to your new effect (destroyer_proj), and the gun will now look how you made the effect to look.

    Here is the list of hp_gun_types I said I'd give.
    hp_gun_special_1: Level 1 Gun or Missile
    hp_gun_special_2: Level 2 Gun or Missile
    hp_gun_special_3: Level 3 Gun or Missile
    hp_gun_special_4: Level 4 Gun or Missile
    hp_gun_special_5: Level 5 Gun or Missile
    hp_gun_special_6: Level 6 Gun or Missile
    hp_gun_special_7: Level 7 Gun or Missile
    hp_gun_special_8: Level 8 Gun or Missile
    hp_gun_special_9: Level 9 Gun or Missile
    hp_gun_special_10: Level 10 Gun or Missile

    hp_turret_special_1: Level 1 Turret
    hp_turret_special_2: Level 2 Turret
    hp_turret_special_3: Level 3 Turret
    hp_turret_special_4: Level 4 Turret
    hp_turret_special_5: Level 5 Turret
    hp_turret_special_6: Level 6 Turret
    hp_turret_special_7: Level 7 Turret
    hp_turret_special_8: Level 8 Turret
    hp_turret_special_9: Level 9 Turret
    hp_turret_special_10: Level 10 Turret

    hp_torpedo_special_1: Torpedo
    hp_torpedo_special_2: Cruise Disruptor

    And now to learn to make the new weapon types. Note that this the point of this is only to adjust how your weapon works against the different types of shields. It's also the only way to make a gun that does massive hull damage and minimal shield damage. First open back up weapon_equip.ini, but you will also need to open up weaponmoddb.ini this time too. First go to weaponmoddb.ini.

    nickname = W_Laser01
    shield_mod = S_Graviton01, 0.800000
    shield_mod = S_Graviton02, 0.800000
    shield_mod = S_Graviton03, 0.800000
    shield_mod = S_Molecular01, 1.000000
    shield_mod = S_Molecular02, 1.000000
    shield_mod = S_Molecular03, 1.000000
    shield_mod = S_Positron01, 1.200000
    shield_mod = S_Positron02, 1.200000
    shield_mod = S_Positron03, 1.200000

    That is an example of a basic laser weapon. You should copy that and paste it at the top or bottom of the file so you have something to work with. First change the nickname from W_Laser01 to say W_Bomb01. then change the shield mod values (the .800000, 1.00000, and 1.200000) to whatever you want them to be. .80000 means 80%, 1.000 means 100%, and 1.20000 means 120%. Once you have finished, save the file. Then go back to weapon_equip.ini

    nickname = li_gun01_mark01_ammo
    hp_type = hp_gun
    requires_ammo = false
    hit_pts = 2
    hull_damage = 16.299999
    energy_damage = 0
    weapon_type = W_Laser01
    one_shot_sound = fire_laser1
    munition_hit_effect = li_laser_01_impact
    const_effect = li_laser_01_proj
    lifetime = 0.800000
    force_gun_ori = false
    mass = 1
    volume = 0.000100

    See the line that says weapon_type = W_Laser01...Change it to weapon_type = W_bomb01 (if that is what you used in weaponmoddb.ini). Then save the file. You now have a new weapon with custom effects and a new weapon type all of its own.



    Only dead fish swim with the stream.
    Don't discuss with idiots. They only drag you down to their level and then beat you with experience there.

    This is ten percent luck,
    Twenty percent skill,
    Fifteen percent concentrated power of will,
    Five percent pleasure,
    Fifty percent pain,
    And a hundred percent reason to remember the name!