Fixed Weapons

  • In one of my mods I´m working on a new weapon type called cannon. They are much like the "standard" guns but do more damaga and - this is the point - have a fixed orientation. So they are meant to shoot only directly forward. But the problem is that even if they are unable to turn they also shoot in angles from the lengh axis

  • take a look at your "cannon" in the hard cmp editor.
    Then, compare it to standard weapons listed in the weapon_equip.ini.
    I'm sure once you discover the differences, you can "fix" the cannon
    orientation.


    note:
    force_gun_ori = true

  • 1. Is your "cannon" a "gun" or a "turret"?


    2. In the CMP editor, your weapon should be:
    a) Hp|Revolute|HpWeapon
    or
    b) Hp|Revolute|HpTurret


    Most standard guns and turrets are set up with a REVOLUTE hardpoint.


    (look up the Liberty Cruiser Forward Gun)


    IF you set up a weapon as FIXED hardpoint --- it's gonna spin around
    similar to a turret, but in some cases worse.
    UNLESS you FORCE the gun orientation. (force_gun_ori = true) as with
    the Liberty Cruiser Forward gun.


    Okay, here is the Liberty Cruiser Forward Gun...take notice:


    [Munition]
    nickname = li_cruiser_forward_gun01_ammo
    hp_type = hp_gun
    requires_ammo = false
    hit_pts = 2
    hull_damage = 250000
    energy_damage = 0
    one_shot_sound = fire_capship_forward_gun
    munition_hit_effect = li_capgun_01_impact
    const_effect = li_cruiser_maingun
    lifetime = 2
    force_gun_ori = true
    mass = 1
    volume = 0.000100


    [Gun]
    nickname = li_cruiser_forward_gun01
    ids_name = 263377
    ids_info = 264377
    DA_archetype = equipment\models\turret\li_cruiser_gun01.cmp
    material_library = equipment\models\li_turret.mat
    HP_child = HPConnect
    hit_pts = 16860
    explosion_resistance = 1.000000
    debris_type = debris_turret_small
    parent_impulse = 20
    child_impulse = 80
    volume = 50.000000
    mass = 10
    damage_per_fire = 0
    power_usage = 0
    refire_delay = 0.500000
    muzzle_velocity = 500
    toughness = 4.000000
    flash_particle_name = li_capgun_01_flash
    flash_radius = 15
    light_anim = l_gun01_flash
    projectile_archetype = li_cruiser_forward_gun01_ammo
    separation_explosion = sever_debris
    auto_turret = false
    turn_rate = 90
    lootable = false
    LODranges = 0, 10



    XXXXXXXXXXXXXXXXXXXXXXX
    CAUTION:


    depending on how your have your "cannon" set up---
    (i.e. it's own cmp, mat, 3db & sur files)
    the "hp_type" will most likely have to reflect a
    different weapon type.
    instead of hp_gun
    it could be:
    hp_gun_special_(01-10) gun max can be up to 10
    OR
    hp_turret_special_(01-09) turret max is only up to 9!


    The big problem with capital ship weapons is that they don't
    have a specific "gun or turret" type line.
    Because of this, any ship (including the lowly starflyer) can mount them...
    and it looks rediculous.

  • Here is another one what you must check :


    Your cmp model of weapons turn rate must set it to 0.


    If not, your weapons will be shoot in angles from the lengh axis.


    You can see it in the Liberty Cruiser cmp model, I was tested it.

  • Wrong....



    turn rate controls how fast a turret or gun rotates, the li cruiser gun doesn't rotate , turn rate isnt used
    putting a normal gun or turret mesh on a fixed hardpoint , and they still spin


    point is there is also a revolute hp on the cmp for the weapon mesh, the li cruiser gun, rh gunboaat cannon etc have non standard hpmount settings, if making your own weapon mesh copy the hpmount settings from these


    forcing gun origins means that 1 the weapon can be fired even when YOU are looking in the opposite direction, and 2 that the weapon doesn't use the 'muzzel cone angle' specified in the global inis (usually 40 degrees) so a normal gun on a +0/-0 degree revolute hp will still fire 20 degrees to either side and 20 degrees below horizontal, plus whatever amout of elevation it permits.


    You need either to
    1 use one of the invisible weapons like the li cruiser gun mesh (simple)
    2 make a custom weapon mesh with limited hp's, (very tricky)
    3 clone an existing weapon mesh, with the flmodelcloner AND some custom editing with the utf editing tool AND hardcmp(tricky)
    or
    4 check out some of the unused weapon meshes, like one of the bretonian weapons or one of the missile launchers, which have a weapon mesh suitable for a standard ship hardpoint but also have limited mount hp's (fairly simple)

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...