Core Architecture: Model: Stories and Libraries - UA-ScriptEase/scriptease GitHub Wiki

#PatternModel An abstract class that provides the guidelines for adding a new model. Each model must have a title, author, and an associated translator.

All of the tabs on the right side of the screen are models, and they are usually related to a Library loaded on the left side.

#StoryModel Story Models contain the GameModule instance that we are creating scripts for, and the start StoryPoint of the story. They also use a LibraryModel with the same translator to generate code, but this is not stored here; the Translator looks it up. The StoryModel is loaded from the .ses file when we create a Story.

#Library Manager and Library Model LibraryManager was created to manage all of the Libraries of patterns stored in /patterns/*.sel files in ScriptEase. It is the backend used by the LibaryPane to display the LibraryModel. LibraryModels are used to contain the actions, causes and effects which make up a Pattern Library for a desired game or genre.

##LibraryModel The Library Model uses inner classes which extend AbstractNoOpStoryVisitor to add and remove StoryComponents from the desired category. After every change to the model, the Library is (updated) saved to disk. It is unclear if this is the desired behaviour since it is an excessive amount of I/O. Each LibraryModel knows which Translator is needs, which may be used by a LibraryEditor (When we create it).