September 16, 2019, 10:21:58

Author Topic: Help with turrets needed  (Read 5462 times)

Offline malcolmreed

  • Recruit
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
    • http://
Help with turrets needed
« on: November 25, 2010, 13:37:46 »
Hi, I'm working form some time on a mod called Invasion that uses huge multi barreled turrets compared to the ones normally used by nexus ships
I was wondering if it is possible to do the following things

- limiting the rotation range of the turrets, because the rotation sometimes makes the whole cannon fire form the inside of the ship, not exactly a major
broblem but surely an annoying one

- make a recoil animation

- make the turret fire from all the barrels every shot, I tried to add more than one #fire# single point ploygon on the model but it didn't worked
the projectile is fired only from #fire1#.

Please help!

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(no subject)
« Reply #1 on: November 28, 2010, 20:32:29 »
Ah, turrets... took me while to wrap my head around correctly placing and orienting those bastards ;)

Limiting rotation / firing arc
Definitely possible, but with limitations. Same basics are covered here:
Turret Orientation

Generally it boils down to this:
  • per default every turret can fire in every direction
  • Nexus tries to select the best turret for attacking a specific target - it's a good idea to have at least two turrets per weapon slot on opposite sides of the ship, so Nexus can pick a turret, that won't fire through the ship's hull
  • you can limit the firing angle by modifying "CannonMaxFireAng" in your tacticstypes.ini for that weapon's DEVICETYPE
  • "CannonMaxFireAng" describes the maximum angle in degrees the shot can deviate from the current orientation of the turret's barrel (e.g. if the barrel points forward and CannonMaxFireAng is 90 degrees, then the turret could fire upwards)
  • "CannonMaxFireAng" is always relative to the barrel, not the turret! Rotating turrets can already move their barrel to cover the upper half-sphere above them - picking a high "CannonMaxFireAng" makes that turret fire outside it's designated half-sphere!
  • a rotating turret can always cover it's upper half-sphere, even with a really low "CannonMaxFireAng" such as 1 degree - because it can always fire in direction of its barrel.
  • the firing arc of a non-rotating turret (such as Nexus' default flak lasers) can be effectively limited by adjusting "CannonMaxFireAng" - because the barrel can't move, the weapon is forced to fire inside the angle set by "CannonMaxFireAng"

Recoil animation:
Not possible, as far as I know.

Multi-barrelled muzzle flash
Maybe possible, although AFAIK that's only a theory. The game ignores more than one #fire# point, although you could potentially fake that by creating a particle effect, that shows a muzzle flash for each barrel. Theoretically, for a cannon with three barrels, you could create a particle effect consisting of three muzzle flash effects with each one's position being slightly offset. If done right, that could result in a proper multi-barreled fire effect. Haven't tried it before, though, so take that with a grain of salt...

Some problem I already see with that approach: particle effects don't scale with turret size - if you use differently sized turrets of the same weapon system on different ships, the particle effect won't align with the barrels. You'd need to make a special version of that weapon's DEVICETYPE for each possible turret size, adjusting the effect's size each time.

I'm not sure, if it's worth it. If your turrets are really big relative to the ship's size, then it's maybe worth a try... but otherwise the player isn't likely to notice that effect anyway - he won't zoom in far enough most of the time to actively notice the small barrels and their fire effects.
« Last Edit: December 08, 2010, 12:48:52 by Arparso »

Offline malcolmreed

  • Recruit
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #2 on: November 29, 2010, 11:23:42 »
Thank you Arpaso, at least now I know what nexus can and can't support, i'll try to make the turrets work as realistic as possible.

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #3 on: November 30, 2010, 01:33:12 »
For the muzzle flash of multi-barreled turrets, you could think along the lines of energy weapons in high-tech anime shows. In these, the weapons often charge up, and then form one big ball of energy that the shot fires out of, instead of one ball for each barrel. It isn't ideal from a realism stand point, and it does work within the limits of Nexus' engine.

Offline malcolmreed

  • Recruit
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #4 on: November 30, 2010, 11:02:20 »
Good idea! But the things I am making are projectile weapons like the ones of Battlestar Galactica.
The guys of Nexus Bsg team made a remarkable work with their weapons, and i'll try to do something similar to that,
someone knows about a thread that explains how to make particles in Nexus, because the explanation in the modding tools in
kinda confusing sometimes.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Help with turrets needed
« Reply #5 on: January 08, 2011, 18:57:44 »
Yeah I think Arparso already covered it pretty well. The engine definitely has some annoying limitations for sure. We'd love to have recoil animations and dual barrel flashes.

I tried making an effect like Arparso suggested, were it has 2 flashes in the texture, but it really only looks decent from a certain range or angle - I wouldn't use it as a real solution :(

Offline Data

  • Recruit
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Help with turrets needed
« Reply #6 on: September 16, 2011, 00:29:39 »
Good night fellas.

Some days a ago I recognized that many hardpoints in the given meshes are bad placed. E.g. on the battleship HP 8 is not aligned to the centerline, also HP 2 or the flak-HP. On the angelwing most turrets are free floating and has no (visual) connection to the hull, so you can look between turret and hull in some times.

This is offending my eyes!  >:(

Is there a way to correct these meshes? Maybe with Lightwave or are there already fixed meshes?

I hope this fits the topic, but I think so.
The reports of my disassembly are greatly exaggerated.

Offline The Old Dragon

  • Ensign
  • ***
  • Posts: 362
  • Karma: 6
    • View Profile
    • http://
Re: Help with turrets needed
« Reply #7 on: October 08, 2011, 20:58:31 »
Hi All,

Does anyone know if it's possible to limit the fire arc of a turret in any way? Some of the turret locations lead to the them firing through the hull on occasion.
Better to look the fool by asking, then prove them right with ignorance.

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Help with turrets needed
« Reply #8 on: October 10, 2011, 16:46:39 »
In the Tacticstypes file, craft weapons often have the following parameter:

CannonMaxFireAng

In the BSG mod, I tested it on main (forward oriented) guns, and appearantly you can limit the fire angle with it. CannonMaxFireAng 10 let those forward oriented guns fire almost only straight ahead. We literally need to aim the bow of a battlestar to let them fire.
But I suppose that for turrets somewhere else on a mesh the initial position of the weapon point (which direction it is pointed) determines the firing angles (or limitation thereof).

Offline The Old Dragon

  • Ensign
  • ***
  • Posts: 362
  • Karma: 6
    • View Profile
    • http://
Re: Help with turrets needed
« Reply #9 on: October 13, 2011, 00:55:20 »
Hi there Geo,

Looks like that only works on fixed weapons (strikecraft, siege weapons, etc),  I'm afraid. Didn't make any difference to the fire arc of the turrets.  :(
Better to look the fool by asking, then prove them right with ignorance.

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Help with turrets needed
« Reply #10 on: October 13, 2011, 21:43:07 »
Aw.  :(
Anyway, good to know the limits of the parameter.