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:18 pm
All times are UTC + 0
AI triggers not working
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [19 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Bugsey827
Grenadier


Joined: 15 Apr 2008

PostPosted: Thu Jul 11, 2019 10:58 pm    Post subject:  AI triggers not working Reply with quote  Mark this post and the followings unread

I'm trying to make some campaign maps for my mod, but suddenly the AI is refusing to make units.
In this map I am making, three Soviet AI houses (Russia, Cuba, Iraq) move MCVs in and build their base via basenodes. Then obviously I want them to make units and attack the player.
The problem is that only one of the AI will make units. The other 2 will make a single War Miner from the factory and that's all. To make things worse, the AI which makes stuff seems to change every now and then. At first it was the Iraq AI making units. But after about half a dozen tests now it's Cuba while Iraq does nothing except make the miner. Russia has never made any units except the miner.
Here is the information for the Cuba house, who is currently working:

I've searched around a bit to find a solution to no avail.
I've tried changing the Build activity (%) but it makes no difference what it's set to.
I've tried making specific AI triggers for the map but the AI just ignores them and the one AI which is working just builds the standard normal ones. I've tried changing MinimumAIDefensiveTeams, MaximumAIDefensiveTeams, and TotalAITeamCap in [General] but it made no difference.
I also tried enabling/disabling certain AI triggers but again it doesn't matter.
All the AI auto production triggers are enabled (the ones it creates automatically when you make a new singleplayer map), and I also added additional triggers to Make enemy with the player's house.
I also read once that the AI won't do anything until you piss them off (hurt their buildings/kill their units), but even if I attack their base they just sit there and take it. There are also units spawned in (some infantry + tanks + kirovs) which I kill but the AI won't care. The only reaction I get from attacking their stuff is if I destroy the miner they make from the factory they rebuild it.
The only significant change I could get working was when I disabled all the AI triggers and set Ignore Global AI Triggers to no in Edit > Basic, which predictably stopped the AI from building any units at all.

It's been a long time since I've done any singleplayer maps, so I'm a bit rusty with tinkering with the AI. The AI works fine in my older singleplayer maps and I've looked at their houses and AI triggers in those maps and I can't figure out why they won't work in this one.

I am using Ares 2.0 and the patched FA2 exe from here https://ppmforums.com/viewtopic.php?p=572100#572100

Any ideas?

Back to top
View user's profile Send private message Visit poster's website Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jul 12, 2019 12:40 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Fri Jul 12, 2019 2:26 am    Post subject: Reply with quote  Mark this post and the followings unread

it almost sounds like you have the max on the teams set to one in which case all the ai that CAN build that team will ignore the house and stuff and build the team. max still
applies so if this is the case, one of the teams will be built between the three AI.  this is speculation on my part though.

the harvester thing is hardcoded, and if disabling global triggers disabled your mapside AI triggers something is wack.
set up your house triggers with 'begin production' 'start ai triggers' and 'make enemy', disable global ai triggers, and post the team/aitriggers if it still doesnt work
so we can see whats going on with the thing.

_________________
visit my moddb profile for .shp downloads and stuff

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


Joined: 28 May 2013

PostPosted: Fri Jul 12, 2019 2:43 am    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:
it almost sounds like you have the max on the teams set to one in which case all the ai that CAN build that team will ignore the house and stuff and build the team. max still
applies so if this is the case, one of the teams will be built between the three AI.  this is speculation on my part though.

Max is per AI. If max is 1 then all the AIs can build one of that team.

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


Joined: 15 Apr 2008

PostPosted: Fri Jul 12, 2019 12:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
Could share the map, as you seem to have done the needed stuff, if missed some check - https://ppmforums.com/viewtopic.php?p=568729#568729

Don't make the AI as allied to the human player while testing.


Tried some of that stuff but it made no difference. Also I attached the map, but it requires Terrain Expansion to play, though you should still be able to open it and look at the triggers/settings. The only AI allied to the human player aren't meant to build anything anyway.

McPwny wrote:
set up your house triggers with 'begin production' 'start ai triggers' and 'make enemy', disable global ai triggers, and post the team/aitriggers if it still doesnt work
so we can see whats going on with the thing.


I've got that with the triggers. I also did try disabling global AI triggers but it made no difference, so I reenabled them.
Also here are my map teams/ai triggers

Team:


AI trigger:


Enabled:


So are all the standard AI triggers:


I have another with tanks and another with aircraft, but they are pretty much the same except the taskforce and the build requirement, with tanks requiring war factory and the aircraft requiring an airpad.



all05umd.map
 Description:
requires Terrain Expansion

Download
 Filename:  all05umd.map
 Filesize:  393.26 KB
 Downloaded:  8 Time(s)


Back to top
View user's profile Send private message Visit poster's website Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jul 12, 2019 2:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

AI doesn't have any base in the attached map.

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


Joined: 15 Apr 2008

PostPosted: Fri Jul 12, 2019 2:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

The AI's MCV moves and and deploys about 10-11 minutes into the map and they build their base via base nodes.







They build their bases just fine, the only problem is the units for 2 of them.
Unless you meant I should give them buildings to begin with, even outside the map hidden from the player?

Back to top
View user's profile Send private message Visit poster's website Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jul 12, 2019 3:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

I didn't play it for 10 mins to check what happens. Now that I checked those triggers, the MCV team owner is correct but the trigger owner is Americans. Give separate triggers for each create MCV team with its own house (not Americans) as trigger owners. Try this and then test.

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


Joined: 15 Apr 2008

PostPosted: Fri Jul 12, 2019 5:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Still nothing. I also gave the AI some starting buildings and units then in 2 tests the Iraq and Cuba AI built units (though Russia still did nothing). After I deleted the buildings (because I don't want random tesla reactors and tanks around the map) the Cuba AI now does nothing but the Iraq AI is still active. I tried to give them some buildings and units again but it's not seemed to work.

Back to top
View user's profile Send private message Visit poster's website Skype Account
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Fri Jul 12, 2019 7:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

a lot can go wrong with an ai.  
-does it have money  
-does it have access to the tech via prerequisite
-does it have access to the tech via owner
-are the ai trigger parameters met  
-does it exceed the max  
-is it stupidly trying to recruit something it shouldnt?
so on and so forth

im looking at the trigger set up and its got on the ai auto production trigger action 3, action 13, action 74, and action 30. action 30 is redundant since forever. dont use that
13 is also obsolete. the make enemy actions are on different triggers. a sure fire ai enable trigger will look like:  
trigger options> House: Cuba (or whatever)  
Events> elapsed time 10  
Actions> 3 production begins, Cuba ; 74 AI triggers begin, Cuba ; 38 Make enemy, (whatever house doesnt rlly matter)
once that fires AI triggers will start.  
AI trigger teams dont actually need any of the boxes checked. veteran, house, and waypoint will be ignored. priority doesnt matter for the production part. max still applies

i also see a lot of lat errors in the cliff. if the case happens to be the ai builds the team, and the team then goes retarded and stops forever, this is the cause.  

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


Joined: 15 Apr 2008

PostPosted: Fri Jul 12, 2019 11:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:
-does it exceed the max  

What do you mean by this?
The rest of the stuff you mentioned I tested for, found no issues, but the AI is still being stubborn. I also changed the triggers like you mentioned to no luck. All that's happened is Iraq stopped making units again and now Cuba will be active instead.
In one test case I removed all AI units from the map and disabled their spawned attacker units, leaving just the MCV. In this instance, the Cuba AI built 1 group of infantry from the barracks (conscripts, flak troopers) and left them in their base and did nothing with them. They didn't replace them either when I killed them. The rest of the AI did nothing as usual either.

Back to top
View user's profile Send private message Visit poster's website Skype Account
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Sat Jul 13, 2019 1:29 am    Post subject: Reply with quote  Mark this post and the followings unread

i see what your problem is. you are being cucked by an ini tag that says the ai ought to be building 'basedefense' teams.
yeet that little problem by adding
[General]
MinimumAIDefensiveTeams=0,0,0 ;1,1,1    ; (by difficulty level, from hardest to easiest)
MaximumAIDefensiveTeams=0,0,0 ;2,2,2   ; "                                            "
UseMinDefenseRule=no ;yes
to your mapside ini

heres the map i used to confirm this, you can use it as an AI reference.
by the way e1, the behavior of the ai on this map will confirm my statement of max being counterintuitively shared between all houses,
i noticed this little detail while making ti maps.



all01umd.map
 Description:

Download
 Filename:  all01umd.map
 Filesize:  39.3 KB
 Downloaded:  16 Time(s)


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


Joined: 28 May 2013

PostPosted: Sat Jul 13, 2019 9:10 am    Post subject: Reply with quote  Mark this post and the followings unread

@Bugsey827: Try with smaller prebuilt bases, AI seems to be spending most of its time on building its nodes.

McPwny wrote:
the behavior of the ai on this map will confirm my statement of max being counterintuitively shared between all houses

Yes for SP maps, no for MP maps. When global AI is enabled, the AI houses will have plenty to choose from.

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


Joined: 15 Apr 2008

PostPosted: Sat Jul 13, 2019 3:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:
[General]
MinimumAIDefensiveTeams=0,0,0 ;1,1,1    ; (by difficulty level, from hardest to easiest)
MaximumAIDefensiveTeams=0,0,0 ;2,2,2   ; "                                            "
UseMinDefenseRule=no ;yes


This worked, thanks

Also about your map in the script pool team, one of the actions is move to own building and the parameter is some number, but how do you know what the number corresponds to? The drop down box is always blank. I've noticed this on other SP maps including westwood's campaign and always wondered

Back to top
View user's profile Send private message Visit poster's website Skype Account
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Sat Jul 13, 2019 4:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

happy to help.  
some of the internal tables in fa2 are wack and its a matter of know what to use where. in the case of the move to building script action you can use the building index.. -1, its the same index on
the action 'move to enemy building', so just steal the number from the working index on the other action.
another example of it being wack or broke is trigger action 125 create building at waypoint. it has the buildingslist index -1 dropdown where you really need to input the ini name of the building instead  
another example is trigger action 88 particle system at waypoint. it displays names from the particles list, not the particlesystems list.  
theres more, but yeah.

_________________
visit my moddb profile for .shp downloads and stuff

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


Joined: 28 May 2013

PostPosted: Sun Jul 14, 2019 12:39 am    Post subject: Reply with quote  Mark this post and the followings unread

Structure number details are at the bottom of that page. If ModEnc gives problem, try different browser which allows to view the page.

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


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sun Jul 14, 2019 6:19 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
If ModEnc gives problem, try different browser which allows to view the page.

ModEnc only becomes problematic when the certificate expires and you use the browser that auto-logs you in.
Or generally logging in when the certificate is outdated causes problems.

Thought you wanted to know.

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
twistedconversion
Rocket Infantry


Joined: 23 Feb 2019
Location: Egypt

PostPosted: Sun Jul 14, 2019 10:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Works if you visit ModEnc in Incognito Mode.

_________________
C&C community is rotten.

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


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sun Jul 14, 2019 3:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

twistedconversion wrote:
Works if you visit ModEnc in Incognito Mode.

Because the browser doesn't sign you in when going incognito #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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [19 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.1834s ][ Queries: 13 (0.0120s) ][ Debug on ]