Follow along with development on the development blog.
Bug fix where "$"'s were not being replaced in queries that had a Not
.
Minor change on Rule
type, which now uses a Trigger
type to allow for non-entity triggers.
You will have to update your rules to use the new trigger. If you use the syntax parser to define your rules, you shouldn't need to change anything.
New syntax parsers, debug utils, streamlined api, and minor new features. Some breaking changes.
- Split up structure into
Core
,Syntax
andDebug
(all nested underNarrativeEngine
namespace) - Add Matcher/Query/Changes parsers
- Add Rule parsers
- Add Narrative parsers
- Add Entity parsers
- Add "debugBar" util
- Add "Compare" link and stat queries
- Add "Lookup" link setter
- Remove assert, assertMatch, and query - replaced with a new version of query that handles all three
getLink
fixed to return Nothing if linked ID doesn't exist in store
100% breaking changes! Huge shifts in both api and concepts:
- shift to full salience and property based systems!
- shift to moving most functionality external to engine
- removed everything specific to "items", "locations", "characters", "scenes", "ending", "history"
- replaced with "tags", "stats", "links" for clients to build up their own semantic requirements
- only controls
WorldModel
andRules
data, instead of controlling the whole model
Exported modules change:
- No more
Engine
- Added
Narrative.WorldModel
- Added
Narrative.Rules
Other
- added example
- removed dep on
elm/html
since it isn't used
Update for Elm 0.19!
No api changes
This version is a major architectural shift from previous versions, allowing for extreme flexibility. Some notable changes include:
- updated to Elm 0.18
- top-level module namespace changed to
Engine
- the view layer has been completely removed from the engine. The engine solely handles maintaining the story world state by matching interactions against rule sets.
- exposes many accessor functions for the client to use as needed
- rules are now matched based on a weighting scale to pick a winner when multiple match
- some new/different matchers and change world commands
- replaced
withItem
/withCharacter
/withLocation
with simplywith
, as they all have the same signature - ids are now Strings instead of types, allowing for dynamic generation and serialization, and also fitting well with the Entity/Component/System pattern
changeWold
function to directly alter the story worldchooseFrom
function to encode conditional choices in data- scenes are not just another condition rather than a grouping of rules
This version adds some new features, fixes some bugs, and changes the public api significantly for design reasons (partially leading towards future versions).
-
The format of story rules has changed significantly. Instead of the infixed rule-building DSL of version 1.0.0 (
interactingWith
,firstInteractionWith
,everyTime
,when
,changesWorld
,narrates
,item
,location
andcharacter
), rules now are defined as records:scene1 : List (Story.Rule MyItem MyLocation MyCharacter MyKnowledge) scene1 = [ { interaction = withCharacter Harry , conditions = [ currentLocationIs Garden ] , changes = [ moveCharacter Harry Marsh, addInventory NoteFromHarry ] , narration = [ "He gives you a note, then runs off.", "I wonder what he wants?" ] } , { interaction = withInventory NoteFromHarry , conditions = [] , changes = [ addLocation Marsh ] , narration = [ "It says, \"*Meet me in the marsh.*\"" ] } ]
MyScenes
type has been removed in favor of linking directly to your list of rules- Items and characters can now only be in one place at a time. This means
addCharacter
andaddItem
were removed withmoveCharacter
andplaceItem
taking their place. AlsoremoveCharacter
andremoveItem
only take a single argument now. - Interacting with a location now moves you there by default.
withItem
now is anInteractionMatcher
instead of aChangeWorldCommand
. UsewithInventory
instead.nearProp
andaddProp
andremoveProp
are nownearItem
,placeItem
andremoveItem
.all
andany
condition matchers removed.storyWorld
is nowworld
andsetup
is nowstartingState
.Element
is nowInteractable
- Progressive narration - the narration field of a rule now takes a list of strings. If a player clicks on the same story element multiple times, the engine will loop through each item in the list, repeating the final item. This allows for a deeper story texture and more variety in narration.
- Story rollback - the internal state of the story has changed to allow for "rolling back" to an earlier point in the story to try a different direction.
- New "broad-scope" interaction matchers:
withAnyItem
,withAnyLocation
,withAnyCharacter
andwithAnything
.
Initial release. Sample story source code and playable link. See demonstration video from ElmConf