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 9:59 pm
All times are UTC + 0
Having problems with AI.
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Mon Jul 03, 2017 7:24 pm    Post subject:  Having problems with AI. Reply with quote  Mark this post and the followings unread

Apparently, my AI, particularly for Soviet on ALL nations, aren't building any units(Except one team for defense purposes but still the problem is so huge since they're not building any teams except that one). I thoroughly checked my aimd.ini and I don't think I've made a mistake on making teams for Soviet AI.

What are the main causes on this problem? Or is there a way to easily spot this problem? Or maybe I should show my rulesmd.ini and aimd.ini for further support?

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


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Mon Jul 03, 2017 8:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

IF the error is also for the Allied AI: you probably have some files left over from the time you used an AI-Editor. Look for files with the name Rules and Ai that aren't INIs.

Other than that, I have no idea.

_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

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
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Mon Jul 03, 2017 8:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Show us your triggers.

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

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Mon Jul 03, 2017 8:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nope I don't have any AI problems on all Allied nations that I have. And no, I ain't using any AI editor or some sorts. I'm just manually making AI on aimd.ini directly ever since I started modding.

I guess I'll show the aimd.ini.



aimd.ini
 Description:

Download
 Filename:  aimd.ini
 Filesize:  354.25 KB
 Downloaded:  4 Time(s)


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


Joined: 09 Feb 2015

PostPosted: Tue Jul 04, 2017 6:50 am    Post subject: Reply with quote  Mark this post and the followings unread

The majority of your triggers are always firing, non-zero cash, so you're flooding the list, and each time one can't be completed it will stall. There's other shit that could be improved but that's the main problem as I see.

_________________
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: Tue Jul 04, 2017 10:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Many triggers have owner as BossGeneral, if you select any other country,
those would have fewer AITriggers.

TaskForces are kind of heavy, AI would need more credits and buildtime
to produce those. There are duplicates like 2=, 2= entries. Game doesn't
use anything more than the fixed index of 0 to 5 in taskforce. 6= in it
won't work.

If playing with any side as allies in skirmish, they won't produce attack
teams until some enemy comes to its base and attacks, problem in YR.

If it is single player, then explicitly Make enemy action has to be given
for AI to make attack teams.

Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Tue Jul 04, 2017 1:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
The majority of your triggers are always firing, non-zero cash, so you're flooding the list, and each time one can't be completed it will stall. There's other shit that could be improved but that's the main problem as I see.


Yes I'm very aware of the stalling problem but I usually ignore it because I don't know how I can solve that problem...

And since I have very slim knowledge of making AI(What I can only do is to duplicate/replicate existing AI triggers from vanilla YR AI and making some simple ScriptTypes), can you explain further about "always firing, non-zero cash" thing and how can I fix it? Sorry you lost me there.

E1 Elite wrote:
Many triggers have owner as BossGeneral, if you select any other country,
those would have fewer AITriggers.

TaskForces are kind of heavy, AI would need more credits and buildtime
to produce those. There are duplicates like 2=, 2= entries. Game doesn't
use anything more than the fixed index of 0 to 5 in taskforce. 6= in it
won't work.


Are those why my Soviets aren't building any teams?

I tried to remove the BossGeneral completely but it doesn't solve the problem.

I just learned about the only 0 to 5 can only work on TaskForce so I made adjustments and also fixing the duplicate numbering entries. Still it didn't fix the problem.

E1 Elite wrote:

If playing with any side as allies in skirmish, they won't produce attack
teams until some enemy comes to its base and attacks, problem in YR.

If it is single player, then explicitly Make enemy action has to be given
for AI to make attack teams.


Seems something that I can do with some AI editor... or can it be done directly on aimd.ini? If so, how can I do that?

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


Joined: 28 May 2013

PostPosted: Tue Jul 04, 2017 4:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

There is no problem with having conditions that pass. You can have all
the triggers check for enemy having more than 0 credit or put -1 as no
condition check which means a pass. There is no stalling and AI won't
trigger all of them together. Only that AI will have a larger set of triggers
to select from.

There are several flags in rulesmd, like MultiplayerAICM, min/max base
defense teams, total AI team caps, AI hate delays or country statistics etc.
that can affect AI in producing teams upfront. So check those yourself
or attach rulesmd also.

Task force with 15-20 heavy units would cost more, AI may not have that
much credit to produce it.

Now you have to tell whether this problem is in single player maps or
are you selecting the Soviet AIs in the same team as yours in skirmish.

AI Editor is available - http://www.ppmforums.com/viewtopic.php?t=38259

When you save the AI file for the first time with this editor, take a backup
and compare the files, as it may remove duplicates which may be different
from your choice.

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


Joined: 09 Feb 2015

PostPosted: Tue Jul 04, 2017 10:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

chr0nicz420 wrote:
Yes I'm very aware of the stalling problem but I usually ignore it because I don't know how I can solve that problem...

What you should be doing is dividing the conditions up to the point where you have the least number of triggers able to fire at any given moment, the more relevant and attainable the list of active triggers, the more responsive the AI will be.

So even if you use cash triggers, give them values to exceed, figure out how easy it is to earn cash in your mod, and define plateaus that trigger harder and harder attacks. Instead of all >0, break them up into >10000, >20000, etc.

Conversely you can also do negative condition attacks to limit the weak ones to early gameplay, like enemy not owns GATECH. Because the rare case that it is just destroyed later in the game doesn't detract from the majority of the game that it does exist, this effectively limits the attack to buildup phase.

Less is more Smile

PS. download my AICHECK/AICLEAN scripts, they will help you find errors and clean up the code

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

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


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Wed Jul 05, 2017 5:10 am    Post subject: Reply with quote  Mark this post and the followings unread

If this only affects the Soviet AI, did you change the minimum required defense teams? By default, the Soviets get one and if the minimum is raised above one, they get stuck.

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

Back to top
View user's profile Send private message Skype Account
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Wed Jul 05, 2017 2:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thank you FurryQueen the problem is solved! Yes I did increase the minimum required defensive teams, no wonder that it'll cause a problem like that on AI...

So for now on the stalling problem.

I completely understand now the ConditionType and as I check my AITriggerTypes, I'm just flabbergasted on how I discovered that I have lots of cash-related conditions(I was totally unaware on what I was doing). There's only one thing that it confuses me or just simply I don't know about and that is, according to ModEnc, the Comparator on AITriggerTypes.

For instance, this one:

Code:
0CE26B5C-G=Alliied Grizzly Attack - H1,0CABE7DC-G,<all>,9,4,<none>,0100000003000000000000000000000000000000000000000000000000000000,30.000000,30.000000,50.000000,1,0,1,0,<none>,0,0,1


On the Comparator 0100000003000000000000000000000000000000000000000000000000000000, I just can't tell how to define related to cash stuff like you both guys are saying. I'm wondering if it has something to do with "1" on the 2nd digit or the "3" on the farthest digit but I don't know what those two mean. Even reading the "The first octet contains the second argument, the second octet contains the operator (0 stands for "<", 1 - "<=", 2 - "=", 3 - ">=", 4 - ">", 5 - "!="), the next six octets are unused."(On ModEnc), I simply don't understand like "less than what? less than or equal to what?"(Though I'm thinking this is about the 2nd digit but still clueless about what "<", "<=" actually means). I also don't know what "3000000000000000000000000000000000000000000000000000000" or maybe just "3" on the farthest digit stands for.

I really hate having lack of knowledge on modding especially on AI...

One question though, is it a good idea to make most of the condition type into -1 on AITriggerTypes?

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


Joined: 28 May 2013

PostPosted: Wed Jul 05, 2017 4:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

You can increase the min base defense value in rules without any problem
by increasing the number of teams available for that side's AI of that difficulty
with attribute of IsBaseDefense=yes in the team types with matching Max value.

For AITriggerTypes examples:

-1,<none>,0000000000 - no condition check, always true.
0,GAREFN,0400000003 - means when enemy owns greater or equal to 4 allied
ore refineries.
1,SHK,0300000001 - when AIs own troops has less than or equal to 3 shock
troopers.
4,<none>,8813000003 - means when enemy has atleast 5000 credits - decimal
little endian notation of 0x1388 = 8813 = 5000 credits.

As stated in my earlier post, you can use -1 for the condition. It won't check
further whether you have put some techtype instead of <none> or any value
instead of 00000000 etc. And there is no performance impact.

These computations are much easier with AI Editor.

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