SpellForce 3: Versus Edition

SpellForce 3: Versus Edition

Not enough ratings
SpellForce 3 Map Creation Step by Step Tutorial
By Rhaaah
In this tutorial, we will go through the complete steps of creating a map in SpellForce 3.
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
In this tutorial, we will go through the complete steps of creating a map in SpellForce 3.

In this example, we are going to replicate the map below. In the first section, Getting setup, you can find the list of recommended steps to make this process comfortable. Throughout this document, you will find checklists to make sure you have done everything. At the end, we will present some FAQ and commonly encountered problems.

ESTIMATED TIME : 2 days to remake the same map yourself if it’s your first time. After that, making a map working with 0 styling and customization could take 4-6h depending on map size.

The document looks very long, but don’t worry there are a lot of screenshots to illustrate.

Source files : here[gitlab.com]. You can download the files this way.



The 4 big steps of the guide :
  • Making a heightmap (10% of total time)
  • Designing the map in the editor (75% of total time)
  • Articy configuration (10% of total time)
  • Scripting (5% of total time)

At the bottom of the gitlab repository, you will find guidelines on what to take into consideration when making RTS maps to get quality competitive maps.

Currently the guide does not cover pure RPG maps, but if there is demand I'll do it too.


===== Getting setup - Tools =====
Versioning your project
If you have coding experience, you may be interested in versioning your project. Aside from the Articy sources, everything can be versioned, so you can rollback in case of issues. See the gitlab link of the example, for one practical way of organizing your files.

If you are new to software development, this project is currently versioned by the tool Git[git-scm.com], on Gitlab. If this intimidates you, I’d recommend making multiple folders, and duplicating all your files to start a new version once you’re satisfied with one step of your project. Otherwise, i’d highly recommend you learning a versioning tool.

NB : The file structure in the gitlab example does not match the file structure for the actual mod in the game installation. But it does not matter for this purpose.
Making a heightmap
The SF3 level editor can be very difficult to use to reach high quality custom maps with different heights itself. However, the editor supports importing heightmaps. To do so, here are the few tools you will need :
  • Generate a PNG file, in black & white. The darker, the lower the map, the lighter, the higher. To do so, you can use Windows’ Paint tool, but if you want to reach some good quality maps, you can use Inkscape [inkscape.org], Gimp[www.gimp.org], or any tools which you are comfortable with to generate quality images.
  • Convert the PNG file to an r16 raw file. To do so, you are going to need to install World Machine[www.world-machine.com]. Don’t worry, you won’t need to learn the tool extensively, the project sources contain a world already prepared for fast conversion.
LevelEditor - Designing the map
This step is entirely done through the Spellforce 3 Level editor. The launcher is located at the root of the folder : SpellforceThree/SF3LevelEditor.exe.

To understand the basics of the LevelEditor, I highly recommend reading through the official documentation, which is also located in the installation folder : SpellforceThree/editor/Grimlore World Editor Documentation.pdf.

To be able to paint the ground tiles, you will need to extract the textures from the installation. To do so :
  • Open the pak inspector, located in SpellforceThree/PakInspector.exe.
  • File/Open… and browse to SpellforceThree/bin_win32/package.pak
  • In the displayed tree, browse to root/textures/terrain
  • Right click terrain, and press Export…
  • Choose a folder, and wait for the export to be done. You will now have a lot of dds files which we will need later on.
Articy setup
Articy is used here to link the objects from the level editor to the actual game. The launcher is found in the installation folder : SpellforceThree/editor/ArticyForSF3/ArticyDraft.exe

This guide is in fact an implementation of the official guide, for the skirmish part : https://spellforce.com/modding/SF3RModdingGuide.pdf

If you already have an Articy setup, you can simply use the same project. If not, follow these steps :
  • Open Articy
  • Click Create new project
  • Select a folder. The folder does not particularly matter.
  • Click anything once it’s loaded, like Entities

You now can browse a lot of gameplay data of the game. The example project this documentation is based on is in Locations/EXP1/Exp1_map_215, which is Mystic Valley.


There is a fan-made alternative to Articy, a SF3 Script Engine. It can deal both with the Articy section and the scripting part. However, this is not an official product, so we won’t cover it here. You can go to the official Spellforce Discord, and find the tool in the SF3 modding section.
Scripting
Finally, to make any map work correctly, you will need at least 1 script : level.as. If you use .as files, you are writing AngelScript files. And while you could theoretically do this in the Windows default notepad, I highly recommend never using this editor, no matter the project. There are countless editors for this. Here are a few good options :
  • A common choice is to use Notepad++[notepad-plus-plus.org], which I recommend to be your default text editor in general. In the context of AngelScript files, you can change the syntax coloring to Actionscript in Language/A/ActionScript or to C++ with the same technique. The color syntax is not perfect but really close and will help you identify basic mistakes.
  • In the official documentation, developers recommend using SublimeText[www.sublimetext.com], which natively supports AngelScript files. This works well for single script files, but we do not have the setup tools used by devs for having a perfect SublimeText support for SF3.
  • However, for general SF3 modding, I recommend using VSCode[code.visualstudio.com], with the AngelScript plugin, for 2 reasons.
    • You have an exact .as file support, with perfect color syntax. So this is your best chance at quickly spotting errors.
    • VSCode allows you to open a folder as a project, and search in the whole project, making searches very convenient. This is particularly good if you also wish to edit spells and general gameplay values, as the config folders could be 1 VSCode project.







Preparing your SF3 mod and file structure
Now that we have all our tools up and running, we need to get started and make a mod ingame :
  • Start SF3
  • Click Mods/Create mod
  • Fill the different fields as you see fit. The important information is to remember your identifier. Here we chose MCT and we will be using this ID a few times in this process.

The game has now created 2 folders in your installation :
  • the source folder : SpellforceThree/data_mods/MCT. We will not use this folder in this tutorial. However, if you ever get to play with spell configs, and RTS/Hero configs, you will. These folders can be versioned via a Versioning Tool.
  • the binary folder : SpellforceThree/bin_mods_win32/MCT. This is where the game loads the real mods (mods you install also end here).



Restart Articy. You will also notice that Articy recognized you made a mod. You are now able to export data for this mod. The image below shows what we will do to export our mod’s data to the binary folder mentioned above :

===== Creating your Heightmap =====
The heightmap is used to very simply create a ground layout for your map. So if you have a water level, a few ground levels, and some mountain-ish walls, all that ground shaping will be easily done via a heightfield map, which we then polish in the world editor.

Going for a heightmap approach has several advantages :
  • It's a common practice, even in other games, to generate maps. So if you have experience elsewhere, you will have no problem generating one for SF3.
  • You can very easily create a pretty detailed layout. Of course, you can be as detailed as you want given your level of experience to get even more impressive results. In this example, our base layout is very simple.
  • In the SF3 context, and specifically in skirmish maps, like in all competitive RTS, a symmetrical map is very appreciated, because it will generate fair games. With this method, it’s very easy to make sure your source is completely symmetrical, and you will have a good base for your map.
Creating your source PNG file
Source files : here[gitlab.com]

