Jump to content
chops

Iowa battleship multiple gunners within one physical turret

Recommended Posts

Hi all,

 

With the kind permission of the original auther @aussnipe73 I am attempting to upgrade and update his formidable Iowa class battleship.

 

The point is to have all nine guns firing independently, via Drongo's artillery, which is still being worked on.

 

The triple-gun turrets are currently static weapons separate from the actual battleship model itself (plan it to attachTo them to the ship. Long story).

 

20180816180113_1_zpsodwwkzs0.jpg

 

So the problem is I'm trying to configure each physical turret to have three gunners, one for each gun, but I can't figure out the required config and model.cfg entries to get this to work.

 

I've tried entering a second manned turret/gun (guided by the turrets wiki), but as you can see below, some of the shells fire dead ahead as the gunBeg points are not rotating or elevating with the

"main" turret. The red lines are from the bullet tracking function. I also seem to have four gunner slots in the damn thing, instead of just the two that I'm aiming for so far.

 

20180817004938_1_zpsem2g75uk.jpg

 

Soooo....

 

Here's the relevant config section:

 

Spoiler

    class USS_Iowa_Turret_B: StaticCannon
    {
        model = "\338\Ships\USS_Iowa_Turret_B";
        displayName = "Cannon 16 Inch B Turret";
        hideUnitInfo = 1;
        scope = 2;
        side = 1;
        faction = "BLU_F";
        crew = "B_crew_F";
        typicalCargo[] = {"B_crew_F"};
        memoryPointsGetInGunner = "gunner_pos";
        memoryPointsGetInGunnerDir = "gunner_dir";
        artilleryScanner = 1;
        laserScanner = 1;
        availableForSupportTypes[] = {"Artillery"};
        class AnimationSources: AnimationSources
        {
            class muzzle_rot_cannon
            {
                source = "ammorandom";
                weapon = "Iowa_406mm_B_Arty";
            };
            class recoil_source
            {
                source = "reload";
                weapon = "Iowa_406mm_B_Arty";
            };
            class reload_magazine
            {
                source = "reloadmagazine";
                weapon = "Iowa_406mm_B_Arty";
            };
        };
        class Eventhandlers
        {
            fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
            init = "_run = _this execVM '338\Ships\init_arty_b.sqf';";
        };
        class Turrets: Turrets
        {
            class MainTurret: MainTurret
            {
                forceHideGunner = 1;
                gunBeg = "turretpri_b_barrelEnd_c";
                gunEnd = "turretpri_b_barrelStart_c";
                gunnerGetInAction = "GetInHigh";
                gunnerGetOutAction = "GetOutHigh";
                weapons[] = {"Iowa_406mm_B_Arty"};
                magazines[] = {"32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells"};
                soundServo[] = {"A3\sounds_f\dummysound",0.031622775,1.0,30};
                minElev = -5;
                maxElev = 80;
                initElev = 10;
                minTurn = -135;
                maxTurn = 135;
                initTurn = 0;
                elevationMode = 3;
                memoryPointGunnerOptics = "gunnerview";
                cameraDir = "look";
                turretInfoType = "RscWeaponRangeArtilleryAuto";
                gunnerForceOptics = 1;
                gunnerOpticsModel = "\A3\Weapons_F\acc\reticle_mortar_01_f.p3d";
                class ViewOptics: ViewOptics
                {
                    initAngleX = 0;
                    minAngleX = -30;
                    maxAngleX = 30;
                    initAngleY = 0;
                    minAngleY = -100;
                    maxAngleY = 100;
                    initFov = 0.174;
                    minFov = 0.0077778;
                    maxFov = 0.14;
                    visionMode[] = {"Normal","NVG"};
                };
                class ViewGunner: ViewOptics
                {
                    initAngleX = 5;
                    minAngleX = -65;
                    maxAngleX = 85;
                    initAngleY = 0;
                    minAngleY = -150;
                    maxAngleY = 150;
                    initFov = 0.7;
                    minFov = 0.25;
                    maxFov = 1.1;
                };
            };
        };
    };

    class USS_Iowa_Turret_BII: USS_Iowa_Turret_B
    {
    class NewTurret;    
    //model = "\338\Ships\USS_Iowa_Turret_B";
    displayName = "16 Inch B Turret Chops";
        
        class Eventhandlers
        {
            fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
            init = "_run = _this execVM '338\Ships\init_arty_b2.sqf';";
        };
//ALL YOUR DOPEY SHIT GOES HERE CHOPS

        class Turrets: Turrets
        {
            class MainTurret: MainTurret
            {
                forceHideGunner = 1;
                gunBeg = "turretpri_b_barrelEnd_c";
                gunEnd = "turretpri_b_barrelStart_c";

                memoryPointGun= "turretpri_b_barrelEnd_C";

                gunnerGetInAction = "GetInHigh";
                gunnerGetOutAction = "GetOutHigh";
                weapons[] = {"Iowa_406mm_B_Arty_C"};
                magazines[] = {"32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells"};
                soundServo[] = {"A3\sounds_f\dummysound",0.031622775,1.0,30};
                minElev = -5;
                maxElev = 80;
                initElev = 10;
                minTurn = -135;
                maxTurn = 135;
                initTurn = 0;
                elevationMode = 3;    
                gunnerName = "Centre Gun Gunner";
                commanding = -2;
                //primaryGunner = 0;
                primaryGunner = 1;
                //primaryObserver = 0;
                primaryObserver = 1;


                memoryPointGunnerOptics = "gunnerview";
                cameraDir = "look";
                turretInfoType = "RscWeaponRangeArtilleryAuto";
                gunnerForceOptics = 1;
                gunnerOpticsModel = "\A3\Weapons_F\acc\reticle_mortar_01_f.p3d";
                class ViewOptics: ViewOptics
                {
                    initAngleX = 0;
                    minAngleX = -30;
                    maxAngleX = 30;
                    initAngleY = 0;
                    minAngleY = -100;
                    maxAngleY = 100;
                    initFov = 0.174;
                    minFov = 0.0077778;
                    maxFov = 0.14;
                    visionMode[] = {"Normal","NVG"};
                };
                class ViewGunner: ViewOptics
                {
                    initAngleX = 5;
                    minAngleX = -65;
                    maxAngleX = 85;
                    initAngleY = 0;
                    minAngleY = -150;
                    maxAngleY = 150;
                    initFov = 0.7;
                    minFov = 0.25;
                    maxFov = 1.1;
                };
            };
            class viewoptics;
            class LeftGunTurret: NewTurret
            {
                stabilizedInAxes = 3;
                //body = "turretsec_1_turret";
                //body = "null";
                body = "turretpri_b_gunTurret";        
                //gun = "turretsec_1_gun";
                gun = "Weapon_TurretPrimary_Barrel_3";
                //animationSourceBody = "turretsec_1_turret";
                animationSourceBody = "null";
                
                //animationSourceGun = "turretsec_1_gun";
                animationSourceGun = "Weapon_TurretPrimary_Barrel_3";
                gunBeg = "turretpri_b_barrelEnd_l";
                gunEnd = "turretpri_b_barrelStart_l";
                
                //gunBeg = "turretsec_1_barrelEnd_l";
                //gunEnd = "turretsec_1_barrelStart_l";

                memoryPointGun= "turretpri_b_barrelEnd_l";

                gunnerAction = "gunner_standup01";
                gunnerGetInAction = "GetInMedium";
                gunnerGetOutAction = "GetOutMedium";
                ejectDeadGunner = 0;
                soundServo[] = {"A3\Sounds_F\vehicles\armor\noises\servo_best",0.01,1.0,50};
                memoryPointGunnerOptics = "turretsec_1_gunnerview";
                selectionfireanim = "axis_turretpri_b_muzzle_l";
                weapons[] = {"Iowa_406mm_B_Arty_L"};
                magazines[] = {"32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells","32Rnd_406mm_HE_Mo_shells"};
                gunnerName = "Left Gun Gunner";
                gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Commander_02_F";
                gunnerForceOptics = 1;
                proxyType = "CPGunner";
                proxyIndex = 1;
                startEngine = 0;
                commanding = -3;
                primaryGunner = 0;
                primaryObserver = 0;
                outGunnerMayFire = 1;
                inGunnerMayFire = 1;
                usePip = 0;
                turretInfoType = "RscWeaponRangeZeroing";
                discreteDistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400};
                discreteDistanceInitIndex = 5;
                minElev = -5;
                maxElev = 80;
                initElev = 10;
                //minTurn = -135;
                minTurn = 0;
                //maxTurn = 135;
                maxTurn = 0;
                initTurn = 0;
                elevationMode = 3;
                class ViewOptics: ViewOptics
                {
                    initAngleX = 0;
                    minAngleX = -30;
                    maxAngleX = 30;
                    initAngleY = 0;
                    minAngleY = -100;
                    maxAngleY = 100;
                    initFov = 0.7;
                    minFov = 0.25;
                    maxFov = 1.1;
                };
                class ViewGunner: ViewOptics
                {
                    initAngleX = 5;
                    minAngleX = -65;
                    maxAngleX = 85;
                    initAngleY = 0;
                    minAngleY = -150;
                    maxAngleY = 150;
                    initFov = 0.7;
                    minFov = 0.25;
                    maxFov = 1.1;
                };
                maxHorizontalRotSpeed = 1.0;
                maxVerticalRotSpeed = 0.6;
            };
        };
    };

 

