Simple Chat - saving in a conversation

Hi all,

Been stuck on this for a while - I’ve written a CYOA using Mark Tilford’s “Simple Chat”, which works wonderfully for what I’ve been doing.

Well, up until the size of it snowballed, so while it’s still working as intended it is no longer reasonable to complete it in one sitting.

So I’m trying to find a way of saving the game mid-chat and hitting problems.

  1. it’s easy to break the chat and save, but restarting the chat from the same node when resuming the game is escaping me.

  2. so I tried editing the extension so that “0” is understood as “save” rather than breaking out of chat - but can’t figure out how to do that, since Inform then just says that save is an action I’ve not defined :-/

Any suggestions?

BDrag0n

I’m not sure what the best strategy is, but here’s a first try. Add something along these lines to your source code (that’s probably better than editing the original extension directly!):

[code][You need a blank line before the Section heading]

Section - Running and saving a conversation (in place of Section - Running a conversation from in Simple Chat by Mark Tilford)

To run a conversation from (current node - a chat node):
let previous node be no quip chosen;
let next node be no quip chosen;
while current node is not no quip chosen:
try giving text for current node;
reset the links;
try silently finding responses to current node;
if rowcount is greater than 0:
repeat with current row running from 1 to rowcount:
say “[current row]) [run paragraph on]”;
now next node is result in row current row of table of current choices;
now first chat node is next node;
now second chat node is current node;
try giving link to next node;
let choice made be 0;
if exiting on zero is allowed:
say “[italic type]([simple chat zero option])[roman type][line break]”;
now choice made is the choice made from 0 to rowcount;
otherwise:
now choice made is the choice made from 1 to rowcount;
if choice made is not 0: [editing the lines form here …]
now next node is result in row choice made of table of current choices;
now previous node is current node;
now current node is next node;
otherwise:
try saving the game;
say “[italic type](You can now resume your game from here …)[roman type][line break]”; [… to here
]
otherwise:
now current node is no quip chosen.

To say simple chat zero option:
say “or 0 to save the game[run paragraph on]”. [and changing this line]

Section The Next

[It’s probably a good idea to start a new section (or chapter etc.) after the one that replaces the section in the Simple Chat extension – and you need a blank line after Section headings as well as before them][/code]

Thank you! That does exactly what I need, after weeks of trying stuff - you’ve very quickly saved my sanity.

(I’ll leave the state of my sanity as an exercise for the reader, given that I’ve learned Inform by writing an 80,000 word CYOA based entirely on chat nodes)