• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

The Galaxy editor for beginners

Avo

Avo

Level 4
Joined
Nov 14, 2008
Messages
24
So you have a few really awesome ideas for a SCII map, but you've never opened the galaxy editor? This tutorial will walk you through all of the steps for creating your own map from the very start, for this tutorial we will be creating a spawn war.

Step 1: Creating the map
Start up your world editor, it will automatically create a map with an ugly tan color. Up in the top corner of your editor you should see a button that says "File", clicking it should create a drop down box. Click the "New" button and it should create pop up that looks like this.

scii1.jpg


It might look a little bit confusing at first but ill explain what each of the important buttons does.

Width: Changes how wide the map is, set this to 200.

Height: Changes how long the map is, set this to 200.

Texture set: This changes what ground textures are available in the map. I like to set the texture to something that hasn't been done a lot so we will be using Shakuras for this tutorial.

Initial texture: This changes what the ground starts out as and will probably be the most common terrain tile in your map. I'm using Shakuras sand.

Base height: Changes how high the map initially is, leave this at 8 for now.

Add random height: This causes variance in the terrain height, raising bits and lowering others. Were going to leave this off for now though i recommend you try it out sometime.


Step 2:Terraining your map

When you have the settings all set up press "OK" and wait for the WE to create the map, this should only take a few seconds. Next click the "layer" button off the top toolbar and select "terrain" from the drop down box. This updates your side pallet giving you the ability yo start terraining you world.

Now it gets fun :grin:. Were going to start painting the ground with textures, you can pretty much do this however you want because this only effects the artwork but there are a few tips to keep in mind.

Large areas of the same texture look boring, while if your terrain is to varied it looks patchwork. I find its usually best to paint strips and blotches of different terrains onto the ground. Remember if you mess up you can always press Ctrl+Z to undo the last action. This should take you a while but its an important part of any map. If your terrain doesn't look good don't worry you will get better. Here's a quick look at what mine looks like.
starcraft22.jpg


Still doesn't look like much but your on your way, but there's still a way to go before our map becomes playable. On your terrain pallet there's a cliff section (it looks like a cliff with a + sign by it). Our map wont have any cliffs in it but this is an important tool to know about. It creates the cliffs that stop units movement and block line of sight for the units below. Toy around with this feature on another map sometime, many games use these as a crucial element.

The map is looking better than the plain blue desert we started with but there's still a lot missing. Every desert has dunes whether is hot and sandy or a snowy wasteland and ours should probably have some as well. Were going to do this by selecting the "height" tab from your pallet (it looks like a hill). Theirs two ways we could do this from here, we could create each hill individually which would take forever or we could use the noise function. Click the noise button (it looks like a bunch of bumps) and start to paint the map. The dunes will look a little sharp but that can be fixed easily by using the smooth function. One you have painted the map with the noise function use the smooth function to give them a softer appearance. It may take several passes to get it to look right but its a worthwhile effect. It will end up looking like this but remember its all up to your taste, you make like sharper dunes.
scii3.jpg


Were still not done with our terrain though, it still seems a little bland so were going to add doodads. Doodads are usually the last things you add. From the menu at the top go to layer then doodads (were skipping units for now, ill explain why later). Your pallet should have changed entirely now, this is because were no longer trying to change the terrain. (though if you need to you can still change the layer back to terrain to edit it). Scroll down the list until you find the environment section and select the item named "rock (giant)". If your having trouble finding it you can use the search bar just above the list. Once you have place a few of them around the map but be conservative, we have a lot more doodads to cram in here.

Feel free to thumb through the list and find things you think fit the desert theme (or just look cool!) but here's a list of some of the ones im using for those of you who are feeling lazy can copy/paste them into the search bar.

