PDA

View Full Version : AI attributes



monkeydog
04-07-2006, 10:08 PM
Howdy, have a problem, hoping someone maybe can help. Have looked through pages of past threads and not finding anything relating to this. I'm working on a sp map for dfx and having trouble understanding the relationships between Max Attack Distance, Max engagement, and Min Engagement Distances in the ai attributes. ( when I read about it in the manual it sounds real simple but I think maybe I'm over anylizing and making it complicated. )
I'm trying to make one of the enemy sit on a hillside and start shooting at me when I'm about 150 yds away, but I dont want him to come after me. so I set the max attack at 150 so that he'll start firing at 150. I set the max engagement at 25 because I didnt want him coming at me unless I was right up on him. Then I also set the Min engagement at 25 so that I'd have to be 25 yds away before he would attack me. The result...... he would not shoot at me till I walked right up on him.
So I went back and changed the min engagement to the same as the max attack (150). same result, had to walk right up to him and practicly tap on his shoulder before he would fire. (have the ai set as red alert and forced crouching)
so I'm confused- the manual says for max attack distance that an enemy must be that close before the ai shoots. Min engagement says that an enemy must be that close before the ai attacks. Are "shoot at" and "attack" the same thing? And max engagement in manual says ai will not approach unless enemy is that close. When the ai "approach" are they not also "attacking" ?
The more I look at the manual explanations and the more I change the numbers the more confused I'm getting! wondering if anyone could simplify this for me or perhaps dirrect me towards some help.
I really appreciate it!

Charger
04-08-2006, 01:20 AM
I can tell you that the AI Attributes are not all that great for DFX. I had the same problem trying to get AI to attack me when I came over a mountain range. I think you need to drop the yardage number some because if its to high they react the same as if its to small. I would have to look in my events list for the map I set it up in to tell you exact. But for the time being try dropping the numbers some. Instead of 150 try 50. This may or may not work but hopefully you can get a real solution soon. It's been a while since I used the editor so I am rusty right now.

Reaper
04-08-2006, 03:48 AM
I have had trouble in jotr same game engine with the same thing, Here are some things to help. Set long distance on the ai how ever use an event to keep them green will help. If it's only a few ai set an event off an area trigger to direct them back to a way point sat where u want to keep them. I worked with all the numbers and never had results I was happy with. Here is the setting I used on a sniper on a tower that kept doing suisides untill i kept her green. max attack 450, max engagement 450, min engagement 450. at red alert she would come off the tower, set to green she stayed and fired. As long as I kept here green it didn't matter how close the human play came she didn't chase.

monkeydog
04-08-2006, 09:59 AM
Thanx Charger and Reaper ! I'll give it another try tonight, Pesky little bastards, with their artificial intelligence!:)

monkeydog
04-08-2006, 10:57 AM
Hey Reaper, you mentioned JOTR, wich makes me curious. Ive never purchased JO as I understand it to be a multiplayer game only. but now I look closer and I see That there are many sp/coop maps made for JO and Escalation. Does the med indeed come with stock ai and is it possible to get the game and either make maps or download custom maps and play the game as a single player?

Reaper
04-08-2006, 03:10 PM
You have these options, use nile LOL or the DFX med your using now. Since Nova released DFX and found we can use the med for JOTR, most of the issues of Nile not being complete no longer matter.

Game play options, single player ie training missions, or coop played on line. Or by lan if you want to play it by your self. I'm building coop maps now. Spend hours playing and testing using lan by my self. The ai include 35 people items and 38 vehicals,

When you map you have to use the people ai to run the vehicals, don't know if DFX works that way or not. You can't just set a truck to a way point list and run it like BHD and C4 did.

monkeydog
04-08-2006, 10:08 PM
Thanx Reaper, I may try it soon, for now though Im going to continue working on my map and trying to learn more about map making .
thanxs again for the info!:)

ArcticWolf
06-14-2006, 05:35 PM
Gee I wish Bad Company was still around - she could explain the AI attributes better than anyone I know.

IF you are going to make a SP/Coop map, here's one little trick taught to me long ago about the AI (should work for Helicopters too):

First, make a dummy map and name it what ever you want. Take 1 each of each type of AI you want to use and place them there and save it as your dummy map.mis

Now then, open it with Notepad or Wordpad and you'll see something like this:

begin item 860
type_id 5252
name "apf02 (spanish)"
id 1299
position -457 531 11
facing 60 0
team 2
bmsi_attributes 514
weapon_type 2
grenades 10
group_id 8
wpdistance 4
fov 360
obliqueness 15
waccuracy2 200
perception2 100
perfectionist2 100
movetimer 3
crouchtimer 3
attention 15
advancetimer 10
edistances 100 500
end item

As you scroll down the list you'll see this line:

perfectionist2 100

Change that line to anything you want upto a max of 250. I can't explain the specifics but what happens to the AI is this:

The longer he/she lives the smarter they get. They may start out shooting at you like crazy till they kill you, and then the next time they take fewer shots and as they kill you and live longer they WILL eventually reach 1 shot 1 kill.

ALSO, if you make your maps similar to the way I do (I only place a select few AI on way point routes - the rest (say 85 to 90) I leave as free roamers), you may find that they may shoot at you and run away/find hiding places to shoot at you from (this has been a major nightmare in my DFLW Spearhead map - they like to hide under bridges making it hard to find them)/make their way to your initial base and spawn rape you/and more.

I meantioned free roamers above, what this does is as the map starts, they spawn where you wanted them, but as the map plays along, they will run to shots/explosions/people talking(yelling too)/vehicles moving, and they will go where ever they want - basically, each time you play that map, it may never play the same twice... really!

Some of you old timers know or knew Crazy Irish who used to post at DFArena quite a bit. When I made Spearhead, I gave him a copy and he actually played it till he beat it, but he did post and say that it took him 63 tries first! LOL

I love to play maps that show more realism than some of this garbage I've seen online - and having all the bots on way point routes is kinda sucky - then it depends also on what kind of map it is too.

And if anyone's curious, yes I am going back to map making again - got tired real fast of that wimpy arcade style BF2 with it's built in cheat (the commanders map) and decided to get back into DF again for a while. I"m going to check and repair all of my old maps (and put them up for others to download) as well as make some new ones for DFLW/TFD and maybe JO if I have the time....

monkeydog
06-16-2006, 09:27 PM
Thats an intriguing idea, I've not heard of it before. Sounds like the ai starting acting not so artificial. I may give that a shot and see how it works out, usually hip to trying something new.
Thanx Arctic Wolf!

Knuckles
06-16-2006, 10:51 PM
There are various tools around the web that you could use to "tweek" your AI. I have modded the helos in C4 to make them a little smarter in my single player maps.
You can adjust certain attributes of the bad guys or vehicles in the AIP files (in the pff)
Here is an example of A Hokum from C4 and you can see what all you could do.

target_eval_rate 0
tether_dist 0
primary_weap AI_STINGER // id of primary weapon
primary_ammo -1 // # of rounds
primary_rate 6 // # of seconds between firing rounds
primary_fov 30 // degrees
primary_range 800 // meters
primary_facing 0
primary_flags 0
secondary_weap AI_30MM // id of secondary weapon
secondary_ammo -1 // # of rounds (-1 = unlimited)
secondary_rate 0.25 // # of seconds between firing rounds
secondary_fov 30 // degrees
secondary_range 600 // meters
secondary_facing 0
secondary_flags 0
hunt_flags 0
hunt_limit 0
patrol_speed 70 // KPH
patrol_altitude 25 // meters
patrol_climb 5 // meters per sec
combat_speed 160 // KPH
combat_altitude 40 // meters
combat_climb 10 // meters per sec
min_agl 10 // meters
min_speed 0 //KPH
min_chase_dist 200 // meters
max_chase_dist 1400 // meters
flight_skill 4
turn_rate 25 // degrees per second turn rate
accel_time 10
radio_distance 0
radio_delay 0
use_waypoint_z 0

If you need more info just shoot me an email.

monkeydog
06-17-2006, 12:23 AM
I've only limited experience in map making, Have'nt made one I felt was worthy of posting yet. So forgive my ignorance. Am I understanding correctly that you can adjust your settings in notepad and then when you put it back in the editor it will reflect the changes, as well as when you convert to bms?

ArcticWolf
06-17-2006, 01:54 AM
When you open your MIS file in notepad it maybe of some length so that's why I suggested that you make one map (mis file only) and place one each of your AI in there and make the changes to their Attributes as you wish to ALL of them and then save it, this way in future maps all you need to do is to open the "save map" and select the AI as needed and the copy and paste them into your working map. I always do the AI placement last, this makes it much easier to ensure that all other items are correct when you pretest it offline.

To clarify and give you an idea on what I do when I make a map:

1. Use Pappy's (Novasheep.com) random object generator to place my trees and shrubs on the terrain first - you can set the quantity and type of each and then use it to randomly place them in the map. I would suggest if you use this to make sure you check the box for random angles also, this way all of your trees are not standing perfectly striaght up - looks a bit more natural.

I then - while still in the editor - go through and remove all trees/shrubs from any and all water that I have in the map, add a single start point for me (that will be the future start point for coop players also) and the save the map as a SP/COOP BMS and then go into the map and take a look around. This way I can find trees/shrubs that are planted like on the sides of near vertical hills/mtns and also look to see if all looks ok. If there's problems I go back into the editor and fix what I found wrong.

NOTE: It maybe helpful to go online as a private game (Passworded) and bring a friend and have them look around also to see if they can find anything wrong - you know the old saying: "Can't see the forest for the trees". You may miss things that someone else may not and I've found it a great help.

