• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 12:59
CET 18:59
KST 02:59
  • 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
RSL Revival - 2025 Season Finals Preview7RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3
StarCraft 2
General
RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced
Tourneys
RSL Offline Finals Info - Dec 13 and 14! Tenacious Turtle Tussle 2025 RSL Offline Finals Dates + Ticket Sales! Sparkling Tuna Cup - Weekly Open Tournament StarCraft2.fi 15th Anniversary Cup
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ [BSL21] RO8 Bracket & Prediction Contest BW General Discussion FlaSh on: Biggest Problem With SnOw's Playstyle Let's talk about Metropolis
Tourneys
[ASL20] Grand Finals [BSL21] RO8 - Day 2 - Sunday 21:00 CET [BSL21] RO8 - Day 1 - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Fighting Spirit mining rates Current Meta
Other Games
General Games
Dawn of War IV Path of Exile Stormgate/Frost Giant Megathread Awesome Games Done Quick 2026! Nintendo Switch Thread
Dota 2
Official 'what is Dota anymore' discussion
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
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
How Sleep Deprivation Affect…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1710 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
Next event in 2h 1m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 130
JuggernautJason107
BRAT_OK 88
MindelVK 79
StarCraft: Brood War
Britney 22288
Calm 2926
Horang2 504
Mini 332
EffOrt 224
ggaemo 58
Zeus 55
scan(afreeca) 51
Mong 37
Noble 6
[ Show more ]
Dewaltoss 0
Dota 2
Gorgc6619
qojqva2388
Counter-Strike
fl0m16578
byalli551
chrisJcsgo76
Super Smash Bros
hungrybox134
Heroes of the Storm
Khaldor685
Liquid`Hasu486
Other Games
Beastyqt753
B2W.Neo730
ToD184
XaKoH 94
ArmadaUGS92
TKL 7
OptimusSC25
Organizations
StarCraft 2
ComeBackTV 851
Other Games
WardiTV672
gamesdonequick185
StarCraft 2
angryscii 24
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• HeavenSC 33
• Adnapsc2 9
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV187
League of Legends
• Nemesis3027
Other Games
• Shiphtur812
Upcoming Events
IPSL
2h 1m
Sziky vs JDConan
BSL 21
2h 1m
Tech vs Cross
Bonyth vs eOnzErG
Replay Cast
15h 1m
Wardi Open
18h 1m
Monday Night Weeklies
23h 1m
Sparkling Tuna Cup
1d 16h
Replay Cast
3 days
The PondCast
3 days
CranKy Ducklings
5 days
SC Evo League
5 days
[ Show More ]
BSL 21
6 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Revival: Season 3
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 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.