Tooth and Tail

Tooth and Tail

26 ratings
Map Editor Guide
By EELuminatus
Quick guide on the basics of the Map Editor.

The Editor has originally been a developer tool for making the campaign hubs. That makes it quite powerful, on the one hand, but not very polished or easy to use, on the other hand. This guide should help you get started and avoid crashes, in the first place, rather than explaining all the features of the editor.

It now also includes a section on XML manipulation, enabling you to do a few things you couldn't do in the Editor.
3
   
Award
Favorite
Favorited
Unfavorite
How to Use Custom Maps
Maps made in the editor can be used for "Multiplayer" games, including Offline matches against the AI.

Custom Maps can be played in Offline lobbies as soon as they have been saved in the right folder (default on Windows: %appdata&\ToothAndTail\worlds, default on Unix: ~/.config/ToothAndTail/worlds - the editor will automatically save them there).

In order to play them in Online lobbies, you first have to publish them to the Steam Workshop, and the owner of the lobby has to have subscribed to that map on the Workshop, in order to select it (you can use them in Offline lobbies, as well).

In order to select a Custom Map, you need to go to match options in your lobby before factions have been selected (because Custom Maps determine team configurations, so factions and teams have to be picked, again). You can pick Workshop Maps or Standard Maps (=random/seeded), and in Offline lobbies even Editor Maps.
If you are in an Online lobby, you have to explicitly allow Workshop Maps when creating the lobby, in order to choose that option later. This will make it impossible for GOG and PS4 players to join your lobby, because they have no access to the Steam Workshop!

