1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Spell] AI settings not being saved

Discussion in 'World Editor Help Zone' started by Ugabunda, Sep 27, 2020.

  1. Ugabunda

    Ugabunda

    Joined:
    May 16, 2020
    Messages:
    431
    Resources:
    0
    Resources:
    0
    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?

    [​IMG]

    Cheers
     
  2. J2Krauser

    J2Krauser

    Joined:
    Jul 31, 2020
    Messages:
    99
    Resources:
    0
    Resources:
    0
    I never worked with the AI editor, and I'm a firm believer you should just trigger your AI instead.
     
  3. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    1,149
    Resources:
    8
    Maps:
    8
    Resources:
    8
    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.
     
  4. Ugabunda

    Ugabunda

    Joined:
    May 16, 2020
    Messages:
    431
    Resources:
    0
    Resources:
    0
    Thanks you two.

    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.
     
  5. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    365
    Resources:
    0
    Resources:
    0
    The Ai file works with standard maps.
     
  6. Ugabunda

    Ugabunda

    Joined:
    May 16, 2020
    Messages:
    431
    Resources:
    0
    Resources:
    0
    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)
     
  7. noob

    noob

    Joined:
    Sep 28, 2011
    Messages:
    822
    Resources:
    0
    Resources:
    0
    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: Oct 11, 2020
  8. Ugabunda

    Ugabunda

    Joined:
    May 16, 2020
    Messages:
    431
    Resources:
    0
    Resources:
    0
    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]
     
  9. noob

    noob

    Joined:
    Sep 28, 2011
    Messages:
    822
    Resources:
    0
    Resources:
    0
    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: Oct 11, 2020
  10. Ugabunda

    Ugabunda

    Joined:
    May 16, 2020
    Messages:
    431
    Resources:
    0
    Resources:
    0
    Thanks - this was the hint that solved it:

    • AI - Ignore (Last created unit)'s guard position