Posted: Thu Nov 09, 2023 12:47 am Post subject:
ai editing help
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:
214 Time(s)
Untitled.png
Description:
all these settings are same and apply to airport oil derrick machine shop and hospital
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. QUICK_EDIT
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 QUICK_EDIT
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. QUICK_EDIT
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 QUICK_EDIT
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 QUICK_EDIT
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 QUICK_EDIT
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 QUICK_EDIT
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. QUICK_EDIT
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 QUICK_EDIT
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. 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