Jump to content

Setting primary building for AI


Jeod

Recommended Posts

What is the best way to set a primary building for an AI and can specific teamtypes be set to only build out of a certain building? I know the final GDI mission had a Nod outpost with a HoN that makes units, but I don't have access to the .ini file for verification of how this was made. (EDIT: Mission I'm thinking of is scg15eb)

Link to comment
Share on other sites

As far as I know, what you're asking is impossible, at least in TD and RA. There the AI uses all of its factories/barracks for production, so the result will be that any teamtype with the proper instructions will usually be built at ALL factories/barracks the AI has, as long as it has money.

 

EDIT:

Workarounds would include:

1. Assigning your 'primary' outpost to another house - this will work like a charm, but puritans will say it results in a wrong score at the end of the mission (incorrect kill/loss counts, but who cares).

2. Only having that building there - you want enemy tanks roaming a particular part of the map? Place all AI factories there.

3. Reinforce - cheat, just like the AI does. If all of the above fails you can always make these 'special' teams come in as reinforcements instead of cluttering production facilities.

Link to comment
Share on other sites

I think if you just put the first waypoint of the team near that factory, it'll use units produced around there. But the AI will still produce units with both factories. You can increase the amount of units it builds as reserve in the teamtype, to increase the chances of the AI having these units built at both factories, so it'll use the ones closest to the waypoint when actually creating the team.

Link to comment
Share on other sites

Okay I have another question, is it possible to set a timer for the win condition? I have a trigger marked for 240 (20 minutes) and Win. Will that work? (I suppose I could have set a shorter interval and tested it then, but meh) Better yet, let's play find out what's wrong with Jeod. Here are the relevant ini sections:

 

[TeamTypes]

R1=GoodGuy,0,0,0,0,0,7,0,0,0,4,RMBO:1,HTNK:1,MTNK:2,JEEP:1,1,Attack Base:0,0,0

R2=GoodGuy,0,0,0,0,0,7,0,0,0,4,JEEP:2,APC:1,E6:5,MSAM:2,1,Attack Base:0,0,0

CRT1=GoodGuy,0,0,0,1,0,15,0,0,0,2,E1:5,E2:5,1,Attack Base:0,0,0

CRT2=GoodGuy,0,0,0,1,0,15,0,0,0,4,HTNK:2,MTNK:2,JEEP:2,E2:5,1,Attack Base:0,0,0

CRT3=GoodGuy,0,0,0,1,0,15,0,0,0,1,E3:5,1,Attack Base:0,0,0

R3=GoodGuy,0,0,0,0,0,7,0,0,0,1,ORCA:2,1,Attack Base:0,0,0

R4=GoodGuy,0,0,0,0,0,7,0,0,0,1,A10:2,1,Attack Base:0,0,0

 

[Triggers]

PROD=Time,Production,25,GoodGuy,None,0

AUTO=Time,Autocreate,30,GoodGuy,None,0

AWIN=Time,Allow Win,0,None,None,0

WIN=Time,Win,240,None,None,0

TM1=Time,Create Team,40,GoodGuy,CRT1,1

TM2=Time,Create Team,50,GoodGuy,CRT2,1

TM3=Time,Create Team,60,GoodGuy,CRT3,1

RE1=Time,Reinforce.,75,GoodGuy,R4,1

RE2=Time,Reinforce.,20,GoodGuy,R1,1

RE3=Time,Reinforce.,30,GoodGuy,R2,1

RE4=Time,Reinforce.,40,GoodGuy,R3,1

LOSE=Destroyed,Lose,0,None,None,0

 

All of the reinforcements work except for the A10s and the engineers. Is that the proper way of giving GDI AI an airstrike? With the engineers, once the apc is destroyed they just sit there. I want them to try to capture buildings.

 

With the created teams, sometimes the team is created but the team will NOT attack my base. And finally, the win condition of course.

 

EDIT: I just noticed that the commando is listed as a reinforcement. But he's built from the barracks in the map. Why? The triggers are set correctly for the team, so..

Link to comment
Share on other sites

AWIN=Time,Allow Win,0,None,None,0

WIN=Time,Win,240,None,None,0

 

 

I would change this to something like:

 

Side=Goodguy

 

AWIN=Time,Allow Win,240,None,None,0

WIN=Destroyed,Win,240,Badguy,None,0

 

Attackunit and Attackbase needs a long time to cross the map, start the attack, keep fighting and keep doing that until all enemies are down, so your parameter to make them move and do something is Attackbase:99

 

Link to comment
Share on other sites

I didn't think I'd need to set a House parameter for the win trigger since it shouldn't matter what House the player is. I saw in CCMap I needed to tick "X Key", whatever that is, for the A10s. Wonder if I can do that for the Orcas too.

Link to comment
Share on other sites

Ok, let's go again, 1 item per time:

I suggest you to read Nyerguds manual to see how things really work.

 

================================================================

WIN condition

 

You can set just

WIN=Time,Win,240,None,None,0

so you don't need "allow win" trigger, at least not associated to your time trigger.

To test if WIN trigger will work, just put the time to "10" or "20" and make a test.

But I still think you might have to set a HOUSE for the time, I'm not sure.

 

================================================================

A10s

This is a working trigger and teamtype for the A10s:

air=time,reinforce.,75,GoodGuy,air1,2

air1=GoodGuy,1,0,0,0,0,7,0,0,0,1,a10:2,0,0

 

this is yours:

RE1=Time,Reinforce.,75,GoodGuy,R4,1

R4=GoodGuy,0,0,0,0,0,7,0,0,0,1,A10:2,1,Attack Base:0,0,0

 

you won't need "attack base" command for the A10s

Also you mentioned "AIRSTRIKE": if it's for the HUMAN player, it could be something like:

airs=time,airstrike,75,goodguy,none,0

 

================================================================

Engineers

This is a working trigger and teamtype from Covert Operations, mission Infiltrated:

eng2=Time,Create Team,20,BadGuy,eng2,2

eng2=BadGuy,0,0,0,0,0,7,0,0,0,1,E6:1,1,Attack Base:80,0,1

 

This is yours:

RE3=Time,Reinforce.,30,GoodGuy,R2,1

R2=GoodGuy,0,0,0,0,0,7,0,0,0,4,JEEP:2,APC:1,E6:5,MSAM:2,1,Attack Base:0,0,0

 

So if you want the APC to deliver the ENGs, this should be your teamtype:

R2=GoodGuy,0,0,0,0,0,7,0,0,0,4,JEEP:2,APC:1,E6:5,MSAM:2,2,Move:7,Unload:7,Attack Base:99,0,0

And you have to create and position WAYPOINT 7 in your MAP, regarding this example.

 

================================================================

Create teams

You're putting all your attack base commands to ZERO.

So the units don't have time to do anything.

Put them to "Attack base:99"

 

================================================================

Commandos

No, the teams, as explained, are not set correctly, so the commandos might be being built as an attempt of the AI to make things work.

But I'm really guessing here.

 

 

I wouldn't "promote" a campaign before your first mission is ready, tested, corrected and criticized by the other players.

It's a long walk before a good result. A campaign is a lot of stuff.

Link to comment
Share on other sites

"Time" triggers are an annoying thing. They usually need an owner to work well, even if no owner is technically involved in the "time" thing. It's mostly linked to the side receiving the effect of the trigger. Though owner of a trigger and the trigger's effect are supposed to be unrelated (since the owner is the house that MAKES it trigger), I've found that in reality, the owner sometimes does affect the trigger effect.

 

(One of these cases is the Airstrike superweapon, which I've successfully given to the AI using celltriggers. Meaning, you can't let the enemy do something that will give the player an Airstrike X_x)

Link to comment
Share on other sites

Thanks Chimas, I have read the manual and the guide. They really should be updated to reflect the new research though. Here are the updated commands:

 

[TeamTypes]

