Map Editor is now public. Basic instructions inside.

Fixious

Test Lead
Controlling Objects
The map editor is now available to everyone. Simply host a game and press F11 to start the editor. A few notes and quick-tips before going on:
  • It will only function properly in windowed mode. In fullscreen the menus at the top are cut-off, rendering it useless basically. If you don't know already, Alt+Enter will change from windowed/fullscreen mode.
  • Make sure Editor Mode is set to Yes at the Create Game screen.
  • She's pretty touchy. Certain menus will simply crash the client, namely the light editor. For now just stay away from that. It isn't needed to make a map anyways, and changing the skybox and fog can be done outside of the editor.
  • Save often! File > Save Mission As > NewMap.mis. Ctrl + S after significant changes.
  • Ctrl + Scroll Wheel controls brush size.
  • Hold Alt to rotate an object.
  • Hold Ctrl + Alt to bring up object scale control; middle white box controls scale uniformly.
If you're looking to make a map the size of Frostbyte, host Frostbyte. Zenith? Host Zenith. There are only two actual map sizes in Legions, which is defined by a squaresize value of either 8 or 16. Both Elegiac and Frost are 8 for example, while Zenith and Mirage are 16. For this example I'll simply start with Frostbyte. Once you're in the game you might as well stay in observer mode. Spawning isn't really necessary. Once you've started the editor, go to Edit > World Editor Setting, and set the visible distance to 8000. You can also turn off object names if they are distracting (they're all called null anyways):


JDqflek.png


This removes the fog and makes things a bit easier to work with.

Each red dot is something you can either remove or modify. Clicking on one, such as one of the blocks by the flag stand, will select it and bring up 3 arrows. Hover your mouse over one of the arrows until it lights up, then click and drag in a direction. Clicking and dragging the yellow, purple, or turquoise lines will allow you to move the object in both corresponding directions (so dragging the yellow line allows you to freely move on both the X and Y plane). Hold Alt to bring up rotation options. Hold both Alt and Ctrl to bring up scale options. In scale mode, adjusting the center white box will control the entire object at once, allowing you to shrink/expand uniformly. You can select a bunch of items at once by simply dragging across them. If you do select a bunch of items and find that you can't move them, it means one of them is locked. I'm not aware of any quick and easy way of finding which items are locked.

5DH55fZ.jpg


That's the bare-bones for controlling an object and modifying them. Of course, if you move the wrong item you can go to Edit > Undo or Ctrl + Z to undo your action(s).
 
Last edited:

Fixious

Test Lead
Importing New Objects
Once you've become accustomed to moving existing objects around, it's time to move onto importing new ones. Again, I'll use Frostbyte for our example. Go to Window and select World Editor Creator. At the bottom of the window that appears there are 4 expandable sections containing items you can place within a map. You'll likely be accessing the Interiors section the most, so lets go there. Expand the box, and open legions > data > interiors. 8 new sections are now available. Feel free to browse through them and select your own items. For now I'll just expand towers and select sniper_with_notches.​
The tower is placed in front of you, but lacking any kind of lighting data. With the object still selected, go to Lighting > Quick Relight Selection. Depending on your computer this may take a few seconds. Once done, the object will display the correct textures and lighting.​
9bfm25z.jpg
After this the object will act just as the previous objects did. You can move/scale/rotate it however and wherever you want. Every new object you place in a map (other than those from Static Shapes) must go through this same Lighting process. You may notice that the object doesn't appear to create any shadows of its own on the terrain. This can be corrected by going back to Lighting > Quick Terrain Relight. I'll cover this a bit more in the Modifying Terrain post.​
Now, what good is a sniper tower without an ammo station? To place an ammo station on the tower we have two options: simply copy/paste an existing ammo box from the map, or import a new one. While copy/paste is the easiest, I'll cover importing a new ammo station as well since it requires a few steps you might not know. Go back to the window with the 4 expandable sections and open Static Shapes > legions > data > shapes > props > ammodepot, and select ammodepot. Place the ammo station where you want it, then go back to the 4 expandable sections. Expand Mission Objects > Mission, and select Trigger. A window will pop up asking for an Object Name, along with a Data Block dropdown. As far as I'm aware the name doesn't matter, so just call it ammobox. From the Data Block dropdown box, select AmmoStationRefillTrigger and press Ok. An empty box will appear on your screen. Place it over the ammo station you placed earlier, making sure it extends just a little bit further around the ammo station. You don't want it inside the ammo station. With the trigger still selected, go to Window > World Editor Inspector, and make sure the active box is checked. Press enter to save the changes.​
PlR516M.jpg
You now have a working ammo station. Press Shift or F11 to go back into the game and test it.​
 

Fixious

Test Lead
Modifying the Terrain - Terrain Editor

We've covered objects (mostly), so now lets cover terrain. I'll use our Frostbyte map again as well, for consistency. Go to Window > Terrain Editor. All the red dots will disappear, and a circular brush will appear wherever you move your mouse. To change how the brush behaves go to Actions > and select whatever you want. I'll select Adjust Height, which has a keyboard shortcut of Ctrl 1. Click and hold anywhere on the terrain and move the mouse up or down to create a basic hill. If the brush is too small/too big, simply go to Brush > Brush Size, and select the appropriate size. I've never really noticed any difference in Brush Pressure so you can ignore that for the time being. The Hard Brush option will create hills with very sharp slopes. For Legions it's best to use Soft Brush, but it's up to you.

712bdEB.jpg


You notice again that shadows aren't updated in real-time. Any time you make a hill or set of hills, or even just modify the terrain a bit, it's best to do a quick relight, so again go to Window > Quick Terrain Relight. This will make the hill easier to see and work with in the editor. Go ahead and press Shift or F11 to go back into the game and test the hills. They're likely quite sharp and not very fun to skii on. Relighting also helps to show these details.

ERURBLH.jpg


If they're sharp like that, simply go back to the editor and select Action > Smooth. When smoothing a hill I've found it better to use a smaller brush than the one I did to create it. It allows you to be more precise, and not worry about over smoothing it. Once you've found the best brush size, click and drag over the sharp parts of the hill to smooth it out. If you think it looks smooth enough, do another Quick Terrain Relight to make sure. Once that's done, enter the game and test it out for yourself.

With the Adjust Height option you can also create depressions/bowls by dragging the mouse down, which are usually found around bases to allow cappers/LO to exit quickly (Frostbyte front bowls, Reactor front and side bowls, etc). Just like hills, you want these to be smooth as well.

If you want to raise a portion of terrain just slightly, the Add Dirt option from the Actions menu might be your best bet. Simply click and hold over the area and it'll slightly rise as the brush adds dirt to the area. If you want to do the reverse, select the Excavate option.

If you're adding a tunnel or base that is lower than the terrain and need to remove a section of it, select the Set Empty option. You'll likely want to use a smaller brush for this, usually no bigger than 5x5. If you need to bring back a portion of empty terrain, select to Clear Empty option and paint over the empty spots.

The Select option allows you to paint over a terrain selection. Once selected, go to Adjust Selection and adjust it to your liking.
 

Fixious

Test Lead
Modifying the Terrain - Terrain Texture Painter
We've modified the shape of our terrain, now lets modify the look of it. Go to Window > Terrain Texture Painter. Since we're working with an existing map, it already has textures applied to it in certain areas. Frostbyte is made up of 4 snow textures: snowbase256, snowrough02, snowrough01_256, and snow_floor. Select the first texture (in this case snowbase256), and press Change. A Windows Explorer box will appear. Depending on where the box opens to by default, navigate to live/legions/data/terrains. This is where all the terrains or stored for the maps in Legions.​
rRx3tY4.jpg
If you open Desert and select the first sand texture, it will replace the image in the top left corner of the Terrain Painter box. Clicking anywhere on the map will then replace the previous snow texture with the new desert texture. You can do the same for the rest of the texture images, essentially turning Frostbyte into a desert map if you so choose.​
MQNqvTV.jpg
If you want to paint a certain area of the map with a specific texture, simply select it from the box and paint over the area you want. Any texture you want to use must be one of the four images in the Terrain Painter box seen above. As stated earlier you can change the brush size to whatever size you want from the Brush menu. The Hard Brush option is also available to use here. It's also worth noting that each texture you place in the Terrain Painter box must be unique. That is, you cannot add a texture that's already in the Terrain Painter box. It must be 4 different images.​
 

