How to create your own random map layout!
Author: Lavapotion,
published 2 years ago,
The Random Map Generator system is based on layouts that tells the generator what regions to create and how to connect them. These layout files are written in JSON and can be added to the game through mods.
[h2]Introduction to layouts[/h2]
A layout is a json file describing the general characteristics of the random level as well as the more specific details of regions and connections. Here’s a list of the fundamental parts of a layout.
[b]Regions[/b] - Are simply an area that contains spawn points and possibly a central structure. They also specify what type of map entities will spawn within them.
[b]Child-region[/b] - Regions can also contain any number of randomly generated children. You can think of these as sub-regions (sharing a lot of the characteristics of a regular region) that automatically connect with their parent-region.
[b]Connection [/b]- Regions can then be connected to each other, optionally by roads and or with hostiles guarding them
[img]https://clan.cloudflare.steamstatic.com/images//40723472/d5638496b9a3c8149287014d7a3283dde6c94a6f.png[/img]
[h2]Creating your own layout[/h2]
We highly recommend basing a new layout of an already existing one as they contain quite a bit of information. I’ve created a 3-player layout mod that you can download and explore right here: [url=https://mod.io/g/soc/m/3-player-random-map-layout]https://mod.io/g/soc/m/3-player-random-map-layout[/url]
Here’s an example of a very simple two player layout:
[url=https://images.squarespace-cdn.com/content/v1/5cd3e3917046805e4d6700e3/51357264-6c84-49de-b7b0-f1dee79ae09f/Screenshot+2022-11-23+at+13.50.34.png?format=1500w][img]https://clan.cloudflare.steamstatic.com/images//40723472/a6ef45b2a4f4c9819b0802ac51171544ee768fa4.png[/img][/url]
(Click the image for [url=https://images.squarespace-cdn.com/content/v1/5cd3e3917046805e4d6700e3/51357264-6c84-49de-b7b0-f1dee79ae09f/Screenshot+2022-11-23+at+13.50.34.png?format=1500w]high res version[/url]) [i]Please note that comments are not allowed in JSON![/i]
[h2]Testing your layout[/h2]
Simply create a folder (e.g called “MyMod”) in the Songs of Conquest mod folder.
On Windows you can find the mod-folder here:
%userprofile%\AppData\LocalLow\Lavapotion\SongsOfConquest\Mods
And on mac its located here:
~/Library/Application Support/Lavapotion/SongsOfConquest/Mods
Copy your layout json-file into this folder and make sure it has .json as its file-ending. Now you can start the game and you should find your layout in the map selection menu. It's also possible to generate a new level in the map editor using your new layout!
[h2]Sharing your layout on mod.io[/h2]
Simply compress your layout json-file into a zip (with no underlying folders) and upload it to your mod.io account. Please set the type as “Random Map” and the appropriate level.
Other players will now be able to download and enjoy [b]your [/b]very own random map layout! Then tell others about it either here on our Steam forums or on our [url=https://discord.com/invite/soc]Discord[/url]!
/Patrik and Team Lavapotion
[list]
[*][url=https://steamcommunity.com:/linkfilter/?url=https://www.songsofconquest.com/newsletter]Newsletter[/url]
[*][url=https://steamcommunity.com:/linkfilter/?url=https://discord.com/invite/soc]Discord[/url]
[*][url=https://steamcommunity.com:/linkfilter/?url=https://twitter.com/songsofconquest]Twitter[/url]
[*][url=https://steamcommunity.com:/linkfilter/?url=https://www.youtube.com/channel/UCtS8G-SVzYknbCSl8DyYk_g]Youtube[/url]
[*][url=https://steamcommunity.com:/linkfilter/?url=https://www.facebook.com/songsofconquest/]Facebook[/url]
[*][url=https://steamcommunity.com:/linkfilter/?url=https://www.instagram.com/songsofconquest/]Instagram[/url][/list]