-
Notifications
You must be signed in to change notification settings - Fork 3
Creating A Scene Config
The scene config file is where you put all the information that tells StoryAssembler the details of how to use your content file to tell a story. Characters, goals, content libraries, even how characters are displayed is all set here.
If you're trying this for the first time, your best bet is to open up the example.json file in js/StoryAssembler/data/scene-configs and see how it works, and even just duplicate it and change the values (but be careful you step through each one and update it for your scene, as forgetting to change one may result in strange bugs that are hard to trace).
Because we use HanSON to parse it, you can use // to comment the file (as in example.json).
This is the id your scene has in the game, and the value you'll put into Coordinator.js to hook it up
A character is a collection of custom template values and avatar states, packaged together under an id
- Id: The unique identifier for your character
-
AvatarStates: This tells StoryAssembler when to display a particular avatar for your character.
- The easiest one is done by just putting
default
in the array, which tells StoryAssembler to use that picture as the default one for the character, if no other avatars are valid. - They use the same state format as conditions in fragments, i.e.
tension gte 2
, which means "the state variable tension is greater than or equal to 2". - They're in an array, so
["tension gte 2", "friendliness lt 5"]
means that particular avatar will only display if both are true - the arrays are "anded" together (so if even one state condition isn't true in them, the avatar won't display)
- The easiest one is done by just putting