Rock (giant) (don't use a lot of them, there massive)
Rock (tower)
Rock small
Xil creature
Xil fossils
Tree - Xil
Mammoth fossils
Tree - Shakuras
Shakuras foliage
Crystal large

(tell me if i got anything wrong, that could get confusing)

A huge part of adding doodads is making them interact with each other and the environment. With a desert you don't need much of that but on harder terrains it becomes crucial.
sc4lw.jpg

This is a simple example, though its pretty terrible.

Remember to save your map every so often. (my editor crashed as a cruel reminder)

Step 3: Trigger work
There is more to a game than just a shiny terrain though and were going to work on that here now. This section of the tutorial gets complicated so bear with me for a little bit by the end it will all make sense. It should look a lot like this.
2

It might look like its a lot less fun than the terrain or doodad editor but this menu is a critical part of just about every game. Before i get to in depth with triggering I'm going to explain what it is and how it works.

A trigger consists of 3 parts, an event, a condition and an action. Local variables are a little bit more complex and ill explain them when we need them.

Event: This is the "When this happens" part of the trigger.
Condition: This is the "So long as this is true" part of the trigger.
Action: This is the "Do this" part of the trigger.

So if you wanted to create a marine for player 1 every 15 seconds so long as player 1 had the money to afford it you would have something that looks like this.

Event: Every 15 seconds of game time
Local variable: (we don't need one of these for this trigger, ill explain more on them later)
Condition: Player 1's minerals are > 50
Action: Create 1 marine for Player 1
Set player 1's minerals = Player 1's minerals - 50

(Don't enter that here! its just an example!)
Naturally if you wanted to do something more complicated the trigger gets more complicated, but you can do just about everything from the trigger menu. When you start a new map the trigger editor will start with a trigger that sets the game up for a melee. You can click on the trigger and delete it using either the delete key or right clicking "melee initialization" and selecting clear from the drop down box.

Right now there's nothing you can do with our game and whats the point in playing a game you cant interact with? Were going to add a few units, while you can do this through the unit placement menu were going to trigger it so the game only spawns units for the players in game. To do this right click the side bar on the left and select New>Category, when it creates the category name it "Spawns". A category stores triggers for organizational purposes and while they aren't mandatory large games can quickly get complicated without them. Next right click the category and select New>Trigger. We will name this trigger "Command center spawn".

Congratulations you created your first trigger but it doesn't do anything yet! We will fix this last though, right click events(the red flag) and select new>event. This should create a window, from this window select "Map initialization" from the top of the list. Map initialization causes the game to perform the events as soon as the map has finished setting up.
Now select New>Action and find "if then else", if your having trouble finding it you can use the find feature to look for it.
The "If then else" creates a miniature trigger within a trigger, if "bah" is true then do "blah" else do "blah".

Right click if from the if then else and select New>condition, this should pop up a new window. Find the "Controller Of Player" condition. This tells us what is controlling an army, a player, bot, neutral or no one. We only want to create spawners for players who are currently playing so this works perfect.When you select the "controller of player" condition it should put text in a smaller window at the bottom of the trigger editor. Near the bottom of it you should see a line of text that's red, double click it. When the window pops up it should have 4 radio buttons at the top, select the one reading "preset". When you select the preset button it should change the list at the bottom, select user from the list. You can continue to press OK until your back to the trigger menu, the condition you created checks to make sure that player 1 red is actually a player. When your done creating the condition you may need to drag it to the if in the "If then else" statement.

The trigger still doesn't do anything though, for this we need actions. Right click the "then" from the if then else and select New>action. Select "Create units facing angle" from the list. We need to set a few settings now so I'm going to give you the values you need.

Count:1 (we only want 1 command center for each player)
Type: Command center (make sure you don't select flying, you will need to find it in the structure list)
Player: 1 (who its created for, leave this as one)
Point: (leave this blank for now, its the position where it will be created)
Angle: (What angle the command center is facing when its created)

Were almost done here we just need a point, go to the toolbar at the top and select Layer>point, now you can click to place points. Place a point a little bit inward from each corner (try to make it equal distanced, the grid helps with this), next name them from the window on the side. I used the names "Player 1 spawn, Player 2 spawn, player 3 spawn and Player 4 spawn", Although the name doesn't really matter it helps to have something related to what you intend for the point to do. Now go back to the trigger editor and change the point to "Player 1 spawn", once your done with that drag and drop it to the "then" position in the "if then else", we don't want the else to do anything so we will leave that blank. Congratulations on creating your first trigger! If you hooked everything up right it should create a command center for player 1 in the corner you specified.

Now you can control something but there's nothing to kill because it doesn't spawn a command center for the other players. If we weren't lazy we could go through the hassle of creating the trigger over again 4 times so were going to copy and paste. Copy the trigger and paste the trigger 3 more times so we have 4 all together, then change the "Controller of player=1" to one through 4, and the "Create one command center for player 1 at player 1 spawn" so it reads 1 through 4. When your done with that it should create a command center for players 1 through 4 in each corner so everyone has there own area to fool around with.

It should look like this when its all done.
scii6.jpg

If your still following you've com farther than most (Honestly, they all put it down when they realize there's more to it than the terrain editor!?!?!)

Were getting closer to a game now but were missing something, Marines! Its not SCII without marines! :mwahaha: Were going to use another trigger for this, right click your category again and select New>Trigger. Name the new trigger "Marine spawns". The event for this trigger should be "periodic event", This creates a timer that will continue to loop through. Change the time on the periodic event from 5 seconds to 30 seconds(you may want to change it to 60 later). Before we start to build the trigger to spawn the marines we want to create a variable for each player, variables hold information and allow it to be changed. Using a variable for the number of marines spawned allows us to spawn more marines when a player completes a certain goal (enough kills, researches, is holding a point). Since we have 4 players were going to need 4 variables (An array would work here but i want to explain variables first), i named mine Player1marines, Player2marines and so on, set there starting values to 5. Now we need a way to tell where the command centers are, so go back to the terrain editor and select layer>regions, create 4 small ones (about the size of a dime on screen will do, doesn't matter where). A region is like a point but its larger, we would normally use points for the task of spawning units but blizzards oversight prevents you from attaching them to units. Now we need to go back to the "command center spawn" trigger and adapt it a little. Create a "attach region to point" for each of the if then elses, change the settings on it so it looks like this.

Attach Region To Unit
Region: Player(1-4)command center
Unit: Last Created Unit
Offset: Point From XY
X: 0.0
Y: 0.0

Make sure that this action is after creating the command center, Starcraft 2 performs actions starting at the top and heading down(same for triggers). We have now taken care of where, how often and how many marines it will spawn so lets make it spawn the marines! Go back to the "marine spawn" trigger and create a new "Create units facing angle" action. Set it up to look like this

Create Units Facing Angle
Count: Player1marines
Type: Marine
Player: 1
Point: Center Of Region
Region: Player1command center
Angle: 270.0
Flags: No Options

You made need to flip through a few of the lists to find all of the settings but this should create 5 marines at the position of player1's command center. Now lets test it out! Go to File>Test document. This should start up SCII and create a single player version of your map, since the trigger cant spawn the units at the center of the unit it will spawn them as close as it can get (the outside edge of the command center). Our trigger that spawns the command centers seems to be working, now there's just 1 last trigger for now. Whats the point in slaughtering other players marines without a bounty?

Creating bounty is a simple trigger, create a new folder and name it "Bounty". Right click the bounty folder and create a new trigger called "Marine bounty" , give it the event "Unit dies", once your done with that give it a "(Owner of (Killing unit)) != (Owner of (Triggering unit))" condition. The last thing we need to do is give the player the reward for killing the marine. The finished bounty action should look like this "Player - Modify player (Triggering player) Minerals: Add 1".

Congratulations! Your done with triggering for now but theres always more work that can be done with them, triggers make up a large part of the world editor and can be used for just about any task you need them for. As with terraining using the trigger editor is a skill that needs to be developed but the end result is rewarding.


(feel free to email me at [email protected], the tutorial is far from finished and your feedback is appreciated)
 
Last edited:
Top