Author Topic: Bot Navigation Tweaks  (Read 12732 times)

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #60 on: 03-12-2010, 06:12:57 »
What about creating a new vehicle type for things like mortars, that should have bots allowed to pick the Change behavior?

I already have a framework setup for making the needed changes. Just need a list of weapons that would be assigned the new AI.

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #61 on: 03-12-2010, 06:12:33 »
Guys,the absolute best way to keep bots on stationary weapons
is to have them automatically spawn in them when the game starts,and have the "no exit" code for the weapon
There is no better way

FH2 already has some stationary weapons setup for not allowing exiting
1 downside...the no exit, affects humans as well

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #62 on: 03-12-2010, 07:12:32 »
Then how is that better exactly? Agree with spawning on part, but the current way keeps them on and allows humans to exit and replace them. I dont see a need to change that

Offline Zoologic

  • Masterspammer
  • ****
  • Posts: 4.141
  • In FH Since 0.67
    • View Profile
Re: Bot Navigation Tweaks
« Reply #63 on: 03-12-2010, 07:12:21 »
Without the "no exit" enabled, i already saw bots camping on howitzers at main bases (e.x. Goodwood QF 25 Pounder). Can you explain this?

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #64 on: 03-12-2010, 07:12:12 »
The only point to the whole business about stationary weapons is that I can have the bots do whatever you guys prefer. It isn't really important to the overall changes I made to AIBehaviors.

I will show you some code. This is to illustrate the real mistakes I've been going on about.

Incorrect:
Code: [Select]
aiSettings.setVehicleBehaviour Tank Fire BBFireInfantery BBPFireInfantery 4 UCFire  TankWeights
Correct:
Code: [Select]
aiSettings.setVehicleBehaviour Tank Fire BBFireInfantery BBPFireInfantery 4 UCFire  UnitWeights
The above example is why the Fire urgency can reach 81 or greater,when it only needs to be raised to around 6 or 7 to become the active behavior.

Mistakes like this are repeated for all behaviors for all vehicles.

Offline Remick04

  • Moderator
  • ***
  • Posts: 103
    • View Profile
Re: Bot Navigation Tweaks
« Reply #65 on: 03-12-2010, 20:12:39 »
Thank you Void for cleaning up the aibehaviors for us! ;D I look forward to trying this out later.

I had been comparing the AIbehaviors of Fh2 to that of other mods, and there seemed to be a lot of differences, but didn't know what they did. Drawde had done a lot of work based of what Legion had started. I did some reading up on how AIbehaviors worked, but not knowing much I decided not to tamper with it. Drawde had done a great job getting the bots to act the way people wanted them too.

As for the 'fixedguns', as everyone pointed out, that was intentional for the sake of keeping bots on defensive positions. I do see the cons to this. It works great for the defending team, as they stay at their guns instead of abandoning them because there are no immediate threats. But I do think it can be a problem for the attacking team as they capture those positions. Occasionally they aren't in the right place to defend against counter attack, and a bot is wasted to a gun that won't necessarily help the team. But I think the general consensus was that the pros outweighed the cons, so things were made this way. It is a lot of fun assaulting a well defended position, which happened less when the bots were free to abandon those fixedguns.

Again thank you for your work, if I have time tonight I'll try playing a few round with your new AIbehaviors and see the difference it makes :)



Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #66 on: 03-12-2010, 21:12:05 »
Hello Remick,

The file I wrote may or may not bring noticeable improvements to bot behavior. I think it might, but you guys will be the judge of that. It is only a WIP release after all.

The main advantage of my code is that it contains the corrections to the urgency inhibitors. This makes it a better starting point to work from than the original AIBehaviors was.

In other words, my file should be able to be tweaked with more predictable results than the one I replaced.

Offline Remick04

  • Moderator
  • ***
  • Posts: 103
    • View Profile
Re: Bot Navigation Tweaks
« Reply #67 on: 03-12-2010, 21:12:29 »
Sounds good, It does look a lot neater than the old one. Keep up the good work!

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #68 on: 04-12-2010, 02:12:48 »

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #69 on: 04-12-2010, 02:12:28 »
Edit-

Nevermind.

« Last Edit: 04-12-2010, 04:12:06 by Void »

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #70 on: 04-12-2010, 03:12:59 »
I have just found this to not be true after all. I've been trying to code more effective sniper AI in my personal mod by creating a new vehicle type for the soldier. What I created was very complex, and very experimental. My initial result was a bot that would spawn in and more or less immediately empty its weapon into the ground or a ridge etc.

If you shoot a tree ingame,does it fall over ?

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: Bot Navigation Tweaks
« Reply #71 on: 06-12-2010, 16:12:23 »
@void
Not seeing dramatically different AI, but perhaps there wasnt meant to be. Sometimes, i do get the impression that the bots are more responsive, but they've always have off and 'on' days so it might just be that.

For this patch though, perhaps the absence of change is a good thing, since its internal cleanup

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #72 on: 06-12-2010, 17:12:20 »
Quote
Not seeing dramatically different AI, but perhaps there wasnt meant to be

Then I accomplished primary mission #1, which was not to make anything worse. Bots should be a little more focused now, but that is a subjective observation.

Though I recoded everything, I tried to capture what I perceived to be the intent of the original file. I'm not surprised that the effects on the bots are minor. There are still many things I would change at the individual vehicle AI level. No, I will never touch the fixed guns. Word of honor.

The new file may need work, but it is workable. The old one was chaotic.

Offline Void

  • Moderator
  • ***
  • Posts: 162
  • AI Dev
    • View Profile
    • ESAI at Moddb
Re: Bot Navigation Tweaks
« Reply #73 on: 08-12-2010, 02:12:42 »
I'm trying to determine the true speeds of FH2 vehicles. There is a nice debugger command for this (vars.set debug-engine 1). I really think the bots would drive better with accurate information about vehicle max velocity.

You get a nice warning screen if you try to run FH2 without using FH2.exe. So, I patched FH2.exe to load the debugger for me instead of the retail game. That was easy.

And I now recall what Devilman said about FH2 maps crashing the debugger. Turns out he is quite correct about that.

Can someone point me to a single FH2 map - any map - that can be loaded under bf2_r.exe ? Just one map would do. Anyone ?

Offline Devilman

  • I belong to Naughty Club
  • **
  • Posts: 274
    • View Profile
Re: Bot Navigation Tweaks
« Reply #74 on: 08-12-2010, 04:12:37 »
When you run any map through the debugger
you will get error messages for objects that arent loaded/used in that map
So there may not be any maps that dont crash the debugger

the debugger sems to "sometimes" show the more important errors as a priority,based on i have noted the first lot of errors at a certain %,removed those errors,then next time i run DB,I receive errors which never originally popped up before

there are 2 ways to overcome this crashing,while map loading
run debugger,when it crashes,check the log file,and remove that object
repeat process,until you give up,like i did

or make a new mod,include only the bare minimum amount of necessary files,and add your vehicles to a BF2 Vanilla map (short explanation)