AI, pathmaps, aircraft, strategic areas....

Ask questions, discuss ideas, get answers

Re: AI, pathmaps, aircraft, strategic areas....

Postby Swaffy » Thu May 09, 2013 9:08 pm

I have an idea. Have the human players spawn in aircraft from the start, and they have to fly up into the sky to capture a flag that has spawners just for spawning the AI. So the AI will start off high up in the sky when the human players capture that flag. You can even push those AI spawners forward through the map, on top of or in front of that huge mountain.

I'm weird.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Image
User avatar
Swaffy
 
Posts: 1705
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: AI, pathmaps, aircraft, strategic areas....

Postby BotHunter » Thu May 09, 2013 9:22 pm

Uh... yep! you are :)
Walk quietly and carry a sniper rifle
User avatar
BotHunter
 
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm

Re: AI, pathmaps, aircraft, strategic areas....

Postby cajunwolf » Thu May 09, 2013 9:53 pm

He already has robotic spawners (the aircraft that spawn in air with a pilot), and you don't have to spawn a bot in the aircraft just use "AIenteronSpawn" in the con file for plane spawner. This way they spawn and immediately occupy the aircraft. Your trying to make it to complected swaffy. ;)

As additional note with a air to air map with no ground troops you want to be sure and never spawn more bots than you have seats for or they will just stand around without a pathmap to follow.
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
cajunwolf
 
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas

Re: AI, pathmaps, aircraft, strategic areas....

Postby fo0k » Fri May 10, 2013 11:02 am

cajunwolf wrote:They use 3D mode only in aircraft via a sensor.



It's this which needs the tweak . with aistats on I can see that when the ground is a certain distance below the plane it will begin to climb. This is simple enough and works fine on the bf maps. this map, as we know is much bigger. so unlike alamein where its dealing with a .. maybe 50 meter high 'mountain' its now dealing with real, 2km high mountains.. some quite steep. They pull up.. they try to avoid it. but they needed to pull up maybe a km back instead to actually make it over.

There are several functions for this it seems. pitch lookahead.. collision look ahead etc etc. I have increased or tweaked these values with little (if any tbh) effect.

Could you say which of these could determine the lowest height for instance? This alone could solve it



in terms of gameplay.. if the entire map was an SA.. with one flag.. could the ai not just fight each other over that flag. I see a search radius too for ai. could this work at 32km size map? or maybe doesn't work how I'm imagining.

cheers!
User avatar
fo0k
 
Posts: 1412
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Postby freddy » Fri May 10, 2013 5:44 pm

http://www.battlefieldsingleplayer.info ... or=138#138

http://www.battlefieldsingleplayer.com/ ... entry79293

I saw there is something for bots and waterheight, dont suppose it could be set to a high value and the bots dont go under it? or maybe it work some other mysterious way, maxSlope?

Code: Select all
rem *** Setup map parameters ***
rem *** searchMap name/waterHeight/waterDepth/maxSlope/brush/lowClipLevel/hiClipLevel/considerAITypes
rem *** searchType name/mapNum/minSearchLevel
User avatar
freddy
 
Posts: 1230
Joined: Sun Oct 18, 2009 4:58 pm

Re: AI, pathmaps, aircraft, strategic areas....

Postby Apache Thunder » Fri May 10, 2013 6:48 pm

Those properties likely only impact the pathmaps during the generation process. I doubt they would serve much purpose for a map with pathmaps already made or a map with no pathmaps. I think the settings are only read at the time of pathmap creation to determine what areas get included in the pathmaps and what areas don't. Like the water height setting for example. I think it's likely relative to the water height in the map and not absolute. Thus it's more of an offset to increase/decrease the water sensing during pathmap generation. (for example you can allow bots to go through shallow water, or by altering this setting you can not allow them to touch the water at all.
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1192
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: AI, pathmaps, aircraft, strategic areas....

Postby cajunwolf » Sat May 11, 2013 12:13 am

freddy, as Apache mentioned all those lines in the AIPathfinding.con file are for the creation of the pathmaps. The maxslope setting is the maximum slope a vehicle or bot can climb before stalling. In pathfinding this would be where it switches from black (do go) to white (no go). None of these settings really need to be changed, and besides aircraft do not use pathmaps so it's moot really.

To path across a stream or river at a shallow area just paint the area you want them to cross black and it's a done thing. You need to hand paint your pathmaps anyhow if you want them to work right.

Apache, at the start of the thread fo0k mentions you had made a robotic aircraft for him to use on this map. I am trying to find out if this is what they are talking about or a bot spawning into an aircraft, taking off, and flying to the target. If it is a robotic (spawn in the air aircraft with bot pilot that fly's in a straight line etc) type I would imagine you had all the controls fixed so the bot can only use the throttle. My suggestion here, as you can read above, was to go into the aircraft_name\AI\Objects.con and give it enough pitch control to be able to climb over the mountain. If on the other hand it is a bot flying the aircraft under it's own control then we have another problem, and I think I know what it might be.

fo0k, I suspect you might have a height scale problem. Check something for me if you will. Look in the Int\Terrain.con file and look for this line ...

"GeometryTemplate. yscale 0.6000"

If it is like the above change it to the following ...

"GeometryTemplate. yscale 1"
(You will need to readjust your water level)

This setting adjust the max height of the terrain in relation to the total height of the map. The setting of 0.6 means that the terrain can have a max height of 60% of the full height of the height map, and the height map is, as we know, a gray scale of rgb 0,0,0 (pure black) to rgb 255, 255, 255 (pure white) where white is the highest point and black the lowest points of the 3D cube map. They did this in like the second version of bf42 (patch) to keep the terrain from being able to reach the very top of the sky (imagine how odd that would look). Now you can still make a 1 to 1 map but best practice with stock bf42 maps (and bfv) is to use .600 as the standard.

Now this is just a theory and if nothing else we can eliminate this as being the issue (really it shouldn't matter except for the size of the map might have an effect here). It's just that from what you are telling me about how they are attempting to climb and fly over but start the climb to late tells me that perhaps they are seeing the terrain 40% lower than it actually is. Hence the late start to climb over the mountain because the slope of the terrain approaching the mountain would start later in their minds eye (they are looking at the sensor going wtf!). Now on the other hand you might have to go lower than .6 because your mountains might already be at the top of the map (as the bots might see it). So if going to 1 has the opposite effect then try going to like .55 the .5 and so on. Did I explain all that all right?

As to the strategic area thing. You don't need to make the whole map a SA, and you shouldn't anyhow. You should have three SA's with the two as main bases each with a value of -1, and one center with a value of 100. As to the diameter make it just big enough for the planes to fly in a circle around the flag to make a capture (I usually use 150).
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
cajunwolf
 
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas

Re: AI, pathmaps, aircraft, strategic areas....

Postby POTAmatt » Sat May 11, 2013 4:14 am

I suspect you might have a height scale problem.
Yeah, that was my initial reaction, and that could probably be addressed by reducing the yscale and compensating for it in the heightmap, but it's all for naught if the bots won't pull the trigger. It would be cool if you were able to scale the map and the plane down to 4096. Then the rest is easy...
POTAmatt
 
Posts: 88
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: AI, pathmaps, aircraft, strategic areas....

Postby fo0k » Sun May 12, 2013 10:31 am

ok, well the heightmap does use the full greyscale range already, and has an epic.. yscale of 10.0 ! (2560 meters).
I discovered / bothered to find out a few weeks back that a value of 1.0 for heightscale is 256 meters

altering this to 1 would solve it for sure. they seem to be setup for this. but would lose the interest of the map as it all flattened out. I need the senses to be increased by a factor of 10 really then they could handle it all.

Im convinced its not a max height issue for them. the yscale should not be the issue. its the lack of reading the terrain ahead. if the mountains had very smooth gradients then the ai would be able to cruise over, gradually gaining altitude to this 2560 meters.. but if that slope is too steep it just does not trigger any alert/warning /pitch adjust until far too late.

little blighters need glasses to look ahead a km or 2.. :roll:
User avatar
fo0k
 
Posts: 1412
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Postby freddy » Sun May 12, 2013 10:52 pm

Duno if you tried changing the AiSettings.SetViewDistance or AiSettings.SetInformationGridDimension

propably dont help but it dont hurt to try i guess
User avatar
freddy
 
Posts: 1230
Joined: Sun Oct 18, 2009 4:58 pm

PreviousNext

Return to 1942 Modding Discussion

Who is online

Users browsing this forum: No registered users and 22 guests