Jump to content

Recommended Posts

Hello. I tried to create missions for the company. Now there was a problem. I am sure that in most of the original missions, bots do not create engineers and MCV even if it is required (except for maybe 9 levels). But in my mission, the bot still hires engineers. It is desirable for me to get rid of attacks on buildings from the enemy at all (as is necessary in the mission), I tried to change all the values - make first attack building delay to 9999999, attack building stength 0, etc. All this does not help.

Share this post


Link to post
Share on other sites
34 minutes ago, Helkor Duner said:

Hello. I tried to create missions for the company. Now there was a problem. I am sure that in most of the original missions, bots do not create engineers and MCV even if it is required (except for maybe 9 levels). But in my mission, the bot still hires engineers. It is desirable for me to get rid of attacks on buildings from the enemy at all (as is necessary in the mission), I tried to change all the values - make first attack building delay to 9999999, attack building stength 0, etc. All this does not help.

Hey there!

The value to prevent the AI from making Engineers is in the UnitBuildPriority. Set this to 0.000:
https://prnt.sc/mj8pw2

That will make the AI never train Engineers. The UBPs can be customized to make the AI use a specific combination of units. In that AI, the Missile Tank is set to 0.010, so the AI will make sure to have at most one Missile Tank among its forces at any time - and that's all.

It's impossible to prevent the AI from attacking buildings unless you make those buildings belong to a side friendly to that AI, but setting all "AttackBuildingPriority" entries to 0.000 will cause the AI to attack the nearest target, not specific buildings (note: this will break special weapons like Saboteurs). You can also set their Morale AttackBuilding and MinMorale to 0, though they may send at least one attack before never doing it again.

Also, make sure EnablePractice is set to 0 unless you want the AI to build new structures beyond what you place on the map for them. Among other weird things "practice AIs" tend to do, like build MCVs.

Hope that helps!

Edited by Fey
  • Upvote 1

Share this post


Link to post
Share on other sites
2 minutes ago, Fey said:

Hey there!

The value to prevent the AI from making Engineers is in the UnitBuildPriority. Set this to 0.000:
https://prnt.sc/mj8pw2

That will make the AI never train Engineers. The UBPs can be customized to make the AI use a specific combination of units. In that AI, the Missile Tank is set to 0.010, so the AI will make sure to have at most one Missile Tank among its forces at any time - and that's all.

It's impossible to prevent the AI from attacking buildings unless you make those buildings belong to a side friendly to that AI, but setting all "AttackBuildingPriority" entries to 0.000 will cause the AI to attack the nearest target, not specific buildings (note: this will break special weapons like Saboteurs). You can also set their Morale AttackBuilding and MinMorale to 0, though they may send at least one attack before never doing it again.

Also, make sure EnablePractice is set to 0 unless you want the AI to build new structures beyond what you place on the map for them. Among other weird things "practice AIs" tend to do, like build MCVs.

Hope that helps!

Thank you very much, this information will be very useful to me.

Share this post


Link to post
Share on other sites

Fey already answered your question. Keep in mind that the AI will always send eengineers paired with some infantry and trooper if possible. Eengineers, St.Fremen and Saboteurs have their own behaviour and his attacks canot be modified directly. As soon as those units are ready (or Sab has the full Stealth bar) they will "attack".

But yes, a priority of "0.000" will prevent that AI to produce the specific unit on the name.

Edited by Cm_blast

Share this post


Link to post
Share on other sites

Hello again, I will not even create a new topic. I completed this mission, about the effect that I wanted, I received. In the new mission, I have another task, which I have been trying to set up for an hour.

It is necessary to make AI attacks similar to the attack of the Harkonnen from the 7th mission for the Atreides. There, they wait a fairly long time, train the army, units do not go anywhere, but then a large army sharply attacks. I even tried to completely copy the settings of Harkonnen from that mission, but alas, it did not help.

What happens to me? From the very beginning of the mission, the enemy begins to train the trikes on one base, to order a missile tank to the old port on the other base. After they immediately attack.

Thanks.

On 2/10/2019 at 10:35 PM, Fey said:

No prob, mate! If ya need anything else, there's the AI manual:
https://forum.dune2k.com/topic/27803-d2k-ai-manual/

