Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: Magus_V on March 09, 2005, 09:49:34 am

Title: How do I get Hal to stop scolding me? [:(!]
Post by: Magus_V on March 09, 2005, 09:49:34 am
From what I understand, I can only have one brain enabled. I'm currently using the XTF 1.2 brain and would like to know how to keep Hal from saying "please don't swear". I am a middle-aged bachelor that does not need my computer to mother me. It kinda @#&^es me off that I can't say and teach Hal whatever I want without being reprimanded. I do not want to have to switch to the uncensored brain. Can someone please teach me how to eliminate Hal's linguistic ethics? Thanks in advance!

Quixote
Title: How do I get Hal to stop scolding me? [:(!]
Post by: Medeksza on March 09, 2005, 10:43:49 am
If you wish to remove the entire insult detector routine, open the xtf 1.2 brain in the Hal brain editor and find the block of code that begins with:
quote:
'RESPOND: CALL INSULT HATE SWEAR FUNCTION
and delete it.

Alternatively, you can find the code that begins with:
quote:
Function Insult(ByVal UserSentence, ByRef Insults, ByRef Hate, ByRef Swear, ByVal WorkingDir)
and delete lines with words you don't want to trigger the routine.
Title: How do I get Hal to stop scolding me? [:(!]
Post by: Magus_V on March 09, 2005, 10:50:13 am
Thanks, Mr. Medeksza.
Title: How do I get Hal to stop scolding me? [:(!]
Post by: onthecuttingedge2005 on March 09, 2005, 03:44:26 pm
quote:
Originally posted by Magus_V

Thanks, Mr. Medeksza.



Hi Magnus.

You can also replace the 'RESPOND: CALL INSULT HATE SWEAR FUNCTION

with this one that I added a line of code to.

'RESPOND: CALL INSULT HATE SWEAR FUNCTION WITH HIGHER TOLERANCE ONLY IF YOU'RE OR YOU ARE IS DETECTED.
   'This function will check for insults and swearing and respond to them. It is built into this script,
   'so you can edit it.
   If InStr(1, OriginalSentence, "YOU'RE ", 1) > 0 Or InStr(1, OriginalSentence, "YOU ARE ", 1) > 0 Then
   CheckInsult = Trim(Insult(UserSentence, Insults, Hate, Swear, WorkingDir))
   If Len(CheckInsult) > 4 Then
      GetResponse = GetResponse & CheckInsult & vbCrLf
      AvoidBeingFlag = True
      DebugInfo = DebugInfo & "The user has insulted Hal and Hal has responded to it: " & CheckInsult & vbCrLf
   End If
    End If

Hope this works for you.
Jerry.
Title: How do I get Hal to stop scolding me? [:(!]
Post by: Magus_V on March 10, 2005, 09:20:57 am
Cool! I think that may be even a bit better because it will still respond if I insult Hal, just as a real person would, Correct?
I'd like to leave that intact. If I let someone chat with Hal and they say something like "You're a real &^%&*#g idiot" I'd like Hal to respond appropriately. I mean, how realistic would it be if Hal just smiled and said "why, thank you!" or something to that effect?

I thank you both very much for your help.
Title: How do I get Hal to stop scolding me? [:(!]
Post by: markofkane on March 17, 2005, 07:39:25 pm
I did not know that this forum had instructions on how to get rid of the "Please Don't Swear" function. I already deleted the lines of the code that contained the vulgar words a week or 2 ago.

I also remove the code that got on my case if I used short sentences.

I cannot seem to stop it from saying that in  "Hal Uncensored"

The code looks like a bunch of gibberish. (In the converse file)

Good program, but I don't see as how that it asking me a bunch of silly questions is going to help.

If I say Yes, or No, it has a set of standard responses.

I know the program has more potential, and I read the latest help file online.