Versatile Novel is a Visual Novel engine with plenty of variables for customizing the presentation to your own purposes. Includes many of the basic features one expects from a Visual Novel, like the ability to scroll back and read previous lines, and skip ahead to sections you haven't already read in some earlier session.
Stories are written in a miniature custom scripting language that allows you to make branching dialogue trees, even ones that come back together but still remember past decisions. Other parts of the game can trigger dialogue, and the dialogue can trigger actions in other parts of the game, making it relatively simple to incorporate Versatile Novel in a game that isn't a straight Visual Novel.
Note: Currently does not work with HTML5.
Fixed a problem with whitespace