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.
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.
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.
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
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.
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
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.
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.
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.
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.
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 !!!
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.
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?
@@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.
@@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.
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?
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.
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?
@@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.
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?
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!
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?
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?
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?
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.
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.
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.
@@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)
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?
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.
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.
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'.
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!
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?
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?
@@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.
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?
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.
@@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.
@@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?
@@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.
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
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.
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.
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.
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
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.
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
How did you open those?
@@JwayT Back then I used a program that could open .MPQ files. Now with Reforged file structure I don't know.
@@501stadvisor Okay thanks anyway, it just says the value: name of it but i cannot find it anywhere
You help a lot with those tutorials :) I want to make my own campaign and i will use help from all of your tutorials ;)
Yeah
Do you know how to make the AI build custom units using Jascraft? I tried searching it up but it came up with nothing.
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.
the link of jass demo is downed, can you upload it to somewhere else?
Just checked the link and it seems that it was only temporarily down. It should be fine to download again.
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.
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.
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.
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 !!!
Content::
1) 0:00 what is jass code
2) 2:39 why jass
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.
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?
@@turnro9146 true thanks for answering.
@@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.
@@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.
Could you give a tutorial on how we can give the AI ability to perform dynamic actions like micro, scouting, and creeping?
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?
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.
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?
Jass Demo no longer works unfortunately, but you will still be able to use JassCraft to write your own AI scripts.
@@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.
I've done all this yet my ai I apply it to will just do nothing
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?
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!
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?
Hello turnro do you have any idea how to access and edit campaign AI scripts for warcraft reforged?
Probably by just loading the campaign maps and looking at them
@@joshuabecton4746 there not there. They're referenced but not accessible.
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?
Select "Use Custom Forces" and "Fixed Player Settings" under Scenario -> Scenario Properties from the main menu
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?
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.
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.
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.
@@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)
@@turnro9146 Problem solved :D
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?
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.
@@turnro9146 I see. Thank you for the fast answer
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.
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'.
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!
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?
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?
@@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.
hi i do you have valid download for the program?
To programmers: Check out WurstScript, a scripting lang that supports OOP, doesn't have redundant code, and gets parsed easily to Jass.
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?
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.
Hey Where download warcraft 3 world editor? Pls i download it
The World Editor comes automatically with Warcraft 3.
This is a great troll :D
my script keeps crashing, any ideas why?
What does your script look like?
@@turnro9146 i used the GUI AI editor script as a template
@@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.
@@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?
@@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.
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
perfectly explained
32:32
thats unnececarily complicated if you want to make a perfect working ai
like 99