For this example, we used Inkscape to generate that PNG file[gitlab.com].

A heightmap works as follows :
  • The only colors accepted are shade of grey, from black to white
  • The darker the pixel -> The lower the corresponding part of the map
  • The lighter the pixel -> The higher the corresponding part of the map



Looking at the map, we have :
  • 2 parts, north and south, which are symmetrical.
  • Each part has :
    • A very large main sector, in the middle, at middle height
    • A smaller sector, also at middle height, connected to the main via a natural bridge of uniform color.
    • A light grey 3rd level, which is higher on the map. That level has an almost white border, meaning you have thin small walls over this area. It is connected to the main via a natural bridge, with a gradient color. So the bridge itself links continuously both levels
    • A dark grey background, which we will call our sand level
  • The middle is completely dark, which is what will be our river level. There is a high natural platform in the middle of the river, surrounded by water. Because of this, the 2 parts are not naturally connected, and we will have to add ingame bridges in the LevelEditor to connect them.

So river (black) < sand (dark grey) < green plains (light grey) < mountain-y terrain (almost white).

I have also committed the .SVG file within the project. This is a vectorial image which can be opened in inkscape (among other tools). You can open it and see how it is assembled. It’s actually shapes over shapes with styling. Some tricks :
  • Turn your page to 1024x1024 px, as well as your scale in the middle
  • Design 1 side of your map, using all the tools you can.
  • Align your shapes to be pixel perfect by calculating the coordinates based on the shapes.
  • Once you’re done, group together that one side, copy paste & rotate, to generate your other half of the map.
  • After that, export the map to PNG.
Converting PNG to r16 file via WorldMachine
Now that we have our source PNG file, we need to convert it to raw16 format. The first step is to load the world that is in the source files.
  • Open World machine
  • File/Open World
  • Go select the file that you downloaded from the source project : png-to-heightmap-converter.tmd

I’m not a World machine expert at all. So we will use a very simple procedure to convert. If you have more experience, feel free to experiment with the configurations.
  • In the Create your Terrain sector, double click “File Input”
    • Go select your file, and click “Refresh from file”
  • WorldMachine tends to adapt a little bit the scope of the map. You might need to do 2 things
    • Increase the size of the map : Project/Project Settings, and change the scale detail to your liking.
      Maps between 512x512 and 1024x1024 are what you are looking for. Keep in mind, 1024x1024 is already large, even for a 3v3 map.
    • Adjust the scope : in the top ribbon, press the Layout view, and then resize/center your map to your liking. Once you are done, go back to the Device Workview, left of this Layout button.
  • In the red Export section, double click “Height Output”
    • Select your filename and destination, keep the format to 16bit RAW and press “Write to Disk”



We are now done with WorldMachine, you can close it.
Importing the r16 file into the LevelEditor
We have our base layout file. We will now import it in the level Editor.
  • Open the Level editor
  • top left, Grimlore Icon/New
  • Select your Heightield file and click “Create from heightfield”.

If you followed all the previous steps correctly, you should now see your map correctly shaped in the world editor :

===== LevelEditor - Design the map =====
Source files[gitlab.com].

If you followed the previous heightmap section, you should now have some map layout available in the LevelEditor. Otherwise, you will need to design your ground from scratch, using the level editor Terrain options :



You can also use these tools to add some customization on your heightmap. Typically, if your ramps between heights are not nice, you may want to use the Level tool to connect them, or increase some wall sizes with the pull tool.

Our first step is to save an initial state.
  • Grimlore Icon/Save as
  • Create a new folder for your map, and name your .mogler file.

Go check the folder. You will see that the map actually is not just 1 file, but a project of 20+ files. So if you ever work on the a with a partner, giving the .mogler file is not enough, you need to share the whole project.

Please read the Troubleshooting section in advance. There are some good practices there to explain how to fix and avoid issues you will most likely encounter.
Setting up your editor tools
The LevelEditor has a lot of tools available for various operations.

If you have multiple screens, you can optimize your organization of your tools by putting some on the other screen while having a large vision over the map.

However, if you don’t, then you need to dock your tools in an efficient way. The tools you will mostly need are :
  • The Properties view. It is in Common/Modify/Properties. This is where you will control the ID of your elements, make exact sizing/positioning, and define the logic of your entities.
  • The Level tree view. It is in Common/Modify/Tree View. This is where you will find your various entities and logic boxes. Another approach is to use the Find Objects… tool, which you will find by pressing on an element in the tree view, and press Ctrl + F
  • Minimap. While it’s not so useful in that very simple example map, when you start building real maps, given the limitations of the zoom in the editor, you would like to see the minimap to know where you are currently looking and what your camera orientation is. So now, spawn your minimap (in View/Camera/Minimap), and press Generate.
  • The console Log. Available in View/Log/Show Log, this tool will help you see that the editor is not stuck, and sometimes give guidance when you are doing something wrong. A couple lines are enough most of the time.
  • The ground brushes. This tool is in Terrain/Ground Patches/Brushes. you will use it to paint the ground with textures. Never close this tool once you open it. The editor cannot handle closing it and reopening it, it generates “Uncaught Exceptions”.

The rest of the tools could be kept floating, and hidden when not used. So here is what your setup could look like. And of course, you should adjust your setup depending on what you are doing.



Also, most of the time you will want your grid to be visible. This is the red square you see in the middle of the picture above. This helps you see at which height the elements you’re about to place will be. You control this height with Alt + Scroll with the mouse wheel. You know you’re at the right height if you can see the white dots on the grid, and if you scroll down, your grid will be “inside” the ground. If your ticks are too large, you can reduce the size of ticks in View/Grid/Size.

LevelEditor Checklist
Going through all the steps below will show you how to complete the checklist.

  • I have a full map layout
  • I have painted the ground
  • I have sectors for all meaningful areas of the map
  • I have made all the logic boxes that i need (consult the Excel for exact example)
    • Camera
    • Visibility Path (careful, that tends to disappear)
    • Player spawn
    • Sector centers
    • Creeps
      • Spawn, either logicBox or PathTool
      • Spots
    • Simple resources
    • Complex resources with custom management
      • Aria
      • Scrap
      • Food
    • Traders
  • All spawn logic boxes have their name start with “Spawn_”
  • I have godstones
  • I have titan spawns
  • I have a volume FX black fog (careful that tends to disappear)
  • I made my map symmetrical as best I can
  • I have calculated in order
    • Navmesh :ground and air
    • Board : ground and air
    • Board : generate visibility
    • Heightfield
  • I have generated the minimap
  • I have exported as a .lvl map, and named it mas_XXX.lvl, and copied it to bin_mods_win32/MCT/levels
Step 1 : Making sure the walkable terrain is really walkable
When you design your map, you have mostly an idea of where you expect units to be able to walk and build, and where you expect to be unreachable. Our first step will be to see if the editor understood what we wanted correctly.

