View Full Version : AI Repair, seen it?
Mr. Bildo
9th Oct 06, 6:18 PM
I've been banging my head against the wall for the last few days trying to figure out what prompts an engineer controlled by the AI to repair a vehicle.
I've found the scar code that determines what vehicles should be repaired, but there is nothing anywhere that instructs an engineer to repair a building or vehicle. Not squadai, not attack plans, nothing. I can't find any reference to their repair ability in the AI.
The only place I've ever seen the AI repair a vehicle is in the single player mission with the all the Tigers. I looked at the code for that sp mission and it turns out that there are specific triggers that send out engineers to specifically repair them.
I'm really beginning to believe that AI controlled engineers will never repair anything.
I'd like someone, if possible, to show some evidence otherwise. Please. :)
--Mr. Bildo
communist_bob
9th Oct 06, 6:22 PM
Instead, maybe make repair bunkers a top priority in their build list thingy for axis ai?
KnowsKnone
9th Oct 06, 6:27 PM
Yeah, you would probabally have to add the whole code manually. Otherwise the priorities might work....
Mr. Bildo
9th Oct 06, 6:32 PM
Instead, maybe make repair bunkers a top priority in their build list thingy for axis ai?
Yes, you are right.
However, the real motive behind asking this is that I was using the engineer repair ability as a pattern for my combat medic. I want him to seek out injured squads and heal them. I have added the code to find injured squads and added it to my ally_heal_ability ai. The next thing is to add his squad ai. I thought I would base it off the engineer, looking for when they decide to find stuff to repair. That's when I discovered that it may not exist.
I can write the squadai myself, that isn't the issue, per se. I'm just curious if I'm missing something, because I can't find where in the AI engineers are "encouraged" to heal their fellow mechanized units. :hmm:
--Mr. Bildo
2ltben
9th Oct 06, 7:58 PM
Take some of the priority off of fighting on the frontlines, perhaps. It gets old seeing more engineers than infantry attacking a cap.
camo1018
9th Oct 06, 8:29 PM
I've actually seen the AI repair their vehicles and buildings. I just noticed that on my last game. In McGechaen's War, my riflemen noticed the engineers repairing an almost-destroyed bunker and a damaged Stug.
Mr. Bildo
10th Oct 06, 5:40 AM
I've actually seen the AI repair their vehicles and buildings. I just noticed that on my last game. In McGechaen's War, my riflemen noticed the engineers repairing an almost-destroyed bunker and a damaged Stug.
Do you remember what difficulty the AI was?
KnowsKnone
10th Oct 06, 5:47 AM
Personally, I don't give them the chance to repair, but I have noticed that those few tanks that get away come back... I've seen them once repairing a bunker at a SP but they can't seem to figure out that HQ>Bunker.... This was on expert diffiuculty...
camo1018
10th Oct 06, 4:14 PM
This was in Expert. However, I also seen AIs repair their vehicles in Normal as well.
Mr. Bildo
10th Oct 06, 4:38 PM
Thanks for the replies. I'll keep digging I guess. Maybe I had too much Tequila while I was modding last night. :sci:
--Mr. Bildo
Mr. Bildo
10th Oct 06, 6:39 PM
O.k., so I did a test:
I played as allies with an AI buddy on Easy. I set the engineers AI to only build and repair. It worked. They only built things and then stood around. I then took a jeep and got it shot up until it had very little life left. I parked it in front of my AI buddy's engineers and they just stood there like tools as my Jeep burnt up. I then started to blow up his buildings. Still he did nothing.
Next test:
Same thing as before, except this time my AI buddy was an Expert. I pulled my crippled Jeep up in front of his engineers and this time they immediately started repairing him.
Why?
Still don't know. I feel like I understand the majority of the variables that are different between the easy ai and hardest ai (that's how it's referred to in the code). I still don't see anything that would cause the AI to not repair in easy and to do so in expert.
--Mr. Bildo
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.