December 22, 2024, 14:25:51

Author Topic: Fighter not using all turrets?  (Read 22957 times)

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
Fighter not using all turrets?
« on: January 23, 2010, 12:53:47 »
Okay, I've got a strange problem with my fighters. My Hercules fighters have 6 front turrets, each with a weapon mounted. For reasons unknown, however, they only shoot with 5 of them. I already checked the weapon slots in the model file - those are just fine. I also tried only giving them two weapons resulting in them firing only one of them! After a few more tests it seems they always fire with one weapon less than they actually could. If they have 5, they fire with 4... if the have 3, they fire with 2. Only if they've only got a single weapon, they'll disobey this "rule".

Ideas, anyone?

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #1 on: January 23, 2010, 13:47:38 »
try copy-pasting a nexus original weapon and add it to the fighter, see if that "rule" sticks. Also, perhaps you can try the same with the fighter coding, to check were the erro really is, if in the mesh or in the coding or in the unkown warps of nexus.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #2 on: January 23, 2010, 15:10:12 »
Doh! Think I've found the issue. I just remembered there's also a "attack with secondary weapons" command button for fighter squadrons. Well, turns out the game treats the last regular weapon of the fighter as secondary and so it doesn't use it when simply right clicking on an enemy! Actually, if you give the order to use secondary weapons it'll use everything but the first regular weapon slot, so I guess the primary/secondary system is kind of borked anyhow. Probably it doesn't expect that many turrets on a simple fighter, since all Nexus fighters, gunboats or bombers have a maximum of two regular turrets and a flak turret (the flak turret doesn't seem to count for this primary/secondary stuff).

I just gave my fighter a slot for special weapons (#slot 9#) and fitted it with a gun, that can't hit anything because of it's HitChanceCat (so it never ever fires at anything)... the Hercules now properly used every one of their regular guns when given the simple attack order. Seems like a workaround I can live with ;)

Offline Hyperion5

  • Recruit
  • *
  • Posts: 14
  • Karma: 0
    • View Profile
(No subject)
« Reply #3 on: April 04, 2010, 00:18:09 »
It looks like weapon types (normal and heavy) are separated by a triple space that might affect the AI routine:
Code: [Select]
SHIPCLASS 20
Name "cls_Bomber"
Mesh "earthmainbomber_01"
...
HPmax 21
Slots 31 31   39 ;   ///<-see?
Slots 51 ;
Slots 71 ;
...
SHIPCLASS

Perhaps if you were to remove them, or move them to the end? that would re-mark the hard-points i think. On a hunch here, try adding additional spaces at the end too.

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #4 on: April 04, 2010, 01:50:43 »
I'm pretty sure those spaces are for visual purposes only...

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
(No subject)
« Reply #5 on: April 04, 2010, 23:03:13 »
AFAIK, the slot number itself determines if something is a heavy or light weapon. Hardcoded.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Fighter not using all turrets?
« Reply #6 on: October 15, 2011, 07:52:28 »
I know you got this working Arparso, heh, but I just can't get it to work! :E
I've  been over the model a dozen times, the hardpoints are fine. I compared the scripting an aside from differences in EFX settings and a slot number (you added 37 for slots 1-8), it's pretty much the same, but mine only fire 1 weapon at a time. Do you absolutely have to max out all of the weapons? I'm trying just 2 slots and a 3rd "empty" slot that won't fire. But it only ever fires that first normal weapon at fighters/bombs/missiles  >_<

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Fighter not using all turrets?
« Reply #7 on: October 15, 2011, 08:22:25 »
Alrighty, I just got this working but only for weapons that target hulls. Once I switch the weapon's purpose to 5 for anti missile/fighter role, it goes back to only using 1 weapon slot :(

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Fighter not using all turrets?
« Reply #8 on: October 15, 2011, 17:11:11 »
Slot setup
Code: [Select]
DEVICESLOTS
1  8 - 90 31 32 34 35 37 ; // normal weapon
9  9 - 110 33 ; // siege weapon
10 13 - 100 39 ; // flak
14 14 - 90 41 42 43 ; // shield
15 15 - 90 51 52 ; // main engine
16 16 - 90 53 ; // aux engine
17 18 - 120 54 55 56 ; // special engine
20 22 M 90 61 62 63 64 65 66 67 81 ; // support devices except weapon generators, and IP drive
23 23 M 60 71 72 73 ; // weapon generator
24 24 M 90 38 ; // mechanoid emitter
DEVICESLOTS

Viper setup
Code: [Select]
SHIPCLASS  7
    Name "cls_vipermkii"
    Mesh "human\vipermkii"
    GUIIcon "icons\vipermkii"
    Efx 290 1
    FinalEfx 1 0.3
    Civilization 0
    Velocity 200
    RotVelFact 40000
    RangeBehav 2 2
    Behaviour 0
    TargetType 2
    WeapCntFact 1
    HPmax 100
    NoCrew
    Slots 37 37 37 33 ;
    Slots 51 ;
    Slots 73 ;
    DefDevices 37 37 37 39 204 290 ;
SHIPCLASS

Weapon setup
Code: [Select]

DEVICETYPE  37
    Name "weap_humfighterguns"
    Category 1
    Civilization 0
    Sets 37 ;
    Purpose 5 ;
    HitChanceCat 20
    DeviceHitChance 100
    AutoDistance 500
    Substance 1
    Charge 1
    EnergyIn 2
    DamageHull 1
    Scanned 100
    HPmax 100000
    RepairHP 16
    Start 2 0 111 1
    Travel 2 6500 112 2
    End 1 0 48 1
    CannonMaxFireAng 20
DEVICETYPE

hitChanceCat
Code: [Select]
BASEHITCHANCE  20
    20 2 35
    20 3 0
    20 4 0
    21 2 25
    21 3 0
    21 4 0
    22 2 50
    22 3 0
    22 4 0
    23 2 115
    23 3 0
    23 4 0
    24 2 135
    24 3 0
    24 4 0
    25 2 35
    25 3 0
    25 4 0
    1 2 35
    1 3 0
    1 4 0
    2 2 25
    2 3 0
    2 4 0
    3 2 35
    3 3 0
    4 4 0
    4 2 50
    4 3 0
    4 4 0
    5 2 115
    5 3 0
    5 4 0
    6 2 135
    6 3 0
    6 4 0
    7 2 35
    7 3 0
    7 4 0
    8 2 50
    8 3 0
    8 4 0
    9 2 25
    9 3 0
    9 4 0
BASEHITCHANCE


The mesh has 3 slots for normal weps (Slots #1 - #3) and slot #9 for the "dummy" artillery piece. When the purpose is set to 5 for the weapons on slots 1-3 it just will not fire more than 1. If I set it to "2 3;" and target a basestar, it fires all three weapons. I need those weapons to fire at fighters and missiles, not capitals >_<

Any help would be great.

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Fighter not using all turrets?
« Reply #9 on: October 15, 2011, 17:31:35 »
What if you would put 2 (or 3 if it needs an extra "empty" gun as well) flak slots in the DefDevices line?

37 37 37 39 39 (39?) 204 290 is what I mean.

I suppose the slots line itself also need to be 37 37 37 33 33 (33?) then...

And what about using "purpose 2 3 5"? Not compatible?

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Fighter not using all turrets?
« Reply #10 on: October 15, 2011, 17:51:29 »
I'll try the additional flak slots.
Using 2 3 5 works, but seems to never fire at missiles/fighters. It's like it ignores the 5 altogether.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Fighter not using all turrets?
« Reply #11 on: October 15, 2011, 18:20:55 »
I got it. Automatic. FRAKKIN automatic. I didn't expect I had to set that for it. I tested the ship using the flak weapon (which was funny seeing 3 gun meshes larger than the viper itself attached to it) and it worked. Only difference was the automatic setting. Changed that, voila' ! :)


Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Fighter not using all turrets?
« Reply #12 on: October 15, 2011, 18:44:34 »
Update the svn already! ;)

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Fighter not using all turrets?
« Reply #13 on: October 15, 2011, 19:18:48 »
Takes time. I have to redo hardpoints on all of the fighters and bombers. We dont have the original LWOs either. So I have to decompile the models and remake the hardpoints. =\   I will be in an hour or two.

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Fighter not using all turrets?
« Reply #14 on: October 15, 2011, 19:48:48 »
Just wondering, but if the plan is that Vipers should be able to carry extra ordnance (like in their attack at the Cylon Tylium plant in "The Hands of God", a secondary weapon point(s) is/are necessary.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Fighter not using all turrets?
« Reply #15 on: October 16, 2011, 03:04:05 »
That's super easy to do when we get to it.