| Crates.io | dcss-scenario-builder |
| lib.rs | dcss-scenario-builder |
| version | 0.4.0 |
| created_at | 2025-03-10 11:25:47.089282+00 |
| updated_at | 2025-10-12 21:29:08.810757+00 |
| description | A scenario builder for DCSS Webtile. |
| homepage | |
| repository | https://github.com/EricFecteau/dcss-api/ |
| max_upload_size | |
| id | 1586461 |
| size | 70,545 |
dcss-scenario-builder creates scenarios in Dungeon Crawl Stone Soup's (DCSS) Webtile using dcss-api in wizmode from a yaml file. It can create any floor layout, from any feature, and add any item or monster. The yaml generally works with the Vault Design Reference Guide.
This example will create a two floor dungeon (D:1 and D:2), with a scroll and sword on the first floor (second room, past the door) and with a Kobold on the second floor.
options:
default_feature: "floor"
levels:
- level:
name: D:1
features:
- '< = exit_dungeon'
- '> = stone_stairs_down_i'
- '# = rock_wall'
- '. = floor'
- '+ = closed_door'
items:
- 'x = Scroll of identify'
map: |-
#########
#...#...#
#.<.#.x.#
#...#...#
#.@.+...#
#...#...#
#...#.>.#
#...#...#
#########
- level:
name: D:2
features:
- '< = stone_stairs_up_i'
- '# = rock_wall'
- '. = floor'
monsters:
- 'k = Kobold'
map: |-
#########
#.......#
#.<.....#
#.......#
#.......#
#.......#
#.....k.#
#.......#
#########
start_game_with_scenario, in combination with the Webtile from dcss-api is used to build the scenario in Rust.
// Connect to DCSS Webtile
let mut webtile = Webtile::connect("ws://localhost:8080/socket", 0)?;
// Empty message queue;
while webtile.get_message().is_some() {}
// Log in (to a user called "Username", with a password "Password")
let _gameid = webtile.login_with_credentials("Username", "Password")?;
// Create scenario
start_game_with_scenario(
&mut webtile,
"dcss-0.33",
"b",
"i",
"c",
"./scenarios/docs/readme.yaml",
)?;
// Empty message queue;
while webtile.get_message().is_some() {}
webtile.disconnect().expect("Failed");