Posted: Fri Oct 15, 2010 4:31 am Post subject:
AI exploits and how to fix them
I've recently been working with AI alot, and trying to fix some major exploits human players can do to it. Of course the AI will never be as smart as human players, but the less exploitable it is the better. Here are some of the bigger issues:
1. AI does not respond to being fired on by particle based damage, such as the Devil's Tongue flame tank. I actually got this fixed, the solution will be further down the post.
2. Once AI unit gets EMP'd it loses track of what it was doing. Very very exploitable, especially to AI harvesters. You can basically EMP all his harvesters and he will never understand to replace them.
3. AI units that don't have anti-air weapons will still try to target flying jumpjet troopers. Basically you can lure an entire team after your jumpjets and slowly but steadily kill them off. The solution would be to just ignore being fired on by jumpjets, like they do against airplanes. But I haven't found any way to do this.
4. AI does not automatically target units along the way. You can make them respond to being fired on, but I haven't found any way to make AI stop and take out whatever units come into its weapon range. This would improve the AI alot since they would actively take out hijackers, suicide units, etc. Also anti-air units are quite useless with AI attack forces since they only target enemy aircraft when being attacked, which most of the time is way too late.
Anyone have ideas or knowledge how to fix these issues? Like I said earlier I did find a way to fix the particle damage thing. You need to edit the fire based weapon to use the Reaper missile logic. Here I've edited the devil's tongue weapon:
Code:
[FireballLauncher]
Damage=0
AmbientDamage=2
ROF=50
Range=4.25
Speed=75 ;1 ; This was changed
Warhead=Fire
Report=FLAMTNK1
UseFireParticles=yes
AttachedParticleSystem=FireStreamSys
Burst=2
ProjectileRange=2 ; Added these 2 keys to use reaper logic
Projectile=FireballFixPR ;Invisible
; Reaper logic weapon attached to FireballLauncher to make AI retaliate
[FireballFix]
Damage=1 ; Gets multiplied by 10, so adjust verses in warhead.
ROF=1000
Range=4 ; Allows them to hit far since the particle flames can travel far too
Speed=100 ; To make sure they always hit
Warhead=FireballFixWH
Projectile=FireballFixPR2
Add the new projectiles:
Code:
; Used by 1st stage of reaper logic attached to FireballLauncher
[FireballFixPR]
Image=INVPROJ ; Need to define an image or the missile logic doesn't work
High=no
VeryHigh=no
Proximity=no
Cluster=2
Ranged=yes
Range=4
ROT=8
Splits=yes
AirburstWeapon=FireballFix
IgnoresFirestorm=no
RetargetAccuracy=50% ; So force-firing ground usually hits enemy too
; Used by 2nd stage of reaper logic attached to FireballLauncher
[FireballFixPR2]
Image=INVPROJ
High=yes
Shadow=no
Proximity=yes
Ranged=no
And finally add the new warhead:
Code:
[FireballFixWH]
Spread=6
Verses=10%,10%,10%,10%,10% ; Will even out the dmg to 1
InfDeath=4
ProneDamage=100% ; Always force that 1 dmg
In art.ini add the following:
Code:
; *** Projectile Objects ***
[INVPROJ]
Also remember to add the new warhead to the warheads list, and more importantly, remember to give FireballFix as a primary, secondary or elite weapon to some fake unit, like the Weedguy infantry. Every weapon has to be used by at least one unit in rules.ini or the game will cause an IE. I've included the INVPROJ shp as attachment to this post.
Basically this fix will make the devil's tongue fire both the normal fire attack and an invisible weapon that deals 1 damage. That 1 damage will be enough to make the AI target and destroy the unit. Even if you force-fire close to the enemy they will get mad at you since the invisible reaper "missiles" home in on units. So much for owning all those Disk Throwers with a single flame tank...
Interesting but off-topic thing to note is that by using particle based weapon + reaper logic you could add more than 2 weapons for a unit, actually up to 4. They would just fire in pairs, at the same time. By tweaking the reaper logic into more stages I guess you could go even for more weapons.
Why do you use the reaper split logic?
Simply give the FireBallLauncher Damage=1 and an invisible projectile.
SuperJoe wrote:
Interesting but off-topic thing to note is that by using particle based weapon + reaper logic you could add more than 2 weapons for a unit, actually up to 4. They would just fire in pairs, at the same time. By tweaking the reaper logic into more stages I guess you could go even for more weapons.
And you could also assign a railgun, a laser and an art.ini area weapon, which makes a unit fire with one shot up to 5 different weapons at the same time. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Using normal damage and fire particles together on a weapon works? I tested it with this
Code:
[FireballLauncher2] ; Changed to make sure it isn't hardcoded
Damage=100
;AmbientDamage=2
ROF=50
Range=4.25
Projectile=Invisible
Speed=100
Warhead=Fire
Report=FLAMTNK1
UseFireParticles=yes
AttachedParticleSystem=FireStreamSys
Burst=2
and it won't deal damage with anything else than the particles. Think UseFireParticles=yes makes it ignore normal weapon properties. Also reaper logic makes force-firing the ground (those particles would still hit the infantry) hit the enemy unit with that 1 damage.
How does multiple particle system weapons work together? Before using the reaper logic I gave the FireballLauncher IsRailgun=yes, which made it fire both of its flamethrowers at the same time, but only once, then it would resume to using only 1 at a time. Needed to change its facing and target to get it to fire both at the same time again. It would be pretty cool to get it to always fire both flamethrowers (ofc tone down dmg by half). _________________ QUICK_EDIT
3. AI units that don't have anti-air weapons will still try to target flying jumpjet troopers. Basically you can lure an entire team after your jumpjets and slowly but steadily kill them off. The solution would be to just ignore being fired on by jumpjets, like they do against airplanes. But I haven't found any way to do this.
I further tweaked the FireballLauncher weapon. Now it works as intended, doesn't matter whether you directly attack a unit or force-fire the ground close to enemy units, they will get mad at the flame tank and take it out. I updated the code in the 1st post to this improved version. _________________ QUICK_EDIT
Are you sure that solves it?
I doubt it works, since infantry are ground units and when they shoot something that has AG=yes, they still see the flying infantry as ground targets.
TK3600 wrote:
4. Opportunityfire=yes for turreted unit, no solution otherwise.
You can't take a RA2 key and simply add to TS. It doesn't exist in TS. _________________ SHP Artist of Twisted Insurrection: Nod buildings
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum