Random Map Generator Modding

You can create your own random map layouts or blueprints. These are quite complex so we strongly recommend you start by making changes to one of the example files.

 
 
 

LAYOUTS

The layout describes regions and how they are connected and is what gives the random map its look and feel.

BLUEPRINTS

The blueprint describes which objects are being placed on the map, quantity and any modifiers, such as if they are guarded or not.

 
 

This image highlights the general concepts of a random map layout. Regions create the bulk of the level and are connected to other regions. These connections can be drawn as roads and be guarded. Regions can have any number of child regions that are directly connected to them. Child regions can be either small or large. The size of a region is determined by its fill-value and the room it has to grow on the map. Regions can be grouped, meaning that they will sync their size, content and difficulty. Spawn points are randomly created and later used by the blueprint to spawn entities.

 

LAYOUT.json

{
    "type": "random-map-generator-layout",
    "name": "My Random Map",
    "description": "It's great!",
    "blueprint" : "MyBlueprint"
    "playerCount": 2,
    "size": 75,
    "gameMode": [0, 1, 2]
    "hostileRestrictions": true,
    "competitiveGroupedRegions": false,
    "layouts": [{
        "name": "My Great Sublayout Name",
        "nodes": [{
            "comment": "Player starting areas",
            "id": 1,
            "point": {
                "x": [0, 0.2],
                "y": [0.2, 0.8]
            },
            "fill": 0.1,
            "player": 1,
            "group": 1,
            "region_identifier": ["MyRegion"],
            "primary_building": ["AgnosticTown"],
            "isClaimed": true,
            "difficulty": [15000, 20000],
            "difficultyModifier" : 2,
            "gameMode": [0, 1, 2],
            "largeCenterArea": true,
            "children": [{
                "id": 11,
                "fill": 0,
                "parentGrowthBeforeBirth": 1,
                "gameMode": [1, 2],
                "group": 101,
                "guardChance": 1,
                "difficulty": [5000, 6000],
                "difficultyModifier" : 2,
                "guardTier": "Low",
                "largeCenterArea": true,
                "region_identifier": ["MyRegion"],
                "spawnChance": 1,
                "road": 1,
                "open": true
            }
                         
      ...

        "connections": [{
            "group": 1,
            "nodeFrom": 1,
            "nodeTo": 3,
            "guardChance": 1,
            "difficulty": [5000, 7000],
            "guardTier": "Low"
            "road": 1,
            "wide": false
        }, {

      ...
//        
// must be exactly "random-map-generator-layout"
// the display name of this layout (can be a language phrase)
// the description of this layout (can be a language phrase)
// the blueprint to use (remove this to use the default blueprint)
// the number of player this layout supports
// the square size in tiles of this layout
// determines which game modes the layout supports, default is 0 only. 0 = LastTeamStanding, 1 = Beacons and 2 = FindTheEntity
// determines if we enforce restrictions on hostiles i.e. if they can spawn inside the town area
// determines whether grouped regions are fully synced or not. If set to false the generator will fill all unused spawn points resulting in slightly unbalanced regions.
// here starts the list of layouts. There are usually only one.
// the name of the sub-layout shown in a dropdown when selecting a random map layout
// the list of nodes describing this layout
// a comment for readability puprposes
// the id-number of the node (used to create connections)
// the relative position of the node
// values must be 0 (far left) to 1 (far right)
// values must be 0 (bottom) to 1 (top)
//
// how much of the map does this node fill (0-1 = 0-100%)
// which player does this node belong to (if any)
// is this node part of a group. Nodes in the same group will have their contents synced and is especially useful for player owned nodes such as the player starting node
// the region identifier points to a region in the blueprint
// the primary building to spawn in the center of this region
// is this region claimed from the start of the game?
// how difficult is the guard of the primary building of this region?
// determines how much stronger a hostile in a region should be compared to its entry from the blueprint.
// determines which game modes the node supports and should be present in. Default is all available game modes if left out
// determines the region size of the region when spawned during the generation
// here starts the list of child regions
// the unique id of this child region
// the desired fill of this region (0 means that it will most likely be a single area)
// indicates how much the parent region must grow (0-1 = 0-100%) before this child region is spawned
// determines which game modes the node supports and should be present in. Default is all available game modes if left out.
// is the child region part of a group?
// how large is the chance that this child region will be guarded? (0-1 = 0-100%)
// how difficult is the guard of this child region?
// determines how much stronger hostile in a region should be compared to its entry from blueprints.
// determines the tier of the guarding hostile. Possible entries: Random, Low, Medium and High. This one only takes a single entry.
// determines the region size of the region when spawned during the generation
// the region identifier points to a region in the blueprint
// how large is the chance that this region will spawn at all? (0-1 = 0-100%)
// determines which type of road to use (0 = no road, 1 = dirt road, 2 = cobblestone road)
// determines if the child should have terrain edges towards its parent
//
//
//
//
// here starts the list of connections
// is this connection grouped? grouped connections will sync things like their difficulty
// from what node does this connection start?
// to what node does this connection go?
// how large is the chance that this child connection will be guarded? (0-1 = 0-100%)
// how difficult is the guard of this connection?
// determines the tier of the guarding hostile. Possible entries: Random, Low, Medium and High. This one only takes a single entry
// determines which road type the connection should use. 0 = no road, 1 = dirt road and 2 = cobblestone road
// should this connection be wide or narrow
//
//
//
 

A single layout can contain any number of sub-layouts for added randomness. Please refer to the examples for more details.

 
 

 DEFAULT REGION IDENTIFIERS

There are a number of regions defined in the default blueprint that you can use in your layouts.

  • default - Is what most identifiers will fallback to after they've completed and contains a variety of stuff including but not limited to road side entities such as Aurelian Milestone
    fill - Runs 999 times and tries to fill what little spawn points are left with simple pickups like Pouch of Gold

  • player_start - We use for the town regions and contains gold mines, etc

  • player_support - Spawns a random troop dwelling and is best suited for a child region with a player owned parent region to make sure you get the desired dwelling for the faction.

  • player_dwelling - Spawns a random troop dwelling center - Spawns very valuable stuff and are used for middle (end-game) regions

  • treasure_high - A treasure region with bountiful treasures and high tier artifacts

  • treasure_medium - A treasure region with a balanced assortment of valuable treasure and medium tier artifacts

  • treasure_low - A treasure region with modest riches and low tier artifacts

  • center - A region which holds more powerful entities and resource generators, suitable for mid-late game areas

  • spire - Spawns a single spire

  • beacon - A region which spawns a beacon before falling back to “valuables”

  • stone_of_winning - A region which spawns a StoneOfWinning before falling back to “valuables”

BLUEPRINT.JSON

{
    "type": "random-map-generator-blueprint",
    "name": "MyBlueprint",
    "startingResources": {
        "gold": 5000,
        "wood": 5,
        "stone": 5,
        "ancientAmber": 0,
        "glimmerWeave": 0,
        "celestialOre": 0
    },
    "regions": [{
        "identifier": "MyRegion",
        "comment": "My cool region",
        "iterations": 8,
        "shuffle": true,
        "fallback": "MyOtherRegion",
        "entries": [{
            "comment": "RoadSide",
            "objects": ["AbandonedCart", "LootedCart", "AurelianMilestone", "AurelianMilestone", "RoadSign", "RoadSign", "DeadCommander", "CozyTavern", "CozyTavern"],
            "type": "random",
            "iterations": 8,
            "count": 1,
            "distance" : 0.25,
            "difficulty": [4000, 8000],
            "guardChance": 0.5,
            "guardTier": ["Low", "Medium"],
            "location": ["NearRoad"],
            "children": [{
                "objects": ["PileOfStone", "PileOfWood", "PouchOfGold", "PileOfGold"],
                "count": [0, 1, 1, 2]
            }]
        }, {
    ...
//        
// must be exactly "random-map-generator-blueprint"
// the name of this blueprint used by layouts
// the starting resources when playing using this blueprint
// 
//
//
//
// 
//
//
// here starts the list of regions
// the identifier of this region (used by blueprints)
// a comment for readability purposes 
// how many times will this region try to spawn its entities?
// will this region shuffle the list of entities before spawning?
// what region should we fallback to if this one failes to run successfully?
// here starts the list of entries
// a comment for readability purposes 
// the objects of this region
// how should these objects spawn? (Synced or Random)
// how many times should this entry be spawned?
// how many objects should be spawned each iteration?
// how far from the region center will these objects start to spawn (0.25 = 25%)
// the army value of the hostile guarding this region (Random between two numbers)
// the chanse that a guarding hostile will spawn (0.5 = 50%)
// the tier of the guarding hostiles (Multiple values will ramdomize). "Low", "Medium" or "High"
// where does the objects of this entry want to spawn? (Any, OutInTheOpen, NearMapEdge, NearRegionEdge, NearAreaEdge, Corner, Edge, NearRoad)
// a list of children of this entry
// what objects are spawned as children?
// how many child objects should spawn? (use a list for some randomness)
//
//
//
 

A COMPLETE LIST OF MAP OBJECTS

  • AbandonedCart

  • AgnosticTown

  • AgnosticLargeSettlement

  • AgnosticSmallSettlement

  • AncientAmber

  • AncientAmberMine

  • AncientRuins

  • ArcaneSpire

  • ArmorRack

  • ArtifactRandomHighPower

  • ArtifactRandomLowPower

  • ArtifactRandomMediumPower

  • AurelianMilestone

  • AurelianStatue

  • Balloon

  • Blacksmith

  • BountifulOasis

  • BubblingBog

  • BubblingPot

  • BurningRuneStone

  • BurntBuilding

  • CagedPrisoner

  • Cairn

  • CelestialOre

  • CelestialOreMine

  • Cemetery

  • ChaosSpire

  • CozyTavern

  • CrawlerStatue

  • CreationSpire

  • CrumblingMonument

  • CrumblingTower

  • DeadCommander

  • DestructionSpire

  • DragonRemnant

  • EffectMarblePillar

  • EffectMarbleRuins

  • EssenceAnomaly

  • EssenceStatueArcana

  • EssenceStatueChaos

  • EssenceStatueCreation

  • EssenceStatueDestruction

  • EssenceStatueOrder

  • FactionGoldGenerator

  • FaeyOfferingTree

  • FallenBeacon

  • Farmhouse

  • FarmhouseLarge

  • ForgottenGrave

  • GallowsTree

  • GiantMushrooms

  • Glimmerweave

  • GlimmerweaveMine

  • GoldMine

  • Granary

  • Gravestone

  • GuardiansMonument

  • HiddenGrove

  • Hideout

  • LargeCamp

  • Lectern

  • LevitatingObelisk

  • LookoutTower

  • LooseBuildSiteLarge

  • LooseBuildSiteMedium

  • LootedCart

  • Monastery

  • MysticHermit

  • ObjectiveBeacon

  • OldBones

  • OldCamp

  • OldUrns

  • Orchard

  • OrderSpire

  • OvergrownPortal

  • OvergrownSanctuary

  • PetrifiedTree

  • PileOfGold

  • PileOfStone

  • PileOfWood

  • PitOfSacrifices

  • PouchOfGold

  • RandomMine

  • RandomResourcePickup

  • ReflectingPool

  • RoadSign

  • ShrineOfAurelia

  • SiteOfBattle

  • SnakeMonument

  • StoneAltar

  • StoneCircle

  • StoneMine

  • StoneOfWinning

  • SunkenStatue

  • SwordOfGiants

  • TreasureChestLevel1

  • TreasureChestLevel2

  • TreasureChestLevel3

  • TreasureTrove

  • TroopDwellingLarge1

  • TroopDwellingMedium1

  • TroopDwellingMedium2

  • TroopDwellingMedium3

  • TroopDwellingSmall1

  • TroopDwellingSmall2

  • Waterfall

  • WaterMill

  • WeaponRack

  • WoodenIdol

  • WoodMine