Community Spotlight: The DM Bot
We love seeing what our community builds. This week, we're highlighting specific user @DragonSlayer99 who built a fully autonomous Dungeon Master.
The Architecture
The bot uses the new State Management features in HiveLang v3.
- World State: Tracks NPCs, locations, and quest progress.
- Inventory System: Persistent tracking of player items.
- Dice Roller: A simple tool call to a random number generator.
ruby# Hivelang definition for the Dice Tool tool DiceRoller { input: { sides: number, count: number }, run: (args) => { let results = []; for(let i=0; i<args.count; i++) { results.push(Math.ceil(Math.random() * args.sides)); } return results; } }
Why It's Cool
It manages a party of 4 players, handling turn-based combat and narrative simultaneously. It's a perfect example of keeping complex state in memory while using the LLM for creativity.
Check out the code in the Community Repo.