R1=GoodGuy,0,0,0,0,0,7,0,0,0,4,RMBO:1,HTNK:1,MTNK:2,JEEP:1,1,Attack Base:99,0,0

R2=GoodGuy,0,0,0,0,0,7,0,0,0,4,JEEP:2,APC:1,E6:5,MSAM:2,1,Attack Base:99,0,0

CRT1=GoodGuy,0,0,0,1,0,15,0,0,0,2,E1:5,E2:5,1,Attack Base:99,0,0

CRT2=GoodGuy,0,0,0,1,0,15,0,0,0,4,HTNK:2,MTNK:2,JEEP:2,E2:5,1,Attack Base:99,0,0

CRT3=GoodGuy,0,0,0,1,0,15,0,0,0,1,E3:5,1,Attack Base:99,0,0

R3=GoodGuy,1,0,0,0,0,7,0,0,0,1,ORCA:2,1,Attack Base:99,0,0

AIR=GoodGuy,1,0,0,0,0,7,0,0,0,1,A10:2,0

 

[Triggers]

PROD=Time,Production,25,GoodGuy,None,0

AUTO=Time,Autocreate,30,GoodGuy,None,0

WIN=Time,Win,240,BadGuy,None,0

TM1=Time,Create Team,40,GoodGuy,CRT1,1

TM2=Time,Create Team,50,GoodGuy,CRT2,1

TM3=Time,Create Team,60,GoodGuy,CRT3,1

AIR=Time,Reinforce.,75,GoodGuy,AIR,2

RE1=Time,Reinforce.,20,GoodGuy,R1,1

RE2=Time,Reinforce.,30,GoodGuy,R2,1

RE3=Time,Reinforce.,40,GoodGuy,R3,1

LOSE=Destroyed,Lose,0,None,None,0

 

Everything is working correctly now, except that the AI will still build minigunners and grenadiers (CRT1 teamtype) that stay at their barracks. Is this due to the autocreate trigger? I'm still a tad unclear on how that works.

Link to comment
Share on other sites

try "1", after "15" in the teamtype.

 

I know that will show if it works or not, but why? What does the 1 do? Also, random question, what makes a base "sleep" until it's discovered? (e.g. Must find old base)

Link to comment
Share on other sites

From my humble mission making experience, it appears that the 'sleeping' buildings are hardcoded. Player controlled buildings will be inactive at the start of the mission simply if the player has no units seeing them. The moment you discover the building, it becomes active. A bug from this feature can be seen when you have an undiscovered Construcion yard. You can easily find it in the shroud by just pressing 'h'. It will still remain inactive until you really discover it though.

Link to comment
Share on other sites

From my humble mission making experience, it appears that the 'sleeping' buildings are hardcoded. Player controlled buildings will be inactive at the start of the mission simply if the player has no units seeing them. The moment you discover the building, it becomes active. A bug from this feature can be seen when you have an undiscovered Construcion yard. You can easily find it in the shroud by just pressing 'h'. It will still remain inactive until you really discover it though.

 

Interesting, that explains why I'm not seeing any triggers for sleeping buildings in scg05. Thanks!

Link to comment
Share on other sites

Have in mind that no one was given a Manual, they were all made through reverse-engineering of the game (hacking) and still today there are parameters with unknown functionalities, abandoned functionalities and others that might work by accident (ok, I'm speculating in this one, I have no source, nor examples).

Link to comment
Share on other sites

I know that will show if it works or not, but why? What does the 1 do?

You said you read my manual. That stuff is in there. Look it up ;)

 

Also, random question, what makes a base "sleep" until it's discovered? (e.g. Must find old base)

Simple. Production trigger on a delay. This delay can be either just time, or something indicating you got to that base, like celltriggers, a Destroyed trigger on a construction yard / refinery you need to capture, etc. As long as there is no Production, the AI will not produce any units or buildings.

 

Often, this is combined with putting the AI's refinery only in the mission's [base] section and not on the map, so they can't harvest all the tiberium off the map before you reached your primary objective. With Production active, the rebuilding of missing buildings will begin, and they'll place their refinery and start producing.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...