Confused on how to make AI on custom map

Hi there!

I have been trying to play around with a custom map but I can’t seem to get the computers to attack my team.

I know I have to set a script for the AI, the problem is, what I have googled has me confused. One of the guides was talking about having to download python and some other programs and my head just started to spin with all the details.

My goal is to be able to have a custom map that I can have two (or more) teams of up to 5 players on each side. I want to be able to choose whether to play in any combination of forces (ie 1v5, 2v3, 3v5 etc). I know there are different “difficulties” of ai script but I wanted the most “challenging” one which I believe is “insane”.

I also want to be able to randomize or be able to select the computer opponents and not have set races.

I would like to have set starting positions for the human players and set locations for the computer players (basically just to make sure they start on the opposite site of the map the humans start on)

Is what I am asking for out of reach? Is there a simple(r) way to do it than coding it all in python?

I basically want to be able to play with my friends vs computers on set locations in a custom map.

I believe blizzard aready has damage modifiers in warcraft 3 in insane difficulty, probably copyright protected, and have maps have official blizzard logo in 32 bit system. But if you are developing something in blizzard in 64 bit and to my knowledge developing out of 64 bit computer system might be redundunt or not yet possible because of viruses floating around.

Hey, AshFaden.

I’m not quite sure what python is, but I think most of what you want is obtainable without it. I think the most players you can have in a game of StarCraft at once without modding is eight (8) meaning that the most you have for equal teams is 4 players on each side, however I might be mistaken by this(couldn’t get the last 4 of the 12 player slots to work).

I made a post replying to someone with a similar question that might help you although I don’t mind giving you extra help if you’re still confused.
https://us.forums.blizzard.com/en/starcraft/t/needing-help-with-map-creation-for-3vx-games/3242/3

Hope this helps.

2 Likes

If this hasn’t changed since before Remastered, that’s correct. Only players 1 through 8 can use triggers. If the last 4 players have triggers assigned, they will ignore them.

4 Likes

Glad you (not)liked it :frowning:
http://www.staredit.net/topic/18202/

You can modify AI’s with that guide, but I believe what you want is something like:
is Player Terran? Start Terran insane AI
is Player Protoss? Start Protoss Insane AI
is Player Zerg? Start Zerg Protoss Insane AI

To assign an AI script, in SCMDraft

  1. place a Location over a player TownCenter building, or Start Location, if the player doesn’t have a previous building
  2. Go to Triggers/Classic Map Triggers and create a new Trigger
  3. Select the Player to which you want to assign the AI
  4. In Condition, set the condition you want the AI to start. For example, Player 1 Owns at Least 1 Nexus
  5. In Action, select Run AI script at Location and select, for example, Protoss Campaign Insane (for Vanilla) or Expansion Protoss Campaign Insane (for BW) and the location you want the AI to run.

The AI will start training stuff and expanding and attacking.

Make sure to set Forces accordingly.

4 Likes

Thank you! This was very helpful. I have got the USM working now, but I was wondering if there was a way to have it so I could either pick the computer players to be random or if they have to be pre-set.

Also, I was wondering if its possible to make it so I could choose to play X vs Y (x being number of humans and y being number of computer players) instead of pre-assigning the number of players in USM…or do I just have to make a separate save with the desired amount of human players vs computers?

I apologize if what I wrote sounds confusing

1 Like

It’s no problem.

I think if you set the computer players to “User Select” in the “Map Properties” tab, you can chose whatever their races are random or predefined in the game lobby. I imagine the triggering would be along the lines of:

Players: All Players
Conditions: Current Player Commands At Least 1 (Nexus/Command Center/Hatchery)
Actions: Center Location X on (Nexus/Command Center/Hatchery) owned by Current Player at Anywhere.
Execute AI Script (Protoss/Terran/Zerg) Campaign Insane at Location X.

(Note: for this to work, my guess would be to create one location box the size of a mining structure for Location X. 3 separate triggers would then need to be made for the different races to run. ei: 1 for Protoss, 1 for Terran, and 1 for Zerg).

I think the amount of Human players is dependent on the number of them present in the game lobby. The amount of Computer players I think can be changed in game if you use a select system through triggers. For this to work the easiest, it would probably be best to place 1 Civilian owned by one of the Human players along with 4 different Beacons. A Location Box would then need to be created for each beacon and labeled 0-3 to indicate the number of Computer players you want to remove. I imagine the triggering would be like:

Players: Player X
Conditions: All Players Command at Least 1 Beacon
All Players Bring at Least 1 men at Location(0/1/2/3)
Actions: Remove All Any Units for Current Player
Remove All Beacons for All Players

(Note: for this to work, my guess is to make 1 trigger for each Location Box to remove the set number of Computer players. ei: Location 1 removes 1 Computer player, Location 2 removes 2 Computer players, etc. This can be done easily by copying the trigger and checking the Computer players you want removed for the other locations. ei: The trigger for Location 1 would have 1 Computer player checked off, The trigger for Location 2 would have 2 Computer players checked off, etc.[the “Remove All Any Units for Current Player” action for the trigger on Location 0 can be deleted]).

Hope this helps.

haha, thats the one! I am sorry, I am not that tech savvy and I am easily intimidated by having to code or download multiple programs for things, but what you wrote out here is very clear and I understood it perfectly. Thanks to your advice I was able to get it going.

my only other question is one that I wrote abouve but I will copy and paste it below:

I was wondering if there was a way to have it so I could either pick the computer players to be random or if they have to be pre-set.

Also, I was wondering if its possible to make it so I could choose to play X vs Y (x being number of humans and y being number of computer players) instead of pre-assigning the number of players in USM…or do I just have to make a separate save with the desired amount of human players vs computers?

I apologize if what I wrote sounds confusing

Thanks again for your help and posts, I really appreciate it.

1 Like

I believe there’s no other way but this

Check out Scenario/Map properties