First of all, we are going to need to explain where the player spawns. For that, we are going to go to Logic/Logic Items/Add box, in the bottom middle sector, which will be the main base of Player0. When you click, hold and drag to get a 2D shape, otherwise you will have just a dot, and that’s annoying to find back.. Don’t put it right in the middle, because we will need this space for the sector center. The Player spawn is not the same as a map sector, we just need them more or less next to each other. Then you clear selection (W + Escape), and click on it. You go to properties. You want to :
  • Change the name : From LogicItem_0 to Spawn_Player0. For all your spawns later on, always call them Spawn_XXX. Spawn_ is a keyword in the game, to make sure some things are recognized.
  • Logic : Category = Spawn, Type = Player. You will notice that the box will automatically get colored in deep blue. The LevelEditor has a color code to help us quickly identify logic boxes. Thank you editor !
  • Shape : Extent = 30; 60; 30. Just to make it very visible.



Now the LevelEditor knows 1 place where units are expected to be walking. It means that when we calculate the NavigationMesh (navmesh) and the Board, it will use this as a reference point to see where we can walk.

Now we go to Logic/Navigation Mesh/Calculate. A menu will show somewhere. Choose Ground, and Calculate. For this map, it should take a couple seconds.
Then we go to Logic/Board/Calculate. Another menu will appear. Choose again, Ground, and Generate (deletes Visibility). Again, this should take a couple seconds.

Finally, we go to Logic/Board/Show/Ground. Now, you will see what the game understood, and where ground units will be able to walk. What we can see is that our bottom section of the map is all connected where we expected it to be. However, we have no way of reaching the middle or the other player’s part of the map. So that’s the first thing we are going to fix.



To fix this, we are going to add 2 bridges to the middle island. So in Entities/Eggs/Bridges, we will take the Bridge Ancient Segment, and put it on both edges of the center. Use the grid to be at the right height. Now we go back and repeat the navmesh/Board calculation. If you show the ground board again, this time, you see all the expected walkable areas connected.

Step 2 : Adjusting your terrain manually
It could be that the heightmap you used or the map you built so far is not perfectly connected everywhere, or you want to terraform some areas to make them a bit more unique (Careful to keep the size/gameplay symmetry if you want a competitive map). So you will need to customize some things by hand with the Terrain tools.

In our case, we are going to try something. Bottom map, we see the main and east sector are connected by a ramp. But the bottom part of that ramp is blocked. We are going to make the top ramp very thin, so that theoretically, we could pass under the “natural bridge”.

  • Delete all the tiles involved in the bridge
  • Copy the wall sections from each plateau. This will make it so that the 2 plateaux are completely full and independent
  • Copy the ground sections next to the hole, to fill the hole.
  • If you copied multiple tiles together, they will be grouped. Select all the tiles around, go to properties, and set the GroupID to -1. This will ungroup the elements so we can manipulate them 1 by 1.
  • Select 1 tile that should be under the bridge. In properties, change its Position second value to 50. The tile will now normally be in between the 2 plateaux. Fill the hole again, and copy paste enough tiles to make the bridge

At this point, we should now have something that looks like this.



Then to actually connect the sides, we are going to use the Pull and Level tools, in Terrain/Ground Patches.

  • Go to the ground brushes tool, and configure your brush
  • Select the Pull tool in the ribbon, under the Terrain tab
  • On the right part of this image, pull a bit the ground and try to bring it to the level of the high plateau. You can press Ctrl while holding click to increase the speed. You notice the result is not very appealing.
  • Same on the right. However, we are pushing down instead of pulling up. So press Shift while holding the mouse click. Same unsatisfying result.
  • Now select the level tool. Try to press around both the left and right side. You notice that the 2 different heights will try to join pretty nicely on the left. However, on the right, it’s pretty bad. This is because the average calculated also takes into account the lower part of the tiles. To fix this, experiment. Remove temporarily the tiles, use the Terrain/Ground Patches/Split tool to decouple the tiles, and add back the ground at the end.

To test your art, regenerate again navmesh and board. Then you can see if your tiles are still nicely connected. After a large amount of tinkering, you should be able to reach more or less that result. It’s not perfect, you can still see lots of gaps, but with a lot more practice, there must be some good way of doing this.



In any case, that is how you could use the tools. To avoid such complications, learn to do good gradients of greys in the tool that you chose to generate a png.
Step 3 : Placing sectors
Note that you could do this after painting the ground. But I like to do this first, it helps visualize how we plan the size of each sector, and where we could make transition styles.

Again, we are placing Logic boxes. So Logic/Logic Items/Add box, drop and dimension it. If after that you clicked too fast, you can find your item in 2 ways :
  • Deactivate Ground in the editing mask, and make a large box around where you thought you put it
  • Open the level tree, And go to Logic/Default. New unconfigured items should be there.

Configure it to be a sector :
  • Name : Sector_P0_0. Keep a naming convention for you, this will make your life simple. Here, I use Sector_Player_Index
  • Category = Sector, Type = Center. This is where the town hall will actually spawn. So place this one precisely where you want on the map
  • Size = 130; 80; 130. Adding the exact size here is nice because it gives you a visual idea of the maximum size of the main base. For non main bases, you can reduce it to 80; 80; 80, as it seems to be the max size, with the human border fortress

Then copy paste this logic box to the left side, and rename it Sector_P0_1. Same to the right side, Sector_P0_2.


Now we could do the same thing for the other side, but that’s the perfect time to learn how to mirror your map. What we are going to do is :
  • Delete the north bridge : we will actually replace it, it will serve as a marker
  • Deactivate ground editing mask
  • Ctrl + A : select all things in edition
  • Ctrl + Click the camera logicbox : We still want only one.
  • Ctrl + C
  • Ctrl + V
  • Scroll 2 times with the mouse wheel : this will turn all the things you’re about to paste by 180 degrees, keeping all relative positions.
  • Use the bridge to know perfectly when you left click to apply that copy.
  • In properties, set the group Id to -1, to ungroup your copy
  • Rename all sectors of the top part, replacing the P0 in P1.

Finally, we need 1 additional sector in the middle, to represent the neutral area.

We need then to ask the editor to calculate the borders between the sectors.
  • Recalculate navmesh, board
  • Go to Logic/Sector, and calculate
  • Click Generate Edges (Generate Roads are not necessary anymore, this is for the legacy version)

If you did it correctly, your editor should look like the image below.




We can adjust the borders manually. To do so, press Logic/Sectors/Show, move around the dots, and add some using the Logic/Sectors/Subdivide-Split-Merge tools. After playing around, you should reach that kind of result. Using only 1 neutral sector, you realize that you cannot completely make the sectors end at each plateau. You could achieve this with more neutral sectors, but it doesn’t really change anything here.



Conclusion : If you want a 100% symmetrical map, what you could be doing is half of your map completely (sectors, creep, resources, decorations, … ) Copy paste all that, and you get a perfectly fair map. However, on some PCs, copying a massive amount of data can also crash the editor, so don’t be too greedy.


Important note : If you ever click this calculate button again, it will reset all the Sector edge nodes position. So normally, you should not have to click this button again.
Step 4: Painting the ground
To paint the ground, you need 2 tools :
  • Terrain/Ground Patches/Patterns : you will here define the textures to apply, and the layers
  • The brush tool. You will use it apply the chosen pattern

If you wish to learn more about the theory of texturing, you can find resources online for the details of how it works. In the level editor, we need to define 4 files which will be used for a pattern, as well as a layer on which the texture will apply. The higher the texture index, the more priority it will have. Note that the layer index is not part of the texture, but a temporary setting. So if you need to invert the priorities of 2 textures, no need to create additional textures.

NB 1 : Manual layering should be an edge case. Auto layering is a lot simpler and controllable.
NB 2 : Don't spend hours drawing the ground already. You can leave it very basic, make some quick tests, and then spend lots of time decorating it.



Manual layering

Now we need to apply the textures. We’ll do it simple here for this map :

Main base, and base 1 for each player is using the Basic Grass texture, with a large brush (150 radius, high pressure, no smoothness)
The whole bottom level will use the sand texture. You can keep the large brush, but then make sure your layer index is lower than the grass, so that sand won’t go above the grass.
We will then complete the border of each plateau using the mountain texture. So increase the priority above the grass, so it will override both sand and grass.
At some point, we reached to paint our natural bridge, west of P1 main base. And we notice our texture applies to both levels of the ground patches. What we are going to do is to move the bottom tiles, paint them elsewhere, paint the natural bridge, and put the tiles back.
Paint the roads. We’re going to go from base to base, to the bridges, and maybe 1 road where we expect the godstone to be.

Play around with the options, and in the end you should reach around this result.




Side note : Suddenly, if you realize you don’t like your road pattern. If you update your ground pattern for Road, and change the color texture, it will update everywhere on the map the color. So if you have some change of heart regarding colors, don’t worry you don’t need to restart from scratch.


Auto-layering

The example map was made manually. However, the LevelEditor offers to manage the layers for you. The way it works is :
  • Whenever you apply a new texture to a ground patch, it will assign the texture to the next available layer
  • If you try to reapply an older texture on the same tile, it will keep the previous layer index. So you cannot just redraw the below texture above the top one this way. Instead, simply erase a bit of the top texture to give emphasis to the bottom one

So simply apply the textures in the order you want them to show and it will be fine.

Painting by properties

You can directly assign a pattern to a patch layer. Go into properties, and type the exact name of the property. This is pretty brutal, but useful to quickly paint a very large surface. For example you can make your whole base with Ctrl + A, properties, and type on Pattern1 the base pattern.

Deleting patterns

At some point, you might have made mistakes and you need to delete some textures on patches. To do so, pretend you’re about to brush, but hold Shift while drawing. If you use the auto-layering, it will nicely unpaint the pattern you have selected. If you made it manual, you need to choose the correct layer to delete the correct texture, which can be confusing.

Note : You can try and go in the properties of a ground patch, and try to retype “None”, but that will somehow make all patterns invisible. It might be a bug, so don’t do it this way.

Smooth Color Blending

Another nice option for painting is to use the Smooth color blending. On the whole tile, it will try to mix them more naturally. It’s all about playing around with the options to look nicer

Left : Off. Right : On

Taking example on official maps

If you take a look at official maps, you will realize they have made very detailed maps with lots of layering and blending and varied textures. You can take examples of them to see how you can improve your layouts. There is no easy way to know the exact patterns they use, however you can use the debug tools to have a better view of them.
  • Start the game with the debug tools
  • Load the map
  • Press Ctrl + D : Start the debug tool
  • Press Ctrl + R : Rendering menu
  • Press Alt + F10 : Disable all the entities

Suddenly, you will now basically only see the ground textures. And by zooming on them, you can try and guess better what they use. Then in the LevelEditor, you try to replicate a small area until you’re happy with the result. You might be surprised what are entities and what were actually real ground textures.



Official example maps

In the Spellforce/editor/Template Map/settings, you can find some example textures left by the developers. If you like that ground, no need to look further, just copy the patch patterns configs.
Step 5 : Adding water
Adding water works in a similar way to adding new ground tiles. Select your height level, go to Terrain/Water/Add, and then simply add an area of water.

For the purpose of this map, we went with the following choice. Careful, the menu will not be docked by default, so it might be hidden behind your other windows.

Note that water can also be configured as a resource. We will need to do this for Aria. We will see about that soon.

Step 6 : Logic boxes
List of all Logic boxes[gitlab.com]

Logic boxes are the most important part of the intelligence of your map. We have briefly talked about it while making the first player spawn, and when making the sector centers.

To make a nice looking logic box :
  • Go to Logic/Logic Items/Add box
  • Click and hold left click, you have a dot now
  • Move the mouse to make a 2D shape, keep holding left click
  • Press Space, and move the mouse up, to make a 3D shape
  • Release left click
  • Adjust size in the properties

Finally, you go to properties to configure it. And if you lost your box, go in the level tree, and look for Logic/Default. If your new box is unconfigured, you will find it here.

Important note : Anything of the category Spawn should have its name start with “Spawn_”. It is a keyword used by the game to correctly find the references.

Here are the boxes you absolutely need to make a Skirmish map. Please look in the excel sheet for the exact configuration in that example map :
  • Camera orientation : Used to make sure the camera looks north when starting the map. It might not look important, but it’s stressful and inefficient to not have it well aligned with the spirit of the map.
  • Sector centers : All details are given in the step for sector configuration.
  • Player spawn : We already made the Player0 spawn, also make a player 1 spawn since it’s a 1v1 map.
  • Path tool : The standard is that when you make a skirmish map, the map is explored by default, but fog of war is still on. To achieve this, we will add a Path around the whole map. So Logic/Paths/Path tool. Then circle around the map and press escape. We renamed it to “SkirmishPlayerVisibility”. Weirdly enough, it doesn’t need a logic type, the game will figure it out on its own. Note, you will probably delete it accidentally with your operations. But even if you do, you can remake it, and you don’t need to recalculate the whole map to have it working in the export.
  • Traders/Merchants : Merchants are NPC that you can trade with. They work the same way, a logic box, configure it as per the excel. We are putting one in each main base, and one in the neutral island.
  • Creep camps. Creep camps have 2 parts to the configuration. We will put 1 zombie group per player, 1 bear in the mountain per player, and 1 stone golem on Player 1 just to show different icons..
    • The actual creep spawn. In the excel, it’s for example Spawn_Zombie_P0. This will be used to explain in Articy what kind of creeps we will spawn. Same system, new box, configure it as per the excel sheet. You could use the box height to quickly differentiate the level of each creep. Additionally, if you do creeps with a simple logic box, your creeps will spawn unable to move by default. So they will be statues until you attack them. To prevent this, use a PathTool instead of a logic box, and assign it the same logic information.
    • The creep spot. This is used in a hidden way by the game to find where to show exactly the creep icon. The name needs to be exactly "Spot_" following by the creep spawn name. So if your spawn is "Spawn_Creep_1", the spot is called "Spot_Spawn_Creep_1".

For custom resources, and loot drops, we will see later on. Recalculate navmesh and board, just to be sure nothing broke. This is basically how it should look :



Or if you made it a pathTool :

Step 7 : Resources
The first thing to know is that anything can be a resource. Any entity could be given some logic to be considered a resource. So you could chew a building, and mine a tree for iron. But let’s be serious and make resources that make sense.

If you read the troubleshooting section, you will see that before any Skirmish map works, there is a minimum amount of entities for the map to be able to start by the game. So adding lots of trees, and iron/stone spawns, and so on will give you a really big headstart on those minimal entities.

Some entities in the LevelEditor are already tagged as natural resources. You will easily identify them by looking for the green square top right of the image. If the item you want does not have it, you will have to manually configure the logic of the entity.



Trees

Please check the guidelines on recommendations from PvP players on how to place the resources (link will be on the first page of the document once it’s ready). It will tell you about the amount of resources, how to distribute them on the map.

Let’s start with some trees. We will go to Entities/Statics/Rock Grasslands/Trees. Find some trees you like and make patches of wood in the main and the grass sectors.

After placing a few, you realize your wood patch doesn’t look natural. It’s time to go to Entities/Static/Placement Settings. Another tool will show up. In its configuration, you can see some options so that the editor randomly changes the size and rotation of the trees.

Then in the small grass sector, we also will do 1 patch of normal trees, and then some dead trees, to which we will deactivate the resource logic. This way, you can see how not all trees need to be cuttable. So if you want some trees for filling the map (careful about not obstructing building space too much), you can still make sure the wood gathering is very efficient and centralized in one place.

Finally, don’t fill the Player1 area, we will do a big copy paste.



Simple resources

Stone, iron, blackash, moonsilver, lenya all work in a very similar way. Place down the resource point, and you’re done if it has the right logic. Here is where we will put those
  • Stone : Main, mountain
  • Iron : mountain, grass sector
  • all T3 resources : mountain

These resources can all be found under Entities/Static/Eggs/RTS Resources.

What the developers do in a lot of skirmish maps, is to put Lenya with Aria, right alongside the pool, and moonsilver/blackash more or less together. There is no particular logic to that, but keep in mind that having T3 resources at similar places makes it fairer. Having the aria very exposed while the dwarf can mine his moonsilver unbothered in the far back is not a particularly good design.

We could do Lenya here as well, but let’s put it at the same time as Aria.



Aria

Aria is the toughest resource to place in a way that makes sense. The way it is often done on official maps is to take an entity that can serve as a pool, pull down the ground level inside this pool, add water with the aria color and finally assign the aria resource to the water.

This is challenging because the water level of aria is actually a bit higher, to make it so that water is consumed while being gathered. So you might need a few trial and errors to get a good aria pool working.

For this map, we will Take Entities/Rock Grasslands/Templer Hybernier/Ancient Altar 01 Floor. We will also add a uniform Scale of 2 to the object in its properties to make the pool a bit more consistent.

Then with the Pull Terrain tool, we will lower the ground inside the altar (make sure your editing mask allows touching the ground tiles). Then we add the water, with the Aria Pond template, and we set the LogicPlaceHolder = true, as well as the Logic categories.

Don’t forget the Lenya that we voluntarily didn’t place before, and you should obtain more or less this result :



Food

Food is a little bit weird, but in the end, pretty easy.

Food is an animal spawn. So to make it work, we are using some small visual entity that will basically be invisible or uninteresting to the player. For this, on this map I chose Trees/Beech Cluster Green 01, and put it in both sectors, with the Logic Resource Meat. For the mountain sector let’s go with Pebbles01 02 Autumn. If you can’t find it, remember to use the Entity/Tools/Entity List and search for “Pebble”. Really nice to look for resources when it’s not always well sorted.


Make sure you rename them in the end to be able to find them quickly. For example, in the Excel you will find Meat_P1_1 for Sector 1 of player 1.


Scrap

Scrap is the Troll Iron equivalent. So it would make sense to place it in sectors that have iron by design.

The right object is Entity/RTS Resources/Depot RawScrap. It is not preconfigured (weirdly), so add the Resource/RawScrap Logic.

Scrap has the unique feature that it can be located outside of a sector and gathered by any scrapper who goes to it. For the scrap that ends up in a buildable sector, we will simply assign the values in Articy on the whole sector, and the game will dispatch as it wants. But for lone scrap piles, you need to keep track of their ID and we will get to it in Articy later on. We would like to put one on this map, in the middle island but do that after we make the resource symmetry.
Step 7 : Resources, final touches
Godstone

While not being a resource, it is still a critical part of the map, and since we’re about to make the symmetry, we might as well deal with them now.

For this map, we will place a godstone in the main base and one in the other grass sector. In the Entity List tool, type “Godstone”. What you want is the Exp1_Godstone. The normal Godstone spawns legacy heroes which is absolutely not what we want.

However, again something weird in the editor. The Exp1_Godstone does not have the correct display, it’s basically just a dot. To fix it, we will actually place a legacy Godstone, and change its property “Build Desc Name” to Exp1_Godstone. You will notice the QueryID will change, so it knows it’s actually a different object in the game.

We also want one in the middle neutral sector, to show how neutral godstones work. However, we’re about to do the symmetry, so let’s not do it yet and do it right after the next step.



Tainted Obelisk

This is rarely used, but you will need some tainted obelisk to allow for titan production. The best way is to search through the entity list for Titan. It will look like this. Yes ingame it renders a bit different, but don’t worry it’s the correct item :



Make the map symmetry

We will go in depth about the why in the Modding Guidelines as to why we really appreciate this step. It’s not necessary for Journey but for PvP/PvE skirmishes.

We have completed the whole sector side of Player0. We want player 1 to have exactly the same thing. What we are going to do is a massive copy paste :

In the editing mask, deactivate everything but entities (that include grounds, water, logic boxes)...
  • Delete the middle bridge of Player1. Again, we will use it as reference
  • Ctrl A
  • Ctrl + C
  • Ctrl + V
  • Double scroll with the mouse, to make a 180° rotation
  • Find the perfect place, and click
  • Ungroup your items with -1 in group ID

NB : Make sure you deactivated random size and orientation for entity placement !

For some reason, some elements don’t like the rotation this way. But most of them worked. So go ahead and fix the buggy elements. In my case, the bridge, the pool and the godstones didn’t like the rotation. Resources seem to have all correctly moved. It was probably because placement settings were still on random rotation and scale.

So do the last adjustments, remember to redo the aria pool, digging underneath and adding the water, and the missing neutral sector elements we wanted to add (godstone, scrap).

When you look in your editor, it should look somehow like this. Pay no mind to the missing T3 resources in the top left sector, this is the editor unable to handle the zoom at this level. If you zoom in on this place, you should see all the elements.

Since we played with the bridge again, make sure to recalculate the navmesh/board, to make sure everything is still walkable.

Step 8 : Environment
Environment can be pretty impactful on how your map feels. The options are in the Shading menu.

You can change the global sunlight and environment settings. While they are not necessary for the map to run, it will make it more unique. Directional light gives the sun color and angle. Environmental maps can be found in the bin_win32/textures folder. It is all the files that are called "environment_cube_*.dds", to not mix up with the environment folder inside that texture folder.


Keep in mind to not make the map too dark, as it can make the map harder to read and play.



Note: When launching the game in debug mode, you can change live the PostFX mode which gives a completely different feeling to the map. So if you're not sure from the level editor, don't put any, load the map in debug mode, and go through each of them. (Ctrl + D, Then Ctrl + Q, then Alt +N) until you find the one that fits best.
Step 9 : Volume FX
You will notice once you play your map that the borders look very weird and have buggy textures. This is something that cannot be avoided when creating the map. However, you can use the VolumeFX to reduce the visibility, and make sure you don’t show the parts you haven’t decorated.

To do so :
  • Go to Shading/Special Effects/Volume FX
  • Create a new template, as per the bottom screenshot
  • Add a volume FX box around your whole map, like you would do a logic box. You should see some shadings as you place your box and dimension it around the map. You will realize, you need to make it very deep and high, to avoid darkness on your grounds or your treetops.

The effect ingame will have this darkened border, and a nice cut to the map :

Step 10 : Calculate, Export and Test the map
At this point, you should have done almost everything. We are going to completely calculate (compile, in some way), the map. After that, we will export it as a .lvl file, and place it in the correct folder.

All of this happens in the Logic tab.

The best way to calculate is to simply click the “NavVis/Calculate” button. It will redo all the right steps in the right order. This can be very long depending on the map size. So start it, go grab a coffee, start looking into the Articy section of the map, and every now and then, check the logs to see when it says “...finished generating Visibility Bitmaps”.


If it’s the first time you do this, it could be that it doesn’t calculate the Air grids. To do so, here are the steps you can manually do :
  • Navigation Mesh : Calculate Ground, Then calculate Air
  • Board : Calculate Ground (delete visibility), Calculate visibility, Calculate Air
    • Careful, even though it says Generate as well, it does not generate ground ! So make sure you calculated the board ground first
  • HeightField : Generate from NavMesh

Now click Board/Show Air, and you should see some uneven air grid :



Generate again your minimap, would be nice to get the final layout.

Once you are done, click the Grimlore Icon/Export. To name your map, make sure your file will be called map_XXX.lvl, where XXX is a number between 001 and 999. This example used index 899.

The index is pretty important. It needs to be unique within the game. The safest way of getting a correct ID is to join the Official discord, and consult the ID reservation list. Ask the moderators for a reservation, and they will make sure you have an ID that won’t override official maps or other modded maps.

You will then need to add the map in your installation folder, so that it will be found. It will be at the following location :

Step 11 : Decorate
At this point, I highly recommend making sure your map fully works before you spend hours making your map look marvelous. So stop after Step 8, make the articy part, test ingame, and come back here.

After you’re done making a batch of decorations, you simply need to repeat step 10 completely, to make sure all is still working as expected.
Troubleshooting the LevelEditor
How do i move camera

The core thing is press Alt + use the mouse button :
  • Alt + left click + move : turn camera around
  • Alt + right click + move : shift camera
  • Alt + hold middle mouse + move : zoom camera
  • Alt + mouse wheel scroll : change working plane level

The nice thing is that it’s the same controls for the other editors, like DataEditor, AssetTool, …

W + Escape

If at some point, your selection seems bugged, press W and/or Escape, so you will select Transform + clear selection. Then usually you will be able to use the editor again. The slower way is to manually go back to Common and press Select, but it’s more consistent.

I can’t paint anymore

Don’t close the brush tool. Once opened, the tool needs to stay open, otherwise, you will encounter exceptio popups..

I don’t know what’s going on

Go to View/Show log. Your logs widget should now show somewhere, preferably at the bottom of the editor. It’s really good to keep a couple lines of logs, so that you know when the editor is stuck or if you’re performing some illegal operation.

I can’t select stuff/I keep selecting the wrong stuff

Did you play with your masks ? It’s really good to change them when you work on something specific, but if you forget about them, you will end up thinking the editor is bugged when you try to do something else.



I can’t move stuff

Did you use the Ortho view to recenter yourself ? Controls don’t seem to work in this mode. Make sure none of the camera options are enabled in the View tab :



LevelEditor has a weird black area above the map, so i have bad vision

This sometimes happens that for some reason, the editor's field of view is in a weird state and prevents you from seeing the map comfortably. Even changing the camera angle, it gets worse.

To fix this, see the previous tip, Click View -> Overview and Ortho, and deselect them. It will basically reset the view in a nice way, with the right camera angle and a good distance. Then if you start zooming and changing angle, it will rework.



I can't find some entities/Logic boxes i placed

Go to Common/Tree View. You will be able to browse all the items you put down.

Cannot modify this subsystem when calculating navmesh

Did you deactivate editing mask for logic boxes ? If so, the LevelEditor cannot change values.

LevelEditor crashes

It is possible that your editor crashes and you don’t know why. We should expand this list as we discover new sources :
  • You have another mod activated that is not in development. Somehow, the LevelEditor will crash if you have another mod turned on in the game, even if the game is not running. To fix that, close your editor, open the game, turn the mods off, except the one in development you’re working on., close the game, and then restart the editor.

Map does not start when i test it

To have a map working, the game requires a minimum of 260 entities and 4 sectors, for skirmish maps. Entities can be anything, trees, grass, rocks, rubbles. Just make sure you have at least that many elements. When calculating your navmesh and board, you should have a count of the amount of entities.
If that was not the case, start the game in debug mode :
During the loading of the map ingame, the game will tell you what step it is doing. If there are errors, popups will show. Keep the error message, and try to figure out what it means, most of them should be understandable. If not, feel free to post your popup in the discord and see if someone can guide you there.



My visibility path does not work ingame

For some users, the Path objects seem to disappear under certain workflows. Start by checking it’s still on your map. Then make sure you put the correct name in the Level.as file. Another way is to add a print in that section and look for debug logs, to see if the game actually tried to initialize it.

Pattern layers don't work anymore

Sometimes, you use 1 pattern, paint on the tile, change the pattern 3 4 times. Then you try to paint again 1 other pattern and you realise it overrides an existing pattern. So it does not paint where you expect.

The sad truth is, there is no nice way of fixing it, you need to completely reset patterns. To fix it :
* Make a gigantic brush
* Apply the None texture on the brush
* Paint over the whole map on every layer this pattern, from 1 to 7.

You will lose all your layering, but aside from layer 1, you will be able to start fresh. Next time, it is better to prepare in advance for this. Apply some very faint amount of the textures on the right order on the tiles. And then you can erase/repaint as you see fit.
===== Articy - Configure the map =====
Now that we have completed the .lvl file, and all the logic boxes needed for the gameplay intelligence, we need to go in Articy to link the elements from the level to the game itself.
Project structure
Under Locations, we need to create a folder which will match the ID of the mod, at the same level as EXP1, Journey, …. In our case, MCT.

Right click MCT, New/Location/LocationMap. Call it MCT_map_899. Remember how we exported the .lvl file with the map id 899.

Same as 215, we will add a few layer folders, to sort the elements we’re about to create. Let’s create Resources, Spawns, Factions, Sectors.

Listing all items in Articy
We are going to basically redraw the schematics of the map into Articy, from all the logic boxes’ standpoint.

