Skip to content

Move biome definitions to YAML configuration with hot reload support #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MorquinDevlar
Copy link
Contributor

@MorquinDevlar MorquinDevlar commented Jun 19, 2025

Summery

This PR refactors the biome system to move biome definitions from hardcoded values to external YAML configuration files, enabling dynamic loading and hot reloading of biome data.

Key Changes

  • External Configuration: Biomes are now defined in _datafiles/world/{worldname}/biomes.yaml instead of being hardcoded
  • Hot Reload: Added support for reloading biomes at runtime via reload biomes admin command
  • Backwards Compatibility: Falls back to hardcoded defaults if no biome files are found
  • Improved Maintainability: Game designers can now modify biome properties without recompiling

Technical Details

  • Added BiomeConfig and BiomesFile structs for YAML unmarshaling
  • Implemented LoadBiomeDataFiles() to load biomes from YAML files at startup
  • Added biome validation to ensure required biomes exist
  • Integrated biome loading into the main server initialization
  • Extended the admin reload command to support biomes

Benefits

  • Easier world customization - biomes can be modified per world
  • No server restart required for biome changes
  • Consistent with existing pattern for items, mobs, and rooms
  • Enables future biome features like environmental effects or resource generation

…ically

- Enabling biome definitions outsite of code
- Biomes reload in the same way as items
"reload biomes" will now hot reload changes, like on items.
@MorquinDevlar MorquinDevlar requested a review from Volte6 as a code owner June 19, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant