Jump to content
Official BF Editor Forums
bobthedinosaur

Python To Force Ai Commander Support?

Recommended Posts

Hi again,

I was wondering if it is possible to make a python that forces an AI commander to perform the support functions via a squad leader requests. Basically what I had in mind was a python forced work around of the original request system, since that broke in the 1.5 patch.

I see that FH2 mod uses some commander abilities (artillery requests) in some of their mod specific python scripts, and was thinking if these python commands could automate the broken commander requests.

Share this post


Link to post
Share on other sites

Hi again,

I was wondering if it is possible to make a python that forces an AI commander to perform the support functions via a squad leader requests. Basically what I had in mind was a python forced work around of the original request system, since that broke in the 1.5 patch.

I see that FH2 mod uses some commander abilities (artillery requests) in some of their mod specific python scripts, and was thinking if these python commands could automate the broken commander requests.

Already looked into this. Python works on events and there are no known events to manage the AI commander.

Share this post


Link to post
Share on other sites

Already looked into this. Python works on events and there are no known events to manage the AI commander.

Hello. I want to know about it too. Can you share that info when you found another way to manage it, please?

Share this post


Link to post
Share on other sites

Artillery, supply drops and UAC are all defined in ".con" files. Models, effects, everything. The approach to solve this may be this. Forget the commander completely and create a modification for the Squad Leader that gives the ability to call in these assets.

1. Like remote detonated explosives. The explosive could be replaced by an IR beacon that when activated calls in artillery, supply or UAC.

2. Project Reality spawning system proves that a location can be pointed at. The player hits a key and something is triggered. This could be linked to the actual artillery/supply/UAC options in comma rose menu to trigger an event, just like any other modification. That would then bring in arty/supply/UAC based on the ".con" files but NOT connected to anything the commander is doing.

Of course this would need a timer system to prevent arty spamming, etc.

Example: Creating Unmanned Airstrikes, but it would need to be unlinked from commander dependent UAC.

Edited by djbarney

Share this post


Link to post
Share on other sites

Actually a work around instead of a forced invoke was kind of what I was thinking. Any work around to to give players abilities that emulate the old commander assets would be great. Artilley is simple enough, but getting a uav to scan with out any player inside, might not be possible out side of using a spawnable stationary that is entered due to radar only working on vehicles and stationary weapons that are in use and the old UAV.

Share this post


Link to post
Share on other sites

Hi, was thinking of creating a new thread about this but chose this one as it shows how long this issue has been going on.

worldlife at Moddb has cracked this problem ! - https://www.moddb.com/games/battlefield-2/addons/advanced-ai-commander-plugin

I've tested it in AIX2 and it works very well and has very little CPU overhead that I noticed although I did not do extensive benchmarking.

It's timeout on the commander artillery is too short but I've not found where to set that yet.

It has some rather garish blue and red smoke grenades that get dropped with the strike but that can be removed by editing.

But the point is, it works ! With supplies drop as well as vehicle drop.

BTW there a step missing in the installation guide. It needs the "Scripts" directory adding to the top of mod dir or level archive (not sure which yet). This loads assets. When it's missing the mod still works but will not look right and/or will be missing effects.

Will be great to see this working its way into various BF2 mods (he gives permission).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×