Author Topic: Overly effective AI stukas  (Read 2577 times)

Offline DirArtillerySupport

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Overly effective AI stukas
« Reply #15 on: 06-08-2012, 20:08:25 »
I prefer a nice thick layer of barbed wire between the spawns and the planes.

Offline hawkeye2816

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Overly effective AI stukas
« Reply #16 on: 20-08-2012, 22:08:45 »
The solution I found to the problem with aircraft was to change the AI behaviors.  In the fh2/ai folder, there's a file called "aibehaviors", or something like that, that handles how AIs behave in response to vehicles and such.  What I did was turn their "move to" weight for fighters and bombers down to zero.  The default is like 7.5, which means that if they see an empty plane, they will almost without failing try to get in it.  At 0.0, they don't try to get in them very often at all, and if they do get in the planes, they either idle on the runway or fly off the map and die.

But I agree that, while it is more interesting to have the bots use the planes, they are so overpowered that no matter what I try to do, I die instantly.  One solution, however, without changing the files is to simply hop out when the stuka is on apporach; they wont bomb you unless you're in a vehicle.

Offline DirArtillerySupport

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Overly effective AI stukas
« Reply #17 on: 21-08-2012, 17:08:20 »
So this one in the file under this heading?:

rem *** Construct Bomber weights ***
aiSettings.createBehaviourModifiers BomberWeights

aiSettings.setBehaviourModifier MoveTo      7.5

and change it to 0.0? Anything else you've changed to make things a little more fun with bots?

Offline hawkeye2816

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Overly effective AI stukas
« Reply #18 on: 21-08-2012, 21:08:07 »
Yes, that's the file I've changed.

The only other change I made was to the objects_server.zip file.  Use 7zip to open it (not unzip), and navigate to the >soldiers>common>ai folder.  Open objects.ai and you should see this as your first paragraph:
rem *** Plugins ***
aiTemplatePlugIn.create Unit SoldierUnit
aiTemplatePlugIn.equipmentTypeName Infantery
aiTemplatePlugIn.setBattleStrength Infantry    10.0
aiTemplatePlugIn.setBattleStrength LightArmour 5.0
aiTemplatePlugIn.setBattleStrength HeavyArmour 3.0
aiTemplatePlugIn.setBattleStrength NavalArmour 1.0
aiTemplatePlugIn.setBattleStrength Helicopter  5.0
aiTemplatePlugIn.setBattleStrength AirPlane    3.0
aiTemplatePlugIn.setStrategicStrength 0 1
aiTemplatePlugIn.setStrategicStrength 1 1
aiTemplatePlugIn.cullDistance 1000

Turn the last line, the culldistance, down to 500 and the bots wont shoot at you from across the map anymore.  The culldistance is their "sight" distance in meters.  It's the distance at which they will engage.  Since most maps don't have sight distances longer than about 600m, the full kilometer attack range of the bots is a bit excessive.  I got tired of being sniped by AT guns and tanks that I couldn't see through the distance fog.  Unfortunately, to my knowledge (which is by no means extensive), the culldistance can't be changed on a per-map basis, so I tried to pick a number that would be reasonable for most maps.

Warning: changing the files in your FH2 game will probably cause the servers to boot you or may crash the game.  Make sure you backup your files before you do anything to them.  I probably should have mentioned that in the previous post, but you probably knew to back up anyways.  Once you do the backup, however, you're free to just play around with the files, and pull the backup if your changes crash the game.
« Last Edit: 21-08-2012, 21:08:55 by hawkeye2816 »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Overly effective AI stukas
« Reply #19 on: 21-08-2012, 21:08:05 »
I'll have to say, what is happening right now in SP development, is more effective AA.

That's it. But still, the stone-paper-scissors effect works in this case.
If infantry and armor can push through (with a lot of losses to AT) and take out AA, they can get air superiority via Stuka and such. Its how it should be.

AA will pwn each time it meets stuka - This needs to be fixed so its the case.