Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...

Scripting AI unit production via AI Triggers


Merc
 Share

Recommended Posts

Hello all,

I've been playing around in FinalSun/Alert and have been messing around with implementing production of teams based on AITriggers. I've seen several topics on the matter however it seems most of them are based around adding additional teams to the global skirmish AI.

While I have extracted and had a look at how scripting works for how the AI handles unit production in campaign missions of both RA2 and TS, however my own attempts at implementing this has not been successful.

as a step by step I will explain the actions I have done.

Note: I have disable global AI Triggers as I do not want the global AI teams to be built

1) I have created a trigger that at 10 seconds after game start it fires off the start AITriggers and Begin Production for the AI side (I am not using a premade house faction)

2) I have created a simple team of 10 conscripts according to how production teams are set up for AI in the campaign missions.

3) I have created the AI trigger specifying that the enemy (Player Faction) possess a soviet barracks Image

4) I have double checked that the AI trigger is indeed present within the maps file Image

According to looking through the various campaign map files as well as looking within the AIMD.ini file, it does not seem that the campaign teams and AItriggers are present within the .ini file.

While I could get around this issue by simply having a create team on a 60 second loop with a check if the team exists, however I would like to get this working via the AITriggers method.

 

Thanks for any help provided.

Link to comment
Share on other sites

Maybe tick "Autocreate".

If your team doesn't exist already, tick  "Prebuild" (this tag forces the house to build units first) and untick "Recruiter" (this forces to pick up existing units from the map)

Edited by Messiah
Link to comment
Share on other sites

On 09/12/2017 at 11:25 AM, Messiah said:

Maybe tick "Autocreate".

If your team doesn't exist already, tick  "Prebuild" (this tag forces the house to build units first) and untick "Recruiter" (this forces to pick up existing units from the map)

I tried using autocreate as well as Prebuild and various configurations (Using Banshee's guide to check what the attributes are), it seems dead set on not producing teams that are not part of the global AITriggers.

While if I do have LooseRecruit and Recruit enabled it does grab any pre placed units and execute the team script, it will not produce any regardless if there are pre placed conscripts or not. The only way I have got this working was to have a createteam action in the Triggers, however this does not seem to be the method the campaign missions use, nor do they rebuild the team once it has been destroyed regardless of the team attributes.

 

I've included the mission file from a clean attempt at implementing AI Triggers.

 

 

sov01umd.map

haha... turns out I uploaded a campaign map by accident...

Edited by Merc
Link to comment
Share on other sites

  • 2 weeks later...

So a bit of an update,

I was playing around in the Dawn of the Tiberian Age editor and I managed to get the AI triggers working in that one.

Looking through the mission file in notepad++ it doesn't seem to have much different from the mission I made in finalalert2. I also had a shot at making an AI trigger mission in finalsun as well but I've ran into the same problem as the one made in final alert in that the AI completely ignore any AI triggers I create (jeez I wish it had a debug).

Is this maybe something to do with the way FinalSun and FinalAlert2 create AITriggers that was maybe fixed in the DTA Editor?

EDIT : Got it working for Tiberian Sun, just need to crack Red Alert 2 now, which works differently it seems...

Edited by Merc
Link to comment
Share on other sites

  • 3 years later...

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
 Share

  • Similar Content

    • By CnCRedAlertFan
      Can't host a game of Yuri's Revenge in CnC Net, only i load and I get a Victorious screen.
       
       

    • By CnCRedAlertFan
      First time I was able to load into the game but the update failed, I got an error in the update and said something about firewall not allowing clientdx.exe to update. My firewall and anti-virus arent the issue and i read others are also having this problem.
      Now I can't even launch the game due to a crash
       
      Update: fixed by reinstalling
    • By Archangel777
      C&C yuri's revenge campaign cuz i prefer just playing the campaign on repeat lol. So basically everything works great except for right past the loading screen when u really get into a game and it tweaks out by freezing the screen. if i tab out and back in its fine until i finish the misson. when it tries to leave the mission to go to the post campaign mission screen it freezes up for good and i couldnt do anything to fix it. and i will say this im kinda an idiot when it comes to the computer stuff but i can do enough to get the game started thanks to tutorials. my question is does any one know how to fix this? the it freezes like this anytime it starts or ends a mission.

    • By Kondrand777
      somebody can help me?
      and another problem, cnc dont even start


    • By Wiganfc
      Hi 
       
      can someone please send instrcutions and downloads for Ra2/YR? I'm trying to reinstall so my son can play. 
       
      Thank you.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...