Warcraft 3 World Editor Tutorial: Creating AI Part 2

Поділитися
Вставка
  • Опубліковано 17 січ 2025

КОМЕНТАРІ • 77

  • @Lordknight13
    @Lordknight13 3 роки тому +2

    I loved playing the campaigns and your AI system is challenging to deal with. Only problem now is that I cannot seem to find a way to play patch 1.30 TFT. Wonder where can I find working patch version. As always sublime video on AI, looking forward to learn more of how the last mission in ROC was designed.

  • @zennii
    @zennii 6 років тому +7

    Wow, a VERY recent tutorial. I lucked out. Any plans to go further into JASS? I used to use the trigger GUI when I was a kid but had no idea there was custom scripts. Do you have any good docs/resources for JASS that you can pass to me as well? I'm a programmer so I can generally make do, mostly could do with a resource that just explains each native to some degree. Thanks.

    • @turnro9146
      @turnro9146  6 років тому +2

      Hey, I don't really have any plans at this stage going into JASS. I only use it for writing AI scripts and customizing the games bg music, but I know some people do like writing triggers using JASS. The only resource I can recommend is a site that taught me how to write AI scripts:
      www.hiveworkshop.com/threads/how-to-make-a-campaign-ai.211549/
      Of course, this will depend on if you want to learn more about JASS to write AI scripts or triggering within actual maps.

  • @501stadvisor
    @501stadvisor 6 років тому +7

    When you were first studying and reverse-engineering the campaign AI, did your head explode when you opened the .ai files from the last missions of the RoC and TFT campaigns (Archimonde and Illidan's .ai files) ? Cuz mine sure did :D

    • @turnro9146
      @turnro9146  6 років тому +4

      Ha ha, no actually. I had been writing AI scripts for some time so I wasen't surprised by it. You don't usually see AI scripts that long for campaigns, its just the last mission requires the AI to do a lot which results in more code.

    • @501stadvisor
      @501stadvisor 6 років тому +4

      True. I went to explore that code before I learned the simple AI scripts. But in time, I was able to figure out most of it, even played a little with Illidan's script file to make the mission more difficult. In the end I couldn't tell if it really worked :D

    • @JwayT
      @JwayT 3 роки тому

      How did you open those?

    • @501stadvisor
      @501stadvisor 3 роки тому +1

      @@JwayT Back then I used a program that could open .MPQ files. Now with Reforged file structure I don't know.

    • @JwayT
      @JwayT 3 роки тому

      @@501stadvisor Okay thanks anyway, it just says the value: name of it but i cannot find it anywhere

  • @Kamilosss54
    @Kamilosss54 4 роки тому +7

    You help a lot with those tutorials :) I want to make my own campaign and i will use help from all of your tutorials ;)

  • @limiteditemeater8167
    @limiteditemeater8167 6 років тому +5

    Do you know how to make the AI build custom units using Jascraft? I tried searching it up but it came up with nothing.

    • @turnro9146
      @turnro9146  6 років тому +5

      You achieve this by referring to the unit's 4-digit code. All units in Warcraft 3, including custom units, have a code that you can use to refer to them within your AI script. To find out what this code is, all you have to do is press Ctrl+D in the Object Editor in World Editor and you will see all unit names replaced by their code. A code will look something like 'nsrp' or 'n001'. You can then type in this code in with AI script surrounded by quotation marks.

  • @ngoctungdao8601
    @ngoctungdao8601 6 років тому +4

    the link of jass demo is downed, can you upload it to somewhere else?

    • @turnro9146
      @turnro9146  6 років тому +2

      Just checked the link and it seems that it was only temporarily down. It should be fine to download again.

  • @nicktusgamers3983
    @nicktusgamers3983 6 років тому +3

    Hello friend, I like your videos, I would like to know the exact names of the units and buildings to be used in jazzcraft. since I am doing an artificial intelligence of night elves and I do not know the correct names that must be put in English. Because they come out with white letters that means that when artificial intelligence runs it will not recognize it.

  • @andioop561
    @andioop561 4 роки тому +1

    How do I make the AI buy zeppelins? As far as I've observed, Insane difficulty computers are able to buy and use zeppelins when the enemy is unreachable by ground. Preferably, I would like to know if this is achievable by the normal AI editor, but any answer is much appreciated.

  • @TheUnknownOtaku
    @TheUnknownOtaku Рік тому

    Do you know how to do advance AI tutorials. Such as If an AI has a hero in a game completely different from the main game, you can command them on where to run, kill, what priority kills, how they use use abilities to attack, what kind of abilities they should use if others have counter buffs, when they should run away to the base, when they should run back just a little bit. So on and so forth.
    Also, is there an easier way to contact you? These sound like pretty good tutorials that would help my map making skills a lot.

  • @strangevideos3048
    @strangevideos3048 3 роки тому

    Dear TURNRO,i have a problem.
    I am trying to finish AI for Burbenog td map,there is a building called Foundry and that building have a custom spell its called "Visionary flame" basic spell is "reveal" neutral hostile -units....i can not find trigger where unit cast spell on ground/unit,there is no Reveal spell ..Please help me to create trigger/code for Foundry to start cast Visionary flame !!!

  • @peasant7214
    @peasant7214 5 років тому +11

    Content::
    1) 0:00 what is jass code
    2) 2:39 why jass

  • @arcturus64
    @arcturus64 5 років тому +3

    Yo Turnro, I love your tutorials, I've never really done more than adding tons of conditions to my AIs to make them more efficient. My question is: Can you have a function that gets called in the main that says "GL HF" at the start of the game? I mean it's as trivial as System.out.println("GL HF"); But I couldn't find any similar command in Jasscraft.

    • @turnro9146
      @turnro9146  5 років тому +1

      Sending messages isn't really a function you can use with the AI as it was never designed for that purpose. Maybe you can send messages through triggers using the World Editor instead?

    • @arcturus64
      @arcturus64 5 років тому

      @@turnro9146 true thanks for answering.

    • @arcturus64
      @arcturus64 5 років тому

      @@turnro9146 I also had another question, I wanted to make an AI that uses transport ships like the human transport ships in WC2 though there's no way to tell the AI to send attack groups that use the transport ships even if you import the unit file and add it to the attack group. Any idea? I mean it kinda works when you tell the AI to use zepplins and I know the Campaign AI uses some custom transport units to attack you in the night elves/undead campaigns.

    • @turnro9146
      @turnro9146  5 років тому

      @@arcturus64 You will be able to achieve this using AI scripts made via Jass code. Provided that the AI player has transport units, they will automatically use them if the path to the enemy base cannot be reached by walking there.

  • @mozhou8935
    @mozhou8935 Рік тому

    Could you give a tutorial on how we can give the AI ability to perform dynamic actions like micro, scouting, and creeping?

  • @angelrobotrobot5676
    @angelrobotrobot5676 2 роки тому

    But where do you use the ai script at? I watched the video a couple of times and couldn't see how you integrate it into the actual game. Does anyone know the timestamp?

  • @KnightMagnet
    @KnightMagnet 3 роки тому

    Hey Turnro,I have problem creating the AI
    I have tried both AI editor within the WE and Jass craft but when I run the AI script in game,The AI doesn’t do anything. It just sits there as if there’s no AI script. Is that because of my WC3 or WE?I did exact same code and AI edit as you but the AI doesn’t seem to work. The only thing that work is with WE my acolyte does summon a necropolis but then it stops. The next command is to build haunted goldmine and then build summoning pit(custom unit) but it doesn’t work.
    Please help me if possible. I really don’t want my custom map to be wasted.

  • @stuckovstuck
    @stuckovstuck 5 років тому +1

    Very helpfull. But current patch 1.30 and above do not longer have an MPQ file so there is no Jazz Editor available anymore. Do you have an idea how to run it anyware?

    • @turnro9146
      @turnro9146  5 років тому +1

      Jass Demo no longer works unfortunately, but you will still be able to use JassCraft to write your own AI scripts.

    • @turnro9146
      @turnro9146  5 років тому +1

      @@jvjbfradio8349 Blizzard changed the core structure of the Warcraft 3 data files in v1.29+, so numerous files don't exist anymore. Fortunately, JassCraft can still be used to write AI scripts.

  • @limiteditemeater8167
    @limiteditemeater8167 6 років тому +2

    I've done all this yet my ai I apply it to will just do nothing

    • @turnro9146
      @turnro9146  6 років тому +1

      Without looking at you map, it is difficult to know what the problem is. Have you:
      - Run JASS Syntax Checker to check for coding mistakes?
      - Imported the AI script into the map and assigned it to a player?
      - Given the AI starting resources?

  • @caphius6095
    @caphius6095 2 роки тому

    Hey, long time no see! I was just wondering if you would be able to help me in figuring out how to level hero abilities in the AI jass script. It'd really be appreciated, thanks!

  • @groxiverde
    @groxiverde 4 роки тому

    What should I do when I created the JASS file? Save it as 'example.ai' and then importing it into the map with the Asset Manager? And then create a trigger called 'AI - Start campaign AI sript for Player 2 (Blue): war3mapImported\example.ai'? I did this but the workers don't do anything they just harvest gold and that's all. Damn. Can you help me please?

  • @JwayT
    @JwayT 3 роки тому

    Hello turnro do you have any idea how to access and edit campaign AI scripts for warcraft reforged?

    • @joshuabecton4746
      @joshuabecton4746 3 роки тому

      Probably by just loading the campaign maps and looking at them

    • @JwayT
      @JwayT 2 роки тому

      @@joshuabecton4746 there not there. They're referenced but not accessible.

  • @eatshit50
    @eatshit50 5 років тому

    Hi turnro, how do i make myself and other player to have the same starting location every game? My problem is the starting location keeps randomizing. How do i make it stay at that one spot?

    • @turnro9146
      @turnro9146  5 років тому

      Select "Use Custom Forces" and "Fixed Player Settings" under Scenario -> Scenario Properties from the main menu

  • @oariu
    @oariu 6 років тому

    Hi Turnro, very nice and helpful tutorial. I learned a lot just from watching this, but it seems that i encountered an issue with my script. Everything is performing as expected but the AI seems to hold off on wood harvesting until it has a couple of buildings and units. Does the AI script in Jass require that i specify which worker is defined for wood/gold?

    • @turnro9146
      @turnro9146  6 років тому

      Usually what happens is that AI workers will only harvest resources if they have nothing else to do. So at the start of the script when you order them to build structures, they will usually busy themselves with that before collecting gold or lumber.

  • @Holdegron3
    @Holdegron3 4 роки тому

    Hi Turnro, I will be lucky if you will answer me, anyway ... Firstly, great tutorials 👍. Secondly, I need little help. In my map I want 3 PC players, 2 of them just regular PC as in every melee and the third one with my custom AI. For this purpose I cannot use Run melee AI script (for computer players) because in that case “Start melee AI script for player...” for my third PC player does not work, it cant overwrite melee script for all computers, so the third player is just normal melee after that. Because of this, I need to start melee script for each PC player individually via “Start melee AI script”. My question is, where can I find the blizzard’s AI script for melee which is used in every normal map for single/multiplayer map in warcraft 3? 😅 You know, that one which starts everytime with “Run melee AI scripts (for computer players)”. I am not able to find it enywhere. It would be very helpful. Thank you.

    • @turnro9146
      @turnro9146  4 роки тому +1

      Providing you have an old version of Warcraft 3, you will need an MPQ editing program to extract data from the game files. The AI will be in a folder called 'Scripts' and will have names such as human.ai, elf.ai, orc.ai and undead.ai. Once you have the AI files, you will be able to import them into your map and apply them to individual player teams.

    • @Holdegron3
      @Holdegron3 4 роки тому

      @@turnro9146 Thank you for reply.
      I tried this, unfortunately another problem showed up.
      When I tried to extract anything from W3 (map, script, sound, ...) extraction failed with a message "Failed to extract the file "..." Access denied." I cant find if somebody had this kind of error too.
      I have Ladik's MPQ editor, I tried to extract files with the newest and also with the older version, but result is the same. :/
      I don't know where is the problem, when I watch some videos on youtube about extracting files with MPQ editor, everything works fine for them.
      W3 (RoC + THT) is version 1.27a (czech version)

    • @Holdegron3
      @Holdegron3 4 роки тому

      @@turnro9146 Problem solved :D

  • @lassebangsgaard9422
    @lassebangsgaard9422 4 роки тому

    Hello Turnro
    I am currently making a Co-op commander map for Warcraft 3 Reforged. I have watched the entirety of both of your AI tutorials and it makes perfect sense. My problem is, when i write the exact same code as in this demo, some of the code will not have any change in color. Do you know what i am doing wrong?

    • @turnro9146
      @turnro9146  4 роки тому

      Unfortunately, the coloring is something that worked only in versions v1.28 or lower for Warcraft 3. Jass Editor relies on certain files existing in the Warcraft 3 directory which were either moved or deleted when the game was majorly patched some time ago.

    • @lassebangsgaard9422
      @lassebangsgaard9422 4 роки тому

      @@turnro9146 I see. Thank you for the fast answer

  • @MultiRodro
    @MultiRodro 4 роки тому

    Hello Turnro, I appreciate your teachings but I had a question, how do I do it so that Anub arack will attack me at my base, if Anub Arack does not appear in Jasscraft, how do I do it? thanks in advance friend.

    • @turnro9146
      @turnro9146  4 роки тому

      You can write order commands with any unit providing you know their 4-code reference (which you can view in the World Editor by going to the Object Editor window and pressing Ctrl+D). Anub'arak's code is 'Uanb'.

  • @alexdexter660
    @alexdexter660 3 роки тому

    Two questions:
    1:I understand that the 3 numbers represents difficulty but why sometimes looks like this
    JASS:
    call SetBuildUnit ( 8, CHAOS_PEON )
    It has only one difficulty (I believe the easy one) ,what the difference between that one and this one
    JASS:
    call SetBuildUnit ( 8,9,10,CHAOS_PEON )
    And number 2:
    JASS:
    //[B]* WAVE 1 *[/B]
    call InitAssaultGroup()
    call CampaignAttackerEx( 1,1,1, ORC_DRAGON )
    call SuicideOnPlayer(M5,user)
    //[B]* WAVE 2 *[/B]
    call InitAssaultGroup()
    call CampaignAttackerEx( 3,3,5, CHAOS_GRUNT )
    call CampaignAttackerEx( 1,1,1, CHAOS_GROM )
    call SuicideOnPlayerEx(M6,M6,M5,user)
    In the first wave there is only one reference "M5" in the second wave there are 3 "M6,M6,M5" why is that as well , I tried țo modified that line by adding additional references like
    JASS:
    //[B]* WAVE 1 *[/B]
    call InitAssaultGroup()
    call CampaignAttackerEx( 1,1,1, ORC_DRAGON )
    call SuicideOnPlayer(M5,M4,M3,user)
    I tested the map to see if its any difference and in my surprise the ai does not do anything except for gather all of the peons to gold mine
    Ty for your time!

  • @XenomorphEmpress
    @XenomorphEmpress 4 роки тому

    Hey there I was wondering if it was possible to edit two different race AI? You know like get the night elves to build their NE shipyard and also have the humans build their human shipyard? or is that not possible?

    • @turnro9146
      @turnro9146  4 роки тому

      I'm not sure if allowing the AI to build shipyards works (as they can only be placed on shallow water), but it is possible to allow your own AI scripts to build ships from a shipyard. What are you trying to do in your map?

    • @XenomorphEmpress
      @XenomorphEmpress 4 роки тому

      @@turnro9146 Thank you for replying, I am trying to get my AI to be able to island hop while still sticking to their race theme, as two of my startup locations are on somewhat small islands.

  • @eliazencot
    @eliazencot 3 місяці тому

    hi i do you have valid download for the program?

  • @noahfowler1
    @noahfowler1 6 років тому

    To programmers: Check out WurstScript, a scripting lang that supports OOP, doesn't have redundant code, and gets parsed easily to Jass.

  • @haydonc5256
    @haydonc5256 5 років тому

    Hey Turnro, I really appreciate you taking the time to explain this. I have a question, so in one of my AI scripts I have written for a map, I have used the CampaignDefenderEx call to specify the enemy hero and two other different units to patrol around the town hall, but when I play the map, the AI builds WAY more than 3 defender's and builds different unit types to defend that I haven't even specified within the code, do you know why this is happening?

    • @turnro9146
      @turnro9146  5 років тому

      Without looking at your map, it is difficult to know exactly why this is happening as there can be many reasons why. I will be redoing the AI tutorials at some point to better clarify how they work though.

  • @cjcastroph2004
    @cjcastroph2004 6 років тому

    Hey Where download warcraft 3 world editor? Pls i download it

    • @turnro9146
      @turnro9146  6 років тому

      The World Editor comes automatically with Warcraft 3.

    • @flyinghead1147
      @flyinghead1147 6 років тому

      This is a great troll :D

  • @johnsterling5425
    @johnsterling5425 2 роки тому

    my script keeps crashing, any ideas why?

    • @turnro9146
      @turnro9146  2 роки тому +2

      What does your script look like?

    • @johnsterling5425
      @johnsterling5425 2 роки тому

      @@turnro9146 i used the GUI AI editor script as a template

    • @johnsterling5425
      @johnsterling5425 2 роки тому

      @@turnro9146 Whenever I load up the global variables, it doesn't run. any ideas? sorry to ask so many questions.
      Thank you for posting. Making an AI can get frustrating because there are such few resources regarding AI.

    • @turnro9146
      @turnro9146  2 роки тому

      @@johnsterling5425 Without knowing what your ai script and variables look like, it is hard for me to suggest what the probelm could be. Perhaps some screenshots?

    • @johnsterling5425
      @johnsterling5425 2 роки тому

      @@turnro9146 hey thank you and sorry to bug you. but i actually found the problem. I was setting duplicate constants, i.e. ones already defined in the common.ai file.

  • @ArchosFangor369
    @ArchosFangor369 5 років тому

    Can you make AI's on my custom map to buy Custom Heros and use Custom Spells plus i have my custom workers and items on map & some units that only heros can buy sorry my english is bad or can you somehow help me by createing video the explain me that i can sand you a link of my map plz :D

  • @psherman3816
    @psherman3816 3 роки тому

    perfectly explained

  • @adamsme1314
    @adamsme1314 5 років тому

    32:32

  • @dimitardimitrov4403
    @dimitardimitrov4403 3 роки тому

    thats unnececarily complicated if you want to make a perfect working ai

  • @laurililleoks9595
    @laurililleoks9595 5 років тому

    like 99