Jump to content

CnCNet Forums

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

Scripting AI unit production via AI Triggers

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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Probably a silly question, but have you checked that the AI faction has money to build the conscripts with?

If it only grabs pre-existing units to make the team and refuses to build any, maybe it has no money. :P

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

  • Similar Content

    • By LFZombie
      I'm trying to create a portable version of RA2, so I want to eliminate the registration for Blowfish.dll. I found a link from @Iran where @FunkyFr3sh described a method here:
      https://ppmforums.com/topic-41629/using-blowfishdll-without-registration-no-admin-rights/
      But the example there is dead, and I can't seem to produce a manifest that works. MT.exe gave me this:
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <file name="blowfish.dll" hashalg="SHA1"> <comClass clsid="{1440AD10-6AA8-11D1-B6F9-00A024DDAFD1}" tlbid="{E7F91750-8861-11D1-B707-00A024DDAFD1}" description="Blowfish encryption algorithm"></comClass> <typelib tlbid="{E7F91750-8861-11D1-B707-00A024DDAFD1}" version="1.0" helpdir="" flags="HASDISKIMAGE"></typelib> </file> <comInterfaceExternalProxyStub name="IBlockCipher" iid="{E0113100-6A7C-11D1-B6F9-00A024DDAFD1}" tlbid="{E7F91750-8861-11D1-B707-00A024DDAFD1}" proxyStubClsid32="{E0113100-6A7C-11D1-B6F9-00A024DDAFD1}"> </comInterfaceExternalProxyStub> </assembly> But it does nothing. I'd be grateful for any help.
    • By NightShadow
      I recommended my friend to update YR to play online on cncnet. At first he can play with me normally, but 3 days after installed the program this happen to him

      How can this problem be solved? He's very frustrated because it is suddenly happen and he doesn't want to quit YR. Please help.
      p.s. he doesn't have an account on cncnet community, but if anyone who can help him and wants to talk to him. I'll tell him to register on this site.
    • By The_BlackToteM
      I have made a map that use Civilian/JP side to attack everyone when condition was met.

      It's went fine but the problem is player's (+Computer) defenses and units won't automatically attack Civilian's unit as they are in range of fire.

      So, Is it possible to solve this problem?
    • By ScottO
      was fine yesterday, exited, when finished, caused graphics crash now trying to play nothing happened when i opened it from the launcher, went to the folder launched from game.exe and got it in a small window, its now doing this for everything... its ignoring all the settings in the C&C.NET launcher
       
    • By KlaPPer SnaPPer
      When trying to play QM on RA2 Yuri's revenge it says I don't [which I do!!!] have a ladder account for the game and asks if I want to sign up, but when I do it just shows me I'm signed up with all my accounts listed. PLEASE HELP! I've deleted and reinstalled everything and this all works for other users on a different computer. PLEASE HELP
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...