Fixious

Test Lead
Modifying the Terrain - Terrain Terraform Editor
The Terrain Terraform Editor under the Window menu controls a variety of terrain options. I won't cover them all because I simply don't know what they all do. I'll cover the ones I feel you'll likely use the most. After you've selected the Terrain Terraform Editor option, feel free to close any other opened windows. You won't need them anymore.​
8AyQNHu.jpg
The terraform editor box will default to the first operation within the box below it, in this case the General operator. The Min Terrain Height box sets the minimum height of the terrain, while the Height Range box controls the different between the minimum and maximum terrain height. Setting the Height Range to a higher value will make the map hillier, while a lower value will make it more flat. Setting both to 0 will, of course, make the map completely flat.​
The second option in the terraform editor window is fBm Fractal, which controls the number of hills on the map, along with how rough they are. If you want to create a map with random hills placed throughout it, set the fBm Fractal settings to your liking and press Apply at the bottom. If nothing happens, select the General operator, then click back on fBm Fractal and press Apply again. In this case I chose a Hill Frequency of 8 and left everything else in fbM Fractal the same, and set the Min Terrain Height to 50 and Height Range to 250. After doing a Quick Terrain Relight to update the shadows this is the result:​
k48ZK0Y.jpg
You'll notice that while the terrain was adjusted, the objects on the map were not. You'll have to move them manually if they get covered by the terrain. Also note that it kept the textures in the same locations, which can result in some wonky visuals. Textures you may have intentionally placed on slopes now appear in flat areas, for instance. I believe there's a setting that allows you to control texture placement by height, but I've never messed with it. Perhaps someone with more experience can chime in on this.​
To add more operators, simply click the dropdown box and select them. I'll add the Rigid MultiFractal operator with default settings and click Apply:​
jaN02z9.jpg
As you can see it added a lot more hills, giving it a Stygian look. If you decide to add another operator, such as the Canyon Fractal and nothing happens, delete it and add it again. This same principle applies to any other operator you add that doesn't seem to work. After messing around with various Fractals I ended up with this weird concoction:​
lAF5iGc.jpg
While cool looking, it's perhaps not the best map to ski on. To fix this we can add the Smoothing operator. Within the Smoothing operator box you can select how many passes the editor should make when smoothing the map, along with how aggressive it is. I set it to 10 passes with a default aggressiveness of 0.500, which resulted in this:​
7CYveGg.jpg
That's the basic function of the Terrain Terraform Editor. There are more operators, but I haven't really messed with them. Some simply don't work or function correctly. Making a map with random hills such as this can be a decent place to start when creating your own map. It can give you a starting place, which you can then modify to your liking. Or you can simply modify an existing Legions map. Up to you!​
 

Fixious

Test Lead
Flags, Player Spawns, and Lights
To make things easier, when creating a new map it's best to simply leave the existing player spawns and flags on the map. You can delete them if you want, but adding new ones back into the game can be a pain. It means dealing with team index's and what-not, and only complicates things. Player spawns act just as other objects do; select one to move it around. Spawns are represented by a green sphere when selected. Wherever the green arrow points is the direction the player will spawn facing.​
VyG0dbX.jpg
Flags are made up of 4 separate objects: The flag object itself, the flag scoring trigger, the flag clamp, and the base flag stand model (called FlagGoal). If you're making a map and need to move the flag, make sure you've selected all 4 objects at once before moving it. Otherwise it turns into an annoying process of putting the pieces back together properly.​
ts63OhP.jpg
As the image shows, I've selected all four objects. While the map editor doesn't tell you how many objects you've selected, you can see 4 different boxes within the selection, ensuring you've got them all.​
Each flag is also usually accompanied by a light object that adds a glow around or above it. You can select that too if you want, or add your own by going back to Window > World Editor Creator, and expanding Mission Objects > Environment, and selecting sgLightObject. An object box similar to the ammo station trigger will appear. Give it a name, and select what kind of light you want to appear around the flag or wherever you're placing the light object. In my example I'll simply type orange in the Object Name field and select orangelight from the dropdown. Pressing OK places a light bulb icon in front of you. Move it wherever you want the light to appear.​
Note that when entering the game to check the light object it doesn't appear to be there. This is another task the requires relighting, however Quick Terrain Relight nor Quick Relight Selection will work in this case. You must select Filtered Relight from the Lighting menu. This will take a noticably longer time to complete. When clicking Filtered Relight, all interior objects will turn black for a few seconds, along with the game lagging a bit. Give it a while, and you'll see the light object now displays properly.​
ocpLFbC.jpg

UPDATE: I forgot to mention something somewhat important when talking about flags. Most, if not every time you make a new map you'll end up with doubl flags. If your flag is home and looks extra bright, it's because there are actually two of them. The way I get rid of this is to join the opposite team and grab the 'double flag'. The one that remains can be deleted. As you can see below, the 'real' one has the IFF's above and below it:

km4BKC1.jpg


In this case simply delete the one on the flag stand and save the mission. Make sure you delete the actual flag itself, not the trigger. If you're not sure, select what you think is the flag and look at its dataBlock. It will simply say Flag.

JC4d1mn.png
 

Fixious

Test Lead
Sky, Fog, and Precipitation
I sadly no longer have my epic sand Frostbyte map from before because I closed the editor for the night, but I'll continue to use Frostbyte for our example. To change the skybox, go to Window > Mission Editor Inspector, and from the top box expand SimGroup - MissionGroup > SimGroup - Environment, and select Sky.

7E1l46a.png


From the bottom half of the window, scroll down to the Media section. The materialList option controls what skybox gets displayed on the map. Click the white box to the right with the 3 black dots to open Windows Explorer again. In this instance I'll select the Elegiac skybox, which can be done by navigating to legions/data/skies/Elegiac, and selecting sky_day.dml.

pYD73RU.png


Pressing open will immediately apply the skybox to the map; no relighting required. You can choose any skybox you want from the skies directory, but it must be a .dml file. Selecting one of the png's or jpg's will crash the client. Press Shift or F11 to go back into the game and see how it looks.

UPDATE: If you apply the skybox but it doesn't appear, make sure useSkyTextures is checked. Some maps such as Zenith have it unchecked by default.

Q1llgno.jpg


While the skybox itself looks nice, I'm not a fan of how it looks with the blue fog. To change the fog color, scroll down 3 sections from Media to Fog. This section controls the fog settings. I'll change the fogColor numbers to 0.66 0.66 0.8 0.75, which is the fog color on Fallout. This will give you more of a white/light purple fog color. Feel free to mess with the numbers to create the fog color you're looking for.

AZGSYHX.jpg


KVQwSd4.jpg


If you look at the first image above this post, you'll see a fogDistance option above fogColor, along with a visibleDistance option above that. These two settings control how thick the fog is, and how close it renders around the player. If you want thick fog with low visibility, set the visibleDistance to a lower number such as 500, and fogDistance to 70. Again, feel free to mess around with these values to get more comfortable with how they interact with each other. Since fog settings won't really affect the Editor (if you set the visible distance to 8000), jump in the game and see it look.

yFb6yvI.jpg


