Problems with Single Player(creating bots)

Ask questions, discuss ideas, get answers
Post Reply
Cobraliones
Posts: 6
Joined: Sun Feb 10, 2013 8:08 pm

Problems with Single Player(creating bots)

Post 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?
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Problems with Single Player(creating bots)

Post 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 :)
Walk quietly and carry a sniper rifle
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Problems with Single Player(creating bots)

Post 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.
Cobraliones
Posts: 6
Joined: Sun Feb 10, 2013 8:08 pm

Re: Problems with Single Player(creating bots)

Post 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?
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Problems with Single Player(creating bots)

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Malbert
Posts: 8
Joined: Sat Aug 06, 2011 5:19 am

Re: Problems with Single Player(creating bots)

Post 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.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Problems with Single Player(creating bots)

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: Problems with Single Player(creating bots)

Post 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
Post Reply