Jump to content

How to map and submap in Xenonauts


Recommended Posts

To be able to create maps and submaps there is a guide on the WIKI page.


However, to use them properly you will need to unpack your tiles folder

EDIT (Chris) - this can now be done more easily by following the instructions in this thread: http://www.goldhawkinteractive.com/forums/showthread.php/9670-Unpacked-Game-Tiles-Required-for-Mapping%21


1) Use QuickBMS - click name at top of page found HERE

2) Download the play first PFPK Script (I have hosted it on dropbox to make easier) Also on thesame page. HERE

3) Once both have been downloaded, unpack and run quickbms.exe

4) Point quick BMS to where you saved the PFPK script.

5) Point it to tiles archive GC.tiles.pfp

default= progam files (x86)\steam\steamapps\common\xenonauts\assets

Extract files to xenonauts\assets\tiles

(type in 'tiles' when it asks for location and it creates a folder called tiles in your assets directory.)

Leave it for a few minutes to unpack the tiles archive.

Now run GCLevelEditor or GCSubmapEditor- both in Xenonuats folder- and start developing those custom maps. I suggest you read the instructions now :D

(Credit to Lt Parson for the original instructions and discovery)

Edited by flashman
Link to comment
Share on other sites

  • 4 weeks later...

This is my attempt at a map making tutorial. Feedback is welcome. I ask that you don't private message me about troubles you run into making maps, though; it's helpful to other people if issues are troubleshooted in public.

Please tell me if I shrunk the images too much! I don't want to break tables and so I resized the screenshots to be 800 pixels wide; if they're too hard to read, I'll crop or put up the larger versions instead.

1) How do I start making maps?

2) Your first map.

3) Your first submap.

4) Getting your submap into the level editor.

5) Making a random submap.

6) Making a basic building for the desert tileset. (WIP)

7) Making a custom object/spectre. (WIP)

8) Making a custom tile. (WIP)


1) How do I start making maps?

Goldhawk have been kind enough to create a level editor for us to play with. You can find it in mod tools in the game's launcher.

Maybe you want to create a desktop shortcut, or want to know where the file is on your hard drive for some other reason. By default, you'll find it in your Xenonauts install directory. If you purchased Xenonauts using Steam, this will be something similar to "C:\Program Files (x86)\Steam\steamapps\common\Xenonauts\".


It's "GCLevelEditor.exe". Whichever way you choose, that's all you need to start making maps apart from unpacking the tiles, as described above by Flash.


2) Your first map.

We'll make our first map very basic, if for no other reason than to hammer home how easy it is to create maps using the default tools. This should be the screen you're greeted with when opening the level editor:


We don't have a map to load right now, so let's click on "new". You'll get a pop-up asking for tileset and map size.

Leave the width/height dimension alone for the time being. Select "desert" from the drop-down list. Click okay, and the previously grey left-hand frame will light up with green squares. Each of these squares represent a 10x10 area.

In theory, you could set the default tile and the light green squares would be filled in with that tile. However, there is a bug where setting a default tile causes issues for people who don't use the typical Xenonauts install dir. So instead of using a default tile - which usually looks bad anyway - we'll place the ground tiles down ourselves.

Scroll down the "ground" column and select "sand_10x10_(10x10)", like so:


Now, move over a green tile and left click. This should place the sand on to the map. If you're unhappy with the placement, position the mouse over the square of sand and hold down left click, then drag to where you want it to go. If you want to delete the sand, right click the sand.

Cover up all the green with sand until your map looks like this.


If you leave any of the green exposed and there's no default tile, it will appear as a black square in the game, and units will be unable to move onto it.

Now that we have something to look at, click on "Open level viewer", a button in the bottom right-hand corner. A separate window will open up, displaying what your level will look like in the game. You can scroll around the map, and placing a new object will cause the level viewer to jump to it, so you can get a look at it with minimal fuss.

The next thing we'll do is place the ships for both aliens and xenonauts. Click "Spawn/Target layers", shown in the picture below.


When you click on it, the columns for the ground/walls/props/building options should be replaced by a list of the available spawns, like so.


Click on "airplane.human.chinook - NW" and place it in the top left corner by left clicking on the map, but leaving a bit of a gap between the chinook and the edge of the map, as below.

Level editor window:


Level viewer window:


You'll see in the level viewer that the chinook's unloading the troops on its south side. If you want the exit ramp to face a different direction, instead of the NW chinook use NE for the ramp to face east, SE for facing north, and SW for facing west. If you place down multiple chinooks, the game will randomly select which one appears at the start of the level. I will be sticking with just the NW chinook for this particular tutorial.

Place the "airplane.human.shrike - NW" and "airplane.human.valkyrie - NW" entities in the top left corner in a similar manner. For the shrike, be careful with using different directions - unlike the chinook, it's not fully implemented in the game at time of writing, leading to rather undesirable behaviour, such as intangible walls. As for the valkyrie, its direction is rather meaningless: for those who don't know, you don't see the valkyrie on the ground battle maps. Instead, you'll be placing troops by hand inside the valkyrie entity's area.

Now that we know that the player starts in the top left, let's determine where the aliens begin. Let's have their ship land around the bottom right. Select "airplane.alien.lightscout - Landed" and place it like this:


Notice how I don't put the lightscout adjacent to the map's southern border. Let's look at the level viewer to see why:


It's possible to block the entrance to the UFO and have an unwinnable map! And unlike the human airplanes, alien ships always face south (at time of writing). This is something to watch out for when placing down the various UFOs.

(The popping out objects is something that doesn't happen in the main game, so don't worry about how it looks.)

Now select "airplane.alien.lightscout - Crashed" and place it in the same position as the landed lightscout on the map. The checklist for the airplanes should look like this now:


Other than placing the relevant UFOs, we don't need to tell the game that this is a lightscout-only map; it works that out from the UFOs that we've put down. If we were to place spawn locations for the landed and crashed corvettes, we'd have a chance of getting this map on a desert UFO mission involving corvettes, too.

Save the work you've done so far. Click "save" at the top, hit "yes" when it asks if you want to continue without a default tile being set, and then name the map "Tutorial1". This will save the map to Xenonauts\assets\maps\desert on your hard drive.

Now that we know where the two teams start, let's place some props down to provide cover, to obstruct line of sight, or simply add flavour. Click on "Props" to get out of the airplane checklist and back to tile placement. Select "rock_cover_1x1 (1x1)" and plonk a few down at the map the exact same way you did for the sand. For example:


And then add various other desert-themed props as you see fit. I do tend to go a little mad on the prop side, and here's my map after I placed down the mesas (the 2x2 pink tiles), the multiple tile rock covers, and random foliage.


Note that I've taken care not to place any props on the airplanes. Doing so causes clipping issues. Do not place props, walls or buildings on areas that contain a ship. The one exception to this rule is the valkyrie, as the valkyrie never actually appears on the ground combat map. Don't panic when you see the valkyrie take up a large chunk of your map, you can place whatever you want inside the valkyrie's area.

We're almost there! Now that we've got the map's layout set, it's time to set the spawn points for the aggressive aliens that start outside of the UFO. Click on the "Alien" button in the "Spawn Points" panel.


The map will be greyed out a tad. If we left click on the map now, we place a red cross representing an alien spawn point. If we place more spawns than there will be aliens that appear in a level, they will choose spawn points at random; there's no need to worry about placing the exact amount. Also bear in mind that in the vanilla game, there will always be some aliens that spawn inside the UFO and not on the crosses.

To remove a spawn point, right click the cross. Here's my map after I've placed down some spawns for the aliens.


Save your work. There's not much left to do now. Set the number of civilians and local allied forces you want to appear in your map; ordinarily for a desert map like this, I'd set it to 0 for both as it makes more sense thematically.


As this is a tutorial though, these poor sods happen to be out here, in the back of beyond. They're placed in the same manner as aliens. Here's how I carelessly put them down on the map. Yellow crosses are civilians, blue crosses are friendly AI.


That's it! You should be good to go. Save your work and play the game, as Tutorial1 will be in the rotation for lightscout maps by default. If you want to see what the map I created for this tutorial looks like, you can download it here. Unzip it into your Xenonauts directory, and it should automatically place a map called "StinkyTutorial1" in Xenonauts\assets\maps\desert\ for you.

If you want to test the map, you can play about with quickbattle as described in the bottom of this page of the wiki. Note: it's a little out of date. Quick battle doesn't seem to be on the launcher anymore. Instead, go to your Xenonauts folder and run Xenonauts_gc_editor - Quick Battle.bat. From all appearances, nothing will seem to be different from starting the game normally. However, go to "new game" and place a base down on the map: if everything's working as it should, the quick battle mode should kick in, and you'll go to ground combat.

Here's what my levelsetup_squickbattle.xml looks like when I set it to test Tutorial1:

<?xml version="1.0" ?><LevelSetup> <Map tileset="desert" mapname="Tutorial1" /> <SpawnTarget dropshipType="airplane.human.chinook" ufoType="airplane.alien.lightscout" ufoLandStatus="landed" /> <Aliens>   <Alien name="AI 1" race="Caesan" rank="Guard" script="defensive" isKilled="0"/>   <Alien name="AI 2" race="Caesan" rank="Guard" script="defensive" isKilled="0" />   <Alien name="AI 3" race="Sebillian" rank="Guard" script="defensive" isKilled="0" />   <Alien name="AI 4" race="Caesan" rank="NonCombatant" script="defensive" isKilled="0" />   <Alien name="AI 5" race="Sebillian" rank="NonCombatant" script="defensive" /><Alien name="AI 6" race="Sebillian" rank="NonCombatant" script="defensive" /><!--   <Alien name="Civilian 1" race="Human" rank="NonCombatant" script="civilian" />   <Alien name="Civilian 2" race="Human" rank="NonCombatant" script="civilian" />   <Alien name="Civilian 3" race="Human" rank="NonCombatant" script="civilian" />   <Alien name="Civilian 4" race="Human" rank="NonCombatant" script="civilian" />   <Alien name="Friendly AI 1" race="Human" rank="NonCombatant" script="friendlyai" />   <Alien name="Friendly AI 2" race="Human" rank="NonCombatant" script="friendlyai" />   <Alien name="Friendly AI 3" race="Human" rank="NonCombatant" script="friendlyai" />   <Alien name="Friendly AI 4" race="Human" rank="NonCombatant" script="friendlyai" />--> </Aliens></LevelSetup>


3) Your first submap.

You might not have realised it, but you've already been working with submaps if you've done the first tutorial. Ground, walls, props, buildings - all of these are submaps. While you can make perfectly good maps using the default set of submaps, you might be hungering for more. By creating your own submaps, you can take greater control over the content of the levels you create; pseudo-random terrain, new buildings, altering the properties of objects, and even inserting your own art assets into the game all become possible once you master the submap editor.

First of all, you need to have an unpacked set of tiles, as described in Flashman's post at the top of the thread. If you have no Xenonauts\assets\tiles folder, or if it's empty, the submap editor will become very angry indeed.

Next, you might as well close down the level editor, if it's still running. We'll be using a different tool for now: the submap editor. As before, either open it from the Xenonauts laucher, or browse to your Xenonauts directory and run "GCSubmapEditor.exe".


You will get a prompt asking about the resolution you'd like to use. Don't use a big/fullscreen resolution or you'll have to alt-tab all the time to switch between edit mode and view mode while making submaps. I only use a single monitor display setup, so I go for one of the smaller resolutions and place the editing window and the submap view window side by side.

After you select your resolution of choice, you'll enter the submap editor's main screen. It may seem a bit intimidating in its complexity, but in actual fact, you can get by perfectly fine only looking at the section in the red rectangle.


You'll also get a window that's nothing but a black screen. This will change when we get started, as it's the submap viewer.

I'm going to take you through a submap I've made that involves placing props on a 10x10 square, with the end goal of creating a submap that simulates random desert objects on a map to help add some spice to a level. One step at a time, though; let's see how I create one of the set pieces first.

At the moment, we have no submap, and we have no tiles to work with. Let's create our submap by clicking on "new submap" up in the top-left corner.


I'm using the naming convention as set out in the community map pack thread: tileset_name_size_author. There won't be any problems if you give it some other name, as long as it's distinct from other submaps.

The submap viewer should now change from a black screen to a 10x10 grid with green squares on a black background. These are transparent tiles; if we saved the submap now and used it, it would load, but nothing would seem to be there in the game. It's not the same as in the level editor, where we want all the ground covered; it's perfectly acceptable to leave squares uncovered.

The next step is to add tiles to work with. Click on "Add Spectres...".


You should get a window popping up like so:


Browse to desert\cover\.


Select "rock_cover_1x1_1_spectre.xml". Note that although you have to option to load .png files, you don't want to do this. Spectres contain all the data that makes an object act the way it does - whether it blocks movement, whether it blocks sight, how much cover it provides (if any), health, whether units can vault over it, whether it explodes, and so on. If you load a .png you'll have to set all of this yourself, and you don't want to do that yet, especially for every rock you place down.

Click "Open". In the "tiles" textbox you should now see an entry for ""desert/cover/rock_cover_1x1_1". Left click on it and the spectre information should automatically load on the right hand side of the editor.


In order to place the object on the map, we need to activate paint mode - this means that left clicking on a square in the submap view window places the object. We also need to set the layer to 1, as props go on layer 1 and ground tiles go on layer 0. If you don't do this, you will have issues in the game such as intangible rocks.


Here's what the viewer should look like after I've placed a rock down with left click.


Unlike the level editor, right click doesn't remove objects. We have a few tools to do this, but in this case we'll click on "clear tile". This turns paint mode off, and causes left click to remove all tiles on a square, returning it to its default empty transparent state.


I want to place another cover item down for this submap, and I want it to be different to the current rock. Let's load spectres en masse this time. Click on "Add Spectres From Dir..." and browse to tiles\desert\cover\. Click "OK".


We have a lot more options now. One thing to note, though, is that .png files that don't have a spectre tied to them will appear in the list. For example, the various "damaged" and "destroyed" items on our list won't have spectres. At this stage, if you have "damaged" or "destroyed" items in your tile list, don't use them. Otherwise you'll get oddness including (but not limited to) hovering rocks.


Needless to say, I removed the flying debris after taking the demo screenshot.

As you can probably tell by the name, I want to have just two props appear on this submap. Having placed down a 1x1 rock cover and a 1x2 rock cover, I'm done. I hit save, and now I have to move the submap so that the level editor can see and use it.


4) Getting your submap into the level editor.

Having created Desert_2CoverPropsA_10x10_Stinky, I need to make a folder to store it in a place that the level editor is comfortable with, and then move the submap proper.

Browse to Xenonauts\assets\maps\desert\props. The "props" category seems the most suitable for what I'm doing. You'll see folders for all the default submaps; you'll want to create your own. I'm naming it "Desert_RandomProps_10x10_Stinky", again, in the same style as the community map pack asks for (tileset_name_size_author). You can call it whatever you want as long as you don't use a name that's already taken.

The submap editor by default saves to Xenonauts\assets\maps. You can tell it to save elsewhere by including a pathname, but personally, I like to use a browser to be 100% sure that it's placed in the correct spot. Either way, make sure Desert_2CoverPropsA_10x10_Stinky.xml (or whatever you called your submap) ends up inside the folder we created just before. Note that the contents of the folder don't have to match the folder's name.

The end result should look like this.


Go into the level viewer and create or load a desert map. If everything's gone to plan, you should be rewarded with this sight in the props column.


Place down a ground tile if there's none on the map already, and then place a Desert_RandomProps_10x10 object on top of it. If you go to the level viewer, you should see that the boulders from your submap appear on top of the ground tile. Here's a pic of the cover props sitting on some 10x10 sand.


Note that if you use non-default submaps in your levels, if you don't package the relevant submaps along with the map, your submaps will not load. Instead, the space your submap occupies will effectively act as an empty submap; so it's not a critical error, but when we use more complicated submaps, its absence can ruin the level's effect. So if I want to make and share a desert map called "Tutorial2" that includes our submap, I'd probably structure the .zip like this:

  Assets|___Maps	|___Desert		|----------Tutorial2.xml		|____Props			|___ Desert_RandomProps_10x10_Stinky						|---------- Desert_2CoverPropsA_10x10_Stinky


5) Making a random submap.

As you can tell by the name, I have more lofty ambitions for Desert_RandomProps_10x10_Stinky than to slap two rocks down the exact same way every time the map's played. Fortunately, this is easily solved. All you have to do is place the submaps you want in the relevant folder, and every time the map is generated, it will select one of the submaps to use at random. I recommend that you make all the submaps the same size, though, as I suspect I've had crashes from placing submaps of varying size inside the same folder. If you really want to use a submap that happens to be the wrong size, load it up in the submap editor and resize the submap from there. In case you can't find the resize button:


I've repeated the process in section 4 to make a number of different patterns for Desert_RandomProps_10x10_Stinky, which is broken down into categories to make:




Rather than force you to repeat the process, you can download these submaps along with some basic maps that use them. Extract the .zip into your Xenonauts folder and the files should end up in the correct location.

Note about using these submaps in the level editor: do not place spawns (alien, civilian, friendly AI) on top of these submaps. If you do, there is a chance the spawned unit will become stuck in a prop. Place them on the outside of the square instead.

Edited by Ol' Stinky
Link to comment
Share on other sites

Yeah, excellent work. I hope to see more soon! Especially on submaps.


Okay, everything's peachy except for testing. I have no idea how to test my map. I do not have the Xenonauts_gc_editor - Quick Battle.exe file; what I have is Xenonauts_gc_editor - Quick Battle.bat, but it seems to simply launch the Xenonauts as normal.

Edited by Solarius Scorch
Link to comment
Share on other sites


The .bat file will run Xenonauts and look perfectly normal.

Then you just start a new game, place your first base and the game will jump straight to a ground combat mission on the map you set up in levelsetup_quickbattle.xml

Thanks! That's a very roundabout way of doing things, but I'll give it a try. :)

Link to comment
Share on other sites

The quickbattle mode was a quick way of testing part of the game many builds ago which was supposed to be removed at some point.

It is basically a quick hack into the code to force a mission rather than a fully fledged feature.

I think it is only still around because it is so useful for testing custom maps.

And to bring this post back to the topic at hand you can press u in quickbattle to bring up the debug screen.

Very useful while testing your maps if you want to add a rocket launcher to blow something up or persuade the aliens to walk off to another area so you can walk round a building to check for layering problems.

Edited by Gauddlike
Link to comment
Share on other sites

I'll have a go at it once I finish the guide. I don't plan on it taking a long time, especially since the bulk of the work in adding custom assets is covered in doing custom spectres anyway (I might just merge the two, thinking about it).

I've also made a note about the valkyrie being an odd duck, and how you don't have to worry about clipping issues by placing objects inside the valkyrie entity square. Don't place anything inside the other airplanes.

Edited by Ol' Stinky
Valkyries are awkward.
Link to comment
Share on other sites

I'm having a rendering issue with the editor that's making it a bit hard to use. The picture says it all. Kind of hard to make everything fit right when I can't really figure out where things are.


Link to comment
Share on other sites

That reminds me of what it looked like in 18.4, when the archiving system came in. If you haven't unpacked the tiles, as described by Flash here, try that.

If you've tried that, I suspect you've made a mis-step with unpacking the tiles. If you can't narrow down the problem with the unpack, there is one other solution: go to this topic and download the pack there. The tiles won't be completely up-to-date but it's fairly recent. It won't be a problem when you distribute maps, and the spectre issues in there aren't too bad.

Link to comment
Share on other sites

  • 2 weeks later...

Okay stinky, first great guide. I only have done the map editor part so far (the sub map part looks scary lol) but so far going great.

Just a couple feedback points.

1. Can you rotate objects? And if so how? I used a lot of the 2x1 cover rocks but they are all oriented the same way.

2. Bat files are scary. So when trying to test my map I ran into a problem of knowing exactly what to do there.

Where is the file that needs to be modified?

How do I modify the file?

Where does it go after I modify it?

One could argue that if you are afraid of modifying files this might not be for you :-) But I always figured map making was pretty different from modding.

Edit: Okay found the .bat file for the quick battle. Modified it and made it work.

Had a few issues which I was wondering if it was a mistake on my part. First all 6 of the aliens were encountered near the ship even though my spawn points were pretty spread.

Second none of the civvies or npc's spawned. Or they were killed before I saw them, but I didn't hear any firing.

Edited by Black Cat
Link to comment
Share on other sites

Followed it step-by-step. Guess I could delete them and try again.
Problem was the files were extracted into assets\tiles, which created a folder assets\tiles\tiles, so they reverted or whatever. Cut/paste fixed it.
Link to comment
Share on other sites

  • 1 month later...

I've run into that myself. I filed a bug report, but unfortunately, Gio replied saying that it was caused by an engine problem, and so probably couldn't be fixed.

The good news is that you can get around it.

1) Save your map in the level editor.

2) Browse to Xenonauts\assets\maps\[tileset] (so Xenonauts\assets\maps\arctic if you're working on an arctic map).

3) Open your map in a text editor and the second line should look like this:

<levelmap defaultSpectre="" width="70" height="70" numberOfCivilians="3" numberOfFriendlyAI="2">

Simply change the width/height and save the file in the text editor.

4) Reload your map in the level editor.

Bear in mind that anything touching the east/south borders will be deleted if you change the width/height respectively.

Link to comment
Share on other sites

Thanks for the replies.

How would you set up a modding "environment" on your computer? You only want to release the stuff in your map pack, but you also want to be able to test your maps, too. Is there a good way to automatically copy only the stuff that you've into your release folder?

Link to comment
Share on other sites

I do it all manually, jotting down on a piece of paper which custom submaps, tiles and spectres I use or have altered. Having the .zip set up to mimic the Xenonauts dir structure helps me as much as it helps people who want an easy install, as I can compare the two if in doubt.

I'd recommend setting up a shortcut to your maps dir as well. The quickest way to check that all of your maps have chinook, shrike and valkyrie spawns is to open them up in a text editor and do a search or count for airplane.human.valkyrie (for example). If an airplane is incorrectly set or not set at all, it'll cause a CTD when the game tries to load it. So opening all 30 desert maps in Stinky Maps 2 and getting a message telling me that there are 30 instances of airplane.human.valkyrie is reassuring.

If there are ways of automating the process further, I'd like to hear them, although it's not bad when using default submaps, tiles and spectres.

Edited by Ol' Stinky
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...