Once a Workshop map is picked, you cannot change the number of players, game mode, deck size etc. - these parameters are all determined by the map. (You'll have to play on a standard/random map if you want to change these parameters.)
Creating a New Map
When you start the editor from the main menu, you can
  • load an existing map,
  • create a new map from scratch,
  • or generate and edit a random/seeded map.

If you just want to try the Editor for the first time, random maps are a good start to dabble around with.
If you're making an actual map, however, you better start with a blank map or download a template map to start with. BestSakuyaNA, for example, has uploaded a 1v1 template with starting Gristmills for both players and a limited playable area: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1587387089

When you create a new map, preferably make the full map size at least about 20 tiles bigger in each dimension than the playable area should be. Otherwise you cannot edit terrain outside the playable area (so it looks boring) and the map's borders might glitch when zoomed out in spectator/replay mode. And even if you don't want a square shaped map, preferably make the full map size square shaped and only limit the accessible area, else the mini map will be distorted.

When you save your map for the first time, always save it via Menu>Save Map, so you can name it!
The directly accessible Save button saves it with the current name, so if it has no name, yet, it will be saved without a name, and that's... bad.

You can also publish your map to the Workshop or update an existing Workshop Map using the Menu button.
Editor Tools
I'll refer to that row of buttons in the top-left corner as the "Toolbar" - you know, this one:

I'll only talk about the features I consider the most important for now...

Select

Surprise! You'll have to click this before you can select an entity already on the map, in order to move it, delete it or change its attributes.
A selectable "entity" can be a Unit (including commanders), a Structure, Minerals or Decor (trees etc.), but not terrain (grass, water...) or elevations/ramps.
In order to select something, you usually have to click it's handle: a small white dot, usually at the center or bottom of an entity. Some entities might have bigger "hitboxes", some might be invisible, but still selectable if you find the handle.

When you selected something, that entity's attributes (name, faction etc.) will show up.
Drag the handle to move it, press the delete key to delete it. EZ.

Terraform

Let's skip Marquee, Trigger and Elevation and go right to Terraform, which is usually the most convenient way to define elevations on your map.
You can choose an elevation level between 0 and 10, but you will usually only pick even numbers, because uneven elevations are reserved for the ramps, which are placed automatically by the Terraform tool (not by the Elevation tool, though).

So what you see above is the result of terraforming one tile from level 0 to 2. The even tile on top is now on elevation level 2, the rocky tiles around it automatically become level 1. (I'm sure you wouldn't want to make them all level 1, manually.)

So you can also make a nice multi-level hill by selecting e.g. level 6 right away an just terraforming one tile from 0 to 6 (see screenshot below).

However, you also see some pink markup on the top-right edge of that hill. This indicates inconsistent elevation levels and should be fixed. In this case, I terraformed one tile next to the hill to level 2. That operation automatically raises or lower adjacent tiles to 1 or 3 - but since there already is an elevation of 2, two tiles away (the first elevation level of the hill), we get a one-tile line of elevation level 1 between the level 2 tiles. Level 1 is a ramp, though, and makes no sense between two tiles of the same elevation.
To fix this, we can simply terraform the pink tile in the middle to level 2, get a nice, even walkable protrusion on that hill, and everything is fine!

Terrain

Here you can define the terrain type of a tile, like grass, water etc.
The most common terrain types are found in the category "Outside" - the other categories were used to design the campaign hubs of the different factions (1: Longcoat Distillery, 2: Commonfolk Skirts, 3: KSR Kitchens, 4: Civilized Gardens & Halls).

Be aware that not all terrain types can be used everywhere, e.g.
  • water can only be used on elevation level 0,
  • cliffs, walls and ramps can only be used on uneven elevation levels (i.e. ramps),
  • grass and snow tiles usually cannot be used in the desert etc.
Terrain types are more than just aesthetics: water acts like water (slows & heals), cliffs are impassable etc.

Mineral (or: food sources)

"Minerals" are all kinds of food sources, very important and easy to mess up - that's why there's a special section on them, below.

Actors

Yes, you can start with units on the map.
The one unit you should place somewhere (preferably next to an appropriate Gristmill or Campfire), is the Commander of that Faction. It defines the spawn point of the Commander.
Please make Hopper red, Bellafide blue, Archimedes yellow and Quartermaster green, and place each of them only once... I frankly don't know what happens else. (Feel free to tell me in the comments!^^)

Structures

Structures like Gristmills, Farms, Campfires and Cabins are closely related to Minerals and also a bit tricky, so there's a special section on them, as well.

Decor

Make your map more interesting by adding rocks, rubble, trees and other little accidents. They are generally indestructible (not even targetable), some of them block the movement of ground units, some merely exist to make your map more beautiful.
Minerals
Now comes the most tricky part: Minerals.
I believe most bugs and crashes with custom maps are caused by these.

"Minerals" are all kinds of food sources (the name "mineral" is just a StarCraft reference, afaik):
Windmills, Farmlands, Campsites and Food Pickups.
These are not faction aligned or attackable, but can be used by any faction.

Last time I checked, Food Pickups did not work as you'd expect, so I'll ignore them for now.

I'm referring to the (exploitable) Minerals as "Windmills", "Farmlands" and "Campsites" as opposed to the (faction aligned) Structures "Gristmills", "Farms" and "Campfires" or "Cabins".
Keep them separated in your mind!

Windmills

Windmills are probably the most fundamental thing here. They don't generate food by themselves, they don't even contain food: they are merely the thing between Farmlands that players can claim in order to build Farms.
Please place them on even ground with enough space for the Farmlands and don't move them across different elevation levels, or you are likely to get glitches/bugs.

In fact:
Avoid moving around any kind of mineral, ever, because that easily breaks things!
(Including crashes whenever you try to load the map, when an AI scouts the mineral etc.)

Farmlands

Gristmills as such come without Farmlands, so you have to place these around your Gristmill in the usual slots. (Well, you don't have to, but a Gristmill without Farmlands is not very useful and might in some cases even lead to bugs.)
You can change the amount of food that can be harvested from a patch of Farmland. Default is 300.

Campsites

Campsites look like Cabins when you select them, but they really are just Campsites if you place them somewhere. They only become Cabins (or Campfires) when you add the respective Structure on top of that Mineral!

Talking about adding structures...
Structures
Structures, too, are very important to make your game work, especially those related to Minerals - guess which ones!

Structures, unlike Minerals, are faction-aligned and can usually be attacked & destroyed.
This is where you select a Structure's faction (same for Actors, btw.):


Gristmills

Gristmills can (only!) be placed on top of Windmills, in order to define the starting base(s) of a faction. (You can put them elsewhere, but don't be surprised if that crashes the game...)
Every faction of your map needs a Gristmill or a Campfire to start with (except faction -2)!

Farms

Farms can/should (only!) be used on top of Farmlands... make sure to have them aligned to the same faction that owns the Gristmill or the game will end very soon. ;)
Farms as such are invisible (you cannot see them in the 2nd row, 2nd column of Structures), but if you put them on the same tile as a patch of Farmland, you will see the how the Farmlands change to actual Farms (see screenshot below: Farms to the left, mere Farmlands to the right).
You don't have to place Pigs on top of starting Farms. These will be added automatically once the match starts.



Campfires and Cabins

Campfires should be used only on top of Campsites. (Surprised?)
These cannot be seen either in the Structure selection box, but they are located just right of the Cabin.
You can make a faction start with only one (or more) Campfires instead of a Gristmill.

Cabins are the things that shoot you... that is: when they are aligned to faction -2, which is the aggressive-neutral non-player faction (white) you probably know from standard/random maps. Cabins can belong to a player, which is kind of funny, because they work for that player (shooting enemies), but that player cannot destroy them in order to build a campfire instead. Enemy assistance is required in order to make that happen.
Speaking of which: Cabins, too, can be put on top of Campsites.

Other Structures

You can also start the game with some defenses or warrens on the map:
most of the selectable Structures are actually the warrens of different units.
Handles, Positioning
There seems to be some confusion about entity positioning and handles.

Generally, if you have an entity to be placed selected, and you click somewhere on the map, the graphics and the entity's handle are usually not exactly where you clicked.

When you place a big structure or mineral (2x2 tiles), they will always snap to the tile grid, and the tile you clicked will be the top tile of the structure (e.g. you clicked at 4|10, then the structure will be on tiles 4|10, 5|10, 4|11 and 5|11). The handle will usually be in the middle of the structure.

Units and decor don't necessarily snap to the tile grid, but units will each search their own tile when the game started, and some decor will block tiles (blocked tiles appear darkened in the editor, see image below). So you will preferably give each unit its own tile from the start and place decor in a way that it's easy to see which tiles they block, in game.

Elevation levels may cause your click and the resulting position & handle of an entity to differ heavily (see the tree to the right in the screenshot below, which is hovering way above the ground... you rather shouldn't do this, for obvious reasons, but if it happened to you accidentally, you know what went wrong here).
Flying units will appear unusually close to the ground when you place them in the editor, but don't worry: they will lift up and fly higher once the game started.

Here's a screenshot of some entities, indicating where I clicked and where the handle appeared on each one.

(From left to right: Structure>Warren, Unit>Archimedes, Structure>Balloon, Decor>Tree, Decor>Tree on Elevation Level 10 above Terrain on 0, Mineral>Gristmill.)
Editor Options
General Editor Options are available in the top-right corner. Most of them should be easy to understand:
Change your Toolsize in order to change the Terrain or Elevation level of a larger/smaller area, add overlays to have an easier time counting tiles/measuring distances etc.

One thing worth mentioning (again) might be that you should not use that "Save" button you see there when you save your map for the first time, or it will be saved without a name!
Open the Menu, instead, click the Save button there, and name your map, first.

I believe the Menu's Save button is better when you already published a map on the Workshop, as well - seems as if sometimes the other Save button would change the map's ID, so you'd upload a new one instead of updating the old one. (You can manually edit/copy the ID of your workshop map with a text editor in order to fix that... I might write a section on XML modifications, some day...)

Oh, yeah: the option to publish/update your map on the Steam Workshop can also be found in the Menu.
Factions
Some clarifications

The Factions in the Editor are somewhat misleading:
Faction 0 / Hopper / red is not necessarily Commonfolk, Faction 1 / Bellafide / blue is not necessarily Longcoats etc.
Instead, the Factions here merely define the order of Player positioning, which is mostly important for Team games (2v2, 2v1 or 3v1).

Generally, in a game without teams, the first player will take the place of Faction 0 - red and Hopper will be replaced by whatever Faction that player has chosen.
Likewise, 2nd player takes over Faction 1 (blue), 3rd player takes over Faction 2 (yellow), 4th player takes over Faction 3 (green).
Faction -2 (white) is always neutral... or rather: everyone else's enemy, will attack when in range, but remain passive otherwise.

Theory

In a team-based game, the positions can change. Players of team 1 will be placed first, then team 2.
That means, for example, if
  • the first player of a lobby chooses Team 2 & Archimedes,
  • the second player chooses Team 1 & The Quartermaster,
  • the third player chooses Team 1 & Hopper,
  • and the fouth chooses Team 2 & Bellafide...
... this is what would happen:
  • player 2 (KSR) will get what's been assigned to Faction 0 (red) in the Editor
  • and be in a team with player 3 (Commonfolk) --> Faction 1 (blue) in the Editor;
  • player 1 (Civilized) --> Faction 2 (yellow) in the Editor
  • teamed up with player 4 (Longcoats) --> Faction 3 (green) in the Editor

What to do?

Might sound complicated, but after all: don't care about it in 1v1 or FFA games!

In 2v2s:
Factions 0 and 1 (red and blue) should be one team, Factions 2 and 3 (yellow and green) the other.
So if you're a nice map maker, you don't put yellow next to red...

In 2v1s:
  • if the solo player is red (Faction 0) in the Editor, they should pick team 1
  • if the solo player is yellow (Faction 2) in the Editor, they should pick team 2
  • don't give the solo player's stuff to blue (Faction 1) in the Editor - that will always be a team member's start

In 3v1s:
  • if the solo player is red (Faction 0) in the Editor, they should pick team 1
  • if the solo player is green (Faction 3) in the Editor, they should pick team 2
  • don't give the solo player's stuff to blue or yellow (Faction 1 or 2) in the Editor - that will always be a team member's start
Advanced (File/Text) Editing
Some options are not directly available in the editor, but can easily be changed with a text editor outside the game (e.g. Notepad++ in Windows, gedit on Linux...).

Maps are saved as XML files, which contained structured information that is usually readable for both machines and humans. If you want to experiment a bit with that, I suggest reading at least a bit about how XML generally works, because obviously you can break things here and make the game crash.

I'll only talk about some simple changes here, mostly limited to changing single values.

Very brief file/XML introduction

You can find your maps in %appdata%\ToothAndTail\worlds (Windows) or ~/.config/ToothAndTail/worlds (Unix).

When you open the document in an appropriate text editor (see above), you will see a lot of stuff written in pointy brackets, e.g <Filename>.
These are called tags, and you'll usually find an opening and a closing tag. The one above is an opening tag, the closing tag looks like this: </Filename>. In some cases, there is only one tag closing itself, e.g. <WorldSeed />.

(Pairs of) Such tags make an Element. Each Element can contain other elements, so they can be arranged in a tree structure, e.g. the Description-Element contains (among others) a WorldGenInfo-Element, which contains the Elements MissionType, Campfire, Windmill, Size and Environment.

You will usually not touch the structure and the name of these Elements, but only the values written between them. Even there: be careful! Many of them are references to game files or scripts, so you should only enter valid values. For example: what is written between the Environment-tags refers to a file found in your ToothAndTail installation folder, ToothAndTail/content/data/multiplayer/worldgen.
If you see true or false between a pair of brackets, you should only replace that with true or false; if you see an integer, you should only replace it with an integer, if you see some text, it will often be a reference like the one above, which should always point to something existing.

Basic information

The XML file starts with basic information about the map. Here are a few things you might want to change in this section:

PublishedId: This ID is used to update your map on the Steam Workshop rather than upload a new one. Sometimes IDs seem to get changed involuntarily, or you might want to actually upload a different version of your map. Change the ID to match an existing Workshop ID to update. Change the ID to 0 and a new ID will be assigned and you can publish this as a new map.
Find out the ID of your map on the Workshop by navigating through the Steam Workshop to your map, then look at the URL on top: what you need is the 10(?)-digit ID after https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=

Description > DeckSize: Change how many units can be picked per player on this map.

Game Mode / Team Configuration: Making a 4 Player FFA version of your 2v2 map, for example, is rather easy. Changing the number of players is only slightly more difficult. Here's what to do:
  1. Change the value between the TeamConfig tags in the Description element of your map, e.g. from 2v2 to FFA_4P - find other possible values below. (The values for MissionType in WorldGenInfo and TeamConfiguration in WorldGame should not matter for Custom Maps, but of course it's more consistent/less puzzling if you change, them, too.)
  2. If you switched from a team based game mode to a game mode without teams - or vice versa - you have to adjust the team numbers for each player. Search for or scroll down to the World element; at its beginning, you will find a Teams element in which the different teams are defined. You should define only the amount of teams you need (add/remove item Elements, if needed), and keep team -2! That's reserved for neutral structures/mobs. Always start counting at 0 for the player teams! Also assign the appropriate team index to each player in the Factions element (Team tag).
  3. If you want to reduce the number of players, you should first remove all their belongings in the Editor. Then you need to remove all references to those players in the XML's Teams and Factions elements: delete the whole item Element for unused teams and factions! (But keep faction -2!)
  4. If you increase the number of players, you need to do the opposite: add items for each player, to each their own int, PlayerIndex and the appropriate Team value. You can then add their starting points and Gristmills in the Editor.
  5. If you want to save this map separately from your first version, change the name, file name and PublishedID.
These TeamConfig values can be used:
  • FFA_2P for 1v1
  • FFA_3P for 3-Player Free For All
  • FFA_4P for 4-Player Free For All
  • Team_2v2 for 2v2 (surprise!)
  • Team_2v1 for 2v1
  • Team_3v1 for 3v1

Most of the other values here are better changed in the Editor or Workshop, as far as I can tell.

Special rules

After the Description-Element, you will find a Rules- (very short) and the Script-Element.
Script contains several special rules you might know from the campaign. Many of them only work in the campaign (with specific mission scripts), but some can be activated even for multiplayer maps. Here's a list. (Might be outdated! - MasterWario and me experimented with this long ago, before the Editor was officially supported, so please tell me if I'm wrong on anything!)

These could be useful:
  • BurrowingAllowed, BuildingAllowed, SellingAllowed, AutoHealAllowed, RespawnTime, StarvationEnabled should all be quite obvious.
  • LevelUpAllowed: Will the commander's max HP increase over time?
  • VisibilityModifier: Modifies your vision range. 0 is normal and will leave most units at a 4 tile vision range. Don't go too crazy here, but slightly decreasing vision range can be interesting.
  • ExplorationDisabled: The minimap only shows you currently see - everything else remains/turns black.
  • Cold: Units freeze outside territory... you all love that feature, don't you?
  • ColdKillTime: If Cold is true, how fast will units die (in seconds) once they are frozen completely? (Assuming full HP.)
ShowRallyHelp, ShowGroupHelp, RallyingAllowed, HighlightFarms, HighlightBuildableTerritory should all work, but don't make much sense outside mission hubs and tutorials, in my opinion.

HeavyWind works, but will make the game desync in online lobbies.

The other options do not work, as far as I know.

Entities

After some more map, team and faction information, which is either better changed in the Editor or does not work for multiplayer matches, there comes a huge Unspawned-Element, which contains all the entities you have placed on your map.

I did not experiment much in this section... be very careful with Minerals, Gristmills, Campfires and Farms, because changes these most easily breaks the game.

One useful option, however, is the Sellable-Option for each unit/structure.
I've seen many custom maps with defenses/warrens given to one or more players from the start - the problem is: they can easily be sold and transformed into a gigantic (mole) army, which just overruns the enemy.
In order to avoid that, just change <Sellable>true</Sellable> (default) to <Sellable>false</Sellable>.

If you experiment a bit here and find out more than I did (e.g. the option "CanRecruit" might be interesting), please tell and I might include that in the guide!
12 Comments
Lord Haart 3 Jul, 2021 @ 3:38am 
Have always intended to getting around to making some maps for this great little game, but never have. Now thx to you I can read this guide first to avoid any pitfalls. Great work.
Salmon man 16 Jul, 2019 @ 9:45am 
ok im sending you a friende request on discord so you can just remove food pickups for me ok?
EELuminatus  [author] 16 Jul, 2019 @ 9:44am 
If it crashes when you try to load any map (that means: when it should show the list of maps), then you probably deleted too much or not enough, so the XML is invalid and the game cannot even read the map's name anymore. Send me the file on Discord and I can most likely fix it.
Salmon man 16 Jul, 2019 @ 9:28am 
ye I edited the XML file and removed the "food pickups" and now the game crashes when im trying to load a map in edit
EELuminatus  [author] 16 Jul, 2019 @ 8:46am 
If you know how to handle XML files, you could search for "food_pickup" in the map file and delete the whole element. Otherwise just send it to me in a DM on Discord - I can remove the crate and send the file back to you.
Good point, anyway, I'll try and fix the food crate issue(s) in one of the next patches.
Salmon man 16 Jul, 2019 @ 8:34am 
accidentally placed down a "food supplies " crate and I can't remove it, any can somebody help me out?
RamsesV 31 Dec, 2018 @ 9:47am 
Ok, that makes total sense now! I just seem to be a complete idiot once I realised what the dots were. Thank you!
EELuminatus  [author] 30 Dec, 2018 @ 2:38am 
I included a section on Handles & Positioning with a screenshot... maybe that helps.
If your issue is different, please explain or upload a screenshot, @RamsesV.
RamsesV 29 Dec, 2018 @ 1:53pm 
Ok wait, so are the white dots quite a bit lower than the actual graphical thing? Because I'm just noticing that the dots itself are below the item.
EELuminatus  [author] 29 Dec, 2018 @ 12:24pm 
Sounds strange @RamsesV - the only "misplacements" I know are:
- big structures (2x2 tiles), of which the tile you clicked on becomes becomes the "top" tile of the structure; e.g. if you place a Gristmill, clicking on tile 4,10, the Gristmill will occupy the tiles 4,10 + 4,11 + 5,10 + 5,11
- and units/decor, which will only have the handle at the position you clicked; unit and decor handles, however, are usually at their bottom/feet, so the unit/decor might appear to be "above" the position you clicked.
What you described sounds more extreme, however... I could imagine something like this happening with conflicting elevation levels, but that's just a guess. Maybe you could upload a screenshot?