• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:10
CET 10:10
KST 18:10
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Intel X Team Liquid Seoul event: Showmatches and Meet the Pros5[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3
Community News
Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win52025 RSL Offline Finals Dates + Ticket Sales!9BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION1Crank Gathers Season 2: SC II Pro Teams10Merivale 8 Open - LAN - Stellar Fest4
StarCraft 2
General
Intel X Team Liquid Seoul event: Showmatches and Meet the Pros Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win Weekly Cups (Oct 13-19): Clem Goes for Four RotterdaM "Serral is the GOAT, and it's not close" DreamHack Open 2013 revealed
Tourneys
SC4ALL $6,000 Open LAN in Philadelphia Merivale 8 Open - LAN - Stellar Fest Crank Gathers Season 2: SC II Pro Teams 2025 RSL Offline Finals Dates + Ticket Sales! $5,000+ WardiTV 2025 Championship
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment
Brood War
General
SnOw's ASL S20 Finals Review BW General Discussion [ASL20] Ask the mapmakers — Drop your questions BGH Auto Balance -> http://bghmmr.eu/ Ladder Map Matchup Stats
Tourneys
[ASL20] Grand Finals Small VOD Thread 2.0 The Casual Games of the Week Thread BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION
Strategy
Current Meta How to stay on top of macro? PvZ map balance Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread The Big Programming Thread Things Aren’t Peaceful in Palestine YouTube Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread MLB/Baseball 2023 Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
KPDH "Golden" as Squid Game…
Peanutsc
Reality "theory" prov…
perfectspheres
The Benefits Of Limited Comm…
TrAiDoS
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1625 users

Custom map with Computer players?

Forum Index > SC2 Maps & Custom Games
Post a Reply
Coldlogic
Profile Joined December 2008
United States116 Posts
November 15 2012 19:53 GMT
#1
I am creating a training map and I would like to be able to allow computer players to be opponents. However, when ever I add an AI and start the game, none of the triggers fire. So no units get created, no menus show, and its basically a screen of the map covered in fog of war because you aren't able to do anything at all. Is there some setting I have missed that allows computer players on custom maps?

If I run the map with just me in the lobby (no computer players), all of the triggers work fine and everything. I thought this might be an acceptable solution, and then would just initialize the computer in the game. However, when I try to start the AI, the computer player doesn't move or do anything. It doesn't start gathering resources and leaves all its workers idle. I have tried both MeleeInitAI() and AIStart(2, false, 200) in an effort to make the computer player do something, but they are proving to be rather stubborn. Am I missing another function call to get the AI players going or something?

These all seem like easy questions that someone with more experience knows how to solve in a matter of seconds, but I really can't figure out what to do.

I've also posted on the SC2 Forums here: http://us.battle.net/sc2/en/forum/topic/7163736306
Quakecomm
Profile Joined April 2012
United States344 Posts
November 16 2012 01:32 GMT
#2
Did you try putting the A.I. in in the map editor instead of adding them in the lobby?
Just a thought, I don't know if it would under mind your map.
gorkey island is the only good map
The_Frozen_Inferno
Profile Joined September 2012
Canada98 Posts
November 16 2012 02:33 GMT
#3
SC2mapster is probably a better place to go than here or Bnet. . . the skilled mappers don't really frequent Bnet or TL.

***

I'm not sure about all the details of your map, so some of this might not apply:

And I'm no expert at triggers, but if it's just getting the units to go to do standard melee stuff, use the default built-in start triggers.

F6 to open trigger menu:

Event: Map initialization (or map restart, or whatever event you have going on)

Action: set melee starting resources for all players
Action: create melee starting units for all players
Action: start the melee AI for all computer players
Action: set default melee options for all players

If I recall correctly, initializing the melee AI only gets it ready for use (for example, if a human player leaves the game, you have to initiate the AI for that player if you want a bot to take over for that player.) But you have to actually 'start' the AI for it to take effect and start doing stuff. And there are 2 different sets of default AI that you have to specify between (melee of campaign)


When you add an AI player in the lobby, it already initializes the AI, so the basic melee triggers just start it. But if you just spawned a base after game initialization for player N, then you have to initialize the AI for player N and then after that start the melee AI.

And you also have to make sure that you set the proper melee options and resources for the AI or it doesn't know what to do.
Also, did you add proper starting location markers for each player? If you don't, the melee AI doesn't work properly either.
In Bizarro World, I ladder more than I make custom maps
Coldlogic
Profile Joined December 2008
United States116 Posts
November 16 2012 06:38 GMT
#4
On November 16 2012 10:32 Quakecomm wrote:
Did you try putting the A.I. in in the map editor instead of adding them in the lobby?
Just a thought, I don't know if it would under mind your map.


Yes, I have game variants for 1v1 vs comp and 1v1 vs player, the variant forces the computer player to the second team. I suppose i could try hard coding the player property to a computer, however I am really looking to make it to where you can add an AI player or invite a friend regardless of which variant you choose. I've noticed that YABOT maps do this. You can add a computer player and every trigger fires regularly, however they use the Green Tea AI suite, so maybe that has something to do with it. I'm currently digging through their tens of thousands of lines of code to try and figure out how they are doing what I seem to be unable to accomplish.

On November 16 2012 11:33 The_Frozen_Inferno wrote:
SC2mapster is probably a better place to go than here or Bnet. . . the skilled mappers don't really frequent Bnet or TL.


Yea, I kinda felt that SC2Mapster seemed dead. I'll try posting there and pray for a response.

I'm not sure about all the details of your map, so some of this might not apply:

And I'm no expert at triggers, but if it's just getting the units to go to do standard melee stuff, use the default built-in start triggers.

F6 to open trigger menu:

Event: Map initialization (or map restart, or whatever event you have going on)

Action: set melee starting resources for all players
Action: create melee starting units for all players
Action: start the melee AI for all computer players
Action: set default melee options for all players

If I recall correctly, initializing the melee AI only gets it ready for use (for example, if a human player leaves the game, you have to initiate the AI for that player if you want a bot to take over for that player.) But you have to actually 'start' the AI for it to take effect and start doing stuff. And there are 2 different sets of default AI that you have to specify between (melee of campaign)


When you add an AI player in the lobby, it already initializes the AI, so the basic melee triggers just start it. But if you just spawned a base after game initialization for player N, then you have to initialize the AI for player N and then after that start the melee AI.

And you also have to make sure that you set the proper melee options and resources for the AI or it doesn't know what to do.
Also, did you add proper starting location markers for each player? If you don't, the melee AI doesn't work properly either.


A little background on my map: It is a terrain port of Cloud Kingdom. I have the hopes of creating a customizable script that I just import to any terrain map and then the system I am implementing will work on said map. This way I can easy add new map pool maps to the system. So all the start locations are accounted for. The first screen the player sees is a menu where they are able to choose between the three races, a league goal (this sets constraints such as # of supply blocks allowed and max energy per energy unit), and then a step of the training system that restricts tech. After a person chooses a step, the game begins. Here is my AI init function


void InitAI() {
      if(numberOfPlayers == 1) {
            playerRaces[1] = RandomRace();
            CreateStartingUnits(2);
            Wait(3.0, c_timeReal);
            Log("Starting AI");
            MeleeInitAI();                   //This is the "Init Melee AI for All Players" trigger
            AIStart(2, false, 200);       // Starts melee AI for player 2 with 200 apm
      }
}


So i make a random race for the computer. Creating their melee starting units (base + 6 workers). I put in a wait because I thought there might be a chance that the units weren't ready, so initing the AI wasn't having the effect, but this didnt work either. Then I init the melee AI, and start a new melee ai for player 2.
Please log in or register to reply.
Live Events Refresh
Replay Cast
09:00
Crank Gathers S2: Playoffs D2
CranKy Ducklings28
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
OGKoka 66
StarCraft: Brood War
Hyuk 3484
Mong 448
actioN 324
Stork 226
JulyZerg 95
PianO 89
Aegong 80
Sharp 59
Sacsri 35
NaDa 35
[ Show more ]
NotJumperer 16
Dota 2
XaKoH 569
ODPixel296
League of Legends
JimRising 774
Counter-Strike
shoxiejesuss581
Heroes of the Storm
Khaldor25
Other Games
summit1g16670
singsing937
ceh9346
Happy145
NeuroSwarm61
Organizations
Counter-Strike
PGL6586
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• LUISG 18
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• iopq 0
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos2100
• Lourlo682
Upcoming Events
WardiTV Invitational
2h 50m
ByuN vs Spirit
herO vs Solar
MaNa vs Gerald
Rogue vs GuMiho
Epic.LAN
2h 50m
CrankTV Team League
3h 50m
BASILISK vs Team Liquid
Epic.LAN
1d 2h
BSL Team A[vengers]
1d 4h
Dewalt vs Shine
UltrA vs ZeLoT
BSL 21
1d 9h
BSL Team A[vengers]
2 days
Cross vs Motive
Sziky vs HiyA
BSL 21
2 days
Replay Cast
2 days
Wardi Open
3 days
[ Show More ]
Monday Night Weeklies
3 days
Sparkling Tuna Cup
4 days
Replay Cast
4 days
The PondCast
6 days
Liquipedia Results

Completed

CSL 2025 AUTUMN (S18)
WardiTV TLMC #15
Eternal Conflict S1

Ongoing

BSL 21 Points
BSL 21 Team A
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
CranK Gathers Season 2: SC II Pro Teams
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025

Upcoming

SC4ALL: Brood War
YSL S2
BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.