Author Topic: Default Gun Barrel Angle  (Read 10082 times)

0 Members and 1 Guest are viewing this topic.

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
Default Gun Barrel Angle
I really hate the default 90 degree orientation of turret gun barrels.  Having seen Stratcomm post the animation code for fixing this issue, I started going through ships and putting the appropriate codes in.  Howeer, I also seem to recall comething about new builds altering the default elevation.  Is it worthwhile to carry on with these table edits?





If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
There was some code to do this, but it had been broken for a while.  The last time it worked was for Goober's 07/28 build, which contained a fix by WMC.  Unfortunately, for some strange reason, no build since then has had this functioning.  I reported it for the first few builds following this, but no one seemed to listen, so I stopped reporting it.
The Trivial Psychic Strikes Again!

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
use the animation code, let me dig it up here really quick

Code: [Select]

$Subsystem: Turret01-base,1,1.0
$Default PBanks: ( "SG-12 Buckshot" )
$animation=triggered
$type="inital"
+relative_angle: 90,180,0 ; this is to make an underside turret point forward
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
Oh, sure, I am using that code, as you see in the screenshots.  However, it would take a while to do all the prominent turrets, which would be a waste of time if FSO is going to change the default angle in the code itself.  Thus, I'm wondering if I should carry on and fix up the other vessels or not....
If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
Originally posted by Trivial Psychic
There was some code to do this, but it had been broken for a while.  The last time it worked was for Goober's 07/28 build, which contained a fix by WMC.  Unfortunately, for some strange reason, no build since then has had this functioning.  I reported it for the first few builds following this, but no one seemed to listen, so I stopped reporting it.


Partly because even when I tried to do it the same way as Bobb's animation code, it still broke turrets.

Edit: Make it as an XMT, if you can get it done before I release the mediaVPs I'll include it as well. If not then it'll be fully compatible with them.

To use Nuke's example as the base:

data/tables/nuke-shp.tbm
Code: [Select]
#Ship Classes
$Name: Unknown    ;;I don't recognize his ship. Sue me.
+nocreate        ;;Don't create the ship, just change the attributes
$Subsystem: Turret01-base  ;;We can skip the other numbers. :D
$animation=triggered
$type="inital"
+relative_angle: 90,180,0 ; this is to make an underside turret point forward
#End
« Last Edit: October 16, 2005, 10:26:53 pm by 374 »
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
what do those numbers mean, i know one is % of hull, but whats the other do?

btw that was off the apis attack fighter, its like an a-10, but more vasudan. :D
« Last Edit: October 16, 2005, 10:36:49 pm by 766 »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
Do I need to include all tags in an XMT?  I used:

Code: [Select]

#Ship Classes
$Name:                          GTC Aeolus
+nocreate        ;;Don't create the ship, just change the attributes
$Subsystem:                     turret01
$animation=triggered
$type="inital"
+relative_angle: 70,180,0
$Subsystem:                     turret02
$animation=triggered
$type="inital"
+relative_angle: 70,0,0
$Subsystem:                     turret03
$animation=triggered
$type="inital"
+relative_angle: 70,180,0
$Subsystem:                     turret04
$animation=triggered
$type="inital"
+relative_angle: 70,0,0
$Subsystem:                     turret05
$animation=triggered
$type="inital"
+relative_angle: 70,0,0
$Subsystem:                     turret06
$animation=triggered
$type="inital"
+relative_angle: 70,180,0
#End


and got:

Code: [Select]

Error: Nelson-shp.tbm(3):
Error: Required token = [$Species:], found [$Subsystem:                     ]
in ship: GTC Aeolus.


So obviously it want species to appear in here too -- does that mean I need to repeat all mandatory tags?

Incidentially, you'll note I put the turrets at a 20 degree slant, not perfectly flat, as I thought that looked unnatural.  Comments?
If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 

Offline Axem

  • 211
Quote
Originally posted by Nuke
what do those numbers mean, i know one is % of hull, but whats the other do?


Rotation time I think. The time in seconds to make one revolution.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Just to clear things up, there are 2 sets of figures for one turret entry with initial position data.

