Page 1 of 1

Problems with Single Player(creating bots)

Posted: Thu Feb 21, 2013 3:00 pm
by Cobraliones
Finnaly i finished my game somehow and i wanted to put bots in it with "BF1942 Single Player Creator" and i put them in my game file and i open BF1942 and succesfully i created my game In Singleplayer mode and bots were created but they arent moving. They stay where they are created, only if i come close to them they start to shoot at me. So my question is how can i make them run, enter the vehicles and all things what bots do in regular maps?

Re: Problems with Single Player(creating bots)

Posted: Thu Feb 21, 2013 6:28 pm
by BotHunter
That is a very interesting question! I have been wondering the same thing for quite a while! the only luck I had with it is control points. they always seem to try to migrate on those :)

Re: Problems with Single Player(creating bots)

Posted: Thu Feb 21, 2013 6:37 pm
by Senshi
there are various (extensive) tutorials here on how to get maps working for bots. It's not easy, but there's a lot of information on that topic here, on bfsp and Google.

Re: Problems with Single Player(creating bots)

Posted: Sun Feb 24, 2013 4:00 pm
by Cobraliones
I have to say that i managed somehow to make that bots on island are moving and driving vehicles, but Allies forces from ships aren't moving, they just stay in boats near battleship or aircraft carrier, ONLY 2 bots who are moving from Allies are those who are born near Airplane(cause they can enter in it) on carrier and they fly normal along the island and shoot on enemies. So only problem is with AIs who are born on ships. How could i fix that?

Re: Problems with Single Player(creating bots)

Posted: Sun Feb 24, 2013 4:15 pm
by Swaffy
Airplanes don't really use pathfinding files, they seem to just follow the heightmap.

Your boats need Boat pathfinding files. Like Senshi said, we have the information here, you just need to look for it. AI can get fairly advanced. Our friend CajunWolf has some very helpful and informative information about AI here.

Re: Problems with Single Player(creating bots)

Posted: Mon Feb 25, 2013 2:55 am
by Malbert
It seems like they can't find the waypoints (paths) or are confused because they are being pulled by two forces with the same strength. I would first go in game and see if you can nudge them in the right direction. I have had problems with bots moving because spawnpoints were not close enough to paths or that so many bots spawned on the same point that some got pushed out of the "pathway" by other bots. So go in game switch sides and see if you can literally push them to an objective and see if they will start walking by themselves at one point, if so then they are just not spawning close enough to the paths. If not then you have at least two things pulling on them meaning they don't know which way to choose. Other than that I can't think of anything.

Re: Problems with Single Player(creating bots)

Posted: Mon Feb 25, 2013 4:37 am
by Swaffy
Oh, you're getting into creating bot support for landing craft. That's the most sopfisticated part of AI from what I was told. I can't help you there, I haven't messed with that part of AI yet.

Re: Problems with Single Player(creating bots)

Posted: Wed Feb 27, 2013 7:55 am
by POTAmatt
Adding Landing Zones is quick and easy. Here's a example from a FHSW map i just added AI to for Juno Beach to allow the LCVP's and the LCT's to land:

Image

Strategicareas.con

rem *** Create strategic areas ***
aiStrategicArea.create beach_village 741.8/1091.7 749.3/1099.2 70 land
aiStrategicArea.create hill_radar 835.1/1314.8 842.6/1322.3 50 land
aiStrategicArea.create german_northbase 1334.9/1659.3 1337.4/1661.8 40 land
aiStrategicArea.create river_crossing 1297.1/1169.2 1307.1/1179.2 50 land
aiStrategicArea.create beach_north_village 822.3/1204.6 824.8/1207.1 60 land
aiStrategicArea.create checkpoint 1060.1/1356.5 1067.6/1364 50 land
aiStrategicArea.create Beach 714/949 856/982 30 land

AILandingZone.createLandingZone BeachLanding 750/800 990/950 LZZMax

aiStrategicArea.setActive Beach
aiStrategicArea.addObjectTypeFlag Base
AIStrategicArea.addLandingZoneUnit LandingCraft
AIStrategicArea.attachLandingZone BeachLanding

aiStrategicArea.addNeighbour hill_radar
aiStrategicArea.addNeighbour german_northbase
aiStrategicArea.addNeighbour river_crossing
aiStrategicArea.addNeighbour beach_north_village
aiStrategicArea.addNeighbour beach_village
aiStrategicArea.addNeighbour checkpoint
aiStrategicArea.setOrderPosition LandingCraft 858/820
aiStrategicArea.addAllowedVehicleGroup land
aiStrategicArea.addAllowedVehicleGroup infantry
aiStrategicArea.addAllowedVehicleGroup any
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 80.0

============================================================================================

AILandingZone.createLandingZone BeachLanding 750/800 990/950 LZZMax
The green box in the pic above is the Landing Zone (BeachLanding) and is defined above with the bottom left x/z - top right x/z coordinates. The Landing Zone can be any size and extend over land as long as the land the craft hits is within the box, they will exit the vehicle. LZZMax dictates the approach of the vehicle which is Up/North in the case. LZZMin is down/South. LZXMin is left/West. LZXMax is right/east.


AIStrategicArea.addLandingZoneUnit LandingCraft
AIStrategicArea.attachLandingZone BeachLanding

This attaches the landing zone to a strategic area (control point, base, route, etc) and dictates the unit type.


aiStrategicArea.setOrderPosition LandingCraft 858/820
This is also added to the Strategic area and the x/z coordinates tell the craft when to open their doors. The coordinates must be within the Landing Zone area.

I hope that helps! If not, let me know. Matt