2. I select one each of each type of building/item that I plan to use in the map and set them off to the side - outside of the play area. From there I can copy and paste things as needed where I want to put them without having to go back into insert mode each time I want something. After you place them it's back into the map to look for problems again, this time also paying attention to elevation type problems too, it doesn't help to have a fence or a building on uneven ground and having a corner up in the air or a fence post flying a few feet off the ground. There's previous posts here as well as DFArena.com's map editing section where if you need "Z" Values (that's the elevation value) for items, you can find them there in those lists. Remember that when you work with tunnels, there IS an absolute Z Value that you can not go below - think of it as Sea Level for the terrain, you can't go below it or things just won't work.

3. Eye Candy: This is where some working knowledge of Groups/Events comes into play. You can make a really cool looking map with interesting effects if you want to, it's just takes a little time and effort. I had one map - I don't remember the name of it - where one of the goals was to go to this one area and destroy the generators. Well, I placed light posts (with working lights for a night map) and overlayed them on the telephone poles. The light posts I placed into 1 group (made them green (neutral)) and then the generators (neutral) were placed in a different group. I then placed my telephone poles with working street lights as they might be around the area where this was going on and then in the events I set it up so that (for example): Group 15 (generators) all destroyed then kill Group 20 (lamp posts). When the players destroyed the generators at the same time all the lamp posts were killed (removed from the map) and only the telephone poles were left so it made it look like the street lights went out. You can do this with many things, like blocking access to the next goal which will not open until they have the previoius goals won first, ect.

Eye Candy also involves the little things, placing a few stacked or randomly placed crates or barrels here and there around buildings or inside, adding small bushes next to buildings, ect.

One inportant thing to remember above all else: Don't put so much into a map that it may cause problems for other players who have lessor machines or poorer quality video cards.

I realize the over the last 4 or so years that the quality and power of vid cards and computers have come a long way, but there's still quite a few people out there who can't afford the better equiptment - try to think of them when you make your map, if they can enter a map and play it with no frame rate loss (or lag as most people used to call it) then they will be happy and you'll actually feel good about it.

4. AI: Ai includes vehicles as well as people. Before I put them in, first I try to decide on the vehicles - am I going to have actions cause some of the vehicles to travel along the roads to another point or are they just there as non movable items? If I"m going to have them move then I have to set up way point routes for them and then set them up in they're on groups for later when I do the events to make them move and stop. Try to be careful with helicopters because they are preprogrammed to fly up to a certain altitude and if you make them fly too fast, they will not have time to climb and fly over objects like buildings or hills and actually fly right through them - and this really looks like crap in a game. 25 to 35 kph is really about the fastest you need to make them go - and make sure you set out their waypoint route first. As with trucks, make sure your helicopter has plenty of way point markers that will try to make it make smooth turns instead of jerky angle movements, you can use upto 2 (I think it was) complete way point routes - one following the other) if you need to go a long ways as you are limited to the amount of markers you can use for one waypoint route (If I remember right I think it was 30 or 35 markers total for one route).

5: The People AI: After I've placed my Waypoint AI I then place the rest (usually about 90 or so) and leave them as free roamers. What I mean by this is that I place them in the map in different areas and when the map is run, they will stay there till they hear gun shots/people shouting (for those who like to use taunts)/people running, then they'll move off towards those sounds and if they encounter players they will attack. Now like I said above about the Perfectionist setting, if they live they will get smarter and use less shots, find hiding places, ect. and even reach the 1 shot 1 kill status if they really live a long time (and in these maps it don't take long! LOL).

IF you really want to see a copy of one of my maps I'll post the link to my website where you can download the mis file and open it up in your editor and see how I did things, but you'll need to give me a few days to redo the mis file as I no longer have the original and will have to rewrite the groups/layers and maybe events.

Geez.. I talk a lot don't I? LOL

There's a whole hell of a lot more about map making than I could post here in one posting, but if you take your time and really want to make an enjoyable pain in the ass coop, make it more realistic by taking your time and paying attention to the details, little things count.

I don't know how many times over the years - since Delta Force 2 - that I've seen poorly made maps that really wanted to make me just give up and quit - they were really that bad - helicopters flying through mountains, trucks driving through rivers underwater, wierd impossible buildings made from all kinds of stuff.. GEEZ!

And if you ever run across any maps made by Othello you'll really enjoy them. Most of us older map makers basically consider him the God of Delta Force SP/Coop Map Making! Really....

~~~~
Added:

If you're having a problem in a map and would like some help, don't be afriad to ask. You can PM me here or send me an email: ArcticWolf@Arctic-Wolf.org and give me a copy of the map, tell me what's wrong or the problem you're having and then I'll take a look see at what I can do to help. What I will do is make a complete copy of the mis file and then when I make the changes I'll send the mis file back with the name slightly changed so that you can compare the one I send back with your original to see what I did to help you - I'll probably write a long winded note to go along with it to explain what I did as well. LOL

And no, it's no problem at all, I don't mind helping. If I can help make better map makers then maybe those with their crappy maps will either start to work better on theirs or give up all together..

monkeydog
06-17-2006, 09:00 AM
Thanx, you've got some good ideas that I'll try, such as the order you follow in laying out the map. I think one problem I've had is that I try to make to much of the map all at once. Ive always started with an insert point and a mission in mind and tried to detail the map as I went from waypoint to waypoint. Trying to set one goal and placing ai, trees, vehicles, triggers, everything around that first goal and then proceed to the next and start over. The resullt being that I usually get frustrated and don't finish; or, that I finish it all out real quick and it simply goes downhill faster and faster till I get done.
I'll start a new one and take this simpler, more structured approach and see how it goes. Thanx again Arctic Wolf !

ArcticWolf
06-17-2006, 02:21 PM
It's no problem at all. I didn't think of this last night as it just dawned on me. There's one more thing you might do before you even start touching the editor:

When you come up with an idea for a map, take a piece of paper and write it out - what your mission is going to be, what will be required. Then, you could break down - on paper - what each goal is and sort of in an outline form write it out, this can be a big help also as there had been many times where I was working on a map and forgot a detail or 2 until after the map was finished.

~~~
Added:

DOH! I forgot again! LOL

If you hit a mind block, when it seems that you just can't get going and nothing seems to work, take some time and listen to what ever music you like - even while working on the map! I have found this has helped me numerous times and Servant, one of the Admin over at DFArena, I suggested this to him one time and it worked for him also. Believe it or not, sometimes with some songs, they can even give you ideas for a whole new map or something to add in your current one. LOL

~~~

Also, as I said above, take your time. When I made my Spearhead map, it took me almost a month, but the outcome was great, people really like the map.

I also made a couple maps for BF1942 - that editor is kinda neat cause in that game, you have to create your own terrain, paint it, add the trees and other items and then you'd have to use another program someone wrote if you wanted to add AI, I just made conquest maps.

If you would like to see some screen shots, click on the following links, the first 8 screen shots are of my BF1942 Desert Combat MOD map called DC Port Hope:

http://www.arctic-wolf.org/maps/DCPH1.jpg

http://www.arctic-wolf.org/maps/DCPH2.jpg

http://www.arctic-wolf.org/maps/DCPH3.jpg

DCPH3 is my second favorite screen shot out of all of them.

http://www.arctic-wolf.org/maps/DCPH4.jpg

http://www.arctic-wolf.org/maps/DCPH5.jpg

http://www.arctic-wolf.org/maps/DCPH6.jpg

http://www.arctic-wolf.org/maps/DCPH7.jpg

DCPH7: I'm especially proud of how this hand painted tunnel and waterfall came out - I just wish I could have done this map in BF2 and used a real one.

http://www.arctic-wolf.org/maps/DCPH8.jpg

Please note that the sky that I used I borrowed from BF Vietnam.

To give you a comparison with the BF1942 map - this is of the port in that map:

http://www.arctic-wolf.org/maps/PH1.jpg

As you can see in both maps, it was a real pain and took me over a month to get it finally completed but it came out really great. I still can't get over my hand painted waterfall from a painted cave opening that I did, that and from the air at the port, the painted train tunnel entrance came out good too.

monkeydog
06-17-2006, 03:50 PM
One more question, I know the Df editors work basically the same, But have you found any of the games to be any better than the others for a novice to work with? I've done one with DF2, and started but never finished several with BHD and DFX. Was thinking about maybe trying TFD or Land Warrior tonight. Any thoughts, or is it about the same with all?

Bluetiereign
06-17-2006, 05:04 PM
BHD was fun to Map. Not too complicated - and when the WAC file really came into use.

Doorway
06-18-2006, 03:42 PM
I agree with BTR on that , BHD was fun to map , another of my favs. was TFD, no matter which game or style of editor I have used , TFD always is fun to go back and play around with.You have to realize too monkeydog, that even your best map makers had to start some where and made some pretty crappy maps in the learning process.Try not to spend to much time focusing on making that perfect map ,it seems to take some of the fun out of map making. I've played some maps that took month's for someone to make , and played some that only took someone a few days to make ,and had just as much fun playing both. Just from reading your threads I can tell you are having fun with making maps , keep it that way and i'm sure you will make some killer maps.:waving.gif:

monkeydog
06-18-2006, 07:55 PM
Thanxs for your input Doorway. I guess you're right that you've got to start somewhere. I start off making a map with some pretty grand ideas and I think what usually happens is the proverbial " trying to run before you learn to walk ", and then I get bogged down and frustrated to where I'm ready to quit.
So I'm going to start a new one, and keep it simple. Maybe just a few waypoints, a couple win conditions, and some ai . Make a couple real simple, quick missions to play and then slowly start adding in the area triggers and the more complicated stuff. Keep the frustration and stress level to a minimum! Hopefully I'll get to that point soon where I feel comfortable posting one for Y'all to check out.
By the way Doorway, You made some maps a few years ago for TFD and Land Warrior featuring some yetis That I have on cd and still enjoy playing. Any plans in the future of unleashing those yetis again?
Thanx again to all- Doorway, BTR, Arctic wolf.

Doorway
06-18-2006, 08:22 PM
I'm glad you asked that monkeydog ,I have just recently reloaded LW and TFD and have started making some maps for both , they are getting close to being done , but not "yeti".. LOL :spin:

monkeydog
06-18-2006, 08:43 PM
Glad to hear that, looking forward to playing them! I've been playing BHD alot lately, but I've always really enjoyed TFD. (it was my first DF game)
Cant wait to experience your new maps! ( one day I may ask you how you made those yetis- unless it's a secret recipe!):waving.gif:

monkeydog
06-19-2006, 06:29 PM
Heck, I feel kind of dumb now. In my last post I mentioned that one day I might ask you how you created those yetis. I reckon I know now. Decided to start fresh on my map making with TFD, Opened up the TFD editor (for the first time) and lo and behold- there's a yeti!
Learn something new everyday, huh? LOL!!
Oh well, still hope you incorporate a few in your next map, enjoyed what you did with them before.
See Y'all!:waving.gif: