Author Topic: Help on bf2 ai  (Read 2279 times)

Offline Darman

  • FH-Betatester
  • ***
  • Posts: 242
    • View Profile
Re: Help on bf2 ai
« Reply #15 on: 29-04-2016, 18:04:06 »
Dude, lets try to unfck this.

0. Reset and make new strategic areas.
1. Two-way neighbour everything as it makes sense. Close the Editor.
2. Open your StrategicAreas.ai ([mapname]/Editor/AI/) file.
3. Manually delete ALL entries starting with "AIStrategicArea.addNeighbour" for the US_Landing_x CPs.
4. Save and DONE.
« Last Edit: 29-04-2016, 18:04:07 by Darman »

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #16 on: 29-04-2016, 19:04:55 »
but whats that gonna do???

actually i just dont understand neighboring  ;D  ;D  ;D

can you explain me why its necessary and what's one and two way neighboring??  ;D  ???


Offline Darman

  • FH-Betatester
  • ***
  • Posts: 242
    • View Profile
Re: Help on bf2 ai
« Reply #17 on: 29-04-2016, 19:04:50 »
People have done tutorials for that, just sayin.

Warning. If you read ahead, you'll take the risk of getting more confused. Make sure you want this or if you'd rather follow my steps from the last post without further digging into this.

So. Actually, the concept of neighbouring zones pretty much self-explanatory. If zones are neighbours, that means that they are linked in the eyes of the AI commanders. Lets say you have 2 CPs, one is owned by each team, they are two-way neighbours (blue line in the Editor). Both AI commanders will now give the order to attack the CP they don't own.
If they are one-way neighbours and connected by a red line in the editor, only one AI commander will see the other CP as a valid target and issue attack orders. The othe AI commander will now only see his owned CP as target and therefore issue a defend order.

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #18 on: 29-04-2016, 19:04:58 »
Lmao!! that was pretty confusing though i got it!! ;D

so what will
0. Reset and make new strategic areas.
1. Two-way neighbour everything as it makes sense. Close the Editor.
2. Open your StrategicAreas.ai ([mapname]/Editor/AI/) file.
3. Manually delete ALL entries starting with "AIStrategicArea.addNeighbour" for the US_Landing_x CPs.
4. Save and DONE.

these steps do???

Offline Darman

  • FH-Betatester
  • ***
  • Posts: 242
    • View Profile
Re: Help on bf2 ai
« Reply #19 on: 29-04-2016, 20:04:07 »
Honestly man, just do it and report the results. You should really understand how it works through this process.

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #20 on: 30-04-2016, 17:04:16 »
But dude should i delete the lines in strategicareas.ai in Editor/AI or /[map name]/gamemodes/AI/
??
« Last Edit: 30-04-2016, 19:04:21 by roxor »

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #21 on: 02-05-2016, 17:05:23 »
C'mon dude tell me!!! In thich folder i should change that file??? Editor/Ai/strategicareas.ai   
                                                       
                                                                     OR

/levelname/gamemodes/[ x ]/AI/strategicarea.ai ????

Offline Darman

  • FH-Betatester
  • ***
  • Posts: 242
    • View Profile
Re: Help on bf2 ai
« Reply #22 on: 02-05-2016, 21:05:05 »
When in doubt, why not both?

The "Editor" folder contains everything that is relevant for work in the editor.

The gamemodes contain the data that is applied ingame.

Unless you are creating multiple layers like 16, 32, 64 - try to keep both folders equal.

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #23 on: 09-05-2016, 09:05:13 »
well that did'nt work...

should i try setting "unstrategic control point" option in bf2 editor??
should that help?  ??? :-\

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #24 on: 09-05-2016, 18:05:12 »
Comeon tell me!! should i use that option + what does that mean? does it mean that its an "unstrategic" CP
and bots won't capture it?

Offline Darman

  • FH-Betatester
  • ***
  • Posts: 242
    • View Profile
Re: Help on bf2 ai
« Reply #25 on: 10-05-2016, 00:05:42 »
No, do not use that option unless you are setting up dummy CPs. General advice here - take a look at other maps and how the creators have done it, in this case take a look at how the option you mentioned is being used. Then decide if it is of value for your work.

If the Landing CPs are owned by the attacking team by default, you may use the option to set "unabletochangeteam 1" for them, however that won't solve your issue, the only way to solve your issue would be to get the Strategic Areas straight.

Since this evolved into some kind of guessing game I would like to ask you to share two files with us here. First your gameplayobjects.con and then your strategicAreas.ai file. Please attach them to your next comment or upload them somewhere, so I can take a look at it. Otherwise I won't be able to help I'm afraid.

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #26 on: 10-05-2016, 08:05:57 »
Here are both the files...take a look! :)

Offline Darman

  • FH-Betatester
  • ***
  • Posts: 242
    • View Profile
Re: Help on bf2 ai
« Reply #27 on: 10-05-2016, 12:05:04 »
So basically, you didn't do what I advised.

remove the AIStrategicArea.addNeighbour entries for all USA CPs. Like this:

Spoiler
aiStrategicArea.setActive USA
aiStrategicArea.addObjectTypeFlag ControlPoint
AIStrategicArea.setOrderPosition Infantry -2.66518/24.9575/-53.1368
AIStrategicArea.setOrderPosition Vehicle -1.74297/24.9575/-54.3564
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 14.1421

aiStrategicArea.setActive Usa_landings_2
aiStrategicArea.addObjectTypeFlag ControlPoint
AIStrategicArea.setOrderPosition Infantry -76.0844/24.9575/-45.7629
AIStrategicArea.setOrderPosition Vehicle -73.442/24.9575/-44.8361
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 14.1421

aiStrategicArea.setActive Usa_landings_3
aiStrategicArea.addObjectTypeFlag ControlPoint
AIStrategicArea.setOrderPosition Infantry 68.569/24.9575/-52.7182
AIStrategicArea.setOrderPosition Vehicle 69.0188/24.9575/-54.3316
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 14.1421

Offline roxor

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Help on bf2 ai
« Reply #28 on: 10-05-2016, 17:05:49 »
I did the thing you told

but this is the result ----->     http://imgur.com/dWkQDlC

they are still crossing the Combat area...  :-\


Offline Darman

  • FH-Betatester
  • ***
  • Posts: 242
    • View Profile
Re: Help on bf2 ai
« Reply #29 on: 10-05-2016, 20:05:12 »
Well, this is the only option that comes to mind. If you are 100% sure that the defending AI will not target the Landing CPs, hence the defending AI commander will not issue attack orders to squads, and still the Bots are moving towards the beach, make sure that the order positions for the "German" CPs are set correctly. Also remove any trace of ESAI and set all Landing CPs to "unabletochangeteam 1". Adjust the AI view distance to match your scenario, too.

If you still don't get the proper results, I am afraid I don't know the answer to your problem.