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

0 Members and 1 Guest are viewing this topic.

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Help needed with turrets
Check out this model.

The tbl entry is as follows:
Code: [Select]
$Name: UAGb Poseidon
+nocreate
$Short name: Poseidon Gunboat
$species: Terran
+Tech Description:
XSTR("Due to its lack of capital ships, the UAL has refitted a large number of Poseidon freighters to be heavy gunboats. Tightly connecting them to a TC 2a unit gives them enough space to carry additional energy sources which are sufficient enough to power two light beam cannons, six medium plasma turrets and no less than eight light anti-fighter laser turrets. Though their sublight speed has been slightly reduced, their huge energy output enable them a subspace mobility to rival a fighter. These features make them ideal support craft for any kind of fighter operation, especially convoy raids. Though Poseidon gunboats do not have the strength to go against larger warships, a group of three or more can easily deal with a single cruiser.", -1)
$end_multi_text
$POF file: Poseidon_gunboat.pof
$Detail distance: ( 0, 165, 349, 762 )
$Show damage: YES
$Density: 1
$Damp: 0.2
$Rotdamp: 0.7
$Max Velocity: 0.0, 0.0, 40.0
$Rotation time: 15.0, 15.0, 15.0
$Rear Velocity: 0.0
$Forward accel: 4.0
$Forward decel: 1.0
$Slide accel: 0.0
$Slide decel: 0.0
$Expl inner rad: 50.0
$Expl outer rad: 100.0
$Expl damage: 50.0
$Expl blast: 500.0
$Expl Propagates: NO
$Shockwave Speed: 0.0
;$Default PBanks: ()
;$Default SBanks: ()
;$SBank Capacity: ()
$Shields: 0
$Power Output: 30.0
$Max Oclk Speed: 60.0
$Max Weapon Eng: 0.0
$Hitpoints: 10000
$Flags: ( "cruiser" )
$AI Class: Captain
$Afterburner: NO
$Countermeasures: 0
$Scan time: 2000
$EngineSnd: 128
$Closeup_pos: 0.0, -4.0, -75
$Closeup_zoom: 0.6
$Score: 15
$Thruster Bitmap 2: thruster02-01LessHaze
$Thruster02 Radius factor: 0.75
$Thruster02 Length factor: 0.6
$Subsystem: turret01, 6.5, 1.0
$Default PBanks: ( "LTerSlash" )
$Flags: ( "check hull" )
$Subsystem: turret02, 6.5, 1.0
$Default PBanks: ( "LTerSlash" )
$Flags: ( "check hull" )
$Subsystem: turret03, 6.5, 1.0
$Default PBanks: ( "Terran Turret" )
$Flags: ( "check hull" )
$Subsystem: turret04, 6.5, 1.0
$Default PBanks: ( "Terran Turret" )
$Flags: ( "check hull" )
$Subsystem: turret05, 6.5, 1.0
$Default PBanks: ( "Orion Huge Turret" )
$Flags: ( "check hull" )
$Subsystem: turret06, 6.5, 1.0
$Default PBanks: ( "Orion Huge Turret" )
$Flags: ( "check hull" )
$Subsystem: turret07, 6.5, 1.0
$Default PBanks: ( "Terran Turret" )
$Flags: ( "check hull" )
$Subsystem: turret08, 6.5, 1.0
$Default PBanks: ( "Terran Turret" )
$Flags: ( "check hull" )
$Subsystem: turret09, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 0, 0, 0
$Subsystem: turret10, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 0, 0, 0
$Subsystem: turret11, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 0, 0, 0
$Subsystem: turret12, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 0, 0, 0
$Subsystem: turret13, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 315, 0, 0
$Subsystem: turret14, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 45, 0, 0
$Subsystem: turret15, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 315, 0, 0
$Subsystem: turret16, 6.5, 1.0
$Default PBanks: ( "Subach HL-7" )
$Turret Base RotationSnd: 250
$Turret Gun RotationSnd: 251
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
 +relative_angle: 315, 0, 0
$Subsystem: communication, 10, 0.0
$Subsystem: navigation, 5,  0.0
$Subsystem: weapons, 20, 0.0
$Subsystem: sensors, 10, 0.0
$Subsystem: engine,  30, 0.0

There's a mess with the small turrets going on (you'll see it ). I don't get it. What is it? How can I solve it? Do I need something else than PCS?

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Help needed with turrets
You mean the multiparts? If so, then I don't know for sure what's wrong since I didn't test, but if the problem is that they're rotating and shooting in wrong directions, then those are usually easiest to fix by adding proper $fvecs and $uvecs for them (they override the turret normals and rotation axes, in case there's something wrong with those).

Like this (untested; only added the props to turrets 9-16).

 

Offline Nyctaeus

  • The Slavic Engineer
  • 212
  • My "FS Ships" folder is 582gb.
    • Minecraft
    • Exile
Re: Help needed with turrets
http://www.mediafire.com/download/cm49rcdrv5dyt5b/Poseidon_GbFix.rar

I hope that's enough. I fixed also other badly rotated turrets. If you want to have some turret with custom rotation, use animation code.
Exile | Shadow Genesis | Inferno | Series Resurrecta  | DA Profile | P3D Profile

Proud owner of NyctiShipyards. Remember - Nyx will fix it!

All of my assets including models, textures, skyboxes, effects may be used under standard CC BY-NC 4.0 license.

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Help needed with turrets
Oh, I didn't know about these two options. Thanks a lot, gentlemen. It's still not a 100% right, but know I know what screws I have to turn. :)

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Help needed with turrets
Another question: Which $uvec and $fvec settings do I need for a turret which is at the back side of a ship? I don't get it...

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Help needed with turrets
Depends on which way the turret is facing.

The $uvec should denote a normal which points straight upwards from the turret (so, along the barrels, as barrels are supposed to point straight up in the model), and $fvec should denote a normal pointing the way the turret is facing (so, the same direction the barrels would point if they lowered themselves 90 degrees).

You can use any of the normal editors in PCS2 (turret, thruster, eyepoint etc normals) to make sure you got the directions right. Except that you have to invert the x coordinate.

 

Offline SF-Junky

  • 29
  • Bread can mold, what can you do?
Re: Help needed with turrets
Yeah, well, the turret is supposed to face... backwards, of course. No matter what I enter under $fvec, it is NOT firing at hostile ships behind the ship the turret is on. $uvec is set to 0,0,1. To my understanding $fvec should be either 1,0,0 or -1,0,0, but none of these settings work.

See screenshot in the attachment shows the turret as it is in PCS.

[attachment kidnapped by pirates]

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Help needed with turrets
When it's on the back side of a ship, then $uvec needs to be 0,0,-1 of course, because 0,0,1 points forward. What $fvec needs to be depends on which way the base of the turret is facing, which I'm guessing in your case is up, meaning that $fvec should be 0,1,0.