-
-
Notifications
You must be signed in to change notification settings - Fork 8
Map Creation
-
Download the Tiled Map Editor (SPECIFICALLY VERSION 1.1.4), the source code for the game and the sprite sheets for the game.
-
Unzip the game and spritesheets.
-
Put the spritesheets in a folder:
src/client/assets/spritesheets
. -
Open the maps in
src/content/maps
in Tiled. -
Copy and paste an existing map to get the correct setups. You can copy and paste the
src/content/maps/Template.json
map into one of the folders (antania
, for example) and it will be set up correctly. -
Did you copy the template, or an existing map? Verify that you did. If you don't, your map is not guaranteed to be usable. Do not create Tiled maps from scratch, always copy an existing map.
I'll be looking to clean up this process in the future, but this is it for now. You have to follow the exact setup above, or else something will not work correctly.
You should change these settings to ON, or you're going to have a bad time:
- View -> Snapping -> Snap to Grid
When creating a map, it should follow these constraints:
There must be a gutter (margin) of 4 tiles on each edge of the map (see any map for an example). Otherwise, the camera will get messed up.
Each map should have these map layers (in order; if you copy a map, they will be):
- Succorport - this is an object layer that uses only rectangle objects. The rectangle object name sets the region name in succor/teleport.
- BackgroundMusic - this is an object layer that uses only rectangle objects. The rectangle object name sets the BGM played in the region.
- RegionDescriptions - this is an object layer that uses only rectangle objects. The rectangle objects set the description for the area contained inside of it. Additionally, if there is no succorport, any succor/teleports will use the name of this RegionDescription.
- Spawners - this is an object layer specifically for spawners. Generally, they are restricted to the pylon sprite to prevent confusion.
- NPCs - this is an object layer for specific scripted NPCs. This typically includes shops, quest givers, and the like.
- Interactables - this is an object layer for anything interactable - doors, stairs, portals, or map event tiles.
- OpaqueDecor - this is an object layer for decorative things that should not be see-through-able but can be walked through. Typically, secret walls are put on this layer.
- DenseDecor - this is an object layer for decorative things that should also not be walk-through-able (but can be seen through). Typically, counters are put on this layer.
- Decor - this is an object layer for decorative things such as beds, barrels, etc.
- Walls - this is a layer specifically for walls. Sparingly, trees may also be placed here to make them opaque/dense.
- Foliage - this is a layer specifically for trees and plants.
- Fluids - this is a layer for water and lava only. Do not put anything else (ie, pools, fountains) on this layer.
- Floors - this is another visual layer on top of terrain, it has no effect other than affecting visual tile layering. Typically carpets, bone piles, etc will go on this layer.
- Terrain - this is the base layer and is the tile that is the general basis of your map - grass, dirt, tile, etc.
Maps have optional properties that can be set:
-
maxCreatures
(Controls the maximum number of creatures on the map. When set to 0, spawners will only spawn their minimal number. default: 0) -
maxSkill
(Controls the max skill you can gain skill points at for this map. default: 1) -
region
(Controls the region this map belongs to. Affects banks, lockers, regional drop tables) -
itemExpirationHours
(Controls how many hours it takes for items to decay on this map. default: 6) -
itemGarbageCollection
(Controls how many minutes it takes for item garbage collection checks to occur. default: 60) -
maxItemsOnGround
(Controls the max items on ground before decay is forced to start. default: 1000) -
subscriberOnly
(If set to true, non subscribers cannot enter the map)
For some specific objects, there is additional configuration required:
These must be on the "OpaqueDecor" layer, and must have the type "SecretWall".
Event Sources can be added to fire events when entering or exiting a tile. They can have these properties:
-
offEvent
- the event name fired when leaving -
onEvent
- the event name fired when entering
-
name
needs to be set to the locker name. -
type
needs to be set to Locker. -
lockerId
needs to be set to a unique id (or non-unique, to share a locker with a previous area)
-
type
should be set to StairsUp or StairsDown or Teleport or ClimbUp or ClimbDown or Fall -
teleportMap
should be set to the map to teleport to -
teleportX
should be set to the x position on the map to teleport to -
teleportY
should be set to the y position on the map to teleport to -
requireHeld
can be set to an item name if it's needed to get through. -
requireQuest
can be set to require a quest be started for a player (always true if the quest is completed) -
requireQuestProgress
can be set to require a key in the quest data be true (always true if the quest is completed) -
requireQuestComplete
can be set to require a quest be complete for a player -
damagePercent
can be set to a number 0..100 if thetype
is Fall.
-
type
should be set to Door -
requireHeld
can be set to an item name if it's needed to get through. -
requireLockpick
can be set to true or false if the door can optionally be picked (required if no requireHeld is set) -
skillRequired
can be set to the thief skill required to be able to use the lockpick (Thieves only) -
requireEventToOpen
can be set to make it so the door only opens in response to events -
lockedIfAlive
can be set to a mob name to make it so the door only opens if no mobs matching the id given are alive
-
type
should be set toFillable
-
fillEffect
should reference an effect that exists -
fillDesc
should be a description of the liquid
-
randomWalkRadius
is the number of tiles in any direction from the spawner the creature will naturally walk (default: 10) -
leashRadius
is the number of tiles in any direction from the spawner the creature will chase a hostile target (default: 20) -
respawnRate
is the number of ticks (half-seconds) it takes for a creature to spawn from this spawner (default: 240) -
initialSpawn
is the number of creatures spawned immediately when the -
script
set to the script for the spawner. For lairs, it should be set toglobal/lair
. -
lairName
set to the name of the lair creature to spawn (optional: for lairs only)
-
script
should be set toglobal/alchemist
-
alchCost
is the cost to combine ounces of a potion -
alchOz
is the maximum number of ounces the alchemist will combine to
-
script
should be set toglobal/smith
-
costPerThousand
is the cost per thousand of condition (avg=20000) to repair an item (default: 1) -
repairsUpToCondition
is the max condition the smith will repair to (default: 20000)
-
script
should be set toglobal/tanner
-
script
should be set toglobal/peddler
-
peddleCost
should be set to a cost in gold to buy an item -
peddleItem
should be set to an item name
-
script
should be set toglobal/banker
-
bankId
should be set to the region the bank is in -
branchId
should be set to the branch the bank is (flavor text, usually set to the town name)
-
script
should be set to their script.
In addition to an actual map, I would prefer to have a document submitted that lists:
- What quests you would like in the map
- What items you would like in the map (and how they're obtained)
- What monsters you would like in the map (and their abilities, general toughness, etc)
I may not copy them verbatim but I'll do my best to implement them.