Custom Melee AI

Cdo

New Member
Reaction score
5
Hi, I've changed a regular wc3 map to make it a coustem melee map with my own units etc.
the ai now no-longer works with my map (what where the chances lol :))
so i've tried to get the ai working with the ai editor, I havn't changed the undead or night elf races AT ALL yet and these are the two races I want the AI to be able to play but unfortunatly they can't, now I can assume this is because I removed the create starting units for all players initialisation command and replaced it with one to create all the starting units for my spechial races.
so I was wondering if anyone knew a way in which I could get this working again. Here's my replacement for the melee initialisation code if it helps.

Trigger:
  • Starting Units
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of (Picked player)) Equal to Human
                • Then - Actions
                  • Unit - Create 1 Fort for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Create 4 Worker for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Create 1 Builder for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of (Picked player)) Equal to Orc
                • Then - Actions
                  • Unit - Create 1 Hive for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Player - Add 500 to (Picked player) Current gold
                  • Player - Add 500 to (Picked player) Current lumber
                  • Unit - Create 1 Harvester for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Create 3 Scibby for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Create 1 Scorpex for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Create 1 Hive Lord for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of (Picked player)) Equal to Undead
                • Then - Actions
                  • Unit - Create 1 Necropolis for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle Nearby Gold Mine
                  • Unit - Create 1 Acolyte for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Create 1 Acolyte for (Picked player) at (((Picked player) start location) offset by (6.00, 6.00)) facing Default building facing degrees
                  • Unit - Create 1 Acolyte for (Picked player) at (((Picked player) start location) offset by (12.00, 12.00)) facing Default building facing degrees
                  • Unit - Create 1 Acolyte for (Picked player) at (((Picked player) start location) offset by (-6.00, -6.00)) facing Default building facing degrees
                  • Unit - Create 1 Acolyte for (Picked player) at (((Picked player) start location) offset by (12.00, -6.00)) facing Default building facing degrees
                  • Unit - Create 1 Ghoul for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of (Picked player)) Equal to Night Elf
                • Then - Actions
                  • Unit - Create 1 Tree of Life for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                  • Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle Nearby Gold Mine
                  • Unit - Create 5 Wisp for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                • Else - Actions
            • Else - Actions


if anyone knows the actual code in the melee initialisation that may be helpfull to me btw, any help would be great and thanks in advance.
 

X-maul

AKA: Demtrod
Reaction score
201
there is an action named "Run Melee AI..." you've probably removed it.
 

Accname

2D-Graphics enthusiast
Reaction score
1,465
and the AI's wont use custom made units by default. you would have to write a new AI for this purpose.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top