Skip to content

Instantly share code, notes, and snippets.

@baughj
Last active August 29, 2015 14:17
Show Gist options
  • Save baughj/98099e3a58174fac6d69 to your computer and use it in GitHub Desktop.
Save baughj/98099e3a58174fac6d69 to your computer and use it in GitHub Desktop.
---
# Map
# Required values: id,size,name
# Optional list values: flags, music, warps, worldwarps, npc, spawns, reactors
# Optional scalar values: min_lev, max_lev, min_ab (this will automatically set min/max on inbound warps)
id: 312
size: 64x64
name: Test Map
flags: [snow, rain, dark, nomap, winter]
min_lev: 1
max_lev: 99
min_ab: 0
music: 12
warps:
# Required values: x,y,target_x,target_y,target_map
# Optional scalar values: min_lev, max_lev, min_ab
- { x: 3, y: 3, target_x: 10, target_y: 10, target_map: 313 }
- { x: 2, y: 2, target_x: 10, target_y: 10, target_map: 313 }
- { x: 1, y: 1, target_x: 10, target_y: 10, target_map: 313 }
worldwarps:
# Required values: x,y, to (references a world map name)
# Optional scalar values: min_lev, max_lev, min_ab
- { x: 5, y: 5, to: Mileth Set }
- { x: 5, y: 5, to: field001 }
reactors:
# Required values: x,y,script
# Script refers to a script name on disk, e.g. literally scripts/MilethAltarReactor.py
- { x: 10, y: 10, script: MilethAltarReactor}
npcs:
# A list of NPCs on a map.
#
# Required values: x,y, name, sprite, direction
# Optional list values: jobs (maps to MerchantJob enum in Hybrasyl)
# Optional scalar values: portrait (corresponds to SPF "new style" portrait name)
- { x: 20, y: 20, name: "Riona", sprite: 312, direction: 2, jobs: [vendor, banker, trainer, repairer, postman], portrait: inn.spf }
spawns:
fixed:
# A list of fixed spawns on the map.
#
# Fixed spawns occur anywhere on a given map and the location
#
# Required values:
# name - The name of the monster that will be spawned
#
# checkrate - A number of seconds until the spawn check fires - e.g. checkrate: 30 would
# run every 30 second
#
# One or more spawn directive(s), which is one of the following values: min/max, percentage, or every
# For min/max, Hybrasyl will:
# - check every checkrate seconds to ensure at least min number of creatures exist;
# - if a maximum is defined, Hybrasyl will add one creature per checkrate interval until the maximum exists.
# For percentage, Hybrasyl will:
# - randomly determine if the percentage was hit (eg 1 means 1% of the time, spawn will trigger)
# For every, Hybrasyl will:
# - Trigger the spawn every N times (e.g. every: 1000 would mean every 1000 intervals, trigger)
#
# You can also combine a number of spawn directives for more interesting effects.
# - max may be combined with any directive. If undefined, there is NO MAXIMUM. This may not be
# what you want!
# - percentage may not be combined with min (it would have no real meaning).
# - Min and max may be combined with every, meaning essentially that the minimum check would fire
# after checkrate * every seconds.
#
# Optional values:
#
# strategy - One of "random", "nearcoords:x,y:(distance)", or "nearplayers:x,y:(distance)".
# Distance is optional and defaults to between 1 and 5 tiles.
# - "random" will spawn anywhere on the map.
# - "nearcoords:x,y:distance" will spawn within distance tiles of x,y on the map.
# Example: nearcoords:3,5:5 would spawn within 5 tiles of 3,5.
# - "nearexit:distance" will spawn within 1-5 or 1-distance tiles of a map warp.
# Example: nearexit:5 would spawn within 5 tiles of a warp. Note that if no warp
# if no warps exist, this will never trigger.
# - "nearplayer:distance" will spawn within 1-5 tiles (or 1-distance tiles) of a player on
# the map (e.g. nearplayer:10). If no players are on the map, again, this won't trigger.
# Examples:
# Check to see if at least 3 goblins exist every 30 seconds, and spawn another one until we reach 10.
- { name: "Goblin", checkrate: 30, min: 3, max: 10 }
# Every 90 seconds, a scorpion has a 1/1000 chance (0.10%) of appearing.
- { name: "Scorpion", checkrate: 90, percentage: 0.10 }
# Every 30*10000 seconds (e.g every 300,000 seconds or ~3 days, spawn a Heiler. Only one Heiler
# may exist at a time.
- { name: "Heiler", checkrate: 30, every: 10000, max: 1 }
zone:
# "Zone" spawns will only trigger within a defined area (literally a box drawn from
# start_point to end_point), and affects only the specified area. area.
#
# Required values: name, start_point (x,y coordinate on map), end_point, and spawn directives
# as above for fixed spawns. Coordinates MUST be in quotes.
- { name: "Goblin Chieftain", start_point: "3,6", end_point: "2,5", min: 3, max: 10 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment