Any mods that will make AI not to shoot at wall ?

Need help? This is the right place!
Note, reporting bugs and issues should be in the Tech Support forum!

Moderator: PhilipJFry

Any mods that will make AI not to shoot at wall ?

Postby GamerDreams2019ns » 07 Sep 2019, 15:41

I find that the AI design is not that good. Example if my units are behind a tall wall or a hill, those enemy AI will try to shoot at my units but not knowing there is a wall blocking it's shots.

Enemy AI will just stop there and keep on shooting !

Any mods that will make AI move closer to my units to shoot or move while shooting ??

Thanks
GamerDreams2019ns
Avatar-of-War
 
Posts: 78
Joined: 31 Jul 2019, 05:10
Has liked: 0 time
Been liked: 1 time
FAF User Name: SupNoviceCom19

Re: Any mods that will make AI not to shoot at wall ?

Postby Uveso » 07 Sep 2019, 21:43

GamerDreams2019ns wrote:Any mods that will make AI move closer to my units to shoot or move while shooting ??


No.

The AI does not know that a unit is hitting a wall or terrain instead of the enemy.
There is no c-command or script in LUA to detect this.

I tried to compare the damageoutput with the healtdrain of the enemy but this is awesome slow and does not work in all cases (multiple units).
So this is one of the gaps the AI will have forever ^^
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Any mods that will make AI not to shoot at wall ?

Postby GamerDreams2019ns » 08 Sep 2019, 16:04

hmmm...too bad. :|

Now I understand why most of the maps do NOT have wall or hill. Mostly are open area.
GamerDreams2019ns
Avatar-of-War
 
Posts: 78
Joined: 31 Jul 2019, 05:10
Has liked: 0 time
Been liked: 1 time
FAF User Name: SupNoviceCom19

Re: Any mods that will make AI not to shoot at wall ?

Postby GamerDreams2019ns » 08 Sep 2019, 16:07

How about making a mod that will make AI always on the move - even it is shooting. So this will not make the AI stay at one spot shooting at the wall.

Will this work ?
GamerDreams2019ns
Avatar-of-War
 
Posts: 78
Joined: 31 Jul 2019, 05:10
Has liked: 0 time
Been liked: 1 time
FAF User Name: SupNoviceCom19

Re: Any mods that will make AI not to shoot at wall ?

Postby Uveso » 08 Sep 2019, 18:10

GamerDreams2019ns wrote:Now I understand why most of the maps do NOT have wall or hill. Mostly are open area.

This has nothing to do with AI. Just lazy mappers :)
In fact there are only 2-3 guys who cares about the AI while making maps.
(i mean making terrain for AI, there are more mappers who add waypoints etc.)


GamerDreams2019ns wrote:How about making a mod that will make AI always on the move - even it is shooting. So this will not make the AI stay at one spot shooting at the wall.

First you move the platoon with the command "UNIT:MoveToLocation(Position)"
If you reach the target you attack with the command "UNIT:AttackTarget(ENEMYUNIT)"

After that the c-engine is controlling the unit and we can do almost nothig from LUA side here.

I know the problem and if i find a solution i will add this to my AI. I promise :)
But as i said, if you have many (800) waypoints, then this will happen not often.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Any mods that will make AI not to shoot at wall ?

Postby Uveso » 08 Sep 2019, 18:30

I don't think that anyone will make a mod for this.
You need to hook into every AI attack function for GPG, Sorian and all other AIs to make this work.

You need to patch these (34) functions:

File Platoon.lua:
HuntAI
GuardMarker
GuardBase
PatrolBaseVectorsAI
GunshipHuntAI
InterceptorAI
StrikeForceAI
CarrierAI
NavalForceAI
AttackForceAI
GhettoAI
AirHuntAI
FighterHuntAI
GuardBaseSorian
NavalForceAISorian
NavalHuntAI
HuntAISorian
CDRHuntAISorian
GhettoAISorian
AttackForceAISorian
StrikeForceAISorian


File AIBehaviors.lua:
CDROverCharge
FatBoyBehavior
CzarBehavior
AhwassaBehavior
TickBehavior
BehemothBehavior
CDRRunAwaySorian
FatBoyBehaviorSorian
CzarBehaviorSorian
AhwassaBehaviorSorian
TickBehaviorSorian
ScathisBehaviorSorian
BehemothBehaviorSorian
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Any mods that will make AI not to shoot at wall ?

Postby GamerDreams2019ns » 09 Sep 2019, 22:05

Uveso wrote:I don't think that anyone will make a mod for this.
You need to hook into every AI attack function for GPG, Sorian and all other AIs to make this work.

You need to patch these (34) functions:

File Platoon.lua:
HuntAI
GuardMarker
GuardBase
PatrolBaseVectorsAI
GunshipHuntAI
InterceptorAI
StrikeForceAI
CarrierAI
NavalForceAI
AttackForceAI
GhettoAI
AirHuntAI
FighterHuntAI
GuardBaseSorian
NavalForceAISorian
NavalHuntAI
HuntAISorian
CDRHuntAISorian
GhettoAISorian
AttackForceAISorian
StrikeForceAISorian


File AIBehaviors.lua:
CDROverCharge
FatBoyBehavior
CzarBehavior
AhwassaBehavior
TickBehavior
BehemothBehavior
CDRRunAwaySorian
FatBoyBehaviorSorian
CzarBehaviorSorian
AhwassaBehaviorSorian
TickBehaviorSorian
ScathisBehaviorSorian
BehemothBehaviorSorian



wow ... I didn't know this required so much work.
GamerDreams2019ns
Avatar-of-War
 
Posts: 78
Joined: 31 Jul 2019, 05:10
Has liked: 0 time
Been liked: 1 time
FAF User Name: SupNoviceCom19


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest