• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

An AI maker needed

Status
Not open for further replies.
Basic AI is quite easy with AI editor. You can check those sample AIs included in the game to see how it works and then you may read some tutorials to improve your knowledge. It works with custom races too as long you don't give a race a complicated trigger heavy mechanics. Otherwise making AI is no harder than basic triggering.
Will you create it for me??
 
Level 25
Joined
May 11, 2007
Messages
4,651
Since you doesn't use any custom units for the Undeads, I just felt this was enough:
  • Run this trigger to activate AI
    • Events
    • Conditions
    • Actions
      • -------- Since purple doesn't use any custom units, just run the normal AI scripts for him --------
      • -------- We also ignore all preplaced normal units --------
      • Player - Set Player 4 (Purple) Food used to 0
      • Player - Set Player 4 (Purple) Current gold to 60000
      • Player - Set Player 4 (Purple) Current lumber to 60000
      • AI - Ignore the guard positions of all Player 4 (Purple) units
      • Melee Game - Run melee AI scripts (for computer players)
Just create it manually and run the trigger when the cinematic finishes.
My editor is a bit wonky right now.
 
Since you doesn't use any custom units for the Undeads, I just felt this was enough:
  • Run this trigger to activate AI
    • Events
    • Conditions
    • Actions
      • -------- Since purple doesn't use any custom units, just run the normal AI scripts for him --------
      • -------- We also ignore all preplaced normal units --------
      • Player - Set Player 4 (Purple) Food used to 0
      • Player - Set Player 4 (Purple) Current gold to 60000
      • Player - Set Player 4 (Purple) Current lumber to 60000
      • AI - Ignore the guard positions of all Player 4 (Purple) units
      • Melee Game - Run melee AI scripts (for computer players)
Just create it manually and run the trigger when the cinematic finishes.
My editor is a bit wonky right now.
Sadly, that was not good! Melee AI is not suitable for a campaign. I have to do another way for this problem or should find an advanced AI maker.
Anyway, thanks!
 
Level 25
Joined
May 11, 2007
Messages
4,651
Sadly, that was not good! Melee AI is not suitable for a campaign. I have to do another way for this problem or should find an advanced AI maker.
Anyway, thanks!
What isn't good with this?

You have to give me something to work with, do you want a custom AI just because it's a custom AI or did you intend to have the AI do something special?
Because all you said was "I want purple to attack night elves".
Which my trigger does. With heroes and units.

I mean, I could whip up an AI with the AI editor, but I didn't see the point.

Btw are you using the campaign editor for this map? Cuz I saw some missing models..
 
You have to give me something to work with, do you want a custom AI just because it's a custom AI or did you intend to have the AI do something special?
Well, I want that purple base attack night elves with only Legion units(Doomguard and Infernal and ....). And in your trigger when purple base attack night elves, they return to their base and I want to stay and fight. So, you should make an AI that only attack with Legion units and should be done with waves in 15 minutes.
Btw are you using the campaign editor for this map? Cuz I saw some missing models.
Yes, I use it.
 
Level 25
Joined
May 11, 2007
Messages
4,651
...

You asked me to create an AI based on the map you gave me.
Then it's up to you to make sure the AI can build the units you want them to build.

Get your stuff working then I can do it for you.
 
Level 12
Joined
Jun 15, 2016
Messages
472
For the sake of everyone involved, this is an undead campaign ai template. But before I give it to you, some instructions:

1. In order to use this script, copy it to a notepad, save it, and change the file extension from ".txt" to ".ai". Then, import the script to the map and run it with this trigger:
  • AI - Start campaign AI script for Player 4 (Purple): map.ai
.

2. All units/buildings/everything (also custom units) in the script are represented by 4 letter strings. For example, 'ugho' = ghoul. To find those out, go to your object editor and press ctrl+d.
all functions must be used with the word "call" at the beginning.
you should write the number of the player where I wrote "TYPEPLAYERHERE". for example red player is PlayerEx(1).

3. To add buildings, type under BLOCK 1 the following function SetBuildUnitEx(e,n,h,u) with e=total amount of buildings on easy difficulty, n=total amount of buildings on normal difficulty, h=total amount of buildings on hard difficulty and u=the building type you want to build. by total amount I mean that if you want to build 2 ziggurats (in all difficulties), then 1 graveyard, then 2 more ziggurats you'll need to type this:

JASS:
call SetBuildUnitEx( 2,2,2, 'uzig')
call SetBuildUnitEx( 1,1,1, 'usep')
call SetBuildUnitEx( 4,4,4, 'uzig')

4. To add defenders, type under BLOCK 2 the following function CampaignDefenderEx(e,n,h,u) with e=total amount of units on easy difficulty, n=total amount of units on normal difficulty, h=total amount of units on hard difficulty and u=the unit type you want to build. Essentially the same as with buildings.

5. To add an attack wave type under BLOCK 3 the following functions:
JASS:
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,4, 'ugho')
call SuicideOnPlayerEx( M2,M2,M2, user)
for example this part will send an attack wave of 4 ghouls after 2 minutes. specify the units that you want to attack in this function call CampaignAttackerEx(e,n,h,u), it works the same as previous functions. Last thing, you should specify how long the attack wave should wait before moving out with this function SuicideOnPlayerEx(e,n,h,user) when e=waiting time in easy difficulty, n=waiting time in normal difficulty, h=waiting time in hard difficulty. all waiting time is set in minutes: M1=1 minute, M2=2 minutes and so on. user is set in the beginning of the script so don't worry about it.

Make sure that you give the ai player enough time between big attack waves. For example, if you make an attack wave with 5 abominations, they can't be ready after 1 minute, so set it to something like this:
JASS:
call InitAssaultGroup()
call CampaignAttackerEx( 5,5,5, 'uabo')
call SuicideOnPlayerEx( M7,M6,M5, user)

Without further ado, this is the template:


JASS:
globals
    player user = PlayerEx(TYPEPLAYERHERE)
endglobals

function main takes nothing returns nothing
    call CampaignAI('uzig',null)
    call DoCampaignFarms(false)
    call SetHarvestLumber(true)

    //BLOCK 1 - write your buildings here

   //BLOCK 2 - write your defenders here

  //BLOCK 3 - write your attackers here

endfunction
 
Status
Not open for further replies.
Top