Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 3:54 pm
All times are UTC + 0
AI vs Harvester mixed with AI vs Vehicles
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [23 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: 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
Reply with quote  Mark this post and the followings unread

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 Sad


Any way THANKS IN ADVANCE Smile

Last edited by TRUEGRIT on Sun Oct 21, 2018 8:52 pm; edited 1 time in total

Back to top
View user's profile Send private message
Virgil
Stealth Laser Trooper


Joined: 22 Jul 2018

PostPosted: Fri Oct 19, 2018 2:07 am    Post subject: Reply with quote  Mark this post and the followings unread

Use gather at enemy base before you give any assault command, this should make things right.

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri Oct 19, 2018 3:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Try hunt 11,15

_________________

Back to top
View user's profile Send private message Skype Account
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Fri Oct 19, 2018 5:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Make sure also the team is not Suicide=yes or they will head for target ignoring everything on the way that fires on them.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Oct 19, 2018 6:18 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Fri Oct 19, 2018 5:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Virgil wrote:
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.


This is my TeamType codes for most of my teams

Code:
Name=Allied Infantry Attack - H1 V
VeteranLevel=1
Loadable=no
Full=no
Annoyance=no
GuardSlower=no
House=<none>
Recruiter=no
Autocreate=yes
Prebuild=no
Reinforce=no
Droppod=no
UseTransportOrigin=no
Whiner=no
LooseRecruit=no
Aggressive=yes
[[[[[[[Suicide=no]]]]]]
Priority=5
Max=1
TechLevel=0
Group=-1
OnTransOnly=no
AvoidThreats=no
IonImmune=no
TransportsReturnOnUnload=no
AreTeamMembersRecruitable=no
IsBaseDefense=no
OnlyTargetHouseEnemy=no


As you can see I'v set Suicide=no in all of my teams, so what could be wrong else??? Crying or Very sad

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.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Oct 19, 2018 5:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Maybe reduce the Points= values on the harvesters, I know they are high.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Oct 19, 2018 6:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Fri Oct 19, 2018 10:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Quote:
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 Idea ???

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




Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Fri Oct 19, 2018 10:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Maybe reduce the Points= values on the harvesters, I know they are high.


sorry man but it didn't work and please read my reply at E1 Elite and ofcourse THANK YOU

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Oct 20, 2018 12:23 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

It won't be a perfect scenario but it should help.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Sat Oct 20, 2018 1:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Sat Oct 20, 2018 2:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Quote:
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

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Oct 20, 2018 3:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

...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


Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Sat Oct 20, 2018 3:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
...you really don't know proper quote-formatting, do you?


Like that sir???




oh come on man.... Okay I accept this Criticizing I didn't know the proper one, but help me to solve the problem first bro Very Happy

I hope I quoted properly this once Smile

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Oct 20, 2018 3:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

TRUEGRIT wrote:
TAK02 wrote:
...you really don't know proper quote-formatting, do you?


Like that sir???




oh come on man.... Okay I accept this Criticizing I didn't know the proper one, but help me to solve the problem first bro Very Happy

I hope I quoted properly this once Smile

Nope.
When you quote a guy here, you don't insert your own text into their quote.
Like this:

Quote:
This?

Yes, this!
Quote:
You sure?

You sure that's not Yuri at your door?
Quote:
Nope.

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Sat Oct 20, 2018 3:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:

Nope.
When you quote a guy here, you don't insert your own text into their quote.



like this Mad

Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Sat Oct 20, 2018 3:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Agent Z wrote:
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

Very Happy

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sun Oct 21, 2018 5:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tested for these script actions:

When threat rating is not properly enabled:

; 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):

MyEffectivenessCoefficientDefault=2
TargetEffectivenessCoefficientDefault=-2
TargetSpecialThreatCoefficientDefault=2
TargetStrengthCoefficientDefault=-2
TargetDistanceCoefficientDefault=-0.1
EnemyHouseThreatBonus=4

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.

Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Sun Oct 21, 2018 7:38 pm    Post subject:   Reply with quote  Mark this post and the followings unread

E1 Elite wrote:


@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

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sun Oct 21, 2018 7:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Sun Oct 21, 2018 8:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
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 Smile

Back to top
View user's profile Send private message
TRUEGRIT
Grenadier


Joined: 21 Apr 2018

PostPosted: Sun Oct 21, 2018 8:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

@ E1 ELITE

You just made my day bro, you are ELITE OF THE ELITE  Wink

I'v never understood that part of the section means which starts with "Hunter seeker controls" and ends with "Defaults for dumb threat evaluation"

I'm so grateful to you, I wish I can help some one here like you guys do soon.

                                        {CASE CLOSED}

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [23 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.2267s ][ Queries: 11 (0.0116s) ][ Debug on ]