Skip to content

An Unreal Engine 5 plugin that adds a state machine graph to my ProceduralDungeon plugin.

License

Notifications You must be signed in to change notification settings

BenPyton/DungeonRules

Repository files navigation

Dungeon Rules Plugin

Plugin version number ProceduralDungeon version number Unreal Engine Supported Versions License Active Development Discord

Warning

This plugin is currently experimental and not production ready yet.
Use it only if:

  • you want to test if it suits your needs.
  • you want to help me improve it (either with bug reports, feature suggestions, or by contributing)
  • you are ready to modify the C++ code to fit your needs.

Important

This plugin requires the Procedural Dungeon v3.4 because it uses some features not available in older versions.
Also, there is no warranty to work as-is on newer versions neither.

Overview

This Unreal Engine 5 plugin extends my other plugin Procedural Dungeon to add a state machine-like asset and graph editor, easing the creation of dungeon rules.

Each rule state have a Room Chooser that will return which room data to add to the dungeon.
After a room data has been added, the dungeon generator will try to go to other linked states, depending on their Transition Conditions. If no condition is fulfilled, it will stay in the same state.
The generation will stop if no door remains unconnected, or if the state Stop is reached.

If you have any bug or crash, please open an issue in the Github repo.
If you have suggestions, questions or need help to use the plugin you can join the Discord server.
If you want to contribute, feel free to create a pull request.

Features

  • New Dungeon Rules data asset with its own graph editor.
  • New Dungeon Generator subclass using the added data asset.
  • Create your own custom Room Chooser and Transition Condition classes.
  • Generate various dungeons by just changing the Dungeon Rules asset in your generator.

How to use it

The Dungeon Rules

  1. Create a new Dungeon Rules data asset with right-clickProcedural DungeonDungeon Rules.
  2. Double-click on your new asset to open the graph editor.
  3. Place new states with right-click and drag link between states to create transitions.
  4. Create new child blueprints from classes Room Chooser, Transition Condition, Dungeon Initializer, Dungeon Validator and Dungeon Event Receiver and implement their overridable functions to fit your project needs.
  5. In your Dungeon Rules asset, fill your states and transitions with your new classes, as well as the global arrays of Dungeon Initializer, Dungeon Validator and Dungeon Event Receiver.

The Dungeon Generator

  1. Create a new actor blueprint deriving from Dungeon Generator With Rules.
  2. Fill the Dungeon Rules variable with your new asset.
  3. Override the Choose Door like you would do with the Procedural Dungeon plugin.
  4. Call its Generate function somewhere (e.g. in its Begin Play).

Installation

Install the Procedural Dungeon plugin v3.4.

- Blueprint-only Project (only for UE 5.3 at the moment)

Download and unzip the latest pre-compiled build in your engine at <engine_path>/Engine/Plugins/Marketplace.

- C++ Project (may require code modification for UE != 5.3)

Download the sources and place it in your C++ project at <project_path>/Plugins.
Regenerate your VS files and compile your project.

License

This plugin is under BSL-1.0 license.
This means you are free to use this plugin for personal/free/commercial projects, you are also allowed to modify the source code and/or redistribute it.
The only requirement is to add the copyright notice and a copy of the license when redistributing the source code or pre-compiled binaries, modified or not.

Support Me

If you like my plugins, please consider tipping:

Ko-fi liberapay PayPal