Author Topic: Singleplayer in Forgotten Hope 2  (Read 93148 times)

Offline gavrant

  • (Almost) retired dev
  • Developer
  • ******
  • Posts: 598
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #75 on: 11-09-2011, 20:09:03 »
There is kind of solution: limit weapons' max. range for bots. You can do it by editing every weapons.ai file in objects_weapons_server.zip (see maxRange string and don't forget to update optimalRangePercentage). It doesn't prevent bots from shooting through undergrowth at close ranges, but at least you won't be shot by MG-fire from opposite side of a map.

I limited rifles to 150 meters (250 - 300 by default, on some maps it exceeds view range), MGs - to 125-150 meters (default: 200-300) and SMGs to 50-75 meters (default 100).

Also, if you tweak "aiSettings.setBehaviourModifier MoveTo" string in ai\aibehaviours.ai (search for string "aiSettings.createBehaviourModifiers StandardWeights"), you'll get a nice bonus: open field battles (e.g. Pointe du Hoc) won't degrade to sharpshooting matches, bots sitting still and wasting whole ammo on some distant enemy.


Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #76 on: 12-09-2011, 01:09:10 »
You dont get shot by mgs at the opposite end of the map. The selectable mg is used at the same range as a rifle. And in single shot with as much accuracy as rifles.

It will be all and good if the plan was to make bots act like sedated cannonfodder. But the idea is to create challenge per bot.

Not while bots wont move tactically, they do fire aprox. as far as a human - But with deviation, so you barely scratch the surface when dealing with bot accuracy compared to playing online.

Like I said, the solution - really, is to just move more tactically and use men to reduce the statistical chance of yourself getting shot, rather than lone-wolfing it.

These lessons ARE supposed to improve your online play after all.

Part of the reason, I never recommend setting ratios between player and bot to 1: 47 or something, but instead setting teams to 50:50 as it should be.

If bots were handicapped further, we would just be making them dumber than they already are, and for a specfic player preference...

Offline gavrant

  • (Almost) retired dev
  • Developer
  • ******
  • Posts: 598
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #77 on: 12-09-2011, 18:09:50 »
Djinn, don't take my words about MG-fire and opposite side of a map literally, it was a hyperbole.

And sorry, I didn't make my true motive clear. It is not to make my life easier by nerfing bots. With some experience, it is not that hard to avoid their fire, and I would rather engage 30 bots simultaneously than single DAzLAYER (that's for "improve your online play" part). The primary motive is to make bots pay more attention to objective and less to lengthy fruitless sharpshooter matches, bots being highly inaccurate at long ranges.

Let me illustrate the point on Pointe du Hoc 64 "vanilla" singleplayer:

Bots move pretty well from beach to "Destroyed Bunker" flag. But then allies and axis get stuck at blue and yellow lines respectively, 250-300 meters apart, trying to snipe each other till the end of a round.

With decreased handheld weapons' ranges and tweaked aibehaviours.ai bots are less distracted by distant enemies, which they can hardly hit anyway. As a result, the "Farm" flag being captured without my necessary presence. And battles are more intense and objective-driven, somewhat closer to online experience and with less sneaking and lone-wolfing on my part.

As for max. range of MG emplacements: on PHL 32 there was (there is?) one particularly annoying MG, which, despite undergrowth, covered whole area of allied advance, effectively halting it. Yes, human player could outflank it, but for bots it was impossible task to do. So better part of a round I was running back and forth, sniping or blasting that MG, only to hear it firing again after several seconds. That was frustrating experience. The easiest path to improve said experience was shorter range for MG emplacements.

And finally, Djinn, I'm confused by "ratios between player and bot" in your post. Are we talking about singleplayer or coop?
« Last Edit: 12-09-2011, 19:09:22 by gavrant »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #78 on: 12-09-2011, 21:09:08 »
I understand your reasoning. Don't think I am simply trying to pooh-pooh the idea. And no, I got the hyoerbole.

But you see, my concept of AI in forgotten hope is this.

I believe the weapon handling is perfect, the rate of fire, damage and mode of use. For this reason, the final piece that makes things work as they should, is making them used at the range they would be.

