Nexus Modding > Mod Development / Released Mods

Limiting weapon ranges

(1/3) > >>

Arparso:
Oh-kay... I'm currently trying to balance fighter combat, but got a pretty annoying problem: I can't properly restrict the fighting range for my fighter-vs-fighter weaponry.

It's a regular anti-fighter weapon, purpose 5, projectile-based (no laser) and installed into the fighters' flak slot:


--- Code: ---DEVICETYPE  50
    Name "weap_subach_hl7"
    Category 1
    Civilization 1
    Sets 7 30 39 ;
    Automatic
    Purpose 5 ;
    HitChanceCat 9
    AutoDistance 1800
    Substance 3
    Charge 1
    EnergyIn 4
    PenetrateShield 0
    DamageHull 27
    DamageShield 21
    DamageDevice 9
    Scanned 100
    HPmax 100000
    RepairHP 16
    Start 2 0 100 1
    Travel 2 450 101 1
    End 1 0 102 1
    CannonMaxFireAng 25
DEVICETYPE
--- End code ---

Problem is, they attack from 5km distance... which looks totally ridiculous...
AutoDistance supposedly limits firing distance on automatic weapons (like flak lasers in vanilla Nexus) and it works somewhat - when not being given a direct attack order on an enemy squadron, the fighter only starts firing when a viable target enters his AutoDistance-range. That's what I actually want. But if the player gives a "attack this enemy squadron"-order, the fighter starts firing from as much as 5km distance (Nexus' default close-combat range).

Changing the weapon to a continious laser beam fixes that, as you can limit the laser's range in the Travel-property of the DEVICETYPE, but Freespace has no frakking laser beams for fighters - I need a projectile-based weapon and limit its range.

/edit:
Even worse... the exact same thing works perfectly fine for attacking capital ships, with a Purpose of 2. But I can't attack fighters with a Purpose-2-weapon...

DreamorCZ:
Well, 'Automatic' should not be there if you have set autodistance for fighter weapons. Also, 30 in sets is little unusual but it depend on your tacticbase setting. And I would rather use Substance 2 or 1 insted of 3.

Arparso:
That doesn't have to do anything with range, though. Still got the same problem after these suggested changes.

Mularac:
can we see what's your BaseHitchance 9?

Arparso:
Sure, there you go:


--- Code: ---BASEHITCHANCE  9
    1 2 35
    1 3 0
    1 4 0
    2 2 30
    2 3 0
    2 4 0
    3 2 20
    3 3 0
    3 4 0
    4 2 45
    4 3 0
    4 4 0
    5 2 85
    5 3 0
    5 4 0
    6 2 0
    6 3 0
    6 4 0
    7 2 0
    7 3 0
    7 4 0
    8 2 0
    8 3 0
    8 4 0
    9 2 0
    9 3 0
    9 4 0
    10 2 0
    10 3 0
    10 4 0
BASEHITCHANCE
--- End code ---

It only got a hitchance against missiles, fighters, bombers and transports and only for the smallest possible range 2, which represents 5km according to my tacticsbase.ini.

Like I already said: the funny thing is I have a nearly identical weapon, just with a purpose of 2 (hull destroyer), with which my fighters attack capital ships. The AutoDistance works fine there, just not on my anti-fighter weaponry.

Navigation

[0] Message Index

[#] Next page

Go to full version