The first line with the subsystem entry would have your subsystem strength, followed by a the rotational data.  The line that starts with "+relative_angle:" has first the angle of the barrels in degrees, the second is the rotation angle of the base in degrees, followed by a figure which I assume would be a rotation time, used in other cases.  Its probably for where a specific movement is triggered, so a time figure must be in to control its speed.  Since the useages being discussed here are for turret initial positions, only a "0" is required.
The Trivial Psychic Strikes Again!

 

Offline FireCrack

  • 210
  • meh...
I beleive the third figure is a roll value, as a iremember seeing +time: in one of these.
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Use a Recent CVS build, I implemented XMTs shortly after 3.6.7
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
did the spelling of relitive change in any recent builds :D

oh yea and the angle is pitch,yaw,roll, for setting initial position of turrets roll is not typically used. the +time: is more for other animations.

oh and can we integrate the python scripting into the animation system as well. seems like an easy way to make it more versitile.
« Last Edit: October 17, 2005, 01:37:34 am by 766 »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Incidentally, roll doesn't work, nor does scripted animation act on any axis other than the axis of rotation as specified in the POF.  I consider this a bug, and I thought it worked differently at some point in the past, but having recently tested it on current CVS builds, I can verify that this is no longer the case.

And do go ahead and define values for the turrets (including turning them around when that makes sense), even if the defaulting-to-depressed code gets reintroduced.  Defining the angles to what looks good will always be better than having a hardcoded default.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
i think theres a line that needs to be in the subobject props for it to work. you need to add :$triggered:" to the subobject properties of any subobject that is animated. (i dont think its nessicary for initial angles though).
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
This is exactly why I wish the submodel animation was documented somewhere that wasn't only indexed by the board's search feature.

That makes sense, though.  I'll have to test it.  Though IMHO, that seems like a silly restriction.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
The post 3.6.7 builds all crash on me.  First it complained about not being able to find 'shockwave.pof,' so I installed DaBrains shockwave release, and got by that.  Next it crashes on:

Warning: Couldn't open texture 'Shornetd'
referenced by model 'New_Qutrob.pof'

and

Warning: Couldn't open texture 'THRUSTER01'
referenced by model 'fighter2t-03.pof'

None of the older builds complain about this.  Also is it right to put a file only supported by post 3.6.7 builds in the media VPs?  Everything works fine when I am just editing ships.tbl directly.

Also, the line "$Subsystem: Turret01-base  ;;We can skip the other numbers. " implies that the values after the turret subsystem name can be skipped.  FS2 would crash on me here, complaining about a missing float until I restored the numbers.
If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
The THRUSTER01 bug is really a non-bug, and that's being taken care of.  The Shornetd texture error has been around for a while, though I can't remember what causes that.  However, both warnings should be non-fatal (press the middle button, cancel IIRC, to return to the game) so you should be able to get past them.

And I'd always put in the numbers as even if it is valid to have them missing (I don't think it is) the defaults would probably not be what you want anyway.  And be careful with dashes in subobject names; those can end up behavinig in very strange ways across different builds.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
Well, it seems there is also a:
Warning: Null vec3d in vec3d normalize.
Trace out of vecmat.cpp and find offending code.

in there.  FS2 always locks up for me in the post builds.  The first mission in the game dies complaining about an extra LOD in the Satis; my little test mission dies complaining about this null vec3d.
If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Quote
Originally posted by Nuke
use the animation code, let me dig it up here really quick

Code: [Select]

$Subsystem: Turret01-base,1,1.0
$Default PBanks: ( "SG-12 Buckshot" )
$animation=triggered
$type="inital"
+relative_angle: 90,180,0 ; this is to make an underside turret point forward
[/B]





Damn, how could I missed that ? :) I thought this feature has never been finished and finally skipped because it didn't worked in the code-update. I just tested it, and the turrets work fine with this table change.

So now more turret erection for the WCS-Ships at all, I have to change the ships.tbl right now :)
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
Originally posted by StratComm
The THRUSTER01 bug is really a non-bug, and that's being taken care of.  The Shornetd texture error has been around for a while, though I can't remember what causes that.  However, both warnings should be non-fatal (press the middle button, cancel IIRC, to return to the game) so you should be able to get past them.

And I'd always put in the numbers as even if it is valid to have them missing (I don't think it is) the defaults would probably not be what you want anyway.  And be careful with dashes in subobject names; those can end up behavinig in very strange ways across different builds.


Who's fixing the THRUSTER01 bug & when will it be fixed?
-C