And the model.cfg entries:

 

Spoiler

    class USS_Iowa_Turret_B_skel: Default
    {
        skeletonBones[] =
        {
            "turretpri_B_gunTurret","",
            "turretpri_B_gun", "turretpri_B_gunTurret",
            "turretpri_B_muzzle_l", "turretpri_B_gun",
            "turretpri_B_recoil_l", "turretpri_B_gun",
            "turretpri_B_muzzle", "turretpri_B_gun",
            "turretpri_B_recoil_c", "turretpri_B_gun",
            "turretpri_B_muzzle_r", "turretpri_B_gun",
            "turretpri_B_recoil_r", "turretpri_B_gun",
            "Weapon_TurretPrimary_Barrel_3","turretpri_B_gun"
        };
    };

...Blah, blah, blah...

    class USS_Iowa_Turret_B: Default
    {
        skeletonName = "USS_Iowa_Turret_B_skel";
        sections[] =
        {
        };
        class Animations
        {
            // Main Turret B
            class mainTurret
            {
                type="rotationY";
                source="mainTurret";
                selection="turretpri_b_gunTurret";
                axis="axis_turretpri_b_turret";
                minValue="rad -360";
                maxValue="rad +360";
                angle0="rad -360";
                angle1="rad +360";
            };
            class mainGun: mainTurret
            {
                type="rotationX";
                source="mainGun";
                selection="turretpri_b_gun";
                axis="axis_turretpri_b_gun";
            };

            class LeftGunTurret: mainturret
            {
                source="LeftGunTurret";
                //selection="aftphal_trav";
                //selection="null";    
                selection="turretpri_b_gunTurret";
                //axis="null_axis";    
                axis="axis_turretpri_b_turret";        
                minValue="0";
                maxValue="0";
                angle0="0";
                angle1="0";    
            };
            class LeftGun: MainGun
            {
                type="rotationX";
                source="LeftGun";
                selection="Weapon_TurretPrimary_Barrel_3";
                axis="axis_turretpri_b_gun";
            };
                        
            class turretpri_b_muzzleRot_l
            {
                type="rotationZ";
                source="turretpri_b_muzzle_source_rot";
                selection="turretpri_b_muzzle_l";
                axis="axis_turretpri_b_muzzle_l";
                sourceAddress = loop;
                minValue = 0.0;
                maxValue = 4.0;
                angle0 = "rad 0";
                angle1 = "rad 360";
            };
            class turretpri_b_muzzleRot_c
            {
                type="rotationZ";
                source="turretpri_b_muzzle_source_rot";
                selection="turretpri_b_muzzle_c";
                axis="axis_turretpri_b_muzzle_c";
                sourceAddress = loop;
                minValue = 0.0;
                maxValue = 4.0;
                angle0 = "rad 0";
                angle1 = "rad 360";
            };
            class turretpri_b_muzzleRot_r
            {
                type="rotationZ";
                source="turretpri_b_muzzle_source_rot";
                selection="turretpri_b_muzzle_r";
                axis="axis_turretpri_b_muzzle_r";
                sourceAddress = loop;
                minValue = 0.0;
                maxValue = 4.0;
                angle0 = "rad 0";
                angle1 = "rad 360";
            };
            class turretpri_b_recoil_l
            {
                type="translation";
                source="recoil_source";
                selection="turretpri_b_recoil_l";
                axis="axis_turretpri_b_recoil_l";
                memory=1;
                minValue=0.0;
                maxValue=0.5;
                offset0=0;
                offset1=-0.5;
            };
            class turretpri_b_recoil_c
            {
                type="translation";
                source="recoil_source";
                selection="turretpri_b_recoil_c";
                axis="axis_turretpri_b_recoil_c";
                memory=1;
                minValue=0.0;
                maxValue=0.5;
                offset0=0;
                offset1=-0.5;
            };
            class turretpri_b_recoil_r
            {
                type="translation";
                source="recoil_source";
                selection="turretpri_b_recoil_r";
                axis="axis_turretpri_b_recoil_r";
                memory=1;
                minValue=0.0;
                maxValue=0.5;
                offset0=0;
                offset1=-0.5;
            };
        };
    };

 

The model itself is set up just fine for one gun to work. I've just followed the same conventions for a second "turret" within this physical one:

 

Untitled_zpsmgpuhjwg.png

 

 

Ideally I'd love to have each gun elevating independently, just like the real thing, but if all three guns moved together, but each with independent gunners able to fire, that'd do just fine.

 

Many thanks in advance. I reckon the Iowa would be great to have back in game delivering all nine 16-inch guns of naval shore bombardment goodness!

 

 

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

It's nice to see this being reworked. Loved the Arleigh Burke when it was being worked on and from the teasers back then I will figure that this should be pretty good in the long run. 

Share this post


Link to post
Share on other sites

I really like your passion and dedication to taking over in order to reconfigure this mod. My apologies if I come off rude (that’s not my intention) are you still working on the mod? What are your plans for the ultimately for the mod and are you looking for someone to partner up with to help with the completion of the mod?

Share this post


Link to post
Share on other sites
2 minutes ago, Oldcrow0999 said:

I really like your passion and dedication to taking over in order to reconfigure this mod. My apologies if I come off rude (that’s not my intention) are you still working on the mod? What are your plans for the ultimately for the mod and are you looking for someone to partner up with to help with the completion of the mod?

 

Before I forget I do live in Los Angeles and we do have the Iowa here so if do any research or questions answered please don’t be afraid to pm me or send me a message! 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×