• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:05
CEST 17:05
KST 00:05
  • 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
Serral wins EWC 202543Tournament Spotlight: FEL Cracow 202510Power Rank - Esports World Cup 202580RSL Season 1 - Final Week9[ASL19] Finals Recap: Standing Tall15
Community News
Weekly Cups (Jul 28-Aug 3): herO doubles up6LiuLi Cup - August 2025 Tournaments3[BSL 2025] H2 - Team Wars, Weeklies & SB Ladder10EWC 2025 - Replay Pack4Google Play ASL (Season 20) Announced58
StarCraft 2
General
Weekly Cups (Jul 28-Aug 3): herO doubles up Clem Interview: "PvT is a bit insane right now" Serral wins EWC 2025 TL Team Map Contest #5: Presented by Monster Energy Would you prefer the game to be balanced around top-tier pro level or average pro level?
Tourneys
Global Tourney for College Students in September Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays $5,000 WardiTV Summer Championship 2025 LiuLi Cup - August 2025 Tournaments
Strategy
Custom Maps
External Content
Mutation # 485 Death from Below Mutation # 484 Magnetic Pull Mutation #239 Bad Weather Mutation # 483 Kill Bot Wars
Brood War
General
BW General Discussion Help, I can't log into staredit.net How do the new Battle.net ranks translate? Which top zerg/toss will fail in qualifiers? Google Play ASL (Season 20) Announced
Tourneys
[CSLPRO] It's CSLAN Season! - Last Chance [Megathread] Daily Proleagues [ASL20] Online Qualifiers Day 2 Cosmonarchy Pro Showmatches
Strategy
Simple Questions, Simple Answers [G] Mineral Boosting Muta micro map competition Does 1 second matter in StarCraft?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Total Annihilation Server - TAForever Beyond All Reason [MMORPG] Tree of Savior (Successor of Ragnarok)
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
European Politico-economics QA Mega-thread US Politics Mega-thread Things Aren’t Peaceful in Palestine Bitcoin discussion thread 9/11 Anniversary
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
TeamLiquid Team Shirt On Sale The Automated Ban List
Blogs
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
The Link Between Fitness and…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
Customize Sidebar...

Website Feedback

Closed Threads



Active: 806 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
Stormgate Nexus
14:00
Stormgate Launch Days
BeoMulf221
TKL 194
IndyStarCraft 179
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Reynor 360
SpeCial 81
StarCraft: Brood War
Britney 50665
Bisu 3971
Shuttle 2425
Mini 930
Soulkey 575
ggaemo 463
Snow 365
actioN 350
ZerO 277
Soma 221
[ Show more ]
Hyuk 197
sSak 157
Leta 91
ToSsGirL 76
sorry 74
Nal_rA 57
Sharp 56
Aegong 40
soO 39
[sc1f]eonzerg 33
sas.Sziky 29
zelot 27
scan(afreeca) 20
Rock 17
ajuk12(nOOB) 17
Sacsri 16
Terrorterran 13
Backho 12
IntoTheRainbow 10
SilentControl 9
JulyZerg 8
ivOry 4
Stormgate
BeoMulf221
TKL 194
IndyStarCraft 179
Dota 2
Gorgc5777
Dendi1606
XcaliburYe381
Counter-Strike
pashabiceps504
flusha368
byalli292
kRYSTAL_56
Heroes of the Storm
XaKoH 112
Other Games
gofns1900
hiko891
Beastyqt480
crisheroes383
KnowMe370
Hui .365
RotterdaM261
DeMusliM253
Fuzer 212
ArmadaUGS92
QueenE71
ZerO(Twitch)18
Trikslyr14
Organizations
StarCraft 2
WardiTV1060
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• StrangeGG 84
• poizon28 23
• davetesta16
• Kozan
• AfreecaTV YouTube
• intothetv
• sooper7s
• IndyKCrew
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• FirePhoenix10
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV791
League of Legends
• Nemesis2797
• Jankos1054
Upcoming Events
uThermal 2v2 Circuit
56m
DaveTesta Events
8h 56m
The PondCast
18h 56m
WardiTV Summer Champion…
19h 56m
Replay Cast
1d 8h
LiuLi Cup
1d 19h
uThermal 2v2 Circuit
1d 23h
RSL Revival
2 days
RSL Revival
2 days
uThermal 2v2 Circuit
2 days
[ Show More ]
CSO Cup
3 days
Sparkling Tuna Cup
3 days
uThermal 2v2 Circuit
3 days
Wardi Open
4 days
RotterdaM Event
5 days
RSL Revival
6 days
Liquipedia Results

Completed

ASL Season 20: Qualifier #2
FEL Cracow 2025
CC Div. A S7

Ongoing

Copa Latinoamericana 4
Jiahua Invitational
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
HCC Europe
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025

Upcoming

ASL Season 20
CSLPRO Chat StarLAN 3
BSL Season 21
BSL 21 Team A
RSL Revival: Season 2
Maestros of the Game
SEL Season 2 Championship
WardiTV Summer 2025
uThermal 2v2 Main Event
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 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.