With guns set correct, you get riflemen moving along SMGs and LMGs. Riflemen fire and move in, MGs prone at range and suppress and smgs move in under their covering fire for the kill. Bots tend to fire at the closest person, with a over-riding logic of firng at anyone who fires at them. For this reason, the ability to put enough firepower downrange will cause enemy bots to focus on simply firing back at riflemen at range, while their SMG team and other non-firing rifle teams move up and finish them off.

If this was reduced, you WONT get the weapon use as it should be, and the human can mow them scores of infantry moving close up without firing, while being in HIS range of fire. And with bots only, you will get ALOT more knife battles and silly combat situations really close up.

Well, that's the theory anyway.

Its not that bots can't be improved. Its that, I think its more about firming up their AI choice logic, how they use their weapons, NOT the range it is used at.

Personally, I think bots play more like real soldiers than human players do - sans moving from cover to cover.
« Last Edit: 13-09-2011, 00:09:17 by djinn »

Offline gavrant

  • (Almost) retired dev
  • Developer
  • ******
  • Posts: 598
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #79 on: 12-09-2011, 23:09:13 »
I agree with you that "bots play more like real soldiers than human players do" - lust for frags doesn't outweigh team's objectives. But I don't think they show good use of cover. In skirmish they mostly sit in the open. And illusion of "moving from cover to cover" is probably due waypoints, hammered into their "heads" by developers.

As for "the human can mow them scores of infantry moving close up without firing", I can't remember any maps with clear view distance above 150 meters (except Northern African desert, but those maps are more suitable for tanks, not infantry). Some building, hill or undergrowth always obscures the view.

Also, note that my tweaks do not touch close range. I have played on PdH, Brest, Sfakia, Giarabub and PHL for month and haven't seen "more knife battles and silly combat situations really close up".

But I'm thinking now about two other ways to make bots use handheld weapons more efficiently:
1) weaponTemplate.optimalRangePercentage - AFAIK, bot will start firing at max. range, but will keep advancing at the same time until its target is within optimal range.
2) weaponTemplate.deviation - some says it is "default deviation that is added to the weapons when bots fire them". So, if one set lower value, we'll get bots more accurate at long ranges. Perhaps, I should try this.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #80 on: 13-09-2011, 00:09:52 »
I like the former of the 2. That way, bots will keep up fire and stand and fight at their best range. That I can live with.

And I didn't say, bots take cover better than humans. I meant bots play more like soldiers EXCEPT to do with cover to cover movement.

I would be happy to try your mod. I think its about time general infantry AI took a leap foward. Its been stalling since 2.26 and Remick's works for the 2.3 release.

I hope he's here to consider this tweak for the official build.

Offline Ajs47951

  • Jr. Member
  • **
  • Posts: 459
  • 1f u c4n r34d th1s u r34lly n33d t0 g3t l41d
    • View Profile
    • AJS
Re: Singleplayer in Forgotten Hope 2
« Reply #81 on: 13-09-2011, 02:09:04 »
I would love to see most of the AI tweaks in the official build. This would make it easier for newer players so they did not have to download anything more. And the AI  tweaks are the shit! ;D


Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #82 on: 13-09-2011, 11:09:00 »
...2) weaponTemplate.deviation - some says it is "default deviation that is added to the weapons when bots fire them". So, if one set lower value, we'll get bots more accurate at long ranges. Perhaps, I should try this.

If you want long range accuracy, just set your difficulty to maximum (there's no added deviation when set to max.).


Quote from: Outsider
The bot skill is used to see how big a part of the ai weapon deviation is used (there is a default value that most weapons use, so that's why you don't normally see it). Time is also involved. A bot that keeps shooting at the same target will have its deviation decreased. A bot skill of 1 results on no additional bot deviation.

The bots target the point that they see. They first try to see the centre of an object, if that fails, they try for the camera, and if that fails they try for a random position.

 - http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=3357


You can take the above quote as gospel (I believe Outsider is/was a DICE employee)... ;)

