This is a little tutorial, that explains how to get the bots to use the stationary mg's better. I'll also add Legion's tips to this tutorial.

I'll begin with Legion's tips:

QUOTE
Okay, on to Stationary weapons -- coding these is actually extremely quick and easy for vanilla 42 and the expansion packs, because -- well -- there really aren't that many of them to code.

In the AI/Objects.cons of each of Stationary_mg42 and Stationary_browning, there are only 3 adjustments necessary:

StrategicStrength 0 9
StrategicStrength 1 9
basicTempe 19

This will prepare the stationary weapons (including DefGuns, Pak40s etc) for bot use.

Additionally, ANY fixed artillery weapon should have its VT set to DefGun. I know that the PaK40 is set to ATGun by default, but for whatever reason, that just doesn't work. And setting it to VTArtillery has one big problem -- VTArtillery vehicles (Priest & Wespe) have at least 2 positions -- driver and gunner. If you set a PaK40 to VTArtillery, the bot may jump on it, but he won't be interested in firing it -- he'll be trying to drive it somewhere.

So! I usually set stationary MG and Arty ranges extremely long. Knowing that the Bren LMG had an effective range of 440m, I usually set stationary MGs to 550m max range. That may strike you as being too long, but do remember that the reports of the Omaha Beach landings made it clear that the MG42 nests were ripping up LCVPs and their troops before they even reached the shoreline. We want MC42's Omaha to at least come close to delivering that experience. Additionally, for a bot to hit you all the way out at 550m, there would have to be 550 unobstructed meters between you and the MG.

I let Arty have its full reach -- 1000m. This goes for both stationary and mobile arty. The optimum target strength settings for both kinds of artillery are these

Infantry 4.0
LightArmor 6.0
HeavyArmor 8.0
NavalArmor 2.0 (everything else 0.0) These numbers will result in Artillery mostly shelling large groups (where there are a few tanks, some scout cars and a smattering of infantry moving or standing in a loose group).

Stationary MG target strengths:

Infantry 8.0
LightArmor 6.0
Air 2.0 (Everything else is 0.0)