Or ya could always ask me. I helped Cm_blast write it. :)

On 2/10/2019 at 10:55 PM, Cm_blast said:

Fey already answered your question. Keep in mind that the AI will always send eengineers paired with some infantry and trooper if possible. Eengineers, St.Fremen and Saboteurs have their own behaviour and his attacks canot be modified directly. As soon as those units are ready (or Sab has the full Stealth bar) they will "attack".

But yes, a priority of "0.000" will prevent that AI to produce the specific unit on the name.

619976497_(226).thumb.png.efd0dbba9b00a873cf7a0a29e6da1dd1.png511639094_mapimage.thumb.jpg.2df9b2d624ffd58d9acebf52ee7cb34a.jpg

Edited by Helkor Duner

Share this post


Link to post
Share on other sites
7 hours ago, Helkor Duner said:

snip

Hallo!

The H7V1 AI is kinda weird in how it's set up. The player's own rock island is actually within the AI's defense zone, so if the player builds far enough to the right (or moves units on the right side of the island), it triggers the AI's "emergency" mode. This forces it to ignore its cashstash and switch from a 1250 tic buildrate to a 1 tic buildrate, and it'll send defense forces to your base since it thinks you're in its base.

The AI you've got there has a build rate of 1000 tics, which is one unit every 40 seconds. And this could be a tank or just a Light Infantry. Since it attacks every 9000 tics (6 minutes), it'll send very few units along with whatever it's ordered at the starport.

To make the AI build up more stuff for a stronger attack, change the BuildRate parameter to something faster, like 250-500 (new unit every 10-20 seconds). You could also boost the AttackBuildingStrength to something like 50-70 so the AI dedicates more of its standing forces to an attack. You could also spawn some free units in at the start so the AI gets a little something to buff up its first attack, and fill in the blanks with some reinforcements. Not too many reinforcements though, just a couple of Carryall drops near the start will do to keep the player on his toes.

If the AI is attacking constantly, it seems you've got two side 1 bases there in a formation where the AI's defense area will be in the player's base. That's probably the issue. Try making the bottom-left or top-right bases belong to a different allocation index, so the defense boxes are drawn like this:
https://prnt.sc/ml0ww6

Instead of like this:
https://prnt.sc/ml0x5t

Hope that helps. :)

  • Upvote 1

Share this post


Link to post
Share on other sites
7 hours ago, Helkor Duner said:

Hello again, I will not even create a new topic. I completed this mission, about the effect that I wanted, I received. In the new mission, I have another task, which I have been trying to set up for an hour.

It is necessary to make AI attacks similar to the attack of the Harkonnen from the 7th mission for the Atreides. There, they wait a fairly long time, train the army, units do not go anywhere, but then a large army sharply attacks. I even tried to completely copy the settings of Harkonnen from that mission, but alas, it did not help.

What happens to me? From the very beginning of the mission, the enemy begins to train the trikes on one base, to order a missile tank to the old port on the other base. After they immediately attack.

Alright, I was about to answerd this but Fey caught me.

Overall it's just this part.

24 minutes ago, Fey said:

Instead of like this:
https://prnt.sc/ml0x5t

the AI just draw an imaginarie rectangle around all the buildings owner of that AI; I am talking only about the Harkonnen ones, here the smuggler and Atreides doesn't count. As you can see, the player it's inside the area the AI it's about to defend, it believes that you are attacking it because you are "near" his base; that's the logic the AI uses and, because of that, he will try to fight you with any units available.

The best you can do it's what suggest Fey: 1 of those two bases, instead using the "harkonnen" side; change it into other side; Imperial, for example.

Then, on the missions settings change the alloc. index of the Emperor to be Harkonnen and that's it: of course later you need to update the Imperial AI tab, but at this point I guess you know how to do that (or you can just simply export/import the one the Harkonnen are using to have those two Ais to behave the same).

With that it's enough; with the "first attack building delay" you can control the time the AI waits until attacking for the first time. The bigger the number it's, the more time the wait to attack the first time.

Remember that 1500 ticks = 1 minute (in game time); so if you want that AI to wait 15 minutes before attacking the first time, his first attack building delay needs to be 15*1500 = 22500 ticks.

Edited by Cm_blast
  • Upvote 1

Share this post


