Jump to content
Sign in to follow this  
WhiteBoySamurai

Problem making machine guns on tank turrets

Recommended Posts

I'm going to be making a whole line of ground objects for the Asian theaters, especially Korea, but I've run into a sticking point with tanks. I want to make a working .50 cal in addition to the main gun. I'm also trying to get things working on existing tanks where possible. But it seems like having a gunner on top of a node which is also a gunner messes things up.

 

Everything works fine when either the main gun is at its neutral position (yaw 0). But when the turret turns, the machine gun's muzzle position also rotates. Since that probably makes no sense, I'm attaching some pics of the M1, T-80, and finally my own model:

post-33721-0-44598700-1352552634_thumb.jpg

post-33721-0-72043400-1352552636_thumb.jpg

post-33721-0-32854100-1352552638_thumb.jpg

post-33721-0-37181500-1352552640_thumb.jpg

 

It doesn't seem to matter which component I put the machine gun under in the data.ini. The only workaround I've found is to link the machine gun to the chassis instead of the turret in the model hierarchy, but that's no good unless the machine gun is positioned right above the turret's pivot point (otherwise the gun will float around the turret when it rotates). Any ideas?

Share this post


Link to post
Share on other sites

I'd be curious as well...I was running into the same issue with ground objects I was creating.

 

FC

Share this post


Link to post
Share on other sites

add a virtual gunner and gun...heres what I did for the rear gun on the B-58...

unless someone else knows more about tank mg`s

I made a dummy component for the yaw....linked to fuselage (Tank Turret ?) and linked the gun to that...

[Chaingun]

SystemType=FLEXIBLE_GUN

GunTypeName=23MM_AM23

MuzzlePosition=0.00,-14.47,0.96

MaxAmmo=500

TracerLoading=5

BurstAmount=10

GunnerID=1

MinExtentPosition=-0.028,-14.5,0.937

MaxExtentPosition=0.028,-14.281,0.992

 

[Chaingunyaw]

SystemType=FLEXIBLE_GUN

GunTypeName=23MM_AM23

MuzzlePosition=0.00,-14.47,0.96

MaxAmmo=500

TracerLoading=5

BurstAmount=10

GunnerID=1

MinExtentPosition=-0.005,-14.266,0.962

MaxExtentPosition=-0.004,-14.226,0.967

 

this is the virtual gunner

 

[TailGunner]

SystemType=GUNNER_STATION

SeatID=4

GunnerID=1

SetCockpitPosition=FALSE

MinExtentPosition=-0.003,-14.323,0.962

MaxExtentPosition=0.003,-14.301,0.967

PitchModelNodeName=Chaingun

YawModelNodeName=Chaingun2

GunRange=2500

GunnerFireChance=90

GunnerFireTime=1.0

GunnerAimOffset=0.050

GunnerAimAccuracy=90

PitchAngleRate=45

MaxPitch=10

MinPitch=-10

DefaultPitchAngle=0

YawLimited=TRUE < this to false will allow gunner to fire any direction?

YawAngleRate=45

MaxYaw=170

MinYaw=190

DefaultYawAngle=180 < this I guess you would need to set at 360 degrees?

 

thats all I can suggest...unless theres a

movinggun=true entry or such?

Share this post


Link to post
Share on other sites

wouldn't the MG cupola need a seperate node? I remember when I first added the MGs to 1stGen back in 05, we just 'ignored' the face they weren't really connected to to turret or chasis.

I know the Abrams, being 3rdParty has a OUT that lists the MG cupola; that what I used. But I can't recall if the sub-turret (for lack of a better term for the cupola) was animated

 

and nowadays, without access to the 3W lods....be diffucult to figure it out (of cousre, some are still in SF/Wo* and lods can be extracted and browsed with a hex editor)

Share this post


Link to post
Share on other sites

have a look thru this...

its for guns in turret and forwards hull...but should apply to a mounted gun mebbe?

 

[MissionData]

NationName=Nazi Germany

ServiceStartYear=1939

ServiceEndYear=1957

GroundObjectRole=TANK

Availability=COMMON

Exported=TRUE

ExportStartYear=1948

ExportAvailability=COMMON

 

[GroundObjectData]

DamagedModel=

DestroyedModel=Tank_Destroyed.LOD

DestroyedEffect=VehicleFireEffect

EmptyMass=27000.00

Component[001]=Chassis

Component[002]=Turret

 

[sound]

EngineSoundName=TankEngine

MovementSoundName=TankTrack

 

[DetectSystem]

TargetType=GROUND

DataLink=FALSE

OpticalSight=TRUE

NightSight=TRUE

VisualRange=2000.0

ViewportPosition=0.0,0.0,2.30

MaxVisibleDistance=4800.0

RadarCrossSection=10

 

[WeaponSystem]

TargetType=GROUND

GunRange=1100.0

PitchAngleRate=10

MaxPitch=15.0

MinPitch=-3.0

DefaultPitchAngle=3

YawLimited=FALSE

YawAngleRate=15

DefaultYawAngle=0

ReloadGunAtAngle=TRUE

GunReloadPitchAngle=17.0

GunRecoil=100

GunStabilization=FALSE

GunRadarTracking=FALSE

RangeFinder=2

BallisticComputer=0

YawModelNodeName=Turret

PitchModelNodeName=GunPitch

 

[MovementSystem]

MaxRoadSpeed=32.4

MaxOffRoadSpeed=10

PowerAvailable=230

MaxTurnRate=20.0

MaxDeceleration=6.0

SuspensionConstant=25.0

MovementEmitterName=TrackedVehicleDustEmitter

MovementEmitterPosition=0.0000,-2.7337,0.1128

 

[Chassis]

ModelNodeName=chassis

EffectSize=1.0

MinExtentPosition=-1.411,-2.931,0.388

MaxExtentPosition=1.411,2.931,1.704

HasArmor=TRUE

ArmorMaterial=STEEL

Armor[FRONT].Thickness=14.5

Armor

.Thickness=14.5

Armor

.Thickness=14.5

Armor[REAR].Thickness=14.5

Armor[TOP].Thickness=10

Armor[bOTTOM].Thickness=11

SystemName[001]=Engine

SystemName[002]=MG02

SystemName[003]=Gunner2

 

[Turret]

ParentComponentName=chassis

ModelNodeName=turret

DetachWhenDestroyed=TRUE

EffectSize=1.0

MinExtentPosition=-0.964,-1.153,1.698

MaxExtentPosition=0.964,0.824,2.328

HasArmor=TRUE

ArmorMaterial=STEEL

Armor[FRONT].Thickness=16

Armor

.Thickness=14.5

Armor

.Thickness=14.5

Armor[REAR].Thickness=14.5

Armor[TOP].Thickness=10

SystemName[001]=GunBarrel

SystemName[002]=MG01

SystemName[003]=Gunner1

 

[Engine]

SystemType=ENGINE

MinExtentPosition=-0.459,-2.203,1.004

MaxExtentPosition=0.467,-1.013,1.564

 

[Gunner1]

SystemType=GUNNER

GunnerID=1

TargetType=GROUND

GunRange=600.0

PitchAngleRate=16

MaxPitch=20.0

MinPitch=-10.0

DefaultPitchAngle=0

YawLimited=TRUE

YawAngleRate=16

MinYaw=-30.0

MaxYaw=30.0

DefaultYawAngle=0.0

YawModelNodeName=GunPitch

PitchModelNodeName=MG01

VisualSearchTime=10.0

 

[Gunner2]

SystemType=GUNNER

GunnerID=2

TargetType=GROUND

GunRange=600.0

PitchAngleRate=16

MaxPitch=20.0

MinPitch=-10.0

DefaultPitchAngle=0

YawLimited=TRUE

YawAngleRate=16

MinYaw=-30.0

MaxYaw=30.0

DefaultYawAngle=0.0

YawModelNodeName=MG02YAW

PitchModelNodeName=MG02

VisualSearchTime=10.0

 

[GunBarrel]

SystemType=GUN

GunTypeName=75mm KwK 37 L/24

MuzzlePosition=0.00,1.98,1.97

MaxAmmo=60

EjectShells=FALSE

 

[MG01]

SystemType=GUN

GunTypeName=MG MK.30

MuzzlePosition=0.33,1.11,1.97

MaxAmmo=900

EjectShells=FALSE

TracerLoading=5

BurstAmount=10

 

[MG02]

SystemType=GUN

GunTypeName=MG MK.30

MuzzlePosition=0.57,1.98,1.44

MaxAmmo=900

EjectShells=FALSE

TracerLoading=5

BurstAmount=10

Share this post


Link to post
Share on other sites

iirc, like ships, tanks should have a 'gunner' statement for each gun. I could be wrong, too!

Share this post


Link to post
Share on other sites

wouldn't the MG cupola need a seperate node? I remember when I first added the MGs to 1stGen back in 05, we just 'ignored' the face they weren't really connected to to turret or chasis.

I know the Abrams, being 3rdParty has a OUT that lists the MG cupola; that what I used. But I can't recall if the sub-turret (for lack of a better term for the cupola) was animated

 

and nowadays, without access to the 3W lods....be diffucult to figure it out (of cousre, some are still in SF/Wo* and lods can be extracted and browsed with a hex editor)

 

 

By separate node, do you mean one of the central components like this?

[GroundObjectData]

//blah blah

Component[001]=Hull

Component[002]=Turret

Component[003]=Machinegun

 

I tried that, but it still has the same muzzle position glitch. (And this also causes the tank to be destroyed easily as soon as the tiny unarmored machine gun component is hit.)

 

The Abrams model's MG cupola is indeed fully animated (YawModelNodeName=MGTurret, PitchModelNodeName=MG). You can sort of see it in the screenshots above. According to the .OUT file it's linked to the turret in the hierarchy. Same with the T-80's machine gun, and my Type 90.

 

The thing about the stock tanks is that their machine guns are just static parts, and only the main gun is operational. So either TK didn't think MGs were needed (even though it would make it more exciting if those ground objects could take shots at low-flyers on CAS missions), or maybe even HE can't get it to work right. >_>

 

 

have a look thru this...

its for guns in turret and forwards hull...but should apply to a mounted gun mebbe?

 

 

Russo, could you tell us how the model hierarchy is set up for that tank model? Specifically, what are GunPitch and MG01 connected to? And can you confirm that the machine guns aren't having the same sort of problem I described?

 

 

Here's the relevant data from my tank at present:

 

[GroundObjectData]

DamagedModel=

DestroyedModel=Tank_Destroyed.LOD

DestroyedEffect=VehicleFireEffect

EmptyMass=50200.00

Component[001]=Hull

Component[002]=Turret

 

...

 

...

 

[WeaponSystem]

TargetType=GROUND

GunRange=3200.0

PitchAngleRate=16

MaxPitch=15.0

MinPitch=-12.0

DefaultPitchAngle=0

YawLimited=FALSE

YawAngleRate=24

DefaultYawAngle=0

ReloadGunAtAngle=FALSE

GunRecoil=100

GunStabilization=TRUE

GunRadarTracking=FALSE

RangeFinder=8

BallisticComputer=6

YawModelNodeName=turret

PitchModelNodeName=maingun

 

...

 

[Hull]

ModelNodeName=hull

...

SystemName[001]=Engine

 

[Turret]

ParentComponentName=Hull

ModelNodeName=turret

DetachWhenDestroyed=TRUE

...

SystemName[001]=MainGun

SystemName[002]=Gunner2

SystemName[003]=HMG

DetachNode[001]=HMGmount

 

...

 

[MainGun]

SystemType=GUN

GunTypeName=120MM_L44J

MuzzlePosition=0.00,5.53,1.714

MaxAmmo=35

EjectShells=FALSE

 

 

[Gunner2]

SystemType=GUNNER

GunnerID=2

TargetType=AIR_AND_GROUND

GunRange=1200

PitchAngleRate=15

MaxPitch=70.0

MinPitch=-5.0

DefaultPitchAngle=0

YawLimited=FALSE

YawAngleRate=30

MinYaw=

MaxYaw=

DefaultYawAngle=0

GunMinAltitude=0.0

GunMaxAltitude=1200.0

YawModelNodeName=HMGmount

PitchModelNodeName=HMG

VisualSearchTime=8.0

ViewportPosition=-0.08,0.375,2.62

IndependentSearchChance=100

LookAroundChance=100

GunnerFireChance=100

GunnerFireTime=0.5

ParentComponentName=turret

DetachWhenDestroyed=TRUE

 

[HMG]

GunnerID=2

SystemType=GUN

GunTypeName=50CAL_M2

MuzzlePosition=-0.075,1.45,2.62

MaxAmmo=1500

TracerLoading=2

BurstAmount=6

EjectShells=TRUE

 

 

There's another stange thing about tanks I noticed. All else being equal, main guns are very accurate if set as the WeaponSystem, but tend to wildly overshoot or undershoot if set as an individual Gunner. (From my experience with ships, this could potentially be corrected with adjustments to pivot points, viewpoints, etc. etc.) Also, ground vehicles tend to stop and shoot rather than fire on the move if using a WeaponSystem.

Share this post


Link to post
Share on other sites

For some odd reason...turret of theausf A wont rotate,even tho its pivot is centred,aligned to world etc....but the gun pivot (gunpitch) does try to turn right and left....weird.

heres shots of the setup linking the guns...and my out file. of the pzkw ausf A

 

 

Chassis [131 polys, 206 verts] '7 - Default'

Turret [32 polys, 54 verts] '7 - Default'

GunPitch [20 polys, 32 verts] '7 - Default'

MG01 [24 polys, 25 verts] '7 - Default'

Box12 [40 polys, 64 verts] '7 - Default'

Object01 [34 polys, 44 verts] '7 - Default'

GunBarrel [132 polys, 91 verts] '7 - Default'

Sphere02 [40 polys, 26 verts] '7 - Default'

Cupola [212 polys, 238 verts] '7 - Default'

Cylinder07 [18 polys, 13 verts] '7 - Default'

Box13 [180 polys, 216 verts] '7 - Default'

Box01 [10 polys, 20 verts] '7 - Default'

Cylinder12 [52 polys, 60 verts] '7 - Default'

Cylinder04 [28 polys, 32 verts] '7 - Default'

Cylinder06 [16 polys, 15 verts] '7 - Default'

Cylinder14 [36 polys, 48 verts] '7 - Default'

Cylinder13 [30 polys, 34 verts] '7 - Default'

Cylinder15 [24 polys, 25 verts] '7 - Default'

Cylinder16 [72 polys, 58 verts] '7 - Default'

Cylinder17 [72 polys, 58 verts] '7 - Default'

LeftTracks01 [72 polys, 78 verts] '7 - Default'

LeftTracks02 [72 polys, 78 verts] '7 - Default'

Sphere01 [40 polys, 26 verts] '7 - Default'

Box06 [10 polys, 20 verts] '7 - Default'

Cylinder01 [22 polys, 30 verts] '7 - Default'

Box10 [10 polys, 20 verts] '7 - Default'

MG02YAW [8 polys, 9 verts] '7 - Default'

MG02 [24 polys, 31 verts] '7 - Default'

 

 

Num Nodes: 28

Total: (1461 polys, 1651 verts)

Mesh Max: (212 polys, 238 verts)

 

1 Materials:

( 1) 7 - Default:

PKW IV ATex.jpg

PKW IV ATex.dds (bump map)

 

1 Textures:

PKW IV ATex.jpg

 

Points

mg02=0.57,1.98,1.44

maingun=0.00,1.98,1.97

mg01=0.33,1.11,1.97

post-1981-0-77977000-1352654031_thumb.jpg

post-1981-0-66404700-1352654049_thumb.jpg

Share this post


Link to post
Share on other sites

just a thought...have a look at the A26 turrets...they rotate and are multi direction firing ...see how they are set up

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..