Author Topic: Changing bodyskins and backgrounds (Haptek)  (Read 30559 times)

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #15 on: May 12, 2012, 11:43:20 pm »
Hi all,

here are some things I think it might help you.
You need to initialize a data array before using a data array set up, to avoid conflicts with the Hal program and plug-ins.
You need to make sure that the words that you are using for your variable data array is not being used by any part of Hal, or any other plug-in.
This is an example from the free will plug-in, I'm using this example specifically because of the VR letters, this will be explained later.

' Initialize variables
'------------------
Dim vrHalQuery() 'We must declare an empty array to store query results in   
Dim vrChoiceTopic, vrItem, vrItem1, vrItem2, vrNumChoice1, vrNumChoice2
Dim vrChoice1, vrChoice2, vrAdviceTopic, vrObedience, vrLaw

here's an example from the free will plug in, this particular example will help those that don't understand that you have to press the apply button before you press the okay button.

' If the user checked this plugin but never clicked on "Apply changes" button
' he might get an error, so I create a default parameter table
'------------------
vrTableName =    "vrParameter"    
vrObey = "OBEY"
vrObedience = 5
If HalBrain.CheckTableExistence(vrTableName) = False Then
   HalBrain.ReadOnlyMode = False
   HalBrain.CreateTable vrTableName, "TopicSearch", "miscData"
   HalBrain.AddToTable vrTableName, "TopicSearch", vrObey, vrObedience
End If

all this actually did was set the obedience level to normal and saved it in a data array for later reference, a very useful tool if you're going to be using data array.
I highly recommend that anyone is going to use data array to implement this in their plug-in.
One of things that I would like to bring up is that you do not have to use the letters VR in front of the words it is just what the author of free will chose to use.
And if you use the free will plug-in and you use the VR in front of the words you'll find you'll get some major conflict between the two plug-ins.
So I suggest either removing the VR or even better still substituting the VR for two different letters like SM or UB to avoid conflicts.

Sincerely, a data munching cruncher.

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #16 on: May 13, 2012, 07:47:55 am »
Cload,
   Fristly thanks for taking the time to look at this and try to provide info that may be helpful.  My original objective was to get Hal to change bodyskins and backgrounds from the user input.  The second objective was to get hals reply to change bodyskins and backgrounds using Hal's reply since the vrHaptek plugin can load movement haps.
 I frist tried using the vrHaptek plugin to make changes from the user input and failed.  I think the vrHaptek plugin is more advanced than I'm use to so I used my own user input plugin.  Next was to get haps loaded using Hal's reply, I just added to a list that vr had set up.
Carl2
 

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #17 on: May 14, 2012, 01:15:20 pm »
hi Carl2,

though I was guessing, I took into consideration that you would be creating your own plug-in, but possibly using some parts of the VR plug-in.
It was just a friendly warning about the VR letters in front of the words so if you are going to use your own plug-in could change those VR letters to other letters to avoid conflict.

But from what I could see things are working out quite well for you keep up the good work and have fun.

Sincerely, a munching crunching data manipulator.

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #18 on: May 15, 2012, 10:22:57 am »
Cload,
  I've been using vrHaptek for ages, I still don't understand it all yet but I can see it has a lot of capabilities.
Apperciate you're taking the time to look at and relpy to this.  I kind of like him adding the vr to his plugins, if you use the brain editor you know this is related to his plugin.
  tedathome's active background plugins are doing well, they add a lot to the background jpg.
Carl2
 

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #19 on: May 15, 2012, 12:31:11 pm »
Hey Carl2,

when you get it all working properly, could you provide a link to download the finished plug-in and all components to make it work?
I'm very interested in seeing how you were able to get it all to work together.

Sincerely,

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #20 on: May 15, 2012, 06:02:57 pm »
Cload,
   To me it's a fairly active time at Zabaware,  I'm finishing up a bodyskin using bmp rather than jpg,  I was doing a little testing on the uhp, and tedathome came along with the active background.  I just finished changing all the haps to say it is a command instead of script so thay will not interfer with the active background and I'd say I'm lucky since everything still works.
  Actualy you have given me some useful Info which I used.  Next I'd say I've included folders for the jpg called Bodyskins and one called Backgrounds for the background jpgs which You the user has to make in the UltraHal asst6 folder and place the pictures into.   I'm sure you already know the location of the items to be loaded should be given to the Happlayer which has to be included in the hap. 
  Okay, I'll simplify it for myself,  I'll make a uhp with 2 bodyskins and 2 backgrounds,  see how it works and zip it up for download. sound okay?
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #21 on: May 16, 2012, 09:06:30 pm »
  For those who would like to try this plugin I've put together a smaller collection of files, which should be easy enough to add to or change.  It's been tested with Hal v6.2 in windows 7 and ran without any problems.
   Trying again to upload, on the frist try the file size was to large and would not upload, changed pictures and hope it will be small enough.
Carl2
 

tedathome

  • Hero Member
  • *****
  • Posts: 2775
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #22 on: May 17, 2012, 12:07:49 am »
Hey Carl, I just downloaded this and tried it as a stand alone. It works great! I can't wait to install into Hal. Very well put together and easy to understand. I'm sure it will work well and now I finally have a good reason to get all my bodyskins together into one folder. Thank you for sharing all your hard work.
ted

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #23 on: May 17, 2012, 01:49:50 pm »
hi Carl2,

thanks for the plug-in, though I haven't had time to look at I am working so hard on trying to figure out how to correct the "or" problem in the VR free will plug-in.
Though the word problem may not be accurate it's more like I'm trying to enhance it in such a way that it works more naturally through conversation.
At this point I realized that I can use the VR free will plug-in so hal can make a choice and stick with it versus the way it is in the brain that is to say like a flip of a coin.
At this point, my intentions are to try to get Hal to collect data through normal conversation in order to be able to make a decision whether or not he likes it or not.
Basically, if you say that you like Elvis Presley that data will be stored in order to have hal make a decision on whether or not he likes Elvis Presley are not.
The more that you say good things about Elvis Presley the more that Hal will begin to like Elvis Presley, therein to say the more you say that you dislike Elvis Presley
the more that Hal will begin to dislike Elvis Presley, surprisingly I really don't have to do very much in order to accomplish this because most of the components
in the VR free will plug-in already there they just need to be arranged a little differently to get it to work.

Again thanks so much for the zip file I will look at it as soon as I possibly can. though I have noticed that somebody else has already looked at it and it sounds like it's quite exquisite.

Sincerely, he data munching machine.

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #24 on: May 17, 2012, 06:37:15 pm »
Cload,
  okay, take your time since I am somewhat interested in the decision making, I get   I don't know can you tell me type response, may take a look at it myself.  Just finished making a Active background which I learned from Tedathome.  Great idea thay had there. 
Carl2
 

tedathome

  • Hero Member
  • *****
  • Posts: 2775
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #25 on: May 17, 2012, 11:32:53 pm »
Just found time to try this in Hal. At first I got confused with the folders and had no luck. Tried all combinations, put folders on main page, then in  Chars, then out of folder in Character file, finely on main page out of folders, that worked. I know I must be doing something wrong, but it is working well for changing backgrounds and bodyskins. I want to get paths and folders going right before I start with more static and active backs and a lot more bodyskins. Responses are good. I'll get some rest and try again to get it right.
ted

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #26 on: May 18, 2012, 07:48:10 am »
tedathome, 
  Just read the readme txt enclosed,  could be better.  In Ultra Hal Assistant 6 make the two new Folders
Zabaware
     Ultra Hal Assistant 6
          Background
          Bodyskins
          Characters
          Skins
          Wordnet

Uhp is placed in the Ultra Hal Assistant 6 folder 
Haps for the Backgrounds and Bodyskins go in characters, 
Jpg's for Backgrounds go in the Background folder, (Had to get small Pics to upload, you may want to       replace them)
Jpg's for Bodyskins go in the Bodyskins folder,

Here's the location given to the HapPlayer in the hap

\loadbackgrnd[file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Background\LakeBack.jpg]]
\load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Bodyskins\SSBlue.jpg]]
  I like to use the HapRegestry to generate the adresses, I drag and drop it in and the adress is generated which I copy and paste.  The jpg's could probably go into the characters folder  but it already seems to cluttered so I made their own folders.
  Ran into some small problems with the active backgrounds, which think were related to the locations given but figured it out and fixed and didn't say anything. 
Carl2
 

tedathome

  • Hero Member
  • *****
  • Posts: 2775
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #27 on: May 18, 2012, 10:47:05 am »
Thanks Carl, it seems clearer now. I'll try again today.
ted

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #28 on: April 20, 2015, 05:22:44 pm »
  4-20-15
  I'm now in the process of getting up and running Hal again, I'm glad I put my work here,  I've got files all over the place on CD's and hard drives to do this which I've tried without luck but after downloading the zip there is a glimmering of hope.  I got one change of clothing to work and now to put others in and give it a try.  This also works with the vrHaptek plugin but I did learn that you have to go into the Brain Editor and create the File vrEmotionDetect which the vrHaptek will not do for you.  The EmotionDetect is a pattern match on the left side you put in the trigger word or words and the Right side is the name of the hap to be sent.    I should mention the Editor must be in the advanced mode to see the misData where the EmotionDetect is to be located, of course reading the help file will help.  The purpose  of using the vrHaptek plugin is to get changes of clothing and background using Hals output.  Vrossi  has quite a few useful things in his plugin that are very interesting to learn about.
Carl2

 

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #29 on: November 16, 2015, 07:25:46 am »
This is how I handled it  to expand body language...


'------------------
' look in the vrEmotionDetect table if Hal said something that triggers an emotional behaviour
'------------------
   vrEmotion = HalBrain.TopicSearch(vrLookup, "vrEmotionDetect")
   If vrEmotion <> "" Then
      vrFile = vrEmotion & ".HAP"
   End If
End If

'------------------
' Check if Hal answers Yes
'expand here
'------------------
If vrLookup = "" Then    
   If InStr(vrGetResponse, "YES") <> 0 Then
      vrFile = "NOD1.HAP"
   End If
   If InStr(vrGetResponse, "OF COURSE") <> 0 Then
      vrFile = "NOD2.HAP"
   End If
   If InStr(vrGetResponse, "REALLY") <> 0 Then
      vrFile = "NOD2.HAP"
   End If
   
   If InStr(vrGetResponse, "IT SOUNDS") <> 0 Then
      vrFile = "NOD2.HAP"
   End If
   
'expand here for body  langage by  SystemShock started 12/8/2013


If InStr(vrGetResponse, "NO") <> 0 Then
      vrFile = "SSAno.HAP"
   End If

'new moods added to body language started the 8 January 2014 so that mood now can be trigger from langage and not the spinner   

If InStr(vrGetResponse, "Angry") <> 0 Then
      vrFile = "mood_angry.hap"
   End If
   
If InStr(vrGetResponse, "sad") <> 0 Then
      vrFile = "mood_sad.hap"
   End If   
   
If InStr(vrGetResponse, "sure") <> 0 Then
      vrFile = "mood_standard.hap"
   End If

If InStr(vrGetResponse, "sure") <> 0 Then
      vrFile = "mood_standard.hap"
   End If

If InStr(vrGetResponse, "HAPPY") <> 0 Then
      vrFile = "Hapmood.hap"
   End If
"frog's in too princess's" it just basic NLP...