How to create new Maps

Creating New Maps

sd-horde uses a modular map system. Each map is a separate Lua file in configs/maps/ that defines everything from spawn points to enemy configurations.


Getting Started

Maps are loaded automatically by the map loader. To add a new map:

  1. Create a new file in configs/maps/ (e.g., my_map.lua)

  2. Register it in configs/config.lua under the Maps array:

Maps = {
    'server_farm',
    'cayo_estate',
    'my_map', -- Add your map here
},

The map file must return a table with the map configuration.


Minimal Map Template

Here's the bare minimum structure for a working map:


Configuration Reference

Requirements

Control who can access the map or specific difficulties.

Property
Type
Description

level

number

Minimum horde level required

completedMaps

table

List of maps that must be completed first

item

string/table

Inventory item required to play


Enemy Spawn Settings

Control how enemies spawn relative to players.

Property
Type
Description

spawnMode

string

"furthest", "minDistance", or "random"

minSpawnDistance

number

Minimum distance from players (default: 15.0)


Boss Fights

Add powerful boss enemies on specific rounds.

Property
Type
Description

round

number

Round when boss spawns

name

string

Boss name (displayed on screen)

subtitle

string

Boss subtitle

model

string

Ped model name

health

number

Boss health

armor

number

Boss armor

weapon

hash

Weapon hash

accuracy

number

Shooting accuracy

killReward

number

Points awarded for killing


Intro Screen

Show a cinematic intro when the game starts.


End Game Loot

Configure rewards shown after completing the horde.

Property
Type
Description

rerollCost

number

Cost to reroll loot selection

itemCount

number

Number of items shown

duration

number

Time to select items (seconds)

lootTable

table

Available items with chances


Finding Coordinates

Use a coordinates tool (vMenu, ox_lib devtools, etc.) to find positions for:

Location
Description

spawnPoint

Where players spawn inside the map

entryLocation

Where players interact to start the horde

leaveLocation

Where players teleport after game ends

zonePoints

Walk the perimeter and record each corner

enemySpawns

Spread throughout the playable area

lootSpawns

Places where loot crates can appear

terminal

Shop access point

depositCrate

Where players deposit loot

  • 20-50 enemy spawn points

  • 20-50 loot spawn points

  • Zone points at every corner/turn of the boundary


Tips & Best Practices

Spawn Points

  • Test all spawn points to ensure enemies don't spawn in walls or unreachable areas

  • Spread spawns evenly across the map for balanced gameplay

  • Include spawns at different elevations if the map has multiple floors

Zone Boundaries

  • Make sure the zone covers all spawn points, terminal, and deposit locations

  • Use zoneThickness to account for vertical space (stairs, ramps)

  • Test by walking the entire perimeter

Difficulty Scaling

Difficulty
Enemies
Health
Armor
Accuracy

Easy

Fewer

Low

Low

20-30

Normal

Moderate

Medium

Medium

35-45

Hard

Many

High

High

50-60

Nightmare

Maximum

Very High

Very High

65-80

Boss Placement

  • Space bosses evenly throughout the difficulty

  • Easy (5 rounds): Bosses at rounds 3, 5

  • Normal (10 rounds): Bosses at rounds 3, 6, 10

  • Hard (15 rounds): Bosses at rounds 4, 9, 15

  • Nightmare (20 rounds): Bosses at rounds 5, 12, 20

Loot Balance

  • Common items: chance = 70-100

  • Uncommon items: chance = 35-55

  • Rare items: chance = 10-30

  • Epic items: chance = 1-10


Complete Example

See configs/maps/server_farm.lua for a complete, production-ready map configuration with all features implemented.

Last updated