# Creating Custom Maps Foe Frenzy has a simple system in place that allows you to create your own maps using a simple image editing software as well as a text editor. To play a map, all you have to do is put it into a special folder and the game will automatically load it up. If you want to play a custom map in Multiplayer, you need to make sure that all players have the map installed. ## Where to Put Map Files All files that the game uses are stored in `Documents/Foe Frenzy` on Windows or `~/Foe Frenzy` on Linux. After launching the game for the first time, a `Maps` folder and a `SpawnPools` folder will be generated. This is the location where custom maps live. ## Creating a Map When creating a Map, two files are required: - `Maps/MapName.xml`: This is a file containing information about the map, like which tile is which, where items can spawn, where players can spawn and so on. Note that the example file included has some more comments inside of it that explain what the different parts of the file do. - `Maps/Textures/MapName.png`: This file represents the actual layout of the map. You can edit it in an image editor of your choice. Each pixel represents one tile on the map, and the colors of the pixels represent what tiles should be placed there. The size of the image is the same as the size of the finished map. Note that, further down in this README, there is some information about which colors the game's default tiles have in the map image. Below is the file as well as the image for an example map with some comments that explain the structure in greater detail. To get started making your own map, it would be easiest to copy this information. ```xml A test custom map 5 Snow Lava 255 255 255 255 0 Grass Tree 151 255 151 255 Grass Vine 11 10 Test 25 10 Test Sand Rock 40 Grass Tree 60 1 8 27 4 6 18 25 15 ``` ![](docs/map.png =100%x*) ## Creating a Spawn Pool When creating a map, the items that can spawn at any given spawn point are referenced by their Spawn Pool. A spawn pool is basically just a list of items mapped to weights, where a higher weight means that the item will spawn more often, and a lower weight means that the item will spawn less often. Spawn pools are stored in `SpawnPools/PoolName.xml`. Note that the example file included has some more comments inside of it that explain what the different parts of the file do. Also note that, further down in this README, there is a list of the game's default spawn pools. Below is the file for an example spawn pool with some comments that explain the structure in greater detail. To get started making your own spawn pool, it would be easiest to copy this information. ```xml Arrow 10 Bomb 15 Sword 15 LeatherArmor 10 RubberHammer 5 Spear 15 Potion 3 ``` ## Tile Names And Colors Each tile color is written as (R, G, B). The alpha value (A) is always 255. - Rock (255, 255, 255) - Grass (0, 255, 0) - Sand (255, 255, 0) - Water (0, 0, 255) - DeepWater (0, 0, 96) - Dirt (127, 51, 0) - RockWall (0, 0, 0) - RockWallFront (81, 81, 81) - Lava (255, 0, 0) - Snow (208, 219, 221) - Ice (96, 96, 255) - FallGrass (156, 98, 43) ## Structure Names - Rock - Tree (automatically changes to snow or fall tree based on the tile below) - Torch - Cactus - GrassTuft (automatically generates on grass as decoration) - Flower (automatically generates on grass as decoration) - Vine - JungleTree ## Item Names - Bomb - Sword - Arrow - Wall - RubberHammer - Pickaxe - Dynamite - Spear - Potion - FlameThrower - LeatherArmor - Feather - SpeedBoots - Torch - Shield - AntiSlipBoots ## Default Spawn Pools - All (Most of the game's items) - Low (Items that are considered lower tier) - Cave (All items except long-range weapons like arrows) - CaveLow (Cave items that are considered lower tier) - Lighting (Lighting items like torches) - Pickaxe (Items to destroy rocks with like pickaxes, bombs and dynamite) - Ice (Most of the game's items, including flame thrower, anti-slip boots and other ice stuff) ## Music Themes - Lava - Beach - Cold - Forest - Desert