Jump to content
Luft08

How to stop AI from attacking armored vehicle with small arms fire

Recommended Posts

In the mission I'm working on, which is set in Vietnam, I wish to make the Vietcong use the hit and run tactics they actually used. To do this I need the AI to understand that attacking a Zippo when all they have are rifles will probably not work out.

 

I need for them run away from fights that they have no chance to win. Is there a function that will return the relative threat level of two groups? Not just rifles against armored vehicles but also small light vehicles against vehicles that totally out class them (Jeep against tank, etc)

 

Thanks.

 

Share this post


Link to post
Share on other sites

The AIs behavior is related to FSMs in Vanilla, and sometimes in modified FSMs in mods.

These FSMs or macros are computing things using tokens on classes for ammos and vehicles. Imho, the main parameter of AIs shooting at an enemy is:

aiAmmoUsageFlags in cfgAmmo.

So, first of all, the simple expression like "64 + 128" will make the difference in shooting or not on a vehicle type.

That said, the result will depend on armor and the way the model of the target is made.

 

You should ask (or report) for the dev of your mod (probably Unsung for Vietnam), on basis of what you remarked. (There are often mod dedicated topics on this forum).

If you want to script something (it's not the best way to fix that and I will not dig that), try with forgetTarget command on targetsQuery or nearTargets

  • Like 1

Share this post


Link to post
Share on other sites
23 hours ago, pierremgi said:

The AIs behavior is related to FSMs in Vanilla, and sometimes in modified FSMs in mods.

These FSMs or macros are computing things using tokens on classes for ammos and vehicles. Imho, the main parameter of AIs shooting at an enemy is:

aiAmmoUsageFlags in cfgAmmo.

So, first of all, the simple expression like "64 + 128" will make the difference in shooting or not on a vehicle type.

That said, the result will depend on armor and the way the model of the target is made.

 

You should ask (or report) for the dev of your mod (probably Unsung for Vietnam), on basis of what you remarked. (There are often mod dedicated topics on this forum).

If you want to script something (it's not the best way to fix that and I will not dig that), try with forgetTarget command on targetsQuery or nearTargets

Thanks pierremgi. You are correct that I am using the assets from the Unsung mod. I think what you are saying is that this behavior would be best left to the mod's Dev team.  I agree but I don't think it will happen which is strange because from what I have read the Vietcong were not stupid. They hit and faded back into the jungle trying to lead their pursuers into traps etc. They generally didn't launch major attacks unless they felt that they had overwhelming force. 

 

I'll look for an Unsung forum. This issue must have been brought up more than once.

 

Thanks again.

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

×