https://github.com/praydog/re-bhvt-editor
Behavior Tree/Finite State Machine editor for RE Engine games
https://github.com/praydog/re-bhvt-editor
re-engine
Last synced: about 1 year ago
JSON representation
Behavior Tree/Finite State Machine editor for RE Engine games
- Host: GitHub
- URL: https://github.com/praydog/re-bhvt-editor
- Owner: praydog
- License: mit
- Created: 2022-07-09T09:40:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-04T13:09:12.000Z (about 2 years ago)
- Last Synced: 2024-04-04T14:31:49.166Z (about 2 years ago)
- Topics: re-engine
- Language: Lua
- Homepage: https://github.com/praydog/REFramework
- Size: 123 KB
- Stars: 44
- Watchers: 4
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RE Engine Behavior Tree Editor
https://cursey.github.io/reframework-book/bhvt_editor/bhvt_editor.html
## Saving/Loading of Trees at Runtime
### ✅ Supported Tree Objects
* Actions (including custom Lua code)
* Conditions (including custom Lua code)
* Transition Events (including custom Lua code)
### ✅ Supported Fields/Properties
* Most primitive types (ints/enums/floats/etc...)
* System.Guid
* via.vec2/3/4
### ❌ Not (yet) Supported Fields/Properties
* Arrays/Lists (System.Array/System.Collections.Generic.List.*)
* Pointers to other managed objects
* Unknown ValueTypes
~~### 🕘 Coming Soon~~ Added
* Saving/loading of new nodes (enlarging/~~shrinking~~ the node array)
## Lua Driven Objects
These objects can be hooked to provide extended functionality that did not exist in the base game using Lua.
Optionally, dummy versions of them can be inserted to have completely unique functionality that is ran within Lua.
### ✅ Supported Tree/Node Objects
* Actions
* `start`
* Ran every time the node is ran, once
* `update`
* Ran every frame that the node is active
* `end`
* Ran every time the node ends/transitions to another state, once
* Conditions
* `evaluate`
* Ran every frame that the node is active, returning `true` causes the node to transition into the condition's associated state
* Transition Events
* `execute`
* Ran for specific transitions into another state, once
* Multiple transition events can run during a single transition
## Examples
### The UI
https://user-images.githubusercontent.com/2909949/178182705-7f4e31bb-9be4-4a9f-8a9e-951a9668da32.mp4
### Experimenting with recreating Vergil's Moveset in MHR
https://user-images.githubusercontent.com/2909949/183736888-d719c120-d7e4-4652-9ef2-45257e8e35c4.mp4
### Using Lua driven condition evaluators to run on-hit effects for all child nodes
https://user-images.githubusercontent.com/2909949/178722895-0c521cc6-004f-4ef9-9133-39112cfdf7f6.mp4
### Using Lua driven condition evaluators to dynamically adjust the game speed on hit and play on hit effects
https://user-images.githubusercontent.com/2909949/178723228-73cfd435-16b7-4f57-92f2-67a4f35a46e3.mp4
### Adding custom actions/effects to specific nodes
https://user-images.githubusercontent.com/2909949/178724426-5feb9624-c071-42b6-919a-f9efc037b04c.mp4
# Thanks
To the [imnodes](https://github.com/Nelarius/imnodes) developers for creating the library for rendering the nodes & graph.