(cont'd)

Ah -- almost forgot! The most important part of getting bots to use stationary MGs or Artillery is actually not controlled by the Objects.RFA's aiTemplates -- although those are still important for prepping the bots for proper and consistent stationary use.

The way to get bots to use Stationary weapons is to add two lines of code to the specific AI Strategy where you want bots to use these weapons. This is something done on a per-map basis. The two lines of code are as follows:

aiStrategy.setTreeModifier TTNFriendGroundFixed 10.0
aiStrategy.setTreeModifierCombatStrength TTNFriendGroundFixed All 10.0

The first line tells the SAI that bots should man fixed ground weapons, and how important this ought to be to them.

The second line tells them that they should use fixed ground weapons to attack all of the targets for which that weapon has target strength values.


But even after these good tweaks you'll still find the bots in mg's not as aggresive as you want them. They fire too rarely etc.
As you all know, the machinegunner on tanks(lets take the pz IV as example) in bf1942 is quite aggresive and shoots well with his mg.
So I looked into the AItemplate for the pz IV top mg position, and compared it to the stationary machinegun AI template. First I thought there weren't any differences, the AI templates looked nearly the same. But then I found it.

Compare the top gunner AI from the pz IV to the AI from the stationary MG42.(which are both using the same mg, the mg42)

Panzer IV top gunner:

rem *** The turret mounted MG
rem **********************************************************************
rem **********************************************************************

rem *** Plugins ***
aiTemplatePlugIn.create Armament PanzerIVTopMgArms
aiTemplatePlugIn.setIsAntiAircraft 1

aiTemplatePlugIn.create Unit PanzerIVTopMgUnit
aiTemplatePlugIn.equipmentType 4
aiTemplatePlugIn.setStrategicStrength 0 1
aiTemplatePlugIn.setStrategicStrength 1 1
aiTemplatePlugIn.setSelectKey PIMenuSelect2
aiTemplatePlugIn.setHasExposedSoldier 1

aiTemplatePlugIn.create ControlInfo PanzerIVTopMgCtrl
aiTemplatePlugIn.driveTurnControl PIYaw
aiTemplatePlugIn.driveThrottleControl PIThrottle
aiTemplatePlugIn.aimHorizontalControl PIMouseLookX
aiTemplatePlugIn.aimVerticalControl PIMouseLookY
aiTemplatePlugIn.lookHorizontalControl PIMouseLookX
aiTemplatePlugIn.lookVerticalControl PIMouseLookY
aiTemplatePlugIn.throttleSensitivity -1.0
rem aiTemplatePlugIn.pitchSensitivity 0.021817
rem aiTemplatePlugIn.rollSensitivity -0.021817
aiTemplatePlugIn.pitchSensitivity 0.21817
aiTemplatePlugIn.rollSensitivity -0.21817
aiTemplatePlugIn.yawSensitivity -2.5
rem aiTemplatePlugIn.lookVerticalSensitivity 0.021817
rem aiTemplatePlugIn.lookHorizontalSensitivity -0.021817
aiTemplatePlugIn.lookVerticalSensitivity 0.21817
aiTemplatePlugIn.lookHorizontalSensitivity -0.21817
aiTemplatePlugIn.throttleLookAhead 1.0
aiTemplatePlugIn.pitchLookAhead 1.0
aiTemplatePlugIn.rollLookAhead 1.0
aiTemplatePlugIn.yawLookAhead 1.0
aiTemplatePlugIn.lookVerticalLookAhead 1.0
aiTemplatePlugIn.lookHorizontalLookAhead 1.0
aiTemplatePlugIn.throttleScale 1.0
rem *** Angle in radians ***
aiTemplatePlugIn.pitchScale 5.0
aiTemplatePlugIn.rollScale 5.0
aiTemplatePlugIn.yawScale 0.0020
aiTemplatePlugIn.lookVerticalScale 1.0
aiTemplatePlugIn.lookHorizontalScale 1.0
aiTemplatePlugIn.setCameraRelativeMinRotationDeg -360/-45/0
aiTemplatePlugIn.setCameraRelativeMaxRotationDeg 360/10/0


rem *** AITemplate ***
aiTemplate.create PanzerIVTopMG
aiTemplate.addType ITUnit
aiTemplate.addType ITBiological
aiTemplate.addType ITGround
aiTemplate.degeneration 15
aiTemplate.allowedTimeDiff 2
aiTemplate.basicTemp 5
aiTemplate.commonKnowledge 0
aiTemplate.secondary 1
aiTemplate.addPlugIn PanzerIVTopMgArms
aiTemplate.addPlugIn PanzerIVTopMgUnit
aiTemplate.addPlugIn PanzerIVTopMgCtrl

rem **********************************************************************
rem **********************************************************************


The Stationary MG42:

rem *** Plugins ***
aiTemplatePlugIn.create Unit Stationary_mg42Unit
aiTemplatePlugIn.equipmentType 4
aiTemplatePlugIn.setStrategicStrength 0 0
aiTemplatePlugIn.setStrategicStrength 1 1
aiTemplatePlugIn.setUseNoPathfindingToGetToObject 1
aiTemplatePlugIn.setHasExposedSoldier 1
aiTemplatePlugIn.setAlwaysTargetSoldier 1

aiTemplatePlugIn.create Armament Stationary_mg42Armament

aiTemplatePlugIn.create Physical Stationary_mg42Physical
aiTemplatePlugIn.setStrType LightArmour

aiTemplatePlugIn.create ControlInfo Stationary_mg42Ctrl
aiTemplatePlugIn.driveTurnControl PIYaw
aiTemplatePlugIn.driveThrottleControl PIThrottle
aiTemplatePlugIn.aimHorizontalControl PIMouseLookX
aiTemplatePlugIn.aimVerticalControl PIMouseLookY
aiTemplatePlugIn.lookHorizontalControl PIMouseLookX
aiTemplatePlugIn.lookVerticalControl PIMouseLookY
aiTemplatePlugIn.throttleSensitivity -1.0
rem aiTemplatePlugIn.pitchSensitivity 0.021817
rem aiTemplatePlugIn.rollSensitivity -0.021817
aiTemplatePlugIn.pitchSensitivity 0.21817
aiTemplatePlugIn.rollSensitivity -0.21817
aiTemplatePlugIn.yawSensitivity -2.5
rem aiTemplatePlugIn.lookVerticalSensitivity 0.021817
rem aiTemplatePlugIn.lookHorizontalSensitivity -0.021817
aiTemplatePlugIn.lookVerticalSensitivity 0.21817
aiTemplatePlugIn.lookHorizontalSensitivity -0.21817
aiTemplatePlugIn.throttleLookAhead 1.0
aiTemplatePlugIn.pitchLookAhead 1.0
aiTemplatePlugIn.rollLookAhead 1.0
aiTemplatePlugIn.yawLookAhead 1.0
aiTemplatePlugIn.lookVerticalLookAhead 1.0
aiTemplatePlugIn.lookHorizontalLookAhead 1.0
aiTemplatePlugIn.throttleScale 1.0
rem *** Angle in radians ***
aiTemplatePlugIn.pitchScale 1.0
aiTemplatePlugIn.rollScale 1.0
aiTemplatePlugIn.yawScale 0.0020
aiTemplatePlugIn.lookVerticalScale 1.0
aiTemplatePlugIn.lookHorizontalScale 1.0
aiTemplatePlugIn.setCameraRelativeMinRotationDeg -70/-70/0
aiTemplatePlugIn.setCameraRelativeMaxRotationDeg 70/30/0


rem *** AITemplate ***
aiTemplate.create Stationary_mg42
aiTemplate.addType ITUnit
aiTemplate.addType ITGround
aiTemplate.addType ITFixed
aiTemplate.addType ITLowPriority
rem aiTemplate.addType ITMobile
rem aiTemplate.addType ITAir
aiTemplate.degeneration 20
aiTemplate.allowedTimeDiff 3
aiTemplate.basicTemp 9
aiTemplate.commonKnowledge 0
aiTemplate.addPlugIn Stationary_mg42Unit
aiTemplate.addPlugIn Stationary_mg42Physical
aiTemplate.addPlugIn Stationary_mg42Armament
aiTemplate.addPlugIn Stationary_mg42Ctrl



As you can see, the lines in blue are different.

Lets show them here again:

pz IV top gunner:

aiTemplatePlugIn.pitchScale 5.0
aiTemplatePlugIn.rollScale 5.0

Stationary MG42:

aiTemplatePlugIn.pitchScale 1.0
aiTemplatePlugIn.rollScale 1.0

I changed the 1.0 value of the pitch and roll scale in the stationary MG AI/objects.con to 5.0, and got as aggresive bots in stationary mg's as the bots were on tanks etc.

 

try this one:

rem *** Plugins ***
aiTemplatePlugIn.create Unit Stationary_mg42Unit
aiTemplatePlugIn.equipmentType 4
aiTemplatePlugIn.setStrategicStrength 0 9
aiTemplatePlugIn.setStrategicStrength 1 9
aiTemplatePlugIn.setUseNoPathfindingToGetToObject 1
aiTemplatePlugIn.setHasExposedSoldier 1
aiTemplatePlugIn.setAlwaysTargetSoldier 1

aiTemplatePlugIn.create Armament Stationary_mg42Armament

aiTemplatePlugIn.create Physical Stationary_mg42Physical
aiTemplatePlugIn.setStrType LightArmour

aiTemplatePlugIn.create ControlInfo Stationary_mg42Ctrl
aiTemplatePlugIn.driveTurnControl PIYaw
aiTemplatePlugIn.driveThrottleControl PIThrottle
aiTemplatePlugIn.aimHorizontalControl PIMouseLookX
aiTemplatePlugIn.aimVerticalControl PIMouseLookY
aiTemplatePlugIn.lookHorizontalControl PIMouseLookX
aiTemplatePlugIn.lookVerticalControl PIMouseLookY
aiTemplatePlugIn.throttleSensitivity -1.0
rem aiTemplatePlugIn.pitchSensitivity 1.021817
rem aiTemplatePlugIn.rollSensitivity -1.021817
aiTemplatePlugIn.pitchSensitivity 0.21817
aiTemplatePlugIn.rollSensitivity -0.21817
aiTemplatePlugIn.yawSensitivity -2.5
rem aiTemplatePlugIn.lookVerticalSensitivity 0.021817
rem aiTemplatePlugIn.lookHorizontalSensitivity -0.021817
aiTemplatePlugIn.lookVerticalSensitivity 0.21817
aiTemplatePlugIn.lookHorizontalSensitivity -0.21817
aiTemplatePlugIn.throttleLookAhead 1.0
aiTemplatePlugIn.pitchLookAhead 1.0
aiTemplatePlugIn.rollLookAhead 1.0
aiTemplatePlugIn.yawLookAhead 1.0
aiTemplatePlugIn.lookVerticalLookAhead 1.0
aiTemplatePlugIn.lookHorizontalLookAhead 1.0
aiTemplatePlugIn.throttleScale 1.0
rem *** Angle in radians ***
aiTemplatePlugIn.pitchScale 7.0
aiTemplatePlugIn.rollScale 5.0
aiTemplatePlugIn.yawScale 1.0020
aiTemplatePlugIn.lookVerticalScale 2.0
aiTemplatePlugIn.lookHorizontalScale 4.0
aiTemplatePlugIn.setCameraRelativeMinRotationDeg -70/-70/0
aiTemplatePlugIn.setCameraRelativeMaxRotationDeg 70/50/0


rem *** AITemplate ***
aiTemplate.create Stationary_mg42
aiTemplate.addType ITUnit
aiTemplate.addType ITGround
aiTemplate.addType ITFixed
aiTemplate.addType ITLowPriority
aiTemplate.addType ITMobile
rem aiTemplate.addType ITAir
aiTemplate.degeneration 20
aiTemplate.allowedTimeDiff 3
aiTemplate.basicTemp 19
aiTemplate.commonKnowledge 0
aiTemplate.addPlugIn Stationary_mg42Unit
aiTemplate.addPlugIn Stationary_mg42Physical
aiTemplate.addPlugIn Stationary_mg42Armament
aiTemplate.addPlugIn Stationary_mg42Ctrl

 

another:

rem *** Plugins ***
aiTemplatePlugIn.create Unit Stationary_mg42Unit
aiTemplatePlugIn.equipmentType 4
aiTemplatePlugIn.setStrategicStrength 0 9
aiTemplatePlugIn.setStrategicStrength 1 9
aiTemplatePlugIn.setUseNoPathfindingToGetToObject 1
aiTemplatePlugIn.setHasExposedSoldier 1
aiTemplatePlugIn.setAlwaysTargetSoldier 1

aiTemplatePlugIn.create Armament Stationary_mg42Armament

aiTemplatePlugIn.create Physical Stationary_mg42Physical
aiTemplatePlugIn.setStrType LightArmour

aiTemplatePlugIn.create ControlInfo Stationary_mg42Ctrl
aiTemplatePlugIn.driveTurnControl PIYaw
aiTemplatePlugIn.driveThrottleControl PIThrottle
aiTemplatePlugIn.aimHorizontalControl PIMouseLookX
aiTemplatePlugIn.aimVerticalControl PIMouseLookY
aiTemplatePlugIn.lookHorizontalControl PIMouseLookX
aiTemplatePlugIn.lookVerticalControl PIMouseLookY
aiTemplatePlugIn.throttleSensitivity -1.0
aiTemplatePlugIn.pitchSensitivity 2.21817
aiTemplatePlugIn.rollSensitivity -2.42417
aiTemplatePlugIn.yawSensitivity -2.5
aiTemplatePlugIn.lookVerticalSensitivity 2.21817
aiTemplatePlugIn.lookHorizontalSensitivity -1.21817
aiTemplatePlugIn.throttleLookAhead 0.7
aiTemplatePlugIn.pitchLookAhead 3.0
aiTemplatePlugIn.rollLookAhead 2.2
aiTemplatePlugIn.yawLookAhead 2.0
aiTemplatePlugIn.lookVerticalLookAhead 3.0
aiTemplatePlugIn.lookHorizontalLookAhead 5.0
aiTemplatePlugIn.throttleScale 1.0
rem *** Angle in radians ***
aiTemplatePlugIn.pitchScale 7.0
aiTemplatePlugIn.rollScale 6.643
aiTemplatePlugIn.yawScale 2.0020
aiTemplatePlugIn.lookVerticalScale 6.0
aiTemplatePlugIn.lookHorizontalScale 5.0
aiTemplatePlugIn.setCameraRelativeMinRotationDeg -70/-70/0
aiTemplatePlugIn.setCameraRelativeMaxRotationDeg 70/50/0



rem *** AITemplate ***
aiTemplate.create Stationary_mg42
aiTemplate.addType ITUnit
aiTemplate.addType ITGround
aiTemplate.addType ITFixed
aiTemplate.addType ITMobile
aiTemplate.addType ITAir
aiTemplate.degeneration 20
aiTemplate.allowedTimeDiff 3
aiTemplate.basicTemp 19
aiTemplate.commonKnowledge 0
aiTemplate.addPlugIn Stationary_mg42Unit
aiTemplate.addPlugIn Stationary_mg42Physical
aiTemplate.addPlugIn Stationary_mg42Armament
aiTemplate.addPlugIn Stationary_mg42Ctrl
if you set the pitch scale, it'll affect the firing of the bots

if you set the roll scale, it'll affect the movement of the bots

So setting the roll scale to 9999.0 will make all bots move around twitching, and setting the pitch scale to 9999.0 will make the bots twitch while they're aiming at a target.

 

I've just basically boosted all of their scales and "look ahead"s by .5. It makes them move and aim a little faster -- nothing superhuman, mind you, but they do move and shoot a LOT more like good, experienced human players now. And although I have seen a few on my team standing about, even those doing so were aimed in the general direction of the enemy, as if to say, "I don't have orders from the SAI yet, pally boy, but just you come my way and see how you like what happens then!"

 

Yep in ObjectSpawnTemplates.con of the gametype you wish it in
add this for say an MG42 unlimited at the bottom save and re-pack the map.

CODE
rem *** MG42 hack ***
ObjectTemplate.Active MG42_unlimited
aiTemplatePlugIn.pitchScale XX
aiTemplatePlugIn.rollScale XX


XX is your choice of tweak strength