Smallones

Lots of cool and useful tips to mod either serverside or clientside
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Smallones

Post by cajunwolf »

Eh .. just thought of something else. When you run BFSAK for the first time, it creates an ini and support files. If you change directories where you run it you have to delete this file or it will not start sometimes. Also in the ini is the last map opened, delete this for each new map is like clearing it's cache.
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Smallones

Post by Swaffy »

I got it! I restarted my computer, shut down any unneeded programs, and started up the SAK that ends in "002". Didn't run in Compatibility Mode or as Admin. It ran! You are very patient, sir. Much respect.
*sigh* Not something fun to deal with at 11 PM.

[Edit] It works! Creating a celebration video.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Smallones

Post by cajunwolf »

As I mentioned above, extract to a new folder fresh and try again by rt clicking on "Run as Administrator" in the drop down list. You might have muddies the waters with all the stuff you tried. Like I said this machine I am on now is running Win 7 Pro x64 and it works fine doing it that way.

Just did a try on my Win 7 pro x64 laptop and after installing the GDK I rt click, run as admin, and it runs.
Image

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

Re: Smallones

Post by cajunwolf »

Kewl!

No problem at all. I am one of those odd ball types that gets gratification from teaching and helping others. You getting it to work and the excitement involved is all the thanks I need. ;)
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Smallones

Post by Swaffy »

Here is a video I want you to look at, especially the ending section that shows the "SmallOnes" web-like stuff.

I spent about 3 hours earlier today painting those lines on the map. Is it too complicated? :lol:

http://www.youtube.com/watch?v=kyyS1qPH1dY
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Smallones

Post by cajunwolf »

Interesting, I assume here your trying to get the infantry to follow certain paths. I have used something like that before in a bf1918 map but no where near that elaborate. Only thing I see right off the bat is that you have your 64x64 info map tiles broken up into to many dogo areas. The trick is to have your info tiles have as few smaller dogo's as possible. My question is have you tried it out yet? Now that you have BFSAK and can see the info and waypoints you will start to see what I mean by this. Now me I would paint the whole area white and make black trails and trying to keep then contained as single dogo areas in each info tile. It's a good idea don't get me wrong, it's just the approach that we need to look at.

Look back at the pathmap images of the two maps I used as an example. You will note I white out EVERYTHING except where I want the bots to go and you see very few waypoint connection lines as I get rid of all areas not used. By being all white there are no black or do go areas the SAI has to deal with, esp if they are not used. Waste of memory and slows the AI down.

Let me know how that idea works in test please. If you can send me a copy so I can look at your pathmaps and perhaps make suggestions. I have an idea where your going with this.

L8trz

Cajunwolf
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Smallones

Post by Swaffy »

I will try your idea, whiting it all out. I have a scenario question: what if a human player abandons a bot-filled vehicle in one of these white areas? Will they drive back to their correct path?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Smallones

Post by cajunwolf »

Well first before you go to painting everything white lets get a plan together. Let me answer your question first as it deals with the first and most important thing about a 2D pathmap. If a bot spawns onto or ends up on a nogo or white area he will stay there till he dies or is killed. Black (bit set to 0) = Do GO, White (bit set to 1) = NO GO. A bot is born into the map with a common knowledge of all things and has but two purposes, to kill other bots and take control points, they think of nothing else. The Battlefield AI is reactive, and totally unique because of this. No other game has ever had nor ever will ai that acts so much like a human in that it makes it's own decisions depending on condition of the world at that moment. They CAN NOT be scripted to play the way you want, but instead react to what is going on around them. The bot has the final say as to what it thinks best. In other words if the SAI tells the bot to go to a particular area or control point, he will go unless there is an enemy bot near by or something else it encounters along the way.

All that being said in painting your pathmaps you have to contain the specific area of the battlefield. A bot is not going to go looking around outside of the main battle area. It is going to go back and forth between control points as they change from neutral, to owned, to hostile, and kill other bots along the way. Do this before you go painting everything white not knowing the natural flow of the bots within the battle area. Explain to me what you want to do. What is the purpose of stripping the terrain in the Infantry maps? Explain the map and how you want the battle to flow. Detail is important here because I can perhaps suggest a better method. To get the bots to do what you want them to, you have to make them think it was their idea. ;)
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Smallones