To remove snow flakes from the map, go back to either World Editor Inspector or World Editor Creator and delete the Precipitation entries as seen below (click them, then press Delete on your keyboard).

g4R91OQ.jpg


To add snow, fluff, or rain to a map open the Mission Objects box in the World Editor Creator window, expand the Environments section and select Precipitation. Again, a box similar to the ammo box trigger and light object appears. Give it an Object Name and/or Name , then select whatever you want from the dropdown. I'll select rain and press OK. You'll notice that after pressing OK, wherever the rain drops hit an object a white box appears.

J90d0Ls.jpg


This can be fixed by opening World Editor Inspector with the rain object still selected, and scrolling down to the Collision section. Uncheck doCollision. This will remove the white boxes.

N4rrK2I.jpg


An alternate method would be to make the splashSize 0.0. This removes the white boxes, and allows for collision.

8xxkYBG.jpg


This same window can also control how many snow flake/rain drops appear, along with how fast they come down. Scroll all the way up to control the numDrops value. The boxWidth and boxHeight values control how close together the drops are, so a lower value in each box will create a tighter spread. Scroll down to the Movement section to control the minSpeed and maxSpeed values. You can add more than one Precipitation object as well (Frostbyte uses 3 different snow Precipitation objects).​
 
Last edited:

Fixious

Test Lead
Saving, Renaming, and Hosting Your Map
Once you're happy with how your map looks, go up to File > Save Mission As. In the box that appears, you must manually add ".mis" to the end of the map name. So you would simply type "New_Map.mis", and press Save.

5PB79sf.png
Once you've saved the map, go to legions/data/missions and open the .mis file you just saved. At the top, change whatever map name is in MissionName = "Map" to the name of your map. This is where you also set what game modes it supports.
ng112tn.png


That's the final step. You can then simply start Legions, go to the Create Game screen and host your map from there.
 
Last edited:

Fixious

Test Lead
Incase you're blind, this tutorial only covered CTF maps. I haven't gone into making a CNC map because frankly I'm not familiar with it. I know how to do some stuff, so I might look into it some more later on. I think there's potential to do some really cool stuff with it though.
 

Fixious

Test Lead
Good news! I've figured out to use the Save Mission As command, so you no longer have to overwrite existing maps. I've updated the Saving, Renaming, and Hosting Your Map post with new instructions.
 

Poponfu

Lead Developer
Two tips I think are handy:

When you are making complicated bases , put groups of things that you are going to want to select later but would be a tedious selection in their own simgroups as you work. This way you can just twirl down a simgroup and shift select the objects in it and work faster. ( you can find simgroups in mission objects and click and drag the objects into it .. or open up the .mis file and just copy and paste them into a named simgroup )

Holding shift and draging object(s) selected will make a duplicate in place. This makes mirroring things very fast. I am always deleting half a base as one side gets further along and doing this then rotating 180.
 

Fixious

Test Lead
Shift still puts you back in the game, though. If you bind downjet to something else, Shift will then work as you suggested.

But that's a pain to do if you use the editor quite a bit, since you're constantly having to rebind it back to Shift when playing a real game.
 

Fixious

Test Lead
I have updated the Sky, Fog, and Precipitation section to include another method for removing white boxes when applying precipitation. This method allows for collision, meaning you can be protected under structures from rain or snow. For whatever reason they didn't do this with the snow on Frostbyte so it just goes straight through objects. The picture below shows it better with rain.

8xxkYBG.jpg
 

Fixious

Test Lead
Using Heightmaps
Since it seems a few people are back to making maps, I thought I'd finally detail how to import heightmaps into Legions. Since the editor doesn't have a functioning heightmap import tool I had to find a workaround. It's time consuming and annoying, but it works. The first thing you'll need is an older version of Torque (Torque 1.5 or 1.8 for example). Since you can't legally purchase older versions of Torque/TGEA anymore, use your imagination. You'll preferably want one from around 2007 or so, though earlier ones should work as well. The one in Blockland might work, I haven't tested it yet. If it does, then that's probably one of the only legal ways of getting this to work.

Once you've found and installed an older version of Torque, next you'll need a heightmap to work with. You can either create your own in something like Photoshop, or find one on the internet. For the sake of simplicity I'll just use one I found on Google:

3hlwOXo.png

The lighter parts of the image represent terrain height, while the darker parts represent the lower parts of terrain. Note that this image is 256x256. I'm quite certain that this is the only dimension that will work properly. I've tried 512x512 but it got cut-off when importing. Save this file to your terrain_imports folder, which for me is located at Torque\SDK\example\creator\terrain_imports. Now, open Torque. For me I opened torqueDemo.exe in Torque/SDK/example.

CZEGEF2.png

Once opened, select World Editor at the top. A screen like this should appear:

fJ8tFT5.png

If you've used the Legions editor before some of this might look familiar to you. Go to Window and select Terrain Terraform Editor. Within the Operation list, select Bitmap.

ELF5z56.png

Once you select Bitmap a new window should appear. Navigate to where you stored your heightmap, then press Load at the bottom of the window.

rlzo5uq.png

After pressing Load, you should see the heightmap in the white box at the bottom left of the screen. It will appear in green and black, which is fine. Next you must press Choose at the top right of the screen and select the heightmap once more, and press Load again. Press Apply. You'll note that nothing appears to happen. This is because you haven't set the terrain height yet. Select the General option, which should be above Bitmap on the right hand of the screen. Put in a Height Range of 150 or so, and press Apply. If you don't see any hills you'll probably have to click on Bitmap then General again, then press Apply. For some reason it doesn't always want to register the number you put it. It should look something like this:

hAb5cjT.png

Now go up to File, Save Mission As, and save the map. I simply saved this one as heightmapTest.mis. By saving the map you've created a new mission file, but more importantly a new terrain file. Both of these files are (probably) located in Torque\SDK\example\tutorial.base\data\missions. All you need to work with is the new terrain file you created (.ter). Find it and copy it to your legions/data/missions folder.

Ct13aBd.png

Now, find a mission file in your Legions missions folder and make a copy of it. Again, for the sake of simplicity I'll just make a copy of Frosbyte and rename it to heightmapTest.mis. Open this new mission file and scroll down to the terrain section, and make the following changes:

};
new TerrainBlock() {
canSaveDynamicFields = "1";
Enabled = "1";
rotation = "1 0 0 0";
scale = "1 1 1";
doDistanceFade = "0";
startFadeDistance = "10";
endFadeDistance = "500";
teamIndex = "-1";
detailTexture = "legions/data/terrains/details/snowdetail256.png";
terrainFile = "legions/data/missions/heightmapTest.ter";
squareSize = "8";
tile = "0";
detailDistance = "42";
detailScale = "512";
detailBrightness = "0.95";
texelsPerMeter = "4";
clipMapSizeLog2 = "9";
bumpOffset = "0.01";
bumpScale = "1";
TypeBool locked = "true";
Position = "-1024 -1024 0";
zeroBumpScale = "8";
};

Now, open Legions and host a game. Once the game has started, open the console and type server::loadmission("legions/data/missions/heightmapTest.mis", "CTF"); and press Enter. You should see something like this:

FwTThYX.png

Go ahead and open the map editor (F11) and do a Full Relight. While the objects will look correct, the terrain will still be black. Go up to Window, Terrain Texture Painter, and change the first texture box to whatever you want. I changed it to grass.

PX4YYKw.jpg

Now, lets compare this to the original heightmap image we used:

HfN8lDa.png

Pretty close, eh? Now, before doing ANY terrain edits your MUST do something very important first. Open Terrain Terraform Editor and delete the Bitmap instance. If you don't, any changes you make will simply flatten the entire map.

That's pretty much all there is to it. Yes, it's annoying and time consuming. But hey it's also pretty damn cool. I used this to create Whiteout. Have fun!

 
Top