Author Topic: multi barraled turrents  (Read 4298 times)

0 Members and 1 Guest are viewing this topic.

Offline HotSnoJ

  • Knossos Online!
  • 29
    • http://josherickson.org
multi barraled turrents
Yesterday I was browsing the FS1 game VP and I looked at the Gun platforms. I noticed that there are two gun points on it for each turrent. Has this feature been deleted from the FS2 source? Or if not whats so hard about making multi barraled turrents?
I have big plans, now if only I could see them through.

LiberCapacitas duo quiasemper
------------------------------
Nav buoy - They mark things

 

Offline Killfrenzy

  • Slaughter-class cruiser
  • 210
  • Randomly Existing
If I were you, unless you ABSOLUTELY NEED them, avoid barrelled turrets like the plague!
Death has more impact than life, for everyone dies, but not everyone lives. [/b]
-Tomoe Hotaru (Sailor Saturn
------------
Founder of Shadows of Lylat

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Quote
If I were you, unless you ABSOLUTELY NEED them, avoid barrelled turrets like the plague!

:wtf: why, there cool

there isn't anything hard about makeing rotateing turrets (<-note no N), simply make the barel a child of the base and set it as the physical parent
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
Why avoid them? I made a ship with 4 of them, works perfectly in game, and each one has 3 firing points... I just wish all of the firing points would work in game *looks at bob and hints "source"*
Freelance Modeler | Amateur Artist

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
As far as I can tell, turrets in FS2 support up to 4 firing points per turret. What I'm not sure is if it'll actually use all of them. It looks like it should, but it's hard to tell if that's working right. (Need to setup a mission to test that better with the Brontos' 4 barrel turret.) And making multi-part turrets isn't that hard. I've done it and made a turret tutorial for TS1/2 users who don't have TrueView. (Though I ought to look through it and revamp it.)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Raptor

  • 210
Barrelled turrets will use all the firing point they have, they just fire them in turn.  They cycle though them, fing from one at a time (Unless you have added the 'Swarm: #'  to their table entry, in which case they fire a savlo of shots;)

The only flaw is that they fire slight odd when you do that.

Example:

Three barrelled turret, fire points A, B and C.

Without Swarm #, turret will fire from A, then B, then C, before going back to A.

With Swarm 2 say, the turret will fire A-B, then B-C, then C-A. :doubt:

quote:
--------------------------------------------------------------------------------
By Bobboau
 why, there cool
--------------------------------------------------------------------------------

I totally Agree with you there.  Turrets with barrels extending out of them are the best looking around.;7  To bad they will only work on flat or vertical faces.
...There ought to be something surreal about a Zoid offering romantic advice...and yet there is not. It seems perfectly normal that the Liger is giving Bit advice on relationships, and it shouldn't, but it does. Dangit man, you've confused me again.[/I]
NGTM-R review of one of the chapters in my fanfic story :D Story is here! -> 'Ancient Legacies'

 

Offline Killfrenzy

  • Slaughter-class cruiser
  • 210
  • Randomly Existing
I can't get barrelled turrets to work - so I adopt the Shivan idea! :D
Death has more impact than life, for everyone dies, but not everyone lives. [/b]
-Tomoe Hotaru (Sailor Saturn
------------
Founder of Shadows of Lylat

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
FS2 will only support 4 firing points per turret. Anything higher will cause a crash in game. (Raising the max turret firing points would change that, but I'm not sure what other things it might affect.) And turrets look odd some times when they're firing and turning, they may fire before the turret is fully turned. (Think I recall a rotation speed thing that might be useful to fix that.)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
Originally posted by Killfrenzy
I can't get barrelled turrets to work - so I adopt the Shivan idea! :D


*points to his sig* :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

  

Offline Killfrenzy

  • Slaughter-class cruiser
  • 210
  • Randomly Existing
Followed it, and it didn't help........:( I dunno what's going on......not that I actually NEED barrelled turrets anyway......
Death has more impact than life, for everyone dies, but not everyone lives. [/b]
-Tomoe Hotaru (Sailor Saturn
------------
Founder of Shadows of Lylat

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Well, if you tell me what it was/wasn't doing and/or send me a model file with the bad turrets, I could probably figure out what went wrong. (I learned turrets the hard way. :) )
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Killfrenzy

  • Slaughter-class cruiser
  • 210
  • Randomly Existing
1) They rotated strangely (as in the wrong way)

2) Proceeded to shoot backwards

And yes, I'm pretty sure I set the axes and stuff right. Currently I don't have a model with barrelled turrets.
Death has more impact than life, for everyone dies, but not everyone lives. [/b]
-Tomoe Hotaru (Sailor Saturn
------------
Founder of Shadows of Lylat

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
Originally posted by Killfrenzy
1) They rotated strangely (as in the wrong way)

2) Proceeded to shoot backwards

And yes, I'm pretty sure I set the axes and stuff right. Currently I don't have a model with barrelled turrets.


1. There are three ways I can think of that turret parts could rotate the wrong way.

     Problem 1: If they start orbiting the ship (in other words actually leaving the ship when shown in game or ModelView32) then it is an axis problem. Every subobject and every subobject group has it's own axis. All the ones for the turret(s) need to be positioned correctly, which means you have to move through the hierarchy checking every axis along the way.
     Problem 2: The model parts are turning in the wrong direction (for instance the barrels are moving side to side instead of up and down) but are not orbiting, then the submodel is set to rotate using the wrong axis in the POF file. Experiment in ModelView32 till they look right. The base should turn around and the barrels should move up/down. (And be aware, ModelView32 can rotate turrets beyond their PoV so it can look wrong but be right. Watch the turrets of a :v: model rotate to see what I mean. :) )
     Problem 3: The barrels are rotating and the base is moving up and down. That means you probably got the associated and rotational submodels assigned backwards. Switch them in ModelView32. The base should be the Associated submodel and the barrels are the Rotational submodel.

2. Firing in the wrong direction? Double check the normals for your firing points. If the turret normally points up, (which is normal) the firing points should point up. (In other words a positive Y value.) Even with correct normals, turrets may fire in odd directions while rotating. That's an odd bug I'm going to see if I can fix with table/POF stuff.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
the turret firing point limit is 4 points for missile turrets and 3 ONLY for laser ones. just look in the weapons editor in fred. the window only will fit 3 laser.
i have tried upping that limit using the source, but it crashed no matter what i tried. :( (and i DID remember to change that window and all the related code. i think i'll leave it untill i actually learn to program.....apparently there is a lot of code that assumes there is only 3 tfps.)

anyway, multi-part turrets are quite easy to do. as Bobboau said:

-you have the turret arm geometry and base in their correct positions.
(i would suggest compiling the parts in a separate cob/scn for simplicity and then add the finished single object to the objects library [ts5 feature-not sure of others])

-gule a local light to the arms as a sibling (don't think this is nesacarry, but it's never caused me problems) and set the axis of the new object group to the bottom of the arms-or wherever the "hinge" would be.

-glue another local light to the base as a sibling and set that object groups axis to the center of the geometry. or the point that the turret is attached to the hull and will rotate around.

-glue the arms object group to the base group as a child and name the object groups accordingly.
hope this helps, but someone correct me if i'm wrong :)                  ([SIZE=0.3]just not tooo painfully plz :D )[/SIZE]
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
Originally posted by Vasudan Admiral
the turret firing point limit is 4 points for missile turrets and 3 ONLY for laser ones. just look in the weapons editor in fred. the window only will fit 3 laser.
i have tried upping that limit using the source, but it crashed no matter what i tried. :( (and i DID remember to change that window and all the related code. i think i'll leave it untill i actually learn to program.....apparently there is a lot of code that assumes there is only 3 tfps.)


The turret weapon slots and firing points are two different things. The game, currently, won't use multiple weapons from one turret. It will use up to 4 firing points for lasers and probably missiles. Firing points are cosmetic, they are where the weapon's pof/ani/whatever emits from/starts at. The way the code is right now, (unless someone has changed it and I haven't heard about it) it checks to see if there are any primary weapon banks and if not checks for secondary weapon banks.

Code: [Select]

// Set active weapon for turret
void ai_turret_select_default_weapon(ship_subsys *turret)
{
ship_weapon *twp;

twp = &turret->weapons;

// If a primary weapon is available, select it
if ( twp->num_primary_banks > 0 ) {
turret->system_info->turret_weapon_type = twp->primary_bank_weapons[0];
} else if ( twp->num_secondary_banks > 0 ) {
turret->system_info->turret_weapon_type = twp->secondary_bank_weapons[0];
}
}


Note, it doesn't check for weapons in any other banks then bank 0. That means the extra weapon slots don't do anything, yet.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
:eek2:  hey, you're right, i tried adding 2 more firing points to a watch-dog and they fired fine. trying 6 crashed it tho :D
whish i'd known this before :D
thx,
VA
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Fury

  • The Curmudgeon
  • 213
Quote
Originally posted by EdrickV
Note, it doesn't check for weapons in any other banks then bank 0. That means the extra weapon slots don't do anything, yet.


That's what I thought. I hope you (read: SCP) can eventually change that.

It would be a nice feature if turret could use the best available weapon for current target.

Although second feature probably would need a ****load of new code.

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
There is some code in the source to handle multiple weapons, but it's made for ships with regular weapons rather then turrets so might be useful but would need some tweaking. And it's beyond my ability right now because I can't compile the thing.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
Originally posted by Vasudan Admiral
anyway, multi-part turrets are quite easy to do. as Bobboau said:

-you have the turret arm geometry and base in their correct positions.
(i would suggest compiling the parts in a separate cob/scn for simplicity and then add the finished single object to the objects library [ts5 feature-not sure of others])

-gule a local light to the arms as a sibling (don't think this is nesacarry, but it's never caused me problems) and set the axis of the new object group to the bottom of the arms-or wherever the "hinge" would be.

-glue another local light to the base as a sibling and set that object groups axis to the center of the geometry. or the point that the turret is attached to the hull and will rotate around.

-glue the arms object group to the base group as a child and name the object groups accordingly.
hope this helps, but someone correct me if i'm wrong :)                  ([SIZE=0.3]just not tooo painfully plz :D )[/SIZE]


From my experiences with turrets, (and very recent experiments) I have found out the following:

1. You have to have a light grouped to the turret objects. I think the light belongs on the barrel object for multi-part turrets. (That's the way I make mine and it works.) It might work on the base too, but I can't say if it will for sure.

2. You don't need a light attached to the base. The local light's main functions are to keep TrueSpace from mucking up the geometry and to tell PCS where parts of a model end. Imagine the hierarchy as a family tree, with the main hull being the trunk.

3. Gluing the arms to the base means clicking them in the other way around. You click the base, click the glue as child tool, and click the arms.

4. For users of TS1/2, don't worry about the turret names becomming "turret,1" instead of "turret-01", PCS should still fill the basic turret data in for the submodels and you can rename the subobjects in PCS/ModelView32 later.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline HotSnoJ

  • Knossos Online!
  • 29
    • http://josherickson.org
Quote
3. Gluing the arms to the base means clicking them in the other way around. You click the base, click the glue as child tool, and click the arms.


Thanx! That's going to help allot with my glueing.
I have big plans, now if only I could see them through.

LiberCapacitas duo quiasemper
------------------------------
Nav buoy - They mark things