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 Sun Jul 21, 2024 8:43 pm
All times are UTC + 0
ai editing help
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Renu48
Cyborg Soldier


Joined: 11 Nov 2018

PostPosted: Thu Nov 09, 2023 12:47 am    Post subject:  ai editing help Reply with quote  Mark this post and the followings unread

ok so i have been doing my own AI editing, can someone help me and explain why when i want engineers to capture the tech buildings, they will only go with 1 script, 1 team, 1 trigger and will go only after for example airport and then straight after want to come after my base instead of going to capture rest of the tech buildings around the alamo map on skirmish.

also iv noticed that infantry (GI) does not want to come after me when i added the engineer capturing on the ai

all of the base defences so far work well, tanks at one point worked well aswell, but after first attack they tended to not repeat the attack so i removed those scripts taskforces teams and triggers earlier so i could try again later



Untitled1.png
 Description:
this is for GIs that worked earlier before i added the engineers to capture tech buildings. they worked with me not setting any triggeer conditions
 Filesize:  151.43 KB
 Viewed:  2701 Time(s)

Untitled1.png



Untitled.png
 Description:
all these settings are same and apply to airport oil derrick machine shop and hospital
 Filesize:  157.5 KB
 Viewed:  2701 Time(s)

Untitled.png



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


Joined: 28 May 2013

PostPosted: Thu Nov 09, 2023 3:57 am    Post subject: Reply with quote  Mark this post and the followings unread

General attack doesn't need any condition anyway. Other triggers don't influence the current trigger's script, so Capture trigger won't affect the general attack's working. Game may choose to produce one trigger over another based on weights.

Attack Target Type script is self repeating, so it will keep attacking until all targets are destroyed or the team itself is destroyed.

Other script actions are not self repeating, so if you want Attack Enemy Structure to repeat, give one after another again. Like capture oil derrick, then hospital etc. You can put those in infinite loop with Jump to line # (Jump To Script Action). Or just use Attack Target Type - Tech Buildings.

Back to top
View user's profile Send private message
Renu48
Cyborg Soldier


Joined: 11 Nov 2018

PostPosted: Thu Nov 09, 2023 7:55 am    Post subject: Reply with quote  Mark this post and the followings unread

So if i understand correctly the higher the weight number, more likely it is willing to attack. Just trying to wrap my head around it really. Why ai is using a script with 80 to capture an airport and then keep using that, instead of ai using oul derrick capturw script with weight of 5000 first.

Also jump to line # does the numbers mean anything aswell if i was to put 1 or 2 or whatever

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


Joined: 28 May 2013

PostPosted: Thu Nov 09, 2023 8:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Weight 5000 trigger will always get preference over 80 weight trigger unless its condition is not satisfied or side is not applicable or max limit reached or something is wrong with it etc. Check what else is different between those 2 triggers.

[ScriptX]
0=Capture oil derrick
1=Capture hospital
2=Jump to line 1

means go to 0= (1st line) and execute actions, that is repeat both captures. Jump to line 2 means keep repeating capture hospital.

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


Joined: 09 Feb 2015

PostPosted: Thu Nov 09, 2023 9:03 am    Post subject: Reply with quote  Mark this post and the followings unread

The Jump action is buggy though, say you have jump to 1, sometimes it will pick the entry number 1, sometimes the first line.

I primarily use it in attack sequences where that kind of precision doesn't matter, like jump to line 3 of a 6-part attack.

_________________
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: Thu Nov 09, 2023 9:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Jump to line is not bugged. It always goes to given line #.

May be some old tools might have given wrong/confusing info.

Back to top
View user's profile Send private message
Renu48
Cyborg Soldier


Joined: 11 Nov 2018

PostPosted: Thu Nov 09, 2023 2:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

There is absolutely no diffference in those scripts as iv used copy functions and just changed structure from airport to oil derrick. Only difference is weight oil derrick has 5000, 5000, 5000 as minimum,initial and max weight whereas airport has 10, 80, 80

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


Joined: 09 Feb 2015

PostPosted: Thu Nov 09, 2023 3:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

But why are you using 5000 to begin with?

The way weights work is you have a random chance of triggering something that's available to trigger (conditions are met) and each weight just increases the chances (random value within the total accumulated weights). Why do you want the oil derrick capture so high compared to literally everything else going on?

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

Back to top
View user's profile Send private message
Renu48
Cyborg Soldier


Joined: 11 Nov 2018

PostPosted: Thu Nov 09, 2023 4:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

It didnt come from me wanting it so high, it came from my lack of understanding it, so i used aimd that i found as a base for me making the scripts. Im still on the learning curve of understanding how to make the best scripts, solutions and so forth to make the most effective agressive and generally speaking difficult ai that i could, because i find it that usual hard enemies are way too easy for me to defeat

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


Joined: 09 Feb 2015

PostPosted: Thu Nov 09, 2023 5:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you want the AI to be adaptable and unpredictable, you want many types of small attacks with similar weightings. Repetition/spam turns people off fast.

_________________
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: Thu Nov 09, 2023 5:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

It is fine to use 5000 weight during testing a trigger to find out if it works or not. When it works, you can change to smaller values.

Compare those 2 trigger's teams, scripts and taskforces also.

Back to top
View user's profile Send private message
Renu48
Cyborg Soldier


Joined: 11 Nov 2018

PostPosted: Fri Nov 10, 2023 1:25 am    Post subject: Reply with quote  Mark this post and the followings unread

So weights like 500 would be fine or would that be still too much and also how much difference should i hsve between minimum and maximum weight

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


Joined: 28 May 2013

PostPosted: Fri Nov 10, 2023 4:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Vanilla game triggers have a range. If you keep new triggers in the same range, you will get variety. If you use 500 or so, those will get more chances than original triggers. Only 5000 is special case, other values are relative to what other triggers have.

When you keep initial, min and max weights as same value, then it is not affected by failure or success. Vanilla rules (success/failure delta) adds 20 on success and reduces 50 on failure to the trigger's current weight. The current weight is kept within min and max when changing. Only executing Register succes script (49,0) is success, if it is not present or is not reached in a script, it is failure (Phobos adds more options). When kept in range, think as a trigger might get 4 or 5 chances in a game to get its current weight changed. How much gap or how high or low a trigger should get is again relative to other triggers.

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


Joined: 09 Feb 2015

PostPosted: Fri Nov 10, 2023 12:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

You want a very low minimum weight like 10-15 when it's an attack that can possibly fail and triggers easily. So like a transport based attack, or a generic tank attack based on money, or even in some cases deep strike aerial attacks. The low minimum, provided you have a 49,0 in the script, will allow that trigger not to waste time and resources.

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

Back to top
View user's profile Send private message
Renu48
Cyborg Soldier


Joined: 11 Nov 2018

PostPosted: Fri Nov 10, 2023 2:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ah so thats why base defensive units will build instantly without fail and as a first thing

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


Joined: 28 May 2013

PostPosted: Fri Nov 10, 2023 3:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

No. Base defense teams are built first because game is able start couple of teams before the AI chooses an enemy. If you reduce the value to 10 or less in AIHateDelays in rules, it won't have time for base defense teams at the beginning and will produce attack teams from the start.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 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.1963s ][ Queries: 15 (0.0110s) ][ Debug on ]