Offline gavrant

  • (Almost) retired dev
  • Developer
  • ******
  • Posts: 598
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #83 on: 13-09-2011, 17:09:38 »
When I said "some says", it was Outsider's words too. But I didn't know he is such a celebrity.

I'm afraid that by setting bots' skill to maximum (1.00?) I'll get a bunch of uber-riflemen from public servers, 1 shot 1 kill at any range. I'm used to 0.85 skill - a compromise between challenge and winning Sfakia for Germans single-handedly. Perhaps, this is the source of bots' inaccuracy at long ranges and it's time for me to raise their skill.

The main problem is testing all this stuff. We got some old and some new bugs in 2.4 singleplayer. E.g. good old Sfakia has a couple of new navmesh bugs (one of them occasionally traps half of team), Ramelle and PdH have "behind the enemy lines" spawn points, etc, etc, etc. These bugs will interfere with any fine-tuning of AI. So a wise move would be: eliminate bugs first, then fine-tuning.

@Djinn: Sorry, I misunderstood "sans" in bots and cover part.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #84 on: 13-09-2011, 17:09:10 »
Not a problem.
I used to tweak bots to my own liking myself, back when we didn't have the auto-stuka horn accepted, smoke grenade code was new and Drawde's AI was still a mod...

These days I am so busy at work I just play it as is. But its important data, to hlep us understand our latitude for bot AI.

Happy modding  :)

Offline cannonfodder

  • Full Member
  • ***
  • Posts: 1.228
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #85 on: 14-09-2011, 11:09:25 »
At 1.0, it's not necessarily 1 shot, 1 kill at long range as the weapons themselves have deviation.

Offline Solidsnake2234

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #86 on: 10-12-2011, 17:12:47 »
2 Questions. 1: On some maps, like Point Du Hoc and the map based of the ending battle from "Saving Private Ryan" (forgot the name of the map), when you spawn, it spawns you behind that spawn point. Like if I click on the beach spawn on Point Du Hoc, it spawns me on a LVT. On the "Saving Private Ryan" like map, I click on the say the bridge spawn, it spans me all the way behind the Alamo spawn, farther away from the current front line on the map. WHy does this happen? 2:Why did they make the 2.4 update so that Muese River is the only singleplayer map in the update, and the other 3 or 4 new maps COOP/Multiplayer?

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.812
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #87 on: 10-12-2011, 17:12:45 »
The back spawning is so you don't spawn in the middle of the action. Basically there are two possibilities: Either you respawn, get killed at once and wait again for the next spawn, or you respawn and have to walk 100m to the actual flag. The devs chose the second one.

You can play Eppeldorf in Coop mode.

Offline Solidsnake2234

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Singleplayer in Forgotten Hope 2
« Reply #88 on: 10-12-2011, 18:12:42 »
The back spawning is so you don't spawn in the middle of the action. Basically there are two possibilities: Either you respawn, get killed at once and wait again for the next spawn, or you respawn and have to walk 100m to the actual flag. The devs chose the second one.

You can play Eppeldorf in Coop mode.

Okay thx for the explanation, but theres one problem. On Point Du Hoc (64), the US AI Bots spawn directly at the first flag (Observation Bunker), yet the human player has to first either wait for the first flag to be taken, or use an LVT to get to the beach, and use one of the swapable classes thats on a destroyed LVT at the beach to use the hook to get over the wall. Why do the AI's spawn at the Bunker, when playes have to do all the above? And I know Eppeldorf can be played on COOP, but why not put the other maps added on into singleplayer or COOP as well?

Offline Eat Uranium

  • Tea Drinker
  • Global Moderator
  • *****
  • Posts: 4.569
  • Today's news will contain [REDACTED]
    • View Profile
    • FH2 Music
Re: Singleplayer in Forgotten Hope 2
« Reply #89 on: 10-12-2011, 19:12:05 »
And I know Eppeldorf can be played on COOP, but why not put the other maps added on into singleplayer or COOP as well?
Adding SP support to a map takes a long time and can only be done when the terrain and statics on that map are finalised.  There just wasn't the time to add it to those three maps (which were still receiving updates to statics until the last moment).