[Spell] AI settings not being saved

Level 11
Joined
May 16, 2020
Messages
655
Hi guys,

I want to tweak the behaviour of PC controlled units a bit. For example:
  • Enemy PC controlled units should not attack my hero when they are already engaged in combat with other units and my hero simply walks close by
  • Allied PC controlled units should help my hero when an enemy hero attacks my hero (like in league of legends)

In the AI Editor I found some good settings, but the yellow marked ones always reset as soon as I close my map... How can I permanently save these settings?

AI.png


Cheers
 
Level 18
Joined
Jul 26, 2008
Messages
1,216
In the AI Editor I found some good settings, but the yellow marked ones always reset as soon as I close my map... How can I permanently save these settings?
Because what you do in the AI editor itself is not saved along with other parts of the map, like triggers and terrain etc. You need to save the AI as an AI file, and then import it back into the map through the import editor. I think you believe just changing those features on the screenshot will automatically affect all the AI in the map.

That is not the case. After importing, you would then need to set up the AI for whatever computer player you want. And you would need to complete the other parts of the AI editor, like build order, attack waves, etc.

While the AI editor comes with the map editor, it is basically a completely separate thing.
 
Level 11
Joined
May 16, 2020
Messages
655
Thanks you two.

That is not the case. After importing, you would then need to set up the AI for whatever computer player you want. And you would need to complete the other parts of the AI editor, like build order, attack waves, etc.

I read a bit more on it and is the AI Editor only for Standard maps or Campaigns? If so then it's useless to me regardless, as I'm working on an dota like map.
 
Level 11
Joined
May 16, 2020
Messages
655
Did some more work on the AI and have some questions:
  1. Can I just set my preferred settings within the General tab (ignoring the other tabs) and still export / use these settings within my custom map? All I want is for PCs to tend to ignore my hero and allied creeps support my hero if he gets attacked.
  2. Is the "Race" within the General tab important when exportin/importing the file and assigning the AI to a PC via trigger? Can I for example select Race = Undead, but assign it to Nightelves (again, I just want the General settings)
 
Level 13
Joined
Sep 28, 2011
Messages
942
You can change the race setting in ai since it actually does nothing else than setting some ai values like the unittype code of the gold and wood miners and other stuff like that.
 
Last edited:
Level 11
Joined
May 16, 2020
Messages
655
For some weird reason adding the following line makes Player 13 ignore this "order to attack-move to x" command -- but only for the first group which is spawned. As the next group spawns, this group follows the attack-move command.

When I delete the first line (so not adding AI to player 13), it follows the order from the very first group on. Any idea why?

  • AI - Start campaign AI script for Player 13 (Maroon): war3mapImported\Computer AI Generic.ai
  • Move Start Legion
    • Events
      • Unit - A unit enters Burning Legion Spawn <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 13 (Maroon)
    • Actions
      • Unit - Order (Triggering unit) to Attack-Move To BurningLegion_Point[4]
 
Level 13
Joined
Sep 28, 2011
Messages
942
Ai tries to assume control of its own units but I believed it was a constant thing and not something the ai gave up on over time.
You can use "remove guard position" it makes the ai lose the right to give interesting orders to the unit.
 
Last edited:
Top