Posted: Fri Oct 19, 2018 1:16 am Post subject:
AI vs Harvester mixed with AI vs Vehicles
Subject description: CASE CLOSED IT WAS JUST A THREAT VALUES MISS-UNDERSTANDING
Well I couldn't find a better title but the description is so simple and here it is:
I gave an AI team the script of [Attack Target Type]=[Vehicles] WHICH is simply in the AI codes like this
[0CE4EC8C-G]
Name=vs Vehicles
0=0,5
As we know AI teams is committed to it's script but actually some times it becomes a stupid thing and here is why:
I build some tanks to defend my base and I place them outside the base as a front line just before the defensive Turrets.
The AI team which has a script of attacking vehicles should attack them but what happens is that AI team just rush into the base for hunting the "Harvesters" BEFORE getting back to the vehicles which means a task force of 20 units will be destroyed without shooting even one round ...well may some will shoot but in the end the team is A FAIL!!!!!
SO why [ATTACK TARGET TYPE]=[VEHICLES] is some how mixed with [ATTACK TARGET TYPE]=[HARVESTERS] with only one exception that the later code attacks only harvesters and just harvesters???
Is there is any value to tweak so that the AI team at least attack any vehicle before the GOD DAMN harvester??!!
Or should I go the route of giving the units some RULES codes like "DistributedFire" or "OpportunityFire" or "MovingFire"with taking in mind that the taskforce is consisted of only infantry???? "BUT" I'm not sure if it's gonna work either
Any way THANKS IN ADVANCE Last edited by TRUEGRIT on Sun Oct 21, 2018 8:52 pm; edited 1 time in total QUICK_EDIT
Harvesters are vehicles and the game gives more importance to harvesters when picking targets while executing 0,1 or 0,5 script actions.
As ApolloTD said, set Suicide=no in its TeamType so that the team can retaliate when attacked. And can even change the target to buildings with script action (0,2) so that it won't select any vehicle as its target. QUICK_EDIT
Use gather at enemy base before you give any assault command, this should make things right.
I have already tried it and unfortunately it doesn't work due to the factor of that you MUST place the vehicles at the point or the place that AI units will gather at which is a cell value in the Rules
and the worse is that the vehicles will hunt the AI units untill they are "FULLY" gathered at that point and "IF" only a few of them made it they will attack the vehicles around them but they won't stand
And if I placed the vehicles far from the AI gathering point the untits will simply ignore the vehicles and will start to move to hunt the harvester first.
cxtian39 wrote:
Try hunt 11,15
Well, I found that in that case that they head just towards the construction yard ignoring any thing on their way to it, but I also noticed that a few of them regroup in a certain point and simply do nothing after.
ApolloTD wrote:
Make sure also the team is not Suicide=yes or they will head for target ignoring everything on the way that fires on them.
As you can see I'v set Suicide=no in all of my teams, so what could be wrong else???
E1 Elite wrote:
Harvesters are vehicles and the game gives more importance to harvesters when picking targets while executing 0,1 or 0,5 script actions.
As ApolloTD said, set Suicide=no in its TeamType so that the team can retaliate when attacked. And can even change the target to buildings with script action (0,2) so that it won't select any vehicle as its target.
First I wanna say that you and every one replied at me DO HAVE ALL MY RESPECT, but I do understand that harvesters are vehicles and the bloody AI gives importance to it while executing 0,5 script, and as you can see I'm setting Suicide=no in it's TeamType but the idea of all of this is to hunt the vehicles in front of my base hence for the vehicles won't ambush the AI units that has a script of attacking buildings I hope I was clear enough so I can get a useful help from you and every body. QUICK_EDIT
There is nothing wrong, the game is programmed that way with the AI scripts.
Suicide=no was only for cases when your vehicles attacks the AI units, those will retaliate. It doesn't mean that those AI units will specifically find your guarding units instead of harvesters.
Can raise harvester's ThreatAvoidanceCoefficient to 1.0. And a wild shot, if you have reduced MyEffectivenessCoefficientDefault etc. from their vanilla values, can put those high values back as 200 etc.
If you want to keep harvesters out of the battle, can put Insignificant=yes and even remove it as a legal target. QUICK_EDIT
There is nothing wrong, the game is programmed that way with the AI scripts.
I know there is wrong in codes, I was just wondering why it's giving importance to the harvester.
Quote:
Suicide=no was only for cases when your vehicles attacks the AI units, those will retaliate. It doesn't mean that those AI units will specifically find your guarding units instead of harvesters.
Yes you right and I'v put it in mind hence for all my "Suicide=no".
But the problem is the logic says that every move has it's counter so when I build some vehicles to ambush the AI vehicles with a script of destroying the defense turrets and the rest of my base "THEN" AI has to make a move to counter it. And because in my mod Infantry will find it impossible to pass through any base defenses so I told my self why I don't give them the task of cleaning the road to the AI's attacking vehicles via attacking the vehicles in front of my defensive turrets got it ???
Quote:
Can raise harvester's ThreatAvoidanceCoefficient to 1.0. And a wild shot, if you have reduced MyEffectivenessCoefficientDefault etc. from their vanilla values, can put those high values back as 200 etc.
If you want to keep harvesters out of the battle, can put Insignificant=yes and even remove it as a legal target.
I kept twaeking every value in your mentioned codes but I gave up and I gave the harvester Insignificant=yes and as you know it has a crappy disadvantage but what can I do this is how the game is, unless there another thing that could be done
There are a number of default behaviours that are different between RA2 and YR and I think this is one of them.
Regardless I don't know what your unit rules are like, but Aggressive= and AvoidThreats= in the TeamType will affect how units passing by enemy units will behave. The units themselves have to be able to choose their own targets, better if they can retaliate as well if they are getting hit before reaching their target.
Joined: 05 Sep 2013 Location: LocationNotFoundException at RealLife.Location.find() at line: -1
Posted: Sat Oct 20, 2018 1:28 pm Post subject:
As far as I remember, in original YR the AI will for certain attacks choose one enemy vehicle and keep trying to destroy it until it is dead. You can see this easily with Yuri when you have a Psychic Radar, as the Allied AI will always try to destroy one of the starting vehicles with their Harriers and Robot Tanks, and won't choose a different target until it is destroyed.
I think, based on observations over the years, that the AI selects the oldest unit you got (first one in some vehicle list that is a valid target). Maybe you started without initial vehicles, and your Harvester was your first vehicle?
Anyway, there is probably nothing to be done other than make the teams able to retaliate to attacks. QUICK_EDIT
There are a number of default behaviours that are different between RA2 and YR and I think this is one of them.
It's RA2 not YR so I don't have the advantages of ARES so I peg you tell me it's a value in RA2 but where it could be!!!!
Quote:
Regardless I don't know what your unit rules are like
The infantry included in the AI's TaskForce which should do the role I mentioned previously
Code:
[HEAVYINFANTRY]
UIName=Name=Rocket
Name=Rocket Trooper
Category=Soldier
Primary=AntiArmour
CanPassiveAquire=yes
CanRetaliate=yes
Sight=20
GuardRange=20
Prerequisite=BARRACKS
CrushSound=InfantrySquish
Strength=100
Armor=flak
TechLevel=1
Pip=white
Speed=8
Owner=Russians,Confederation,Africans,Arabs,British,French,Germans,Americans,Alliance
Cost=450
Soylent=50
Points=10
IsSelectableCombatant=yes
VoiceSelect=FlakTroopSelect
VoiceMove=FlakTroopMove
VoiceAttack=FlakTroopAttackCommand
VoiceFeedback=FlakTroopFear
VoiceSpecialAttack=FlakTroopMove
DieSound=FlakTroopDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
;MovementZone=InfantryDestroyer ;GEF wow!!! copy paste bug from the original Disk Thrower!
ThreatPosed=5 ; This value MUST be 0 for all building addons
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ImmuneToVeins=yes
Size=1
AllowedToStartInMultiplayer=no
IFVMode=3
And the harvester has it's original codes and so is the vehicles as well, I just gave it a new weapon
Quote:
but Aggressive= and AvoidThreats= in the TeamType will affect how units passing by enemy units will behave. The units themselves have to be able to choose their own targets, better if they can retaliate as well if they are getting hit before reaching their target
They are actually retaliate after getting attacked by my guarding vehicles but I want them to strike first OMG they do even have a longer range than the vehicles but their rushing movement through the vehicles"which I do place them at the only entrance to my base" make the soldiers have no chance to survive the many shots of them
Quote:
It won't be a perfect scenario but it should help
Ofcourse it won't be but I neeeeeed it to be a """"REALISTIC&SMART&FILTHY TACTICAL WAR""""
But for now putting Insignificant=yes to the bloody harvester solved the problem, but ofcourse enlighten me if you have another better idea
Last edited by TRUEGRIT on Sat Oct 20, 2018 3:01 pm; edited 1 time in total QUICK_EDIT
...you really don't know proper quote-formatting, do you?
Here, let me fix it up for you:
TRUEGRIT wrote:
G-E wrote:
There are a number of default behaviours that are different between RA2 and YR and I think this is one of them.
It's RA2 not YR so I don't have the advantages of ARES so I peg you tell me it's a value in RA2 but where it could be!!!!
TRUEGRIT wrote:
G-E wrote:
Regardless I don't know what your unit rules are like
The infantry included in the AI's TaskForce which should do the role I mentioned previously
Code:
[HEAVYINFANTRY]
UIName=Name=Rocket
Name=Rocket Trooper
Category=Soldier
Primary=AntiArmour
CanPassiveAquire=yes
CanRetaliate=yes
Sight=20
GuardRange=20
Prerequisite=BARRACKS
CrushSound=InfantrySquish
Strength=100
Armor=flak
TechLevel=1
Pip=white
Speed=8
Owner=Russians,Confederation,Africans,Arabs,British,French,Germans,Americans,Alliance
Cost=450
Soylent=50
Points=10
IsSelectableCombatant=yes
VoiceSelect=FlakTroopSelect
VoiceMove=FlakTroopMove
VoiceAttack=FlakTroopAttackCommand
VoiceFeedback=FlakTroopFear
VoiceSpecialAttack=FlakTroopMove
DieSound=FlakTroopDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
;MovementZone=InfantryDestroyer ;GEF wow!!! copy paste bug from the original Disk Thrower!
ThreatPosed=5 ; This value MUST be 0 for all building addons
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ImmuneToVeins=yes
Size=1
AllowedToStartInMultiplayer=no
IFVMode=3
And the harvester has it's original codes and so is the vehicles as well, I just gave it a new weapon
TRUEGRIT wrote:
G-E wrote:
Aggressive= and AvoidThreats= in the TeamType will affect how units passing by enemy units will behave. The units themselves have to be able to choose their own targets, better if they can retaliate as well if they are getting hit before reaching their target
They are actually retaliate after getting attacked by my guarding vehicles but I want them to strike first OMG they do even have a longer range than the vehicles but their rushing movement through the vehicles"which I do place them at the only entrance to my base" make the soldiers have no chance to survive the many shots of them
TRUEGRIT wrote:
G-E wrote:
It won't be a perfect scenario but it should help
Ofcourse it won't be but I neeeeeed it to be a """"REALISTIC&SMART&FILTHY TACTICAL WAR""""
But for now putting Insignificant=yes to the bloody harvester solved the problem
As far as I remember, in original YR the AI will for certain attacks choose one enemy vehicle and keep trying to destroy it until it is dead. You can see this easily with Yuri when you have a Psychic Radar, as the Allied AI will always try to destroy one of the starting vehicles with their Harriers and Robot Tanks, and won't choose a different target until it is destroyed.
I think, based on observations over the years, that the AI selects the oldest unit you got (first one in some vehicle list that is a valid target). Maybe you started without initial vehicles, and your Harvester was your first vehicle?
Anyway, there is probably nothing to be done other than make the teams able to retaliate to attacks.
the AI units retaliate but just like the way I mentioned it to G-E in my reply at him
And I'm not sure but may be you are right about the old vehicle is first one to be attacked in 0,5 script action, its always the harvester because Refinery is built before the war factory hence for its the first vehicle, I hope you are right
; Vanilla game values
MyEffectivenessCoefficientDefault=200
TargetEffectivenessCoefficientDefault=-200
TargetSpecialThreatCoefficientDefault=200
TargetStrengthCoefficientDefault=-200
TargetDistanceCoefficientDefault=-10
EnemyHouseThreatBonus=400
On 0,5 (Attack vehicles) - If any unit exists at less than 40 cells distance then attack that unit. Otherwise attack the first unit produced by the enemy. After that attack target is destroyed, attack the next nearest unit from its current location.
On 0,1 (Attack anything) - If any object (attackable unit/aircraft/infantry/building) exists at less than 40 cells distance then attack that object. Otherwise attack the first unit/aircraft/infantry/building produced by the enemy in that order. Meaning if no unit exists then the first aircraft produced by that enemy and so on. After that attack target is destroyed, attack the next nearest object from its current location.
On 0,2 (Attack buildings) - If any building exists at less than 40 cells distance then attack that building. Otherwise attack the first building produced by the enemy. After that attack target is destroyed, attack the next nearest building from its current location.
When threat rating is enabled (divide the vanilla values by 100):
On 0,5 (Attack vehicles) - AI targets the nearest enemy unit from its current location.
On 0,1 (Attack anything) - AI targets the nearest enemy object (any of infantry/unit/aircraft/bulding) from its current location.
On 0,2 (Attack buildings)- AI targets the nearest enemy building from its current location.
Dumb* flags doesn't come into use in the game, so it doesn't matter what values it holds. This was tested in YR and should be the same for TS and RA2. I suppose the remaining 0,n script actions should be similar with their target types to the tested ones of 0,1 , 0,2 and 0,5.
@TRUEGRIT: If you enable the threat rating like the values mentioned above, you should be able to use Harvester with Insignificant=no. QUICK_EDIT
@TRUEGRIT: If you enable the threat rating like the values mentioned above, you should be able to use Harvester with Insignificant=no.
WOW, could this be magic!!! this is simply the end of line,but there is just one thing more
What are the vanilla game values?ARES thing? please tell me no because I'm modding the original RA2 and I can't find these flags inside it's Rules.ini, could it be a patch or something else I did searched about it on the web but I found nothing usefull.
EDIT: Is it a kind of some INI files and some sort files?If so where can I find it??? Last edited by TRUEGRIT on Sun Oct 21, 2018 7:50 pm; edited 1 time in total QUICK_EDIT
Don't search for Vanilla game values, that is the comment I have put in the previous post. Search for MyEffectivenessCoefficientDefault, those flags are present in TS, RA2 and YR with same values.
At the end of [General] section in rules.ini. QUICK_EDIT
Don't search for Vanilla game values, that is the comment I have put in the previous post. Search for MyEffectivenessCoefficientDefault, those flags are present in TS, RA2 and YR with same values.
Sorry about that and honestly I just couldn't understand that hint or tip, THANKS alot I left the hat for you E1 ELITE.
Surely I will let you know if it worked or honestly if I made it properly QUICK_EDIT
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