Jump to content
Sign in to follow this  
*zeewolf*

Autonomous AI vehicle management

Recommended Posts

I've looked through quite a few multiplayer and coop missions but I've never seen scripts that can do the following:

(Assume a single editor placed AI playable unit in a single unit group that never merges with any others).

1. Identify and mount an empty vehicle or (preferentially) a friendly vehicle with an empty crew spot. Run-time created vehicles must work to allow for MP respawning vehicles.

2. When driving a vehicle by themselves, look for enemies, if an enemy is detected (and the weapon's on their vehicle is able to kill the enemy), switch to the gunners position and engage the enemy. Once the enemy has been engaged switch back to the driver's postion and continue to their waypoint.

3. When flying a helicopter without a gunner, fire the helicopter's rockets and missiles in a "manual fire" style.

Does anyone know of any example missions where this has been done?

I'm specifically interested in using AI players to balance teams in Battlefield1985 type games. But I can see applications for this in other game types.

I've done some work on this myself (see the AI demo in the mission pack linked in my signature for my fudged attempt), but I was wondering if I'm trying to reinvent the wheel here.

Share this post


Link to post
Share on other sites

You're not trying to reinvent the wheel there, that's for sure ;). Feel safe in that aspect.

Share this post


Link to post
Share on other sites

It sounds like an interesting idea. The AI definately could use such a script. I don't recall of such script's existance either.

I'm not sure if this works for the AI, but perhaps you could just try a simple command to enable the manual fire on choppers, like this:

guy1 action ["MANUALFIRE"]

That would at least enable the manual fire for player controlled vehicles, but, as I said, I'm not sure if it works for the AI.

Share this post


Link to post
Share on other sites

It was approached in the past, now that I remember, modifying the vehicles to be controlled by 1 AI. I know it's not what you want, but it could serve you as a precedent.

Share this post


Link to post
Share on other sites

Hi, yes, those "one man" vehicles exist in OFP, they were planned in BIS config, for example this tank :

	class M1AbramsAuto: M1Abrams
{
	scope=protected;
	displayName=$STR_DN_M1A1_AUTO;
	hasGunner=false;
	hasCommander=false;
};

But as you see, the scope is protected by default so you'll have to use some "editor update / upgrade" addon to access it in your mission. For example, editorupdate102 by GB has it under : "EU - Units";displayName="M1A1 With 1 AI".

Share this post


Link to post
Share on other sites
Hi, yes, those "one man" vehicles exist in OFP, they were planned in BIS config, for example this tank :

	class M1AbramsAuto: M1Abrams
{
	scope=protected;
	displayName=$STR_DN_M1A1_AUTO;
	hasGunner=false;
	hasCommander=false;
};

But as you see, the scope is protected by default so you'll have to use some "editor update / upgrade" addon to access it in your mission. For example, editorupdate102 by GB has it under : "EU - Units";displayName="M1A1 With 1 AI".

Yeah, I know about the "Auto vehicles", trouble is they can only carry one person. They are a real pain for a human player to use because you can't use the gunner's sights like you do in the Battlefield games. A human player is limited to using the driver's sights or the external view (which has a severe vertical parallax error on the crosshair).

The point of the scripts I've done is to allow an AI to locate an empty vehicle and board the appropriate position without instructions from a player. If a friendly vehicle is nearby they preferentially board a free crew spot in that. When they encounter an enemy they can switch to the gunner's seat to move the turret of a tank and shoot at enemies. For an AI pilot they must be able to operate the weapons in a similar way to a human would without a gunner. A gunship is pretty pointless if the pilot always needs to wait for a gunner to board so the weapons can be fired.

The scripts I've done rely on smoke, mirrors and extreme fudgery to do this. If no one can actually see through the illusion then that's fine, they can treat the bot roughly as they would a human pilot/driver. But I've not had any feedback from anyone who can offer an objective opinion on what I've done.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×