Post by Swaffy »

I just want the bots to follow the roads. And if they somehow end up off the road in one of the fields (such as a human player dropping them off or crashing) then I want the bots to head back to the road. So I made the stripes like that so that the bots will go back to following the road. But what I didn't have in mind was how the smallones would turn out. I thought about how messed up the smallones might end up like as I was finishing all of the striping stuff.

They were following the paths fairly well in-game, but I could see in some areas where they were getting "confused". Such as an area where they were walking back and forth along a fence line because they "didn't know" how to go around it to the gap that allowed them through; that's when I knew the smallones came out out-of-whack.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Smallones

Post by cajunwolf »

I am struggling to come up with a way to explain this in an unambiguous way, and it is difficult to say the least. It always has been, and this is the reason behind this thread along with others I plan to start here, and at bfsp. Your asking very good questions, but like others you have the wrong impression as to how and why bots move around the map. It is the Strategic Areas or SA's for short and their values at any given time due to conditionals that move bots around the map. The pathmaps are just that, a map showing how to get from SA to SA.
I just want the bots to follow the roads.
I showed you how to do that with my edited Tank pathmaps for Bocage, and this is the only way to get them to specifically follow a road. You can see how that limits the game play right? In a real battle the infantry and tanks are not going to follow any roads, but take out across a field or what ever to engage the enemy. I keep tanks on the road only in parts of the map where it is appropriate for them to do so. Other wise I only restrict them, within reason. As for Infantry, I rarely ever restrict them to a road, but will keep them confined within a certain area. More on this later because understanding more about the AI will make a lot of this more clear to you.
And if they somehow end up off the road in one of the fields (such as a human player dropping them off or crashing) then I want the bots to head back to the road.
First off, why would they want to go back to the road? Remember a bot has two purposes or desires only, to kill other bots and take control points in the SA's. He knows nothing at all about a road but looks for the SA with the highest value and heads for it in the most direct route the pathmaps will allow. If along the way another SA develops a temperature or value higher than the one he is heading for, he goes towards that one. As he travels to the control point he goes from the tile he is in and heads for the next waypoint in the next tile, waypoint to waypoint until he reaches his destination.
Such as an area where they were walking back and forth along a fence line because they "didn't know" how to go around it to the gap that allowed them through
Sounds to me like you have a waypoint issue and I suspect there was some black or do go around the fence. Bots only see complex objects which are the buildings and structures with interiors, and then not even in the way you do. They see a mesh with "portals" which are the openings like doors and windows. They can only see or shoot at you through these portals. They don't even see things like fences. sandbags, etc. Even with a portal mesh, if the pathmap is black they will try to go right through it because the pathmap says that is a do go area.

As mentioned the bots move around the map from SA to SA because of their modulating values during game play. SA's are connected to each other by "AddNeighbor" and this is very important in deciding on which SA the bots go to from each SA. A SA, when created has a basic value you set and then it is modified by Flag modifiers linked to the strategies and due to conditionals, increase or decrease the value of the SA. For instance, Neutral, Hostile, or Owned would be three conditions and each would have a modifier value that the basic value is increased by due to this condition. Some other modifiers are chokepoint, soldierspawner, bridge, flank, front, and the list goes on. You have different modifiers in the strategies too along with number of attacks or defenses and aggression levels to name a few. By understanding the Strategic AI, the strategies, and the pathmapping system you can get the bots to play the map right. This can take a tremendous amount of time depending on the map and it's complexity.

I need to do a thread on StrategicAreas and strategies to give everyone a view of the bigger picture and I think this would help a lot towards understanding. Like I said, this is a very complected subject with a complex interaction of three complex systems. Hence my opening statement.

Here is something interesting to do and very educational at the same time. Take the pathmap textures from Ed42 and put them in your map. You of course would have to do Infantry and Tank separately, but you get the idea. Now when you play the map you have the pathmap as the terrain and your seeing what the bots see, in away. You can go free cam, set back and watch the bots play out the map, seeing how they follow the pathmaps. In the next post, when I have the time, I will show you how to turn on several ai debugging tools in the AI.con so you can see whats going on.

I hope this has helped somewhat and keep the questions coming. Anyone else please feel free to jump right in here ok?

L8trz,

Cajunwolf
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
Post Reply