First, we draw the sectors. We need 2 rows of 3 rectangles, to represent the 2 player bases. And 1 round, for the middle neutral sector. Name these shapes with the according sector names. Change the fill color of each box, so that they match with their other player counterpart. This will help you better make the same config on both sides. Then, in the tree, move the several sectors in the Sectors folder we made before.

Next up, making the player spawn. Let’s drop 2 flag shapes, and call them Player0 and Player1. Note how we don’t put “Spawn_” in the name, even though we did in the LevelEditor. Move them into the Factions folder. Let’s make them red

Then, we make the spawns for the traders. 3 crosses, small, purple colored, which we will name with the exact spawn name put in the LevelEditor : Spawn_Trader_P0, … Sort them in the Spawns folder.

We continue with the lone resources. While we made custom IDs for meat, and assigned resource types to aria, the values will be done in the sectors. So the only resource we have floating here is the neutral scrap in the middle. We’ll add a small green cross, and sort it in the Resources folder.

All that’s left for now is the creep spawns. This time, like traders, we need the exact name of the spawn, so Spawn_Zombie_P0, … We’ll make a middle sized orange cross each, and sort them in the spawn folder.

Your project should now look something like this. As you can see, this is very rough, we don’t really care that they’re exactly well placed.



Note: We could have been smarter and already applied the templates we’re about to do in the next section, and then copy-paste the elements. That would make for less clicks, but this is a tutorial, we take it step by step.
Map description
The first thing we will fill out is the level properties. Click on the map in the tree, and open the properties by pressing F8.

Singleplayer Faction will be filled with Player0. Double click it and look for Player0 from the current map, not from other maps.

Multiplayer Faction Slots will list all players available. In our case, Player0 and Player1. For Articy to accept the Players to be assigned in the various player slots, the Players need to be assigned a template, which is explained in the next subsection.

Game file name needs to be set to be exactly the same as the .lvl file. So for us, it will be map_899.

Scenario should be a skirmish.

You also should fill the Default Display Name. as well as the Default Description Text.

Finally, you could decide to enable/disable other game modes, such as domination. Best leave it all by default, unless you have specific plans.

Configuring the templates
For all the elements we have designed onto the map, we need to assign a template for them. Explain a sector is a sector, a resource is a resource, …



To do so, select the item and either :
  • Click the assign template, make your selection, and then click “Open properties”, left of the “Assign template” button
  • Press F8 to enter properties, go to the template tab and click Choose template

Players

So for both Player0 and Player1, select the “Faction Slot” template. We need to fill a few fields :
  • Race : Double clock, and select Entities/Main/RTS Races/Human
  • Faction index : 0
  • Color index : 0

For Player1, of course change the indexes to 1. Additionally, for all other players, we need to also give the default AI faction, so that AI can play the map. Double click Default AI configuration and search for “Default AI”. There should be only 1 option, the DefaultSkirmishAI should not be used here.



Sectors

For each sector, we will assign the Sector template. The configuration is different depending on what we want from the sector.

All sectors have 4 sets of parameters. But for our use case, we only need to fill the first one. There are 3 things to look for :
  • Initial owner Slot. This is what makes the sector a main base. You need to double click on it and assign the matching Player of the sector. So on Sector_P0_0 we assign Player 0. But we don’t do it for Sector_P0_1, because anyone can get it
  • Unconquerable tag : This is what we need for our Sector_Neutral. This way, no one will build on it
  • Resources : This part is straightforward.

For the resources, you can look into this document[gitlab.com].

It details the amount of resources put, and some quotas for the map to feel nice. Keep in mind, this is a tutorial map, so it’s normal that the numbers are incorrect, the layout is really bad from a player’s perspective.

Here is the example for the main base of player 1.



Lone Resources

Now for all sorts of non conventional resources, you will have to manually add an element in Articy, assign it the Resource Deposit template. In our case, we use it for the Neutral scrap in the neutral sector. Here is the configuration :



Spawns

All the spawns that we added will need to be assigned the Creature Spawn template. Then, we need to explain the type of unit to spawn. Here is the way to find them :
  • Creeps : The creeps can be found in Articy, in Entities/EXP1/Exp1_Mobs/_SPAWN GROUPS SKIRMISH
    • Zombies : MP_Zombies_Easy
    • Bear : MP_Bear_Medium
    • Golem : MP_StoneGolem_Elite
  • Traders : They can be found in Articy, in Entities/EXP1/Exp1_Traders/Skirmish
    • Normal trader for main base : EXP1_MP_TraderMain_Armor
    • Rare one for potions and non main bases : EXP1_MP_TraderRare

It’s a bit weird to do it Articy, and very prone to misclicks. There seems to be no other way than :

Open the properties of the spawn
Navigate to the entity without clicking on it
Drag & drop it in the “Creatures to Spawn” bar

In the end, for all entries, it will look like as follows :

Exporting the data
Now that wasn’t so bad, was it? For a simple case like this, that’s what we need.

We will now export the data. There are 2 formats for it :
* the "default" one will export in a .content file in bin_mods_win32/modname/configs/levels.
* the "plain text" one will export in text files in bin_mods_win32/modname/configs/levels/map_xxx.

Note: It does not matter which one you choose really, depends how much you want that data protected. But once you chose one, don't change the format because then you might get surprises as to which export takes precedence. So always export as content, OR always export as plain text, but don't mix. If you do, delete all those files and reexport to be safe.



If your export doesn’t do anything, try to right click the map and click “Export Selected level description”. It should give you an error message about what’s wrong.

If everything went right, you will now see some files appear in bin_mods_win32, as follows :



Looking through the files, you will be able to read the configuration of the map.

The output files are committed here[gitlab.com] for reference, if you need to compare to debug some errors .

At this point, we have the level file in bin_mods_32, we have done the Articy configuration. What remains is some final scripting and last configs, and we will be ready to test the map.
Troubleshooting Articy
Grimlore property

You might end up getting an error when exporting, explaining that you are not allowed to export Grimlore Games products. This usually means that you put your data in the wrong package name (so not under your mod). Go back to the Project Structure section, to see where and how to name your Articy folders correctly.
===== Scripting =====
We still have a couple files which we will need to manually add, to complete the configuration of the map.

The .as files will need to be added to the following folder :



If you wish to learn more about what you can do with these script, you will need to look through the official documentation[sf3fgscripting.spellforce.com].
map_abc.txt
This file is mainly used for the default game mode and camera.

Here is the example file[gitlab.com].

All you need to do is to edit the map number, and the names of the objects on which the camera starts.

Fun fact, the Camera_Player0/1 are not objects that need to exist in the LevelEditor. You could pass the id of any entity present in the level, and this will be the starting point for the player at the shown index. Remember that we used Camera_Player0 as a camera direction, to make sure everybody starts from the same standpoint.

The file will need to be placed here :

Level.as
Reference[gitlab.com]

This file is the initial script that is run when the map is being initialized. We can do a lot of things here. The only things you need to change for now are the following variables :
  • the “NeutralSpawns” array of strings. Here you need to reference all the creeps that will not be hostile by default. Their icon will be beige instead of red.
  • the 4 arrays of spawns. This will be used also for the icons, to explain which level you deem your creep groups to be. Don’t put them randomly, you will see that it actually matches the folder names where you found the creep groups in Articy.
  • The path_visibility string. This is the PathTool we have defined in the LevelEditor and so far never used.

This script currently performs the following task :
  • In the Pvp_PrepareCampNotifications, we initialize the icons of the minimap.
  • For all neutral spawns, we make sure that they cannot be auto-attacked. However, once they are attacked, an event will trigger on the whole group to make them all hostile (Skirmish_OnCreatureDamage function)
  • For all factions, add the partial visibility to the map, based on the name of the PathTool we gave
  • For all factions, we prepare an event for the first time a hero spawns, so that we will auto equip the potions and the stone of homecoming, and load them in the spellbar in F10 to F12.



Challenge : On official maps, if we extract the Level.as file, that equipment section is not defined directly at this place. It is done via mixin classes, in the initialization of a standard Skirmish match. But for some reason, it never worked no matter the approach we did, so we made our own. If someone finds out why, feel free to comment so we can improve the guide :)
===== Test, validate, finalize =====
If we put all the files correctly in the installation, you will now see the map available in skirmish, as shown in the screenshot below.



Now run the map and start checking that everything is running correctly. Look at the introduction screenshot for the expected result.

Fun fact : When I made the first export, it was not actually working fully the first time. My PathTool had the wrong name, and some godstones were not the Exp1 version. You will make some mistakes, so please find after a checklist of things you want to verify.
Final Checklist
Here are all the things to look for, when checking a map :

  • My map shows in skirmish. If not, some files are missing, probably the map_XXX.txt and the map_XXX.lvl
  • I have vision over the whole map. If not, did your PathTool disappear ? ( see troubleshooting LevelEditor). Or is your naming consistent in LevelEditor and Level.as ?
  • My creep icons show. If not, did you correctly fill the arrays of creeps in Level.as ? Did you comment out the line PrepareCampNotification accidentally ?
  • My creeps have the correct type ? Did you name the creep camp, and put the correct element in Articy for the group ?
  • Can I summon skirmish Heroes ? If not, you probably have the wrong godstones
  • Are all my simple resources working ?
    • That should be automatic. If not, maybe you didn’t put the resources for the sector in articy, or accidentally removed the logic off the entities
    • Make sure you didn’t make typos, so check all sectors
  • Is food working ? If not, make sure your hidden element is correctly configured and articy has a value for Meat
  • Is Aria working ? Since this is a tricky resource with the water, pay extra care here. Maybe the water has no logic, or the pool is too deep, or the path is blocked by stones on the navmesh.
  • Did you traders spawn ? Main base ones should sell armor/weapons, random ones on the map should only sell consumables. Did you name the spawn correctly and assign the right Creature in Articy ?
  • Am I allowed to walk in unexpected places ? This would be a navmesh issue. Try to bug out your map, and then look for the Navmesh/board in the LevelEditor. Did you also recalculate everything before your last export ? To test this, try to use the Dark elves Guardian of Nor, and use his Soul Transformation to reach unexpected places.
  • Is my Air grid working ? Check with Troll ironbeaks, for a quick test. This would be a navmesh/board issue. Did you calculate the heightfield ?
  • Did I test the map with actual players ?
    • You might think you have a good concept, but in the end, you ask players and they really don’t like playing the map. It’s sad, and would require you to probably rework the map a lot.
    • To avoid this, it is recommended to make your map, paint everything with 1 color roughly, add the logic, and directly try it out without any decoration or styling. This could be around 2-4h of work to get the very basic version of the map working. You can then already have it being playtested. That way, if you have to change your hieghtmap, and redo some core layout things, you will not lose days of work.
    • To test with other players, you will need to publish your map. You don’t need to put it on the steam workshop, do a simple publish, and share the files manually with your testers.

Conclusion
For generating the map from scratch, we followed these steps :
  • Generated a heightmap, using whichever tool you like. In this case, an svg file made in Inkscape, and exported as a black & white png
  • Converted the png into an r16 file via WorldMachine
  • Imported the r16 file in the LevelEditor
  • Designed the core features of the map in the LevelEditor
  • Exported the map from the LevelEditor in a .lvl file, and placed it in the mod folder of the installation, under levels/
  • Linked all the LogicBoxes in Articy, to give them intelligence like resources and units to spawn.
  • Exported the Articy configuration as plain text files, which ended up in the mod folder of the installation, under configs/levels/
  • Filled out map_XXX.txt file, which is a header file for the camera management
  • Configured our AngelScript files, notably level.as, and copied them in configs/levels/map_XXX/Scripts
  • Tested the core features of the map ingame
  • Iterated on the files to fix bugs and improve decorations.

It looks like a lot of steps, but every step is fairly easy and understandable.

This tutorial covered the basics of making a map, and if it’s your first time, it might take you 1-2 days to get it fully working, and that is normal :) . It is a lot to learn about, and lots of easy mistakes to make. But now, you can make your own maps from scratch.

At the current state of the documentation, we didn’t go into other nice aspects of map making, such as Lighting, FX Effects, Weather, creep patrol paths. We will complete this guide as we see the need rise.

The next step for you is to make your own maps. Basically, follow the same steps, but get creative !
  • Come to the official Spellforce Discord and request a map ID (link ingame)
  • Follow this tutorial
  • Take into the account the recommendations[gitlab.com] for making skirmish maps.

Thank you, and congratulations !
Common issues
Please find here a list of common issues you notice with your maps, and what hints there are to help you debug it. If you have any issues, please post in the comments below or in the official SpellForce discord, and we'll update this guide.

Map loads, but my scout and buildings are under the map

You may notice that your test map, which currently is undecorated, spawns the players correctly, you can control them, but they are existing under the map. You can move the scout, you can build farm and they produce, but you don't see them really.

This happens when you don't have at least 250 entities on your map. To fix it, create a batch of 20 trees, make a bunch of copies until you have around 300 entities on the map. Recalculate, and your issue should be fixed.

My scout walks through buildings or trees

When we import a map via Heightmap, all ground tiles have the coordinate 0 on the vertical axis, even if there is elevation. It's because the editor does not "place" the tile at the right height, it transforms it to look like it's only at the heights you required. Knowing that, you cannot always trust the entities coordinates to know if you're matching the ground. If you have this bug, lower your entities to start a bit below ground, just to make sure it crosses the ground. So the tree roots are really under the map a bit.

For bigger maps : when the LevelEditor calculates the navmesh, it has an option MaxDynamicObstacles at 1024. One of the cause is that you have too many objects that are blockers that can be removed (like trees, or barricades, ... ). Increase that number to 3000, and see how it goes.

Spawn_Player0 referenced in level does not exist

While this shows as an "error". It's not really an error. The spawn with logic Player is to explain which factions are present in the game, but we do not spawn units from there. The easy fix is to create a spawn in Articy, with no owner, with no units to spawn, but the same name, and re export. It makes debugging a bit more comfortable.

My heroes cost resources. Why ?
Check the articy section. You might have selected the Skirmish "scenario" but forgot the "Map Type" as Skirmish as well.