1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Making siege units focus buildings

Discussion in 'World Editor Help Zone' started by StangtennisGuru, Feb 13, 2020.

  1. StangtennisGuru

    StangtennisGuru

    Joined:
    Aug 16, 2019
    Messages:
    6
    Resources:
    0
    Resources:
    0
    I have a non-melee custom map, which involves some computer controlled units. Some of these are siege units with an attack for units and one for buildings (they're based on Mortar Teams) and I would like to make these units target buildings rather than units whenever they're within range.

    I don't want other units to focus buildings so I can't just change the attack priority of the buildings so what else can I do? I could probably make some messy triggers that get the job done, but I'm hoping there's a smarter way to do it.

    I know the custom AI has a 'Smart Artillery' option, which sounds like exactly what I need, but when running the AI script for the computer, it doesn't seem to make any difference.
     
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,689
    Resources:
    1
    Spells:
    1
    Resources:
    1
  3. Nowow

    Nowow

    Joined:
    Jun 15, 2016
    Messages:
    443
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    I think smart artillery targeting is based on how the firing unit and the target unit are classified. The classification itself is done in the object editor. So the problem itself could be in the object editor.

    What I suggest is to do the following test:
    Try the same script with actual mortar teams and buildings, not custom units. If the vanilla units display the behavior you want, try replacing the mortar teams with your edited siege only, then try replacing the vanilla buildings with your edited ones. See who breaks the behavior and check the object data accordingly.
     
  4. StangtennisGuru

    StangtennisGuru

    Joined:
    Aug 16, 2019
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Even testing it with melee units and buildings it doesn't seem to work...
    Really would be practical if there just was an option for a unit to prioritize the usage of one of its weapons over the other.
     
    Last edited: Feb 14, 2020
  5. Nowow

    Nowow

    Joined:
    Jun 15, 2016
    Messages:
    443
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Did you create your AI script with the editor? can you upload the file here?
     
  6. StangtennisGuru

    StangtennisGuru

    Joined:
    Aug 16, 2019
    Messages:
    6
    Resources:
    0
    Resources:
    0
    I tried but it doesn't seem to allow WAI files:
    "The uploaded file does not have an allowed extension"
     
  7. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,689
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Put it in a zip/rar/7z/tar/gz/whatever file.
     
  8. StangtennisGuru

    StangtennisGuru

    Joined:
    Aug 16, 2019
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Ahh, thanks. Here it is
     

    Attached Files:

    • AI.rar
      File size:
      294 bytes
      Views:
      2
  9. Nowow

    Nowow

    Joined:
    Jun 15, 2016
    Messages:
    443
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    WAI files are for the AI editor, I need the .ai file itself. You can get it using the export option in the AI editor (should look like a page with a green arrow next to it).

    Then you can upload it by zipping, or simply change the file to a text file, it works too.
     
  10. StangtennisGuru

    StangtennisGuru

    Joined:
    Aug 16, 2019
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Kay, lets try again then
     

    Attached Files: