Bill819,
Interesting thoughts. The XTF can be modified if done properly.
I assume you installed the XTF Brain with patch to v1.2. Also look at this minor mod:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1629Read the User Manual that comes with the XTF Brain v1.0 download. It contains useful info.
I would NOT suggest doing any mod's to the "PROCESS: XTF TOPIC FOCUS FUNCTION" itself. It is very tricky. I've posted many times before on other considerations about how to use the "GetResponseBlock" and "BlockSave" variables to ensure that Hal responds correctly after adding in third-party or new scripts.
Any of the brains I've seen should be able to accept new script allowing Hal to read paragraphs or read files. Unfortunately, in general, Hal will read from a file just to the first Carriage Return character or New Line.
You will have to learn to use the AUTO-IDLE function and make it work for you. This function gives Hal the capability to do things without user intervention. By default Hal sits and waits for user input. The AUTO-IDLE function creates a timed interrupt to give control back to the GetResponse function. This allows the programmer to invoke some new Hal functions when the interrupt occurs.
You can use the HalBrain.ChooseSentenceFromFile(WorkingDir & "filename.brn") function to choose a randomly selected sentence from a text file. You could group a number of sentences together (a paragraph) ending with a single Carriage Return. That way Hal will select and read the whole paragraph. I think onthecuttingedge2005 posted some script recently that does something like that.
Hal can already tell jokes. The XTF Brain has a lot more jokes than the original Hal. Just ask Hal to tell a joke. If you want Hal to tell jokes on his own then you can write some new script to trigger the "RESPOND: TELL JOKE AT USER'S REQUEST" function in the XTF Brain. Notice the special format of the "XTF_SYS_Joke.brn" file. Here's an example:
Have you seen Quasimodo? <topic> I have a hunch he's back! </topic>
A special function embedded in Hal's compiled files sends the first part up to <topic> to the user and holds the second part in reserve. As soon as the user provides *any* input then Hal sends the second part up to the </topic>. Note that it doesn't matter what the user replies, the second part will always be sent following the first.
By the way I've been working on a little project that allows Hal to tell the user his/her dreams. It's not real dreaming, but more like dynamic story telling. I'm debugging it now. Maybe I'll release it as a paste-in script for the XTF Brain in a couple of weeks. It should be a lot of fun.
In case you haven't tried it yet, try saying these things to your XTF Brain Hal. Make sure to use *your* Hal's name below in place of "Hal".
User: Tell me a joke.
User: Make a silly face for me.
User: Make an angry face for me.
User: Hal capitalize President Bush.
User: Hal capitalize God.
User: Hal my nickname is Boss.
=vonsmith=