Link to post
Share on other sites

Thank you very much, I don’t have any minor attacks anymore - indeed, the player’s base was in the AI zone. But for some reason they stopped attacking altogether only when the carryalls were planted with the hunt parameter. Smugglers (atreides with a modified index) bring units to the starport and must attack every 15,000 ticks. But during the game they are engaged only in defense. I even decided to put the percentage of attack at 100 for the sake of verification - they still do not attack the player. I hope I will solve this problem, thanks for the help that already is.

On 2/14/2019 at 3:46 PM, Fey said:

Hallo!

The H7V1 AI is kinda weird in how it's set up. The player's own rock island is actually within the AI's defense zone, so if the player builds far enough to the right (or moves units on the right side of the island), it triggers the AI's "emergency" mode. This forces it to ignore its cashstash and switch from a 1250 tic buildrate to a 1 tic buildrate, and it'll send defense forces to your base since it thinks you're in its base.

The AI you've got there has a build rate of 1000 tics, which is one unit every 40 seconds. And this could be a tank or just a Light Infantry. Since it attacks every 9000 tics (6 minutes), it'll send very few units along with whatever it's ordered at the starport.

To make the AI build up more stuff for a stronger attack, change the BuildRate parameter to something faster, like 250-500 (new unit every 10-20 seconds). You could also boost the AttackBuildingStrength to something like 50-70 so the AI dedicates more of its standing forces to an attack. You could also spawn some free units in at the start so the AI gets a little something to buff up its first attack, and fill in the blanks with some reinforcements. Not too many reinforcements though, just a couple of Carryall drops near the start will do to keep the player on his toes.

If the AI is attacking constantly, it seems you've got two side 1 bases there in a formation where the AI's defense area will be in the player's base. That's probably the issue. Try making the bottom-left or top-right bases belong to a different allocation index, so the defense boxes are drawn like this:
https://prnt.sc/ml0ww6

Instead of like this:
https://prnt.sc/ml0x5t

Hope that helps. :)

 

On 2/14/2019 at 3:52 PM, Cm_blast said:

Alright, I was about to answerd this but Fey caught me.

Overall it's just this part.

the AI just draw an imaginarie rectangle around all the buildings owner of that AI; I am talking only about the Harkonnen ones, here the smuggler and Atreides doesn't count. As you can see, the player it's inside the area the AI it's about to defend, it believes that you are attacking it because you are "near" his base; that's the logic the AI uses and, because of that, he will try to fight you with any units available.

The best you can do it's what suggest Fey: 1 of those two bases, instead using the "harkonnen" side; change it into other side; Imperial, for example.

Then, on the missions settings change the alloc. index of the Emperor to be Harkonnen and that's it: of course later you need to update the Imperial AI tab, but at this point I guess you know how to do that (or you can just simply export/import the one the Harkonnen are using to have those two Ais to behave the same).

With that it's enough; with the "first attack building delay" you can control the time the AI waits until attacking for the first time. The bigger the number it's, the more time the wait to attack the first time.

Remember that 1500 ticks = 1 minute (in game time); so if you want that AI to wait 15 minutes before attacking the first time, his first attack building delay needs to be 15*1500 = 22500 ticks.

211609004_(228).thumb.png.0287943a551f2b1e5fe6883aa054b4bc.png

3.jpg

Edited by Helkor Duner

Share this post


Link to post
Share on other sites
1 hour ago, Helkor Duner said:

Thank you very much, I don’t have any minor attacks anymore - indeed, the player’s base was in the AI zone. But for some reason they stopped attacking altogether only when the carryalls were planted with the hunt parameter. Smugglers (atreides with a modified index) bring units to the starport and must attack every 15,000 ticks. But during the game they are engaged only in defense. I even decided to put the percentage of attack at 100 for the sake of verification - they still do not attack the player. I hope I will solve this problem, thanks for the help that already is.

First, you need to check the "Guardgroupsize" which it's 1000: that define the amount/strengh of units that will use to defend his base, now. I am guessing those Atreides recieves units via script, right? because they don't have money.

If you want the Atreides to not make use units to defend his base at all, just change the GuardGroupSize value to 0. Any unit the AI recieves will be ready to attack.

"protectstreng" and "Defendstrengh" don't really affect here: those are just the % of the units used at once to do that job. For example, if you have a very big AI base being defended by 50 tanks and you have the protectstrengh value to 10, the AI don't mobilize all the 50 tanks at once when you are shooting at the enemy turret/building, you will see only 5 combat tanks going to defend (and if those died, more join).

Also, keep in mind that the "first attack building delay" has a randomized default value of 25 (defined by the line called "TimingRandomPorcentaje"). This means that the AI it's not going to attack exactly at 15500 ticks but around this number; appliying a 25% random, may be more, may be less.
With a basic calculation: 25% of 15500 it's 3875; so you can expect the Ai attacking in between ~13560 and ~17430 ticks. <-- the calculation it's a guess, from my experience I deduced the AI will attack in bewteen 12.5% early or 12.5% later; I may be wrong, but his is an approach.

There is other thing that I don't know exactly how it works or how you have it in your map.
A line that said "morale AttackBuilding": I saw Ai's that don't attack at the timer set because you are killing his allies <-- I saw Ai's stop attacking, but I never manage to replicate this in my playground-test map.
I don't know if you have any other value than 100, but if you haven't it, just place 100 just to be safe. I know for sure that with 100 the AI morale never change and attack as usuall.

So here the main solutions:
*Reduce the area guard size of that AI to a lower number or just simply to "0" if you want every single unit delivered to be used as future attacks.
*If you really want to AI to attack at 15500 ticks everysingle time, changing the "timingrandomporcentaje" to "1" will do the trick, but if don't mind to just be around that number the random just will make the maps a bit less fixed.
*And checking "Morale AttackBuilding" and setting it to 100 if it wasn't, just to be more safe.

And finally, as a recomendation for testing a bit more easy: I may suggest you to add into your maps, a reveal map event to trigger at timer =1 with a radius of 0 (the positions doesn't matter). This will reveal the whole map to you, so even if you are just "playing" your map you can spy what the AI it's doing from time to time without using debug mode.

Also, to help you track the timers you can write on the "time limit" the 15500 value, so you are more aware around which moment that AI will send the attack.

Edited by Cm_blast

Share this post


Link to post
Share on other sites
On 2/16/2019 at 6:08 AM, Helkor Duner said:

Thank you very much, I don’t have any minor attacks anymore - indeed, the player’s base was in the AI zone. But for some reason they stopped attacking altogether only when the carryalls were planted with the hunt parameter. Smugglers (atreides with a modified index) bring units to the starport and must attack every 15,000 ticks. But during the game they are engaged only in defense. I even decided to put the percentage of attack at 100 for the sake of verification - they still do not attack the player. I hope I will solve this problem, thanks for the help that already is.

211609004_(228).thumb.png.0287943a551f2b1e5fe6883aa054b4bc.png

3.jpg

Interesting 😮 Something I just noticed now, you don't put Thick Spice tiles around your Spice blooms :P

For the record, Spice bloom tiles can't be harvested (so they don't spawn) until all the nearby Thick Spice tiles are gone, so if you want Spice blooms to appear sooner, this is a good thing for the map. Nothing important or relevant, just thought I'd acknowledge that.


As Cm recommended, those three solutions:

On 2/16/2019 at 7:27 AM, Cm_blast said:

So here the main solutions:

 

*Reduce the area guard size of that AI to a lower number or just simply to "0" if you want every single unit delivered to be used as future attacks.
*If you really want to AI to attack at 15500 ticks everysingle time, changing the "timingrandomporcentaje" to "1" will do the trick, but if don't mind to just be around that number the random just will make the maps a bit less fixed.
*And checking "Morale AttackBuilding" and setting it to 100 if it wasn't, just to be more safe.

Should fix the problem entirely. My biggest AIs usually only have a guard group size of around... 40, and for weaker AIs, 30 or 20. That seems to do just fine.

I've been going back through my OG smugglers campaign and tuning up the AI and stuff. If you want some examples of fierce AIs to go off of, I'll send you the maps re-done thus far (S01V1 through S06V2)! It'd require modded files to play, but can always look in the editor at what the AI does. I've got stuff building up from just an MCV in a specific order, UnitBuildPriority tricks, designated defense areas, and more.

Hope that helps!

Edited by Fey

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

×