Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Simple Map - Yet Nothing's Happening!
Simple Map - Yet Nothing's Happening!
Mar 22 2023, 5:41 pm
By: Salamano  

Mar 22 2023, 5:41 pm Salamano Post #1



Greetings,

I'm new at this, rather, used to make maps 20 years ago but have started again because my kids like playing SC. :)

Anyway, I thought I'd whip up something *simple* that creates 4 human players in a nicely turtled area with a single conveniently shared choke-point, with computer opponents having free reign on the rest of the map at the bottom.

I thought it was going to be a very simple thing. Set up start locations, resources, terrain, forces, save/play. Boom.

However, none of the computer players are doing anything. I can kill 'em with probes and they don't even move out of the way. Is there some sort of trigger I have to also put in there to tell them all to "Fight like you normally do" (that frankly should be standard when any computer is playing)?

I'm attaching this allegedly simple map if anyone wants to take a look at it.

I CAN get the computers to play right when I DONT use map settings, but then no matter what the player positions are randomized and we can't seem to ever get the colors to match the map in the start locations (thus 1 or more of us start right next to a computer opponent lol)

Thanks in advance for any assistance that can be given!

Attachments:
Top Turtling-2Teams-4p.scm
Hits: 1 Size: 41.96kb



None.

Mar 22 2023, 7:09 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

You need to run ai scripts for the computer players. There's a trigger action for it. make sure to not preserve the trigger.




Mar 22 2023, 7:36 pm Salamano Post #3



What is/are the 'standard' AI scripts for these computer opponents?

-anybody know- ?

I thought there would be a basic/normal one by merely placing a computer start location on the board :/



None.

Mar 23 2023, 12:19 pm Excalibur Post #4

The sword and the faith

Quote from Salamano
What is/are the 'standard' AI scripts for these computer opponents?

-anybody know- ?

I thought there would be a basic/normal one by merely placing a computer start location on the board :/
The start location sets up their player slot in the map but doesn't give them AI.

Standard scripts are
Expansion <Race> Campaign <Level>
So for example
Expansion Protoss Campaign Easy

You can make a location over each AI's base and use Run AI Script At Location for that player with the appropriate race/level you desire.





SEN Global Moderator and Resident Zealot
-------------------------
The sword and the faith.

:ex:
Sector 12
My stream, live PC building and tech discussion.

Mar 24 2023, 1:39 am Ultraviolet Post #5



A few things to note: Use Map Settings maps often don't have regular SC gameplay, this is the reason for there not being a default AI for computer players. If you were creating maps like the ones I make, a default AI would cause more problems than solutions.

As far as the AI scripts go, Ex's example is perfect. Most experienced players use the Insane Expansion AI, but depending on your kids' skill level, lower difficulties may be more appropriate. Easy is likely to be boring regardless of skill level, medium is probably a good starting point, imo.

This link may provide some useful information as well: http://classic.battle.net/scc/faq/aiscripts.shtml



My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Mar 25 2023, 2:08 pm Salamano Post #6



Quote from Excalibur
Quote from Salamano
What is/are the 'standard' AI scripts for these computer opponents?

-anybody know- ?

I thought there would be a basic/normal one by merely placing a computer start location on the board :/
The start location sets up their player slot in the map but doesn't give them AI.

Standard scripts are
Expansion <Race> Campaign <Level>
So for example
Expansion Protoss Campaign Easy

You can make a location over each AI's base and use Run AI Script At Location for that player with the appropriate race/level you desire.

So I'm guessing the 'use map settings' also doesn't allow for someone to change what race the computer players are at-will in the pre-game menu settings? Or is there a different entry I'm supposed to use for where eg [protoss] is specified? If all computer opponents are "Force 2" do I just make a location that includes the whole bottom half of the map and say "Expansion [UserSelected] Melee Medium at Force2" or something like that?



None.

Mar 25 2023, 5:46 pm Salamano Post #7



So I've got a map that's set up for turtling humans to face Computer Opponents...

...But when I run the game, all they do is just have a single one of their gathering units gather minerals, there's no production, no expansion/attack/etc.

What's wrong with the code?

Attachments:
Untitled.png
Hits: 1 Size: 398.15kb
SCScrnShot_032523_133716.png
Hits: 1 Size: 1472.89kb



None.

Mar 25 2023, 5:51 pm Ultraviolet Post #8



This example map shows how you can make it so computer players are selectable in the pre-game menu. It's a fairly simple set of triggers for each of the computers that detects whether they have a command center, nexus, or hatchery. If they have a command center it runs a terran AI script, nexus = protoss, etc. You have to get used to doing little work-arounds in SC, since often things like a "User Selected" AI script don't exist. You can easily allow for each of the computers to have their own base, just make a location for each computer's base and then a unique set of triggers for that player and their selected starting location. You'll need to ensure the player's locations aren't randomized in the forces menu so that you don't encounter any issues. So instead of having one shared location like I did in the test map, you could do AI 1 Start, AI 2 Start, etc.. then again rather than making a shared set of triggers for all the computers like I did in the test, you'd just make an individual set of triggers for each computer which specifically pointed to the location of their base.





My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Mar 25 2023, 5:59 pm Ultraviolet Post #9



Quote from Salamano
So I've got a map that's set up for turtling humans to face Computer Opponents...

...But when I run the game, all they do is just have a single one of their gathering units gather minerals, there's no production, no expansion/attack/etc.

What's wrong with the code?

The problem with your triggers is you're running multiple AI scripts for the same player because your triggers are setup to run for Force 2. In your example, you should instead have a trigger for Player 5 that runs the terrain AI script, a different trigger for Player 6 that runs the zerg AI script, etc. Running multiple AI scripts for a single computer produces bad results like what you're seeing.



My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Mar 25 2023, 6:11 pm Ultraviolet Post #10



One last post, I broke it down a little further to show precisely what I'm talking about:





Example Map

Hope this helps!



My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Mar 25 2023, 8:00 pm Salamano Post #11



Quote from Ultraviolet
One last post, I broke it down a little further to show precisely what I'm talking about:





Example Map

Hope this helps!

That's great -- But for some reason when I try the "Expand..." command, my STAREDIT claims it's no longer compatable with StarCraft as an .scm file. Instead it wants to save it as a .scx file which for some reason my Battle.net isn't seeing/loading it. Does the basic [non-expand] AI script option also work?



None.

Mar 25 2023, 9:44 pm Ultraviolet Post #12



Are you still using StarEdit? :crazy: Scmdraft 2 is by far the best option these days, it's even endorsed by Blizzard. SCX files are the SC/BW version, which is what the expansion scripts are for. The non-expansion scripts do work and you should be able to do SCM that way, but there's no reason to have only StarCraft installed without Brood War these days since you can download standard SC:BW free from Battle.net, so I'm confused why you'd be having that issue.



My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Mar 25 2023, 10:56 pm Salamano Post #13



Quote from Ultraviolet
Are you still using StarEdit? :crazy: Scmdraft 2 is by far the best option these days, it's even endorsed by Blizzard. SCX files are the SC/BW version, which is what the expansion scripts are for. The non-expansion scripts do work and you should be able to do SCM that way, but there's no reason to have only StarCraft installed without Brood War these days since you can download standard SC:BW free from Battle.net, so I'm confused why you'd be having that issue.

Yeah... I have them both, and I went with the SCMD2 for my fixes to my scenario... It 'seems' that the AI scripts are all there and 'work', but then when I tried it out, I was able to take out 4 CPUs each on "insane", and two of those CPUs somehow refused to mine vespene gas. I'm not sure why that is or how to fix that one. They were spread pretty far apart from each other.



None.

Mar 25 2023, 11:21 pm Ultraviolet Post #14



If you post the current version of the map, I'll look at it.



My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Mar 26 2023, 8:13 am TheHappy115 Post #15



Most of my knowledge is from self-experimentation with AI (and ran into a lot of mistakes and learned a lot of stuff through posting and what not)

Important Basics:
1) The AI Script you run for the Computer must also match their starting Race.
What this means is that if Player 5 is set to Zerg and then your run a "Expansion Terran Campaign Medium", the functionality of the AI becomes nearly non-existent (I think it may mine minerals but that's about it) So ensure you have it set to the correct race.
2) Running Multiple AI Scripts for the same player can cause issues. Ensure you only have 1 "Main" AI Script.
3) Some AI Scripts initially think they start with resources and structures. As a result, some AIs can get stuck trying to do something impossible.
Example (not accurate AI script but should suffice):
AI Script:
Build 1 Commander Center
Build 4 SCVs
Build 1 Barrack
Build 1 Factory
Build 2 Vultures
Wait(2 minutes)
Attack (2 Vultures)

If the AI starts with no resources but the standard Command Center and 4 SCVs, it will essentially, mine until it has 150 minerals, make a barrack. Then it will continue to mine, but it will never have the gas required to build a Factory. And the script doesn't tell it to build a refinery so it won't mine vespene gas thus it will stall on "Build 1 Factory."
You can fix this issue by either giving the AI some starting facilities, or giving them a bunch of starting resources, or select an AI that has a script that can perform everything.

Most Campaign AIs often assume to start with a lot of resources. I find that they break if you don't set their starting resources to a large amount.
Insane AIs often have mineral and gas cheats when falling below a certain amount, but I don't know the extent of when it does this.
Custom AI - As I look at this AI, this seems to be the AI script that is run during standard non-custom games making it functional at only 1 main structure +4 workers.
Side Note: Zerg Easy Campaign AI is bugged and has the same script as Zerg Difficult Campaign AI (Expansion versions too).



None.

Mar 26 2023, 3:53 pm Salamano Post #16



Quote from Ultraviolet
If you post the current version of the map, I'll look at it.

Here's the current version for any interested. :D

Thanks to all!

Attachments:
Top Turtling-2Teams-4p_v4.scm
Hits: 2 Size: 44.18kb



None.

Mar 27 2023, 2:21 am Ultraviolet Post #17



You mostly had it working, I made a few small fixes for you, can download here



My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Mar 27 2023, 2:37 am TheHappy115 Post #18



After reviewing the map, I had no issues with anything. However, I did make one change before playing. The AI location should cover all the resources you want mined (otherwise I noticed the scripts can get confused).

As a side note, due to the fact that they are Insane AIs, they don't realistically need to mine gas because Insane AIs automatically refill their money (thats why they can instantly make a supply depo or pylon).

How long were you playing too? I believe the AI won't build the refinery/assimilator/extractor unless they are going to start building gas units.

I.E. Terran immediately built one because they make an academy and medics. However, Zerg waited until they did their Zergling attack before getting Gas and a hydralisk den.

As a side note, I never really thought about having AIs on "User Select" so learned something new :)



None.

Mar 27 2023, 9:02 pm Salamano Post #19



Ultraviolet,

That seemed to help knock these folks into some sense ;) Though they seem to work horribly as a team (taking each other's refineries, etc) but ah well. I may have to juice it up a little more with some rhythmic unit spawns or something.

One weird thing though-- the map wouldn't load in SCMD2 ... It would play fine on BNet, but if I tried to load it, I got this message... So I can't address the scripting.

Attachments:
Untitled.png
Hits: 3 Size: 6.71kb



None.

Mar 27 2023, 9:47 pm Ultraviolet Post #20



Yeah, comp AIs are bad for stealing each other's resources, especially with bases placed close together. Triggered unit rushes are certainly a good workaround for AI limitations. You can also experiment with terrain changes to increase the difficulty level, like one example off the top of my head is widening the choke point. The choke point you have is incredibly narrow and will quite effectively bottleneck all CPU rushes making it very difficult for the comps to break through with any number of units. Pre-placing bases for the computers can also help speed along their attacks although this comes with the limitation of forcing you into having certain computers be certain races, unless you go through some tedious triggering to place buildings at specific locations for the comp once the game begins and their race is detected. Can't say I'd recommend that approach in your circumstance.

Regarding the issue with the map not loading in SCMD2, I have no idea why you'd be having that issue, I didn't place any protection on the map. Seems like some strange technical stuff is going on on your PC. You wouldn't happen to be using a Mac would you? I've heard tale of unexplainable errors with SC and related tools on Macs.

Edit: Or is your version of Scmdraft 2 maybe not up to date?

Post has been edited 1 time(s), last time on Mar 29 2023, 1:46 am by Ultraviolet.



My Projects:

Impossible Ultraviolet | Impossible UV2 | Impossible UV3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:24 pm]
Oh_Man -- da real donwano
da real donwano shouted: Who can crack into an old protected map & remove the trigger for insta-defeat for playing solo?
me
[12:48 am]
RIVE -- j
[10:41 pm]
lil-Inferno -- p
[2024-11-07. : 7:38 pm]
Zoan -- M
[2024-11-07. : 11:26 am]
Zycorax -- F
[2024-11-06. : 7:31 pm]
O)FaRTy1billion[MM] -- L
[2024-11-06. : 9:45 am]
TF- -- Blumph win :wob:
[2024-11-06. : 3:43 am]
da real donwano -- Who can crack into an old protected map & remove the trigger for insta-defeat for playing solo?
[2024-11-04. : 3:21 am]
Ultraviolet -- surprised it runs at all anymore
[2024-11-04. : 3:21 am]
Ultraviolet -- DLDB is fucked
Please log in to shout.


Members Online: Oh_Man