Jump to content
Sign in to follow this  
TK3600

How to make AI build modded units?

Recommended Posts

Posted (edited)

I have duplicated a grizzly tank, tagged "MTNKK". I edited so it has DefaultToAreaGuard=yes, GuardRange=40. Putting it into taskforce AI simply refuse to build it. The scripts are not at fault, AI build it the moment I change MTNKK to MTNK, the original grizzly. I have duplicated factories before and AI build them. What can I do?

 

Edit: I ran into another problem, AI's Siege Chopper refuse to deploy despite script! They simply hover above factory doing nothing!

[0A3142EC-G]
Name=Soviet Dog Guard Tech
0=58,10
1=9,0
2=11,11

Edited by TK3600

Share this post


Link to post

Can the AI build the unit legitimately? Usually it doesn't matter and the AI ignores it, but it's best to keep it in-line.

The AI can't deploy Siege Choppers. They can attack with them but they will not deploy them.

Share this post


Link to post
On 1/9/2018 at 3:25 PM, Doctor Destiny said:

Can the AI build the unit legitimately? Usually it doesn't matter and the AI ignores it, but it's best to keep it in-line.

The AI can't deploy Siege Choppers. They can attack with them but they will not deploy them.

What do you mean in-line? Are you saying it will never be used and no one ever done it? Then how do mods with new unit even function? There has to be a way, and I just don't know.

Siege chooper will never deploy? Well, that sucks. But it is very helpful to know I did not do things wrong and it just cannot work. Thanks!

May I ask another question? Is there a command to make AI guard base? You know, when AI start with tanks in skirmish, they will aggressively respond to your attack even if your tanks are outside their range. I think that is a better guard than the "GuardArea" command. However I did not find anything online about it. If AI learn to rely more on mobile tank defense than towers I think it will make a huge difference.

Share this post


Link to post

Keep the AI as in-line as possible. In other words, don't let the AI build things it shouldn't. You can tell the AI to build whatever and it will, but it's best not to. Makes the cheating a lot less apparent.

I make the AI use new units all the time. If you're editing existing task forces, that's the quick and dirty way to make it work. Make sure the unfilled team delay isn't set too low. For example, if you have a $2500 unit in a task force and DissolveUnfilledTeamDelay is set to... say... 1500... the AI will fail to make the team if there's a large number of those units and you'll never see it get used. My delay is set to 8000 and this is measured in frames.

You can add defense teams. You have to make them patrol your base. Refer to the existing patrol teams for some pointers. Those should get you started.

Share this post


Link to post
14 hours ago, Doctor Destiny said:

Keep the AI as in-line as possible. In other words, don't let the AI build things it shouldn't. You can tell the AI to build whatever and it will, but it's best not to. Makes the cheating a lot less apparent.

I make the AI use new units all the time. If you're editing existing task forces, that's the quick and dirty way to make it work. Make sure the unfilled team delay isn't set too low. For example, if you have a $2500 unit in a task force and DissolveUnfilledTeamDelay is set to... say... 1500... the AI will fail to make the team if there's a large number of those units and you'll never see it get used. My delay is set to 8000 and this is measured in frames.

You can add defense teams. You have to make them patrol your base. Refer to the existing patrol teams for some pointers. Those should get you started.

I know patrol and guard area, Soviet has it by default. What I am interested is how AI's starting units will respond to attack outside its guard range. Lets say you use the 5 grizzlies to attack the moment you can, the 4 rhino and conscript will run toward your grizzlies even outside guard range. If they were under patrol and guard area command, they will stay where they were unless you are in their range.

Share this post


Link to post

The AI doesn't really behave that way. You could conceivably add a lot of triggers to attack based on specific units and specific numbers of those units but that still won't be perfect. For example, you could trigger the Allied AI to attack with a group of units when 5 Lasher Tanks are in the field, but the AI will just try to attack the units. It's not that smart since it's a fully scripted AI and not heuristic. Easier to make the AI attack more than try to defend itself.

I'd have to check the team types info again though. This might be possible to do but it may not be worth the effort.

Share this post


Link to post
8 hours ago, Doctor Destiny said:

The AI doesn't really behave that way. You could conceivably add a lot of triggers to attack based on specific units and specific numbers of those units but that still won't be perfect. For example, you could trigger the Allied AI to attack with a group of units when 5 Lasher Tanks are in the field, but the AI will just try to attack the units. It's not that smart since it's a fully scripted AI and not heuristic. Easier to make the AI attack more than try to defend itself.

I'd have to check the team types info again though. This might be possible to do but it may not be worth the effort.

You know, when you fire up skirmish with 10 starting units? If you use these units to attack enemy base, all enemies starting units will chase you, regardless of where your units are(outside their normal guard range). This is before the starting pool units form a team of course. Once the team forms they dumb down. I am not expecting much, I am taking a blind shot. If there is a way to replicate that behavior I can make AI very strong. If that fails I will have to go convoluted ways like make them have higher guard range. That is not ideal. I am writing AI for CNCnet, they rather me not touching player side of things.

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×