Rumor is a free, open source narrative content framework meant to be integrated into any Unity3D game that needs a dialog system. This library is a good fit for teams that want a scripting language for writers to use and need an easy-to-use API for running the dialog.
You can get it here: GitHub - exodrifter/unity-rumor: Narrative scripting language for Unity3D.
I’ve been sitting on this library for a while and I think (fingers crossed) that it’s kind of ready for some use by others. If you’ve ever wanted dialog in a game with choices and were displeased with the available options, you might be interested in this framework.
Rumor doesn’t provide any visual styles of its own; all it does is provide a scripting language, a compiler, and an execution engine. You will need to implement any visual styles yourself so you could use it to potentially make a visual novel, a mass effect-esque or oxenfree-esque dialog, cinematic subtitles, and more.
I’ve tried to make the scripting language as intuitive and flexible as possible, and it is inspired by Ren’Py scripts. I believe it is powerful and easy to use, but I suppose I’ll let y’all be the judge of that.
It’s still in a pre-release alpha state, but I’d be thrilled to receive feedback from the community. While the documentation is kind of super shabby at the moment, they do exist and I will be improving this framework periodically, so please let me know if there’s anything I can do to make it better for you!
Rumor has been updated to version 1.0.0. This update adds more operators and increases general flexibility. This is the first official release of Rumor that is not in a pre-release state.
Link: Release More operators and general flexibility · exodrifter/unity-rumor · GitHub
Added:
- Added the ability to specify a clear for just dialog or just choices
- Added the default binding _choice, which returns the contents of the last chosen choice
- Added the -=, +=, /=, and *= assignment operators
- Added the <, <=, >, and >= comparison operators
Changed:
- The OnClear event in RumorState has been changed to use a ClearType enum, which specifies if everything, just choices, or just dialog was cleared
- The Pause command will now wait for an advance if the time is less than or equal to 0
- Multiple methods of the same name can be binded as long as they have a different number of input parameters
1 Like
Rumor has been updated to version 2.0.0. The Rumor compiler has been completely rewritten in order to support more robust expression string parsing, more helpful compiler errors, and improved performance.
Link: Release Compiler Rewrite · exodrifter/unity-rumor · GitHub
Added:
- Added OnAddChoice and OnRemoveChoice events to RumorState
- Full Unity scene example added
- You can now add the enum argument
cant_skip to the end of a pause statement to ignore advances until the pause ends
- You can now add the enum argument
no_wait to the end of an add or say statement to auto advance the dialog
- Variable substitution with
{ and } in strings is now supported
Changed:
- Rumor.CallBinding no longer calls DynamicInvoke and is much faster
- More descriptive error for tokens after string
- The compiler no longer uses a tokenizer except when parsing expressions
- Compiler errors are more specific and descriptive
- The
Exodrifter.Rumor.Lang namespace has been renamed to Exodrifter.Rumor.Language
- All unit tests and examples are wrapped in a
UNITY_EDITOR ifdef to make it easier to use this repository as a submodule in non-unity project
- Bindings are no longer stored in
Rumor; instead, it is now stored in Bindings
Rumor.Run has been renamed to Rumor.Start in order to match the language used in C# Thread.Start and Unity’s
StartCoroutine method to improve consistency
Fixed:
- Fix unit test failures caused by Tokenize performance optimization code
- Fix Rumor bindings no longer attempting to convert arguments
- Fix +=, -=, *=, /= operators not working
- Fix exception when script execution finishes in some cases
- If conditional statements no longer require a following else or elif
- Fix Rumor.Choosing throwing an error if Rumor has not been started
- Fix scope not being initialized when passed as null when constructing Rumor
- Fix Add statements behaving like Say statements
- Fix null pointer exception in Equals expression
- Fix incorrect equality checking
- Fix improper deserialization of values caused by wrapper types (Json.NET will wrap object values in its own type, JValue, which causes logic to fail)
- Rumor no longer clears the scope when starting
- Null ObjectValues are now treated the same as an uninitialized (null) variable
Rumor has been updated to 3.0.0. This update fixes a lot of bugs involving compilation and script execution. In particular, the == operator is much more strict. Only comparisons between objects of the same type are allowed with the notable exception of int and float, which can be compared to each other.
Changed
- == now only works when comparing values of the same type, with the notable exception of Int and Floats which can be compared to each other.
Fixed
- Fix compilation error when comment directly follows a statement expecting a block
- Fix pauses not ending if a choice has been picked
- Better parsing errors
- Allow function and variable names to start with keywords
- Fix math operator precedence
- null + null returns null instead of throwing InvalidOperationException
- Fix comparing any non-empty string with another, different non-empty string with == would always return true instead of false
- Fix >= and <= not working due to comparing the wrapper type instead of the wrapped values
- Fix using ! on a non-null object would throw an exception
- clear choices and clear dialog compile instead of throwing a compilation error