├── hexroll3 ├── src │ └── main.rs └── Cargo.toml ├── .gitignore ├── hexroll3-testbed ├── assets │ ├── icon.png │ └── screenshot.png ├── src │ ├── app │ │ ├── helpers │ │ │ ├── mod.rs │ │ │ ├── router.rs │ │ │ ├── logger.rs │ │ │ └── config.rs │ │ └── views │ │ │ ├── mod.rs │ │ │ ├── raw_html.rs │ │ │ ├── rendered_json.rs │ │ │ ├── center_panel_selectors.rs │ │ │ ├── open_or_roll.rs │ │ │ ├── raw_json.rs │ │ │ ├── preview.rs │ │ │ └── top_app_bar.rs │ └── main.rs └── Cargo.toml ├── hexroll3-scroll ├── tests │ ├── utils.rs │ └── renderer.rs ├── src │ └── lib.rs └── Cargo.toml ├── Cargo.toml ├── hexroll3-scroll-data ├── utils │ ├── index.scroll │ └── sigils.scroll ├── names │ ├── base.scroll │ ├── jibrish.scroll │ ├── regions.scroll │ ├── dungeons.scroll │ └── taverns.scroll ├── dungeons │ ├── fountain.scroll │ ├── encounters │ │ ├── dragons.scroll │ │ ├── caves.scroll │ │ ├── humanoids.scroll │ │ ├── undead.scroll │ │ ├── vermins.scroll │ │ ├── ooze.scroll │ │ ├── temples.scroll │ │ ├── aberrations.scroll │ │ └── magical.scroll │ ├── appearance.scroll │ ├── portal.scroll │ ├── tomb.scroll │ ├── fungi.scroll │ ├── pools.scroll │ ├── cave.scroll │ ├── temple.scroll │ ├── remains.scroll │ ├── mouth.scroll │ └── debris.scroll ├── wilderness │ ├── base.scroll │ ├── desert.scroll │ ├── swamps.scroll │ ├── plains.scroll │ ├── forest.scroll │ ├── tundra.scroll │ ├── jungle.scroll │ └── mountains.scroll ├── settlements │ ├── folk.scroll │ ├── castle.scroll │ ├── dwelling.scroll │ ├── village.scroll │ ├── base.scroll │ └── town.scroll ├── hooks │ ├── quests │ │ ├── escort.scroll │ │ └── delivery.scroll │ ├── rumor.scroll │ ├── artifacts.scroll │ ├── relation.scroll │ └── quest.scroll ├── realms │ ├── name.scroll │ └── base.scroll ├── monsters │ ├── base.scroll │ └── activities.scroll ├── npc │ ├── state.scroll │ └── gender.scroll ├── factions │ ├── militia.scroll │ ├── syndicate.scroll │ └── cult.scroll └── osr │ └── npc_allocs.scroll └── README.md /hexroll3/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() {} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Cargo.lock 2 | debug 3 | target 4 | **/*.rs.bk 5 | *.pdb 6 | -------------------------------------------------------------------------------- /hexroll3-testbed/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexroll/hexroll3/HEAD/hexroll3-testbed/assets/icon.png -------------------------------------------------------------------------------- /hexroll3-testbed/assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hexroll/hexroll3/HEAD/hexroll3-testbed/assets/screenshot.png -------------------------------------------------------------------------------- /hexroll3-scroll/tests/utils.rs: -------------------------------------------------------------------------------- 1 | pub fn create_tempfile() -> tempfile::NamedTempFile { 2 | if cfg!(target_os = "wasi") { 3 | tempfile::NamedTempFile::new_in("/").unwrap() 4 | } else { 5 | tempfile::NamedTempFile::new().unwrap() 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /hexroll3-scroll/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate pest_derive; 3 | 4 | pub mod commands; 5 | pub mod frame; 6 | pub mod generators; 7 | pub mod instance; 8 | pub mod parser; 9 | pub mod renderer; 10 | pub mod renderer_env; 11 | pub mod repository; 12 | pub mod semantics; 13 | -------------------------------------------------------------------------------- /hexroll3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hexroll3" 3 | version = "0.1.1" 4 | authors = ["Pen, Dice & Paper"] 5 | description = "HEXROLL3 - the OSR sandbox generator" 6 | license-file = "../LICENSE" 7 | repository = "https://github.com/hexroll/hexroll3" 8 | homepage = "https://hexroll.app" 9 | readme = "../README.md" 10 | edition = "2021" 11 | 12 | [dependencies] 13 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | [workspace] 26 | members = [ "hexroll3", 27 | "hexroll3", 28 | "hexroll3-scroll", 29 | "hexroll3-testbed" 30 | ] 31 | resolver = "2" 32 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/helpers/mod.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | pub mod actions; 26 | pub mod config; 27 | pub mod html; 28 | pub mod logger; 29 | pub mod router; 30 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/utils/index.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | IndexedEntity { 27 | Anchor = "" 28 | } 29 | 30 | TocEntry { 31 | Title! = none 32 | Type! = none 33 | UUID! = none 34 | Class! = none 35 | } 36 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/names/base.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Name { 27 | NameGender :: STRING # one of "NameFemale", "NameMale" or "NameFluid" 28 | First! :: STRING 29 | Last! :: STRING 30 | Full! :: STRING 31 | } 32 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/views/mod.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | pub mod center_panel_selectors; 26 | pub mod open_or_roll; 27 | pub mod preview; 28 | pub mod raw_html; 29 | pub mod raw_json; 30 | pub mod rendered_json; 31 | pub mod top_app_bar; 32 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/fountain.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonFountain { 27 | Title = fountain 28 | Liquid @ [ 29 | * clear water are 30 | * dark liquid is 31 | ] 32 | Outlet @ [ 33 | * a hole in the wall 34 | * a stone statue of a fish 35 | ] 36 | Description! = <% 37 | {{capitalize(Liquid)}} coming out of {{Outlet}} here 38 | %> 39 | } 40 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/wilderness/base.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Feature { ^ [ 27 | *(x9) Bridge 28 | *(x9) Watchtower 29 | *(x9) DeadAdventurers 30 | *(x9) Wagons 31 | *(x9) AbandonedVillage 32 | *(x9) Altar 33 | *(x9) SacrificialSite 34 | *(x9) SignalingTower 35 | *(x9) DeadMonster 36 | *(x6) Graveyard 37 | *(x3) Arena 38 | *(x5) CaravanCamp 39 | *(x1) Artifact 40 | *(x1) Portal 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/main.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | mod app; 26 | 27 | #[cfg(not(target_arch = "wasm32"))] 28 | fn main() { 29 | use app::HexrollTestbedApp; 30 | 31 | let _ = eframe::run_native( 32 | "HEXROLL3-Testbed", 33 | eframe::NativeOptions::default(), 34 | Box::new(|cc| { 35 | egui_extras::install_image_loaders(&cc.egui_ctx); 36 | Ok(Box::::default()) 37 | }), 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/views/raw_html.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | use egui::Ui; 26 | 27 | use crate::app::HexrollTestbedApp; 28 | 29 | impl HexrollTestbedApp { 30 | pub fn raw_html_panel(&mut self, ui: &mut Ui) { 31 | egui::ScrollArea::vertical().show(ui, |ui| { 32 | ui.set_width(ui.available_width()); 33 | ui.horizontal_top(|ui| { 34 | ui.label(&self.current_entity.html_source); 35 | }) 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/dragons.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterDragonsTier3(DungeonEncounterMagical) { 27 | Monster! @ MonstersDragonsTier3 28 | | DungeonEncounterMagical 29 | Rumor @ DungeonMonsterRumor { 30 | DungeonMonster = &Monster 31 | } 32 | } 33 | 34 | DungeonEncounterDragonsTier4(DungeonEncounterMagical) { 35 | Monster! @ MonstersDragonsTier4 36 | | DungeonEncounterMagical 37 | Rumor @ DungeonMonsterRumor { 38 | DungeonMonster = &Monster 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/settlements/folk.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Folk(Character) { 27 | | Character 28 | PersonalQuest! @ Quest 29 | OwnerTitle! = "" 30 | ShopTitle! = "" 31 | ServiceTitle = "" 32 | Profession! = none 33 | $IndexRef @ IndexedEntity { 34 | Render = "Name" 35 | Details = "The {{OwnerTitle | lower}} from {{capitalize(SettlementName)}}" 36 | Anchor = &uuid 37 | Link = &HostingEntity 38 | Type = "location" 39 | Full = "" 40 | Search = "{{Full}}" 41 | Icon = "user" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/views/rendered_json.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | use egui::Ui; 26 | use egui_json_tree::{DefaultExpand, JsonTree}; 27 | 28 | use crate::app::HexrollTestbedApp; 29 | 30 | impl HexrollTestbedApp { 31 | pub fn rendered_json_panel(&mut self, ui: &mut Ui) { 32 | ui.set_width(ui.available_width()); 33 | egui::ScrollArea::vertical().show(ui, |ui| { 34 | ui.set_width(ui.available_width()); 35 | JsonTree::new("rendered_json_panel", &self.current_entity.json_rendered) 36 | .default_expand(DefaultExpand::All) 37 | .show(ui); 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/hooks/quests/escort.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | EscortQuest { 27 | Destination % Hex 28 | 29 | Frequency @ [ 30 | * Once a season 31 | * Twice a season 32 | * Twice a year 33 | ] 34 | 35 | ShopOwner = :Shop.Owner 36 | QuestMission = :Shop.HexQuestMission 37 | 38 | Description! ~ <% 39 | {{Frequency}}, {{ShopOwner.Name.First}} will want to {{QuestMission}} in 40 | {{Destination.Region}} (hex {{hex_coords(Destination.uuid)}}) 41 | and will look for someone to protect {{ShopOwner.Gender.PronounObject}} throughout the 42 | journey. 43 | %> 44 | 45 | Reward @ [ 46 | * 500 47 | * 600 48 | * 700 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/caves.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterCaveSpecific (DungeonEncounter) { 27 | | DungeonEncounter 28 | Foreshadow! @ [ 29 | * It is impossible to hear anything inside 30 | * You hear echoing droplets of water 31 | ] 32 | 33 | Hint! @ [ 34 | * You feel as if you're being watched 35 | * A strange sensation is creeping up your spine 36 | * Something here makes the hair at the back of the neck stand 37 | ] 38 | } 39 | 40 | DungeonEncounterCaveSpecificTier1 (DungeonEncounterCaveSpecific) { 41 | Monster! @ MonsterCavernsTier1 42 | | DungeonEncounterCaveSpecific 43 | } 44 | 45 | DungeonEncounterCaveSpecificTier2 (DungeonEncounterCaveSpecific) { 46 | Monster! @ MonsterCavernsTier2 47 | | DungeonEncounterCaveSpecific 48 | } 49 | 50 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/humanoids.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterHumanoids(DungeonEncounter) { 27 | | DungeonEncounter 28 | Foreshadow! ~ <% 29 | When listening from outside, 30 | {%if Monster.NumberAppearingRoaming > 1%}speaking {{Monster.Title}}s 31 | {%else%}footsteps{%endif%} 32 | can be faintly heard from inside this area 33 | %> 34 | Hint! @ [ 35 | * There’s movement inside 36 | * You see glowing eyes staring at you from inside 37 | * A violent shout in an unknown language is coming from inside 38 | * You see the shimmer of a blade inside 39 | ] 40 | } 41 | 42 | DungeonEncounterHumanoidsTier1(DungeonEncounterHumanoids) { 43 | Monster! @ MonstersHumanoidTier1 44 | | DungeonEncounterHumanoids 45 | } 46 | 47 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/settlements/castle.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Castle { 27 | Used = false 28 | RealmType = false 29 | RulerTitle ~ <% 30 | {% if RealmType %}{{RealmType.Ruler.Title}} {{RealmType.Ruler.NPC.Name.Full}}{% endif %} 31 | %> 32 | SettlementName = *Settlement.NamePart 33 | SettlementUUID = :Settlement.uuid 34 | SettlementClass! = :Settlement.class 35 | Type @ [ 36 | * citadel 37 | * castle 38 | * palace 39 | ] 40 | Title! ~ <% 41 | {{Type}} in {{capitalize(SettlementName)}} 42 | %> 43 | 44 | Desc! ~ <% 45 | {% if Used %} 46 |
The {{Type}}
47 | The {{Type}} is the formal residence of {{RulerTitle}}. 48 | {% endif %} 49 | %> 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/realms/name.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | RealmName { 27 | 28 | Prefix @ [ 29 | * Ca 30 | * Al 31 | * El 32 | * Va 33 | * Vo 34 | * Ne 35 | * Jo 36 | ] 37 | 38 | Infix @ [ 39 | * 40 | * saf 41 | * dar 42 | * der 43 | * nar 44 | * sil 45 | * v 46 | * r 47 | ] 48 | 49 | Suffix @ [ 50 | * a 51 | * ia 52 | * ana 53 | * iana 54 | * 'il 55 | ] 56 | 57 | Prefix2 @ [ 58 | * A 59 | * E 60 | * O 61 | * I 62 | * U 63 | ] 64 | 65 | Infix2 @ [ 66 | * ra 67 | * ze 68 | * re 69 | * sha 70 | ] 71 | 72 | Suffix2 @ [ 73 | * zar 74 | * zor 75 | * bar 76 | * bor 77 | * nar 78 | * nor 79 | * dar 80 | * dor 81 | ] 82 | 83 | Name @ [ 84 | * {{Prefix}}{{Infix}}{{Suffix}} 85 | * {{Prefix2}}{{Infix2}}{{Suffix2}} 86 | ] 87 | 88 | Title! ` "{{Name}}" 89 | } 90 | 91 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/monsters/base.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | TreasureType { 27 | Empty! :: BOOL 28 | Details! :: STRING 29 | } 30 | 31 | Monster { 32 | RandomEncountersNumberAppearingFactor = 3 33 | Title! :: STRING 34 | NumberAppearingRoaming! :: DICE 35 | NumberAppearingLair! :: DICE 36 | Sound! :: STRING 37 | Activity! :: TYPE(MonsterActivity) 38 | Intelligent! :: BOOL 39 | Stats! :: STRING 40 | Alignment! :: STRING 41 | HitDice! :: INTEGER 42 | HitDiceRoll! :: STRING 43 | TreasureType! :: TYPE(TreasureType) 44 | TitlePluralizedByRoaming! ~ <%{{plural(NumberAppearingRoaming | int,Title)}}%> 45 | TitlePluralizedByLair! ~ <% 46 | {{plural(round(NumberAppearingLair / RandomEncountersNumberAppearingFactor,0.0),Title)}} 47 | {%if round(NumberAppearingLair / RandomEncountersNumberAppearingFactor,0.0) > 1%} 48 | ({{round(NumberAppearingLair / RandomEncountersNumberAppearingFactor,0.0) | int }}){%else%}{%endif%} 49 | %> 50 | } 51 | 52 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/views/center_panel_selectors.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | use egui::Ui; 26 | 27 | use crate::app::CenterViewMode; 28 | use crate::app::HexrollTestbedApp; 29 | 30 | impl HexrollTestbedApp { 31 | pub fn center_panel_selectors(&mut self, ui: &mut Ui) { 32 | ui.selectable_value( 33 | &mut self.center_view_mode, 34 | CenterViewMode::Preview, 35 | "Preview", 36 | ) 37 | .on_hover_cursor(egui::CursorIcon::Default); 38 | ui.selectable_value( 39 | &mut self.center_view_mode, 40 | CenterViewMode::RawHtml, 41 | "Raw HTML", 42 | ) 43 | .on_hover_cursor(egui::CursorIcon::Default); 44 | ui.selectable_value( 45 | &mut self.center_view_mode, 46 | CenterViewMode::RenderedJson, 47 | "Rendered JSON", 48 | ) 49 | .on_hover_cursor(egui::CursorIcon::Default); 50 | ui.label(&self.current_url); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/names/jibrish.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | JibrishWord { 27 | Part1 @ [ 28 | * ga 29 | * ba 30 | * ka 31 | * za 32 | ] 33 | Part2 @ [ 34 | * ru 35 | * du 36 | * vu 37 | * mu 38 | ] 39 | Part3 @ [ 40 | * xa 41 | * sa 42 | * ja 43 | ] 44 | Part4 @ [ 45 | * un 46 | * il 47 | * wa 48 | * ju 49 | ] 50 | Part5 @ [ 51 | * ri 52 | * xi 53 | * bi 54 | * ni 55 | ] 56 | Part6 @ [ 57 | * ge 58 | * me 59 | * te 60 | * ye 61 | ] 62 | Part7 @ [ 63 | * ko 64 | * po 65 | * ao 66 | ] 67 | Text @ [ 68 | * !jinja "{{Part1}}{{Part2}}{{Part3}}" 69 | * !jinja "{{Part2}}{{Part1}}{{Part3}}" 70 | * !jinja "{{Part3}}{{Part2}}{{Part1}}" 71 | * !jinja "{{Part1}}{{Part2}}{{Part3}} {{Part4}} {{Part5}}{{Part6}}{{Part7}}" 72 | * !jinja "{{Part2}}{{Part1}}{{Part3}} {{Part4}} {{Part6}}{{Part7}}{{Part5}}" 73 | * !jinja "{{Part3}}{{Part2}}{{Part1}} {{Part4}} {{Part7}}{{Part5}}{{Part6}}" 74 | ] 75 | } 76 | 77 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/undead.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterUndead(DungeonEncounter) { 27 | Monster! @@ [ 28 | * MonsterUndeadTier1 29 | * MonsterUndeadTier2 30 | ] 31 | | DungeonEncounter 32 | Foreshadow! ~ < It is impossible to hear anything inside > 33 | 34 | Hint! @ [ 35 | * You feel the chill of death curling up your spine 36 | * Other than that, there's a silence of death in here 37 | * Looking down, you realize you just stepped into a pool of blood 38 | * A strange sensation is creeping up your spine 39 | * Something here makes the hair at the back of the neck stand 40 | ] 41 | } 42 | 43 | DungeonEncounterUndeadTier3(DungeonEncounterUndead) { 44 | Monster! @ MonsterUndeadTier3 45 | | DungeonEncounterUndead 46 | Rumor @ DungeonMonsterRumor { 47 | DungeonMonster = &Monster 48 | } 49 | } 50 | 51 | DungeonEncounterUndeadTier4(DungeonEncounterUndead) { 52 | Monster! @ MonsterUndeadTier4 53 | | DungeonEncounterUndead 54 | Rumor @ DungeonMonsterRumor { 55 | DungeonMonster = &Monster 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /hexroll3-testbed/Cargo.toml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | [package] 26 | name = "hexroll3-testbed" 27 | version = "0.1.1" 28 | authors = ["Pen, Dice & Paper"] 29 | description = "HEXROLL3 Testbed - an egui testbed app for HEXROLL3" 30 | license-file = "../LICENSE" 31 | repository = "https://github.com/hexroll/hexroll3" 32 | homepage = "https://hexroll.app" 33 | readme = "../README.md" 34 | edition = "2021" 35 | default-run = "hexroll3-testbed" 36 | 37 | [dependencies] 38 | anyhow = "1.0.82" 39 | chrono = "0.4.39" 40 | console_error_panic_hook = "0.1.7" 41 | dirs = "5.0.1" 42 | eframe = "0.29.1" 43 | egui = {version = "0.29.1", default-features = false} 44 | egui-file-dialog = "0.7.0" 45 | egui_extras = { version = "0.29.1", features = ["all_loaders"] } 46 | egui_json_tree = "0.8.0" 47 | hexroll3-scroll = { path = "../hexroll3-scroll" } 48 | html5ever = "0.29.0" 49 | image = { version = "0.25", features = ["jpeg", "png"] } 50 | log = "0.4.22" 51 | path-tree = "0.8.1" 52 | serde = "1.0.216" 53 | serde_json = "1.0.133" 54 | wasm-bindgen = "0.2.99" 55 | web-sys = { version = "0.3.76", features = ["Window", "Document", "HtmlElement", "Text"] } 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HEXROLL 3 2 | 3 | This is the new work-in-progress version of HEXROLL (https://hexroll.app) - the OSR sandbox generator. 4 | 5 | ## Currently Included 6 | 7 | - hexroll3-scroll: the core content generator 8 | - hexroll3-scroll-data: the new data model, based on the hexroll2e model 9 | - hexroll3-testbed: an egui application for testing and messing around 10 | - hexroll3: placeholder for the full app 11 | 12 | You can look at each part to see how it all works. 13 | 14 | ## Running the testbed 15 | 16 | Make sure you have `git` and an up-to-date Rust development environment, and then: 17 | 18 | ``` 19 | git clone https://github.com/hexroll/hexroll3 && cd hexroll3 20 | cargo run --release 21 | ``` 22 | 23 | This should open up the testbed where you can generate your first sandbox: 24 | 25 | ![testbed-screenshot](https://raw.githubusercontent.com/hexroll/hexroll3/master/hexroll3-testbed/assets/screenshot.png) 26 | 27 | ## License 28 | 29 | ```text 30 | Copyright (C) 2020-2025 Pen, Dice & Paper 31 | 32 | This program is dual-licensed under the following terms: 33 | 34 | Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 35 | This program is free software: you can redistribute it and/or modify 36 | it under the terms of the GNU Affero General Public License as 37 | published by the Free Software Foundation, either version 3 of the 38 | License, or (at your option) any later version. 39 | 40 | This program is distributed in the hope that it will be useful, 41 | but WITHOUT ANY WARRANTY; without even the implied warranty of 42 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 43 | GNU Affero General Public License for more details. 44 | 45 | You should have received a copy of the GNU Affero General Public License 46 | along with this program. If not, see . 47 | 48 | Option 2: Commercial License 49 | For commercial use, you are required to obtain a separate commercial 50 | license. Please contact ithai at pendicepaper.com 51 | for more information about commercial licensing terms. 52 | 53 | HEXROLL3 contains Open Game Content, subject to the Open Game License, 54 | released under the Open Game License, Version 1.0a (enclosed in the LICENSE 55 | file), as described in Section 1(d) of the License. 56 | ``` 57 | -------------------------------------------------------------------------------- /hexroll3-scroll/Cargo.toml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | [package] 26 | name = "hexroll3-scroll" 27 | version = "0.1.1" 28 | authors = ["Pen, Dice & Paper"] 29 | description = "HEXROLL3 Scroll - the sandbox content generator" 30 | license-file = "../LICENSE" 31 | repository = "https://github.com/hexroll/hexroll3" 32 | homepage = "https://hexroll.app" 33 | readme = "../README.md" 34 | edition = "2021" 35 | 36 | [features] 37 | zstd = ["dep:zstd"] 38 | 39 | [dependencies] 40 | anyhow = "1.0.82" 41 | caith = "4.2.3" 42 | ciborium = "0.2.2" 43 | getrandom = { version = "0.2", features = ["js"] } 44 | indexmap = {version="2.2.6",features=["serde"]} 45 | log = "0.4.22" 46 | minijinja = {version="2.3.0" , features=["builtins"]} 47 | moka = {version="0.12.8",features=["sync"]} 48 | pest = "2.7" 49 | pest_derive = "2.7" 50 | rand = {version="0.8.5", features=["std_rng"]} 51 | rand_chacha = "0.3.1" 52 | redb = "2.3.0" 53 | serde = {version="1.0.197",features = ["derive"]} 54 | serde_json = { version="1.0.133",features = ["preserve_order"]} 55 | zstd = {version = "0.13.2", optional= true} 56 | 57 | [lib] 58 | path = "src/lib.rs" 59 | 60 | [dev-dependencies] 61 | tempfile = "3.10.1" 62 | 63 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/vermins.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterVermins(DungeonEncounter) { 27 | | DungeonEncounter 28 | Foreshadow! ~ <% 29 | A successful listening roll could detect the sounds that the 30 | {{Monster.TitlePluralizedByRoaming}} {%if 31 | Monster.NumberAppearingRoaming>1%}are{%else%}is{%endif%} making inside this 32 | area %> 33 | Hint! @ [ 34 | * There’s movement inside 35 | * There’s also a foul smell of decay and rot 36 | * Looking down, you see countless fragments of small animal skeletons 37 | * Flies swarm off bones covered with rotting flesh on the ground 38 | ] 39 | } 40 | 41 | DungeonEncounterVerminsTier1(DungeonEncounterVermins) { 42 | Monster! @ MonstersVerminTier1 43 | | DungeonEncounterVermins 44 | } 45 | 46 | DungeonEncounterVerminsTier2(DungeonEncounterVermins) { 47 | Monster! @ MonstersVerminTier2 48 | | DungeonEncounterVermins 49 | } 50 | 51 | DungeonEncounterVerminsTier3(DungeonEncounterVermins) { 52 | Monster! @ MonstersVerminTier3 53 | | DungeonEncounterVermins 54 | Rumor @ DungeonMonsterRumor { 55 | DungeonMonster = &Monster 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/ooze.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterOozes(DungeonEncounter) { 27 | | DungeonEncounter 28 | Foreshadow! ~ <% 29 | There's a good chance players could sense the vile stench that the 30 | {{Monster.TitlePluralizedByRoaming}} {%if 31 | Monster.NumberAppearingRoaming>1%}are{%else%}is{%endif%} emitting from 32 | inside this area 33 | %> 34 | Hint! @ [ 35 | * There’s a strong burning sensation when breathing the air here 36 | * There’s also a very strong acidic stench here, making breathing almost 37 | unbearable 38 | * There are bones on the ground, clean bones.. almost bleach-white 39 | * A strange sensation is creeping up your spine 40 | ] 41 | } 42 | 43 | DungeonEncounterOozesTier1(DungeonEncounterOozes) { 44 | Monster! @ MonstersOozeTier1 45 | | DungeonEncounterOozes 46 | } 47 | 48 | DungeonEncounterOozesTier2(DungeonEncounterOozes) { 49 | Monster! @ MonstersOozeTier2 50 | | DungeonEncounterOozes 51 | } 52 | 53 | DungeonEncounterOozesTier3(DungeonEncounterOozes) { 54 | Monster! @ MonstersOozeTier3 55 | | DungeonEncounterOozes 56 | Rumor @ DungeonMonsterRumor { 57 | DungeonMonster = &Monster 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/appearance.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | AreaAppearance { 27 | Cover @ [ 28 | * splatters of dark matter 29 | * claw marks 30 | * burn marks 31 | * scorch marks 32 | * cracks 33 | * fractures 34 | * spots of green rot 35 | * spots of yellow ooze 36 | ] 37 | 38 | State @ [ 39 | * deeply fractured 40 | * scorched with burn marks 41 | * carved with claw marks 42 | ] 43 | 44 | Recency @ [ 45 | * old 46 | * fresh 47 | ] 48 | 49 | Quantity @ [ 50 | * a few 51 | * some 52 | * several 53 | ] 54 | Description! @ [ 55 | * there are {{Quantity}} {{Cover}} on the {{Part}} 56 | * the {{Part}} {{if_plural_else(Part,"have","has")}} {{Quantity}} {{Cover}} on 57 | * the {{Part}} {{if_plural_else(Part,"are","is")}} covered with {{Cover}} 58 | * the {{Part}} {{if_plural_else(Part,"are","is")}} {{State}} 59 | ] 60 | } 61 | 62 | DungeonAreaAppearance (AreaAppearance) { 63 | Part @ [ 64 | * walls 65 | * ground 66 | * ceiling 67 | ] 68 | | AreaAppearance 69 | } 70 | 71 | 72 | CaveAreaAppearance (AreaAppearance) { 73 | Part @ [ 74 | * stalagmites 75 | * stalactites 76 | * ground 77 | * canopy 78 | ] 79 | | AreaAppearance 80 | } 81 | 82 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/hooks/rumor.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Rumor { 27 | Details! = "" 28 | } 29 | 30 | LocalRumor(Rumor) { 31 | } 32 | 33 | RealmRumor(Rumor) { 34 | } 35 | 36 | HexRumor(Rumor) { 37 | 38 | } 39 | 40 | RumorsTable { 41 | 42 | [2..5 rumors] ? LocalRumor 43 | [6..6 rumors2] ? RealmRumor 44 | [6..6 rumors3] ? HexRumor 45 | 46 | table! ~ <% 47 | 48 | 49 | {%set counter=namespace(value=0)%} 50 | {%for r in rumors%} 51 | {% if trim(r.Details) != "" %} 52 | {%set counter.value=counter.value+1%} 53 | 54 | {% endif %} 55 | {%endfor%} 56 | {%for r in range(6-counter.value)%} 57 | {% if rumors2[r] %} 58 | {%set counter.value=counter.value+1%} 59 | 60 | {% endif %} 61 | {%endfor%} 62 | {%for r in range(6-counter.value)%} 63 | {%set counter.value=counter.value+1%} 64 | 65 | {%endfor%} 66 |
d6 Rumor
{{counter.value}} {{begin_spoiler()}}{{r.Details}}{{end_spoiler()}}
{{counter.value}} {{begin_spoiler()}}{{rumors2[r].Details}}{{end_spoiler()}}
{{counter.value}} {{begin_spoiler()}}{{rumors3[r].Details}}{{end_spoiler()}}
67 | %> 68 | } 69 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/temples.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterCultistsClasses { 27 | ^ [ 28 | * MonsterCultistsTier1 29 | ] 30 | } 31 | 32 | DungeonEncounterCultists(DungeonEncounter) { 33 | Foreshadow! ~ <% 34 | If listening to one of the doors here is successful, the faint voices 35 | of chanting by cultists could be heard 36 | %> 37 | 38 | Hint! @ [ 39 | * There are cultists inside 40 | * There are cloaked and hooded humans inside 41 | * There are humans wearing red robes inside 42 | * There are humans wearing dark robes inside 43 | ] 44 | Monster! @ DungeonEncounterCultistsClasses 45 | | DungeonEncounter 46 | } 47 | 48 | DungeonEncounterTempleAnimalsClasses { 49 | ^ [ 50 | * MonsterTempleAnimalsTier1 51 | ] 52 | } 53 | 54 | DungeonEncounterTempleAnimals(DungeonEncounter) { 55 | Monster! @ DungeonEncounterTempleAnimalsClasses 56 | Foreshadow! ~ <% 57 | A successful listening roll could detect the sounds that the 58 | {{Monster.TitlePluralizedByRoaming}} {%if 59 | Monster.NumberAppearingRoaming>1%}are{%else%}is{%endif%} making inside this 60 | area 61 | %> 62 | Hint! @ [ 63 | * There’s some sort of a beast inside 64 | ] 65 | 66 | | DungeonEncounter 67 | } 68 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/helpers/router.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | use path_tree::PathTree; 26 | 27 | use crate::app::{HexrollTestbedApp, RouteHandler}; 28 | 29 | impl HexrollTestbedApp { 30 | pub fn routes(tree: &mut PathTree) { 31 | let _ = tree.insert( 32 | "/inspect/:sandbox/:location/:id", 33 | Box::new(|s, args| { 34 | s.navigate(args["id"].as_str(), true); 35 | }), 36 | ); 37 | let _ = tree.insert( 38 | "/inspect/:sandbox/location/:id/npc/:npc_id", 39 | Box::new(|s, args| { 40 | s.navigate(args["id"].as_str(), true); 41 | }), 42 | ); 43 | let _ = tree.insert( 44 | "/reroll/:id", 45 | Box::new(|s, args| { 46 | s.reroll(args["id"].as_str()); 47 | }), 48 | ); 49 | let _ = tree.insert( 50 | "/unroll/:id", 51 | Box::new(|s, args| { 52 | s.unroll(args["id"].as_str()); 53 | }), 54 | ); 55 | let _ = tree.insert( 56 | "/append/:parent_id/:attr/:cls", 57 | Box::new(|s, args| { 58 | s.append(args["parent_id"].as_str(), args["attr"].as_str()); 59 | }), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/portal.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonPortalDestination { 27 | AreaUUID! = none 28 | Portal = none 29 | Origin = none 30 | OriginUUID = none 31 | RoomNumber = :AreaDescription.RoomNumber 32 | Location! = <{{RoomNumber}}> 33 | Active! = false 34 | } 35 | 36 | DungeonPortal { 37 | Title = 38 | Portal @ [ 39 | * painting of a door on the wall 40 | * stained old full-size mirror on the wall 41 | * stone-carved demon face on the wall with a large gaping mouth 42 | ] 43 | Destination ? DungeonPortalDestination { 44 | Portal = &Portal 45 | Origin = &Origin 46 | OriginUUID = &OriginUUID 47 | Active = <% 48 | {{capitalize(articlize(Portal))}} is a magical portal. 49 | Anyone stepping into the portal will be magically teleported into 50 | area {{Origin}} 51 | %> 52 | } 53 | Description! = <% 54 | {{capitalize(articlize(Portal))}} is a magical portal. 55 | Anyone stepping into the portal will be magically teleported 56 | into area {{Destination.Location}} 57 | %> 58 | } 59 | 60 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/tomb.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | TombFeatureTier1 { 27 | ^ [ 28 | *(x3) DungeonEncounterVerminsTier1 29 | *(x2) DungeonEncounterHumanoidsTier1 30 | * DungeonTreasureTier1 31 | * DungeonRemains 32 | * DungeonFungi 33 | * DungeonPool 34 | ] 35 | } 36 | 37 | TombFeatureTier2 { 38 | ^ [ 39 | *(x2) DungeonEncounterUndead 40 | * DungeonTreasureTier2 41 | * DungeonRemains 42 | * DungeonFungi 43 | * DungeonPool 44 | ] 45 | } 46 | 47 | TombFeatureTier3 { 48 | ^ [ 49 | *(x2) DungeonEncounterUndeadTier3 50 | * DungeonTreasureTier3 51 | * DungeonRemains 52 | * DungeonFungi 53 | * DungeonPool 54 | ] 55 | } 56 | 57 | TombFeatureTier4 { 58 | ^ [ 59 | *(x10) DungeonEncounterUndeadTier4 60 | * DungeonTreasureTier4 61 | ] 62 | } 63 | 64 | Tomb(Dungeon) { 65 | Name! @ TombName 66 | HexLink! = :Hex.uuid 67 | Coords! = <% 68 | 69 | %> 70 | FactionLair = none 71 | 72 | | Dungeon 73 | 74 | DungeonFeatureTier1 = TombFeatureTier1 75 | DungeonFeatureTier2 = TombFeatureTier2 76 | DungeonFeatureTier3 = TombFeatureTier3 77 | DungeonFeatureTier4 = TombFeatureTier4 78 | 79 | # TODO: add a dungeon map 80 | # map @ DungeonMap 81 | 82 | WanderingMonsters @ DungeonWanderingMonsters 83 | } 84 | 85 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/aberrations.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterAberrations(DungeonEncounter) { 27 | | DungeonEncounter 28 | Foreshadow! = <% 29 | A successful listening roll could detect the sounds 30 | that the {{Monster.TitlePluralizedByRoaming}} 31 | {%if Monster.NumberAppearingRoaming>1%}are{%else%}is{%endif%} 32 | making inside this area 33 | %> 34 | Hint! @ [ 35 | * Red eyes are glowing inside like fire, and you hear a 36 | {%if Monster.Sound%} {{Monster.Sound}}{%else%}growl{%endif%} 37 | * Looking down, you realize you just stepped into a pool of blood 38 | * You feel the warm stench of a monster’s breath 39 | * There’s something moving inside 40 | * There’s movement inside 41 | * You feel chills curling up your spine 42 | ] 43 | } 44 | 45 | DungeonEncounterAberrationsTier1(DungeonEncounterAberrations) { 46 | Monster! @ MonstersAberrationTier1 47 | | DungeonEncounterAberrations 48 | } 49 | 50 | DungeonEncounterAberrationsTier2(DungeonEncounterAberrations) { 51 | Monster! @ MonstersAberrationTier2 52 | | DungeonEncounterAberrations 53 | } 54 | 55 | 56 | DungeonEncounterAberrationsTier3(DungeonEncounterAberrations) { 57 | Monster! @ MonstersAberrationTier3 58 | | DungeonEncounterAberrations 59 | Rumor @ DungeonMonsterRumor { 60 | DungeonMonster = &Monster 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/hooks/artifacts.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Shard { 27 | HexCoords! = none 28 | HexUUID! = none 29 | Region! = none 30 | Name! @ [ 31 | * Blue Meteor Shards 32 | * Blood Crystal Shards 33 | * Lightning Stone 34 | ] 35 | HexDescription! =<% 36 | There's a 2 in 6 chance of finding a {{Name}} 37 | reservoir when searching minerals here. %> 38 | Findable! = false 39 | } 40 | 41 | Plant { 42 | HexCoords! = none 43 | HexUUID! = none 44 | Region! = none 45 | PrefixPartA1 @ [ 46 | * Orcish 47 | * Dragon's 48 | * Ogre's 49 | * Elven 50 | * Highlands 51 | ] 52 | 53 | PrefixPartA2 @ [ 54 | * Black 55 | * Spell 56 | * Pale 57 | * Dark 58 | * Deep 59 | ] 60 | 61 | PrefixPartB @ [ 62 | * night 63 | * blood 64 | * fire 65 | * bolt 66 | * blade 67 | * wind 68 | * death 69 | ] 70 | 71 | Suffix @ [ 72 | * Berry 73 | * Root 74 | * Cane 75 | * Flower 76 | * Weed 77 | * Moss 78 | * Vine 79 | ] 80 | 81 | Name! @ [ 82 | * "{{PrefixPartA1}}-{{PrefixPartB}} {{Suffix}}" 83 | * "{{PrefixPartA2}}{{PrefixPartB}} {{Suffix}}" 84 | ] 85 | 86 | HexDescription! = <% 87 | The {{Name}} grows here and there's a 2 in 6 88 | chance of finding it when searching. %> 89 | 90 | Findable! = false 91 | } 92 | 93 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/encounters/magical.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonEncounterMagical(DungeonEncounter) { 27 | | DungeonEncounter 28 | Foreshadow! ~ <% 29 | A successful listening roll could detect the sounds that the 30 | {{Monster.TitlePluralizedByRoaming}} {%if 31 | Monster.NumberAppearingRoaming>1%}are{%else%}is{%endif%} making inside this 32 | area 33 | %> 34 | Hint! @ [ 35 | * You’re not alone here 36 | * This is not looking good 37 | * There’s something moving inside 38 | * There’s movement inside 39 | * A weird sensation is creeping up your spine 40 | ] 41 | } 42 | 43 | DungeonEncounterMagicalTier2(DungeonEncounterMagical) { 44 | Monster! @ MonstersMagicalTier2 45 | | DungeonEncounterMagical 46 | } 47 | 48 | DungeonEncounterMagicalTier3(DungeonEncounterMagical) { 49 | Monster! @ MonstersMagicalTier3 50 | | DungeonEncounterMagical 51 | Rumor @ DungeonMonsterRumor { 52 | DungeonMonster = &Monster 53 | } 54 | } 55 | 56 | DungeonEncounterMimic(DungeonEncounter) { 57 | Monster! @ Mimic 58 | | DungeonEncounter 59 | Foreshadow! ~ <% 60 | A successful search roll could detect the sticky substance that the 61 | Mimic discharged %> 62 | Hint! @ [ 63 | * The ground under your feet feels a bit sticky 64 | * Your boots and feet feel sticky as you step forward 65 | * There is an unfamiliar stench in the air 66 | * There is a very unpleasant smell around here 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/fungi.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonFungi { 27 | Foreshadow! = none 28 | Hint! @ [ 29 | * Faint colourful light is emitting from everywhere 30 | * There’s also a colourful glow emitting from the ground 31 | ] 32 | 33 | Quantity @ [ 34 | * a few 35 | * a few dozen of 36 | * countless 37 | ] 38 | 39 | Effect @ [ 40 | * might be severely poisoned (1d4 of damage until a successful saving throw per turn) 41 | *(x3) will be paralyzed with mind twisting hallucinations for 1d6 turns 42 | *(x4) will suffer a severe stomach ache and a -2 penalty to attack rolls for 1d6 turns 43 | ] 44 | 45 | PotionEffect @ RandomPotion 46 | 47 | Description! @ [ 48 | * {{capitalize(Quantity)}} green and purple bioluminescent mushrooms are 49 | growing from cracks in the ground. Anyone consuming them {{Effect}} 50 | * There are {{Quantity}} colourful bioluminescent mushrooms growing from 51 | cracks in the ground. Anyone consuming these {{Effect}} 52 | * {{capitalize(Quantity)}} blue, red and yellow bioluminescent mushrooms 53 | are growing from cracks in the ground. Anyone consuming them {{Effect}} 54 | * There are {{Quantity}} colourful bioluminescent mushrooms growing from 55 | cracks in the ground. Anyone consuming these will gain the same 56 | effect as if they consumed {{articlize(PotionEffect.Description)}} 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/hooks/relation.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Relation(Quest) { 27 | Related % Character 28 | 29 | OwnerUUID = :Character.uuid 30 | OwnerName = :Character.Name 31 | OwnerGender = :Character.Gender 32 | 33 | WhatLimited @ [ 34 | * some business with 35 | * a severe dispute with 36 | * a grudge against 37 | * bad blood with 38 | * a vendetta against 39 | * a special interest in 40 | ] 41 | 42 | WhatFull @ [ 43 | * some business with 44 | * a severe dispute with 45 | * a grudge against 46 | * bad blood with 47 | * a vendetta against 48 | * a special interest in 49 | * feelings for 50 | * fallen in love with 51 | * an affair with 52 | ] 53 | 54 | SameSex @ 1d10 55 | 56 | Description! ~ <% 57 | {%if Related and Related.uuid%} 58 | {%if Related.uuid!=OwnerUUID%} 59 | {{OwnerName.First}} {{OwnerGender.Possession}} 60 | {%if OwnerGender.class == Related.Gender.class and SameSex > 8 %} 61 | {{WhatFull}} 62 | {%elif OwnerGender.class != Related.Gender.class%} 63 | {{WhatFull}} 64 | {%else%} 65 | {{WhatLimited}} 66 | {%endif%} 67 | 68 | {{Related.Name.Full}}. 69 | {%endif%} 70 | {%endif%} 71 | %> 72 | } 73 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/views/open_or_roll.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | use egui::Ui; 26 | 27 | use crate::app::HexrollTestbedApp; 28 | 29 | impl HexrollTestbedApp { 30 | pub fn open_or_roll_panel(&mut self, ctx: &egui::Context) { 31 | if !self.scroll_in_filepath_is_valid { 32 | return; 33 | } 34 | egui::CentralPanel::default().show(ctx, |ui| { 35 | ui.set_width(ui.available_width()); 36 | ui.vertical_centered(|ui| { 37 | ui.set_max_width(300.0); 38 | ui.horizontal_centered(|ui| { 39 | ui.set_max_height(50.0); 40 | self.open_or_roll_fragment(ui); 41 | }); 42 | 43 | let mrus = &self.config.recently_opened.clone(); 44 | mrus.iter().rev().for_each(|v| { 45 | if ui.link(v).clicked() { 46 | self.open_existing_sandbox(v) 47 | .map_err(|_| { 48 | log::warn!("Unable to open file {}", v); 49 | }) 50 | .ok(); 51 | } 52 | }); 53 | }); 54 | }); 55 | } 56 | 57 | pub fn open_or_roll_fragment(&mut self, ui: &mut Ui) { 58 | if ui.button("Roll a new sandbox").clicked() { 59 | self.roll_new_sandbox_dialog(ui); 60 | } 61 | ui.separator(); 62 | if ui.button("Open an existing sandbox").clicked() { 63 | self.open_existing_sandbox_dialog(); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/names/regions.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | kRegionNames = [ 27 | * Hell Pit 28 | * Stargazer 29 | * Dark Storm 30 | * Ironhammer 31 | * Nightshard 32 | * Pantheon 33 | * Goblinchaser 34 | * Vazul's Spear 35 | * Watermaze 36 | * Dragon's Flame 37 | * Goldseeker's 38 | * Bonecrusher 39 | * Blood Blade 40 | * Battleworn 41 | * Demon's Fork 42 | * Devil's Eye 43 | * Holloweye 44 | * Gem of Elderia 45 | * Dragon Fury 46 | * Revenger 47 | * Karla's Hammer 48 | * Heart of Avaya 49 | * Black Shield 50 | * Dark Armor 51 | * Nightmare 52 | * Spiderweb 53 | * Vicious 54 | * Javelin 55 | * Heartseeker 56 | * Thousand Shrines 57 | * Blackapple 58 | * Redfeather 59 | * Ragthorn 60 | * Crimsonblade 61 | * Nightshadow 62 | * Halfmoon 63 | * Howling Wolves 64 | * Hell's Gate 65 | * Aurora 66 | * Sunbreak 67 | * Goldmass 68 | * Dragonclaw 69 | * Moonwatcher 70 | * Fallen Star 71 | * Crater 72 | * Savage 73 | * Demonskull 74 | * Wyvern's Sting 75 | * Axe of Sal'zazoo 76 | * Vortex 77 | * Spiral 78 | * Bloodborn 79 | * Bloodforged 80 | * Fireforged 81 | * Iceforged 82 | * Fireborn 83 | * Iceborn 84 | * Wintercry 85 | * Summerwave 86 | * Firefly 87 | * Alvania 88 | * Fearless 89 | * Thunderwave 90 | * Lifeless 91 | * Arrowpoint 92 | * Retribution 93 | * Light of Valor 94 | * Goldenswan 95 | * Emerald 96 | * Darkfall 97 | * Grey Mist 98 | ] 99 | 100 | RegionName { 101 | Value! @ $kRegionNames 102 | } 103 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/npc/state.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | kNPCState = [ 27 | * Aggressive 28 | * Aghast 29 | * Agitated 30 | * Alone 31 | * Angry 32 | * Annoyed 33 | * Anxious 34 | * Apprehensive 35 | * Arrogant 36 | * Ashamed 37 | * Bothered 38 | * Calm 39 | * Cheerful 40 | * Confident 41 | * Contented 42 | * Crushed 43 | * Delighted 44 | * Depressed 45 | * Desperate 46 | * Determined 47 | * Disorganized 48 | * Disoriented 49 | * Distressed 50 | * Drained 51 | * Ecstatic 52 | * Elated 53 | * Embarrassed 54 | * Energetic 55 | * Enraged 56 | * Excited 57 | * Exhausted 58 | * Fearful 59 | * Forceful 60 | * Frustrated 61 | * Guilty 62 | * Happy 63 | * Heartbroken 64 | * Helpless 65 | * Hopeless 66 | * Horny 67 | * Horrified 68 | * Hurt 69 | * Joyful 70 | * Livid 71 | * Lazy 72 | * Lifeless 73 | * Lost 74 | * Irritated 75 | * Mellow 76 | * Moody 77 | * Nervous 78 | * Offended 79 | * Outraged 80 | * Overwhelmed 81 | * Pained 82 | * Panicky 83 | * Paranoid 84 | * Persuasive 85 | * Petrified 86 | * Pleased 87 | * Proud 88 | * Puzzled 89 | * Queasy 90 | * Rejected 91 | * Relieved 92 | * Remorseful 93 | * Repentant 94 | * Sad 95 | * Satisfied 96 | * Scared 97 | * Shocked 98 | * Sickened 99 | * Sorrowful 100 | * Surprised 101 | * Terrified 102 | * Timid 103 | * Tired 104 | * Troubled 105 | * Uncomfortable 106 | * Unimpressed 107 | * Unsatisfied 108 | * Unsure 109 | * Upset 110 | * Worried 111 | * Worthless 112 | ] 113 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/names/dungeons.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonNameNoun = [ 27 | * skeletons 28 | * ogre 29 | * lich 30 | * goblin 31 | * blades 32 | * spider 33 | * souls 34 | * horrors 35 | * blood 36 | * fire 37 | * witch 38 | * desire 39 | * hopes 40 | * pain 41 | * pits 42 | * order 43 | * slaves 44 | ] 45 | 46 | DungeonNameAdjective = [ 47 | * betraying 48 | * corrupted 49 | * grey 50 | * corrupted 51 | * lost 52 | * cursed 53 | * hidden 54 | * unspoken 55 | * lonely 56 | * foresaken 57 | * dark 58 | * feared 59 | * tormented 60 | * raging 61 | * cruel 62 | * mourning 63 | * nameless 64 | * dishonored 65 | * deadly 66 | * cold 67 | * hopeless 68 | * unholy 69 | * savage 70 | * crying 71 | * burning 72 | * doomed 73 | * violent 74 | * mad 75 | * infernal 76 | * twisted 77 | * ruthless 78 | * furious 79 | ] 80 | 81 | DungeonName { 82 | Noun @ $DungeonNameNoun 83 | Adjective @ $DungeonNameAdjective 84 | Title! = "{{capitalize(NamePrefix)}} of the {{ capitalize(Adjective)}} {{capitalize(Noun)}}" 85 | } 86 | 87 | CavernName (DungeonName) { 88 | NamePrefix @ [ 89 | * caverns 90 | * lair 91 | * hideout 92 | ] 93 | | DungeonName 94 | } 95 | 96 | 97 | TombName (DungeonName){ 98 | NamePrefix @ [ 99 | * tomb 100 | * crypt 101 | ] 102 | | DungeonName 103 | } 104 | 105 | TempleName (DungeonName){ 106 | NamePrefix @ [ 107 | * temple 108 | * shrine 109 | ] 110 | | DungeonName 111 | } 112 | 113 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/names/taverns.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | BaseTavernName { 27 | Creature @ [ 28 | * Ghoul 29 | * Mummy 30 | * Skeleton 31 | * Spectre 32 | * Wight 33 | * Wraith 34 | * Zombie 35 | * Werewolf 36 | * Hawk 37 | * Harpy 38 | * Dragon 39 | * Vampire 40 | * Pixie 41 | * Unicorn 42 | * Orc 43 | * Goblin 44 | * Gnoll 45 | * Ogre 46 | * Troll 47 | ] 48 | 49 | Title @ [ 50 | * Devil 51 | * Queen 52 | * King 53 | * Knight 54 | * Hunter 55 | * Baker 56 | * Brewer 57 | * Wizard 58 | * Bard 59 | * Rogue 60 | * Mage 61 | * Witch 62 | * Paladin 63 | * Peasant 64 | ] 65 | 66 | Object @ [ 67 | * Sword 68 | * Mace 69 | * Stone 70 | * Torch 71 | * Arrow 72 | * Spear 73 | * Staff 74 | ] 75 | 76 | LivingAdjective @ [ 77 | * Bleeding 78 | * Fearless 79 | * Gloomy 80 | * Sad 81 | * Crying 82 | * Laughing 83 | * Cursed 84 | ] 85 | 86 | StaticAdjective @ [ 87 | * Flaming 88 | * Glowing 89 | * Magic 90 | * Black 91 | * Cursed 92 | * Lost 93 | ] 94 | Full! @ [ 95 | * "The {{Creature}} & The {{LivingAdjective}} {{Title}} {{Type}}" 96 | * "The {{LivingAdjective}} {{Creature}} {{Type}}" 97 | * "{{StaticAdjective}} {{Object}} {{Type}}" 98 | * "The {{StaticAdjective}} {{Object}} {{Type}}" 99 | * "The {{Title}}'s {{Object}} {{Type}}" 100 | ] 101 | } 102 | 103 | TavernName(BaseTavernName) { 104 | Type! = Tavern 105 | | BaseTavernName 106 | } 107 | 108 | InnName(BaseTavernName) { 109 | Type! @ [ 110 | * Inn 111 | * Lodge 112 | ] 113 | | BaseTavernName 114 | } 115 | -------------------------------------------------------------------------------- /hexroll3-testbed/src/app/views/raw_json.rs: -------------------------------------------------------------------------------- 1 | /* 2 | // Copyright (C) 2020-2025 Pen, Dice & Paper 3 | // 4 | // This program is dual-licensed under the following terms: 5 | // 6 | // Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU Affero General Public License as 9 | // published by the Free Software Foundation, either version 3 of the 10 | // License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU Affero General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU Affero General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Option 2: Commercial License 21 | // For commercial use, you are required to obtain a separate commercial 22 | // license. Please contact ithai at pendicepaper.com 23 | // for more information about commercial licensing terms. 24 | */ 25 | use egui::CursorIcon; 26 | use egui::Ui; 27 | use egui_json_tree::{render::DefaultRender, DefaultExpand, JsonTree}; 28 | 29 | use crate::app::HexrollTestbedApp; 30 | 31 | impl HexrollTestbedApp { 32 | pub fn raw_json_panel(&mut self, ui: &mut Ui, value: serde_json::Value) { 33 | let tree = JsonTree::new("", &value); 34 | ui.style_mut().interaction.selectable_labels = false; 35 | tree.on_render( 36 | |ui, context| match serde_json::to_string_pretty(context.value()) { 37 | Ok(pretty_str) if pretty_str.trim_matches('"').len() == 8 => { 38 | let rendered_tree_item = context.render_default(ui); 39 | if rendered_tree_item.hovered() { 40 | let rendered_tree_item = rendered_tree_item 41 | .highlight() 42 | .on_hover_cursor(CursorIcon::Default); 43 | if rendered_tree_item.is_pointer_button_down_on() { 44 | rendered_tree_item.ctx.set_cursor_icon(CursorIcon::Wait); 45 | } 46 | if rendered_tree_item.clicked() { 47 | rendered_tree_item.ctx.set_cursor_icon(CursorIcon::Wait); 48 | self.navigate(pretty_str.to_string().trim_matches('"'), true); 49 | rendered_tree_item.ctx.set_cursor_icon(CursorIcon::Default); 50 | } 51 | } 52 | } 53 | _ => { 54 | context.render_default(ui); 55 | } 56 | }, 57 | ) 58 | .default_expand(DefaultExpand::All) 59 | .show(ui); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/pools.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | DungeonPool { 27 | Foreshadow! = none 28 | 29 | Hint! @ [ 30 | * There’s a large round pool in the middle of the floor 31 | * There’s a large elevated oval pool on the floor 32 | * There’s a large circular pool embedded in the center of the floor 33 | ] 34 | 35 | Effect @ [ 36 | * The liquid is a strong acid. When it comes in touch with human skin, 37 | it will inflict 1d4 of damage each round until it 38 | is completely washed off. 39 | * Anyone submerging into the pool will regain 1d6 per level of hitpoints. 40 | * If the pool is disturbed, it will start overflowing, rapidly 41 | flooding the area. If the doors are closed, it could drown 42 | anyone here. 43 | * When anything is submerged into the pool, the liquid inside will 44 | solidify around it into stone. It will take either magic or incredible 45 | external effort to break out. 46 | * If anything dead is thrown into the pool, a demon (or any other referee 47 | elected creature) will emerge from within. 48 | * Gazing into the pool will reflect a demonic entity that will secretly 49 | possess anyone looking at it. Save vs Spells 50 | or secretly serve the demon's evil intentions until a Bless 51 | or a similar spell is used. 52 | ] 53 | 54 | Liquid @ [ 55 | * dark, tar-colored liquid 56 | * crystal clear liquid 57 | * milky-white liquid 58 | * blood-like liquid 59 | * glowing-green liquid 60 | * stinky yellowish liquid 61 | ] 62 | 63 | Description! @ [ 64 | * The pool contains {{Liquid}}. {{Effect}} 65 | * The pool is filled with {{Liquid}}. {{Effect}} 66 | * The pool has {{Liquid}} inside it. {{Effect}} 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/factions/militia.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | MilitiaName(FactionName) { 27 | Name_Prefix @ [ 28 | * fists 29 | * swords 30 | * spears 31 | * arrows 32 | * hammers 33 | * army 34 | * defenders 35 | 36 | ] 37 | 38 | Name_Suffix @ [ 39 | * of hope 40 | * of justice 41 | * of power 42 | * of honor 43 | * of victory 44 | * of valor 45 | * of fire 46 | * of revival 47 | ] 48 | | FactionName 49 | } 50 | 51 | Militia (Faction) { 52 | 53 | FactionName! @ MilitiaName 54 | 55 | AcceptedAlignment @ [ 56 | * Chaotic 57 | * Neutral 58 | ] 59 | 60 | Race @ [ 61 | * humans 62 | * elves 63 | * gnolls 64 | * kobolds 65 | ] 66 | 67 | Verb @ [ 68 | * conspiring to 69 | * plotting to 70 | ] 71 | 72 | Purpose @ [ 73 | * overthrow the ruler of the realm 74 | * abolish all magic-users 75 | * eliminate all cultists 76 | ] 77 | 78 | Tavern ? Tavern { 79 | FactionName = *FactionName 80 | FactionUUID = &uuid 81 | Faction = <% 82 | {{FactionName.Full}} 83 | are using this place as a meeting place from time to time. 84 | %> 85 | } 86 | 87 | Leader @ MilitiaLeader { 88 | HostingEntity := &uuid 89 | Alignment = Neutral 90 | } 91 | 92 | Brief! ~ <% 93 |

94 | {{FactionName.Full}} 95 | {{class | lower}} are {{Verb}} {{Purpose}}. 96 |

97 | {% if Tavern %} 98 |

99 | The {{class | lower}}’s usual gathering venue is 100 | {{Tavern.Title}} 101 | {%if Tavern.SettlementName%}in {{title(Tavern.SettlementName)}}{%else%} 102 | {%endif%} 103 |

104 | {%endif%} 105 | %> 106 | 107 | Coords! ~ <{%if Tavern%}{{Tavern.Coords}}{%endif%}> 108 | | Faction 109 | } 110 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/cave.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | CaveEncounterTier1 { 27 | ^ [ 28 | *(x2) DungeonEncounterHumanoidsTier1 29 | * DungeonEncounterVerminsTier1 30 | * DungeonEncounterOozesTier1 31 | * DungeonEncounterAberrationsTier1 32 | * DungeonEncounterCaveSpecificTier1 33 | ] 34 | } 35 | 36 | CaveEncounterTier2 { 37 | ^ [ 38 | * DungeonEncounterHumanoidsTier1 39 | * DungeonEncounterVerminsTier2 40 | * DungeonEncounterOozesTier2 41 | * DungeonEncounterAberrationsTier2 42 | * DungeonEncounterCaveSpecificTier2 43 | ] 44 | } 45 | 46 | CaveEncounterTier3 { 47 | ^ [ 48 | * DungeonEncounterVerminsTier3 49 | * DungeonEncounterOozesTier3 50 | * DungeonEncounterAberrationsTier3 51 | * DungeonEncounterDragonsTier3 52 | ] 53 | } 54 | 55 | CaveFeatureTier1 { 56 | ^ [ 57 | *(x2) CaveEncounterTier1 58 | * DungeonTreasureTier1 59 | * DungeonRemains 60 | * DungeonFungi 61 | ] 62 | } 63 | 64 | CaveFeatureTier2 { 65 | ^ [ 66 | *(x2) CaveEncounterTier2 67 | * DungeonTreasureTier2 68 | * DungeonRemains 69 | * DungeonFungi 70 | ] 71 | } 72 | 73 | CaveFeatureTier3 { 74 | ^ [ 75 | *(x2) CaveEncounterTier3 76 | * DungeonTreasureTier3 77 | * DungeonRemains 78 | * DungeonFungi 79 | ] 80 | } 81 | 82 | Cavern(Dungeon) { 83 | Name! @ CavernName 84 | HexLink! = :Hex.uuid 85 | Coords! = <% 86 | 87 | %> 88 | FactionLair @ FactionLair { 89 | DungeonUUID = &uuid 90 | Name = *Name 91 | HexLink = &HexLink 92 | Coords = &Coords 93 | } 94 | 95 | | Dungeon 96 | 97 | DungeonFeatureTier1 = CaveFeatureTier1 98 | DungeonFeatureTier2 = CaveFeatureTier2 99 | DungeonFeatureTier3 = CaveFeatureTier3 100 | DungeonFeatureTier4 = CaveFeatureTier4 101 | 102 | # map @ CaveMap 103 | 104 | WanderingMonsters @ DungeonWanderingMonsters 105 | } 106 | 107 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/settlements/dwelling.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | Hut { 27 | Name! = Hut 28 | Motivation! @ [ 29 | * hiding here as a fugitive 30 | * living in solitude here 31 | ] 32 | } 33 | 34 | Cottage { 35 | Name! = Cottage 36 | Motivation! @ [ 37 | * finding refuge from the world 38 | * seeking solitude from others 39 | * spending retirement here 40 | * looking for some peace and quiet 41 | ] 42 | } 43 | 44 | Farmhouse { 45 | Name! = Farmhouse 46 | Motivation! @ [ 47 | * trying to sustain independently here 48 | * growing a unique specie of smoking-pipe leaves 49 | ] 50 | } 51 | 52 | House (Residency){ 53 | Prefix @ [ 54 | * aging 55 | * well-maintained 56 | * decorated 57 | * barricaded 58 | ] 59 | Encounter = "Yes" 60 | Type! @@ [ 61 | * Hut 62 | * Cottage 63 | * Farmhouse 64 | ] 65 | 66 | Population = 1 67 | 68 | HexLink = :Hex.uuid 69 | HexRegion = :Hex.Region 70 | Resident! @@ [ 71 | * Character 72 | ]~{ 73 | HostingEntity := &HexLink 74 | URLExt = "/location/{{HostingEntity}}" 75 | SettlementName = &HexRegion 76 | } 77 | 78 | Quest @ [ 79 | * Feeling someone or something is lurking around the {{Type.Name}} 80 | * Hearing strange noises at night and fearing someone or something will raid the {{Type.Name}} 81 | ] 82 | 83 | Details! =<% 84 |
  • 85 | {{Resident.Name.First}} {{Resident.Gender.BeVerb}} {{Type.Motivation}}. 86 | 87 | {{capitalize(Resident.Gender.PronounSubject)}} {{Resident.Gender.Possession}} {{Resident.Appearance}} 88 | ({{Resident.State}}). {{Resident.InThePocket.Details}} 89 | 90 |
      91 | {%if Resident.Association%}{{Resident.Association}}{%endif%} 92 | {%if Resident.Story2%}{{Resident.Story2.Description}}{%endif%} 93 |
    • 94 | {{Quest}}. 95 |
    • 96 |
    97 |
  • 98 |
99 | %> 100 | | Residency 101 | } 102 | 103 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/factions/syndicate.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | SyndicateName(FactionName) { 27 | 28 | Name_Prefix @ [ 29 | * dark 30 | * red 31 | * black 32 | * white 33 | * avenging 34 | * rough 35 | * silent 36 | ] 37 | 38 | Name_Suffix @ [ 39 | * blades 40 | * shadows 41 | * cloaks 42 | * daggers 43 | * snakes 44 | * spiders 45 | * ghosts 46 | * wyverns 47 | * wolves 48 | * masks 49 | * hyaenas 50 | ] 51 | | FactionName 52 | } 53 | 54 | Syndicate (Faction) { 55 | 56 | FactionName! @ SyndicateName 57 | 58 | AcceptedAlignment @ [ 59 | * Chaotic 60 | ] 61 | 62 | Race @ [ 63 | * humans 64 | * elves 65 | * gnolls 66 | * kobolds 67 | ] 68 | 69 | Verb @ [ 70 | * conspiring to 71 | * plotting to 72 | ] 73 | 74 | Purpose @ [ 75 | * assassinate the ruler of the realm 76 | * abduct and smuggle people to slave traders 77 | * collect protection money for an unknown purpose 78 | ] 79 | 80 | Tavern ? Tavern { 81 | FactionName = *FactionName 82 | FactionUUID = &uuid 83 | Faction = <% 84 | {{FactionName.Full}} 85 | are using this place as their secret meeting place from time to time. 86 | %> 87 | } 88 | 89 | Leader @ SyndicateLeader { 90 | HostingEntity := &uuid 91 | Alignment = Neutral 92 | } 93 | 94 | Brief! ~ <% 95 |

96 | {{FactionName.Full}} 97 | {{class | lower}} are {{Verb}} {{Purpose}}. 98 |

99 | {% if Tavern %} 100 |

101 | The {{class | lower}}’s usual gathering venue is 102 | {{Tavern.Title}} 103 | {%if Tavern.SettlementName%}in {{title(Tavern.SettlementName)}}{%else%} 104 | {%endif%} 105 |

106 | {%endif%} 107 | %> 108 | 109 | Coords! ~ <{%if Tavern%}{{Tavern.Coords}}{%endif%}> 110 | | Faction 111 | } 112 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/dungeons/temple.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | TempleEncounterTier1 { 27 | ^ [ 28 | *(x2) DungeonEncounterCultists 29 | * DungeonEncounterTempleAnimals 30 | ] 31 | } 32 | 33 | TempleEncounterTier2 { 34 | ^ [ 35 | * DungeonEncounterMagicalTier2 36 | * DungeonEncounterAberrationsTier2 37 | ] 38 | } 39 | 40 | TempleEncounterTier3 { 41 | ^ [ 42 | *(x4) DungeonEncounterMagicalTier3 43 | *(x4) DungeonEncounterAberrationsTier3 44 | * DungeonEncounterMimic 45 | ] 46 | } 47 | 48 | TempleEncounterTier4 { 49 | ^ [ 50 | *(x3) DungeonEncounterDragonsTier3 51 | * DungeonEncounterDragonsTier4 52 | ] 53 | } 54 | 55 | TempleFeatureTier1 { 56 | ^ [ 57 | *(x3) TempleEncounterTier1 58 | * DungeonTreasureTier1 59 | * DungeonRemains 60 | * DungeonPool 61 | ] 62 | } 63 | 64 | TempleFeatureTier2 { 65 | ^ [ 66 | *(x2) TempleEncounterTier2 67 | * DungeonTreasureTier2 68 | * DungeonRemains 69 | * DungeonPool 70 | ] 71 | } 72 | 73 | TempleFeatureTier3 { 74 | ^ [ 75 | *(x2) TempleEncounterTier3 76 | * DungeonTreasureTier3 77 | * DungeonRemains 78 | * DungeonPool 79 | ] 80 | } 81 | 82 | TempleFeatureTier4 { 83 | ^ [ 84 | *(x10) TempleEncounterTier4 85 | * DungeonTreasureTier4 86 | ] 87 | } 88 | 89 | Temple(Dungeon) { 90 | Name! @ TempleName 91 | HexLink! = :Hex.uuid 92 | Coords! = <% 93 | 94 | %> 95 | FactionLair @ FactionLair { 96 | DungeonUUID = &uuid 97 | Name = *Name 98 | HexLink = &HexLink 99 | Coords = &Coords 100 | } 101 | 102 | | Dungeon 103 | 104 | DungeonFeatureTier1 = TempleFeatureTier1 105 | DungeonFeatureTier2 = TempleFeatureTier2 106 | DungeonFeatureTier3 = TempleFeatureTier3 107 | DungeonFeatureTier4 = TempleFeatureTier4 108 | # TODO: add a dungeon map 109 | # map @ DungeonMap 110 | 111 | WanderingMonsters @ DungeonWanderingMonsters 112 | } 113 | -------------------------------------------------------------------------------- /hexroll3-scroll-data/settlements/village.scroll: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020-2025 Pen, Dice & Paper 3 | # 4 | # This program is dual-licensed under the following terms: 5 | # 6 | # Option 1: (Non-Commercial) GNU Affero General Public License (AGPL) 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | # Option 2: Commercial License 21 | # For commercial use, you are required to obtain a separate commercial 22 | # license. Please contact ithai at pendicepaper.com 23 | # for more information about commercial licensing terms. 24 | # 25 | 26 | VillageDistrict(District) { 27 | Title = Village District 28 | CostFactor = 0.9 29 | << Advert 30 | << LocalRumor 31 | [5..19 shops!] @ TownShops 32 | | District 33 | } 34 | 35 | Village(Settlement) { 36 | | Settlement 37 | 38 | Title! = "village of {{title(NamePart)}}" 39 | 40 | Prefix! @ [ 41 | * thriving 42 | * bustling 43 | * sleepy 44 | * flourishing 45 | * lively 46 | * struggling 47 | * growing 48 | * withering 49 | * prospering 50 | * expanding 51 | ] 52 | 53 | Connector! @ [ 54 | * blends seamlessly 55 | * sits quietly 56 | * rests peacefully 57 | ] 58 | 59 | District? @ VillageDistrict 60 | Population? = "{{int(District.Population)}}" 61 | 62 | GAlignment @ [ 63 | *(x5) Lawful 64 | *(x1) Neutral 65 | ] 66 | [2..3 Guards?] @ Guard { 67 | Alignment = &GAlignment 68 | HostingEntity := &uuid 69 | Profession = "guard" 70 | URLExt = "/location/{{HostingEntity}}/npc/{{uuid}}" 71 | } 72 | 73 | Overview? ~ <% 74 |

75 | Population: {{Population}} villagers 76 |

77 |
Village Shops & Services
78 | {{District.Index}} 79 | {% if Guards %} 80 |
Guards
81 | {% for g in Guards %} 82 | 83 |

84 | {{reroller(g, "", False)}} {{g.Description}} 85 | {{g.Stats}} 86 | {% if g.Association %} 87 |

    88 | {{g.Association}} 89 |
90 | {% endif %} 91 |
92 |

93 | {% endfor %} 94 | {% endif %} 95 | %> 96 | 97 | Supplemental! = "" 98 | 99 | Brief? = <% 100 | {{Overview}} 101 | %> 102 | 103 | 105 | %metadata> 106 | 107 |