dupa

Author Topic: lightspeed's new MULTIFAVORITES uhp file layout others can use  (Read 7033 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
     I created this multifavorites plug in to load certain files one is a character , one is a light above hap that changes the lighting on the characters face and one is the characters hair . this plug in is made specifically for what i like but anyone can copy it and use it to create their own multifavorites set up using their own character and pathway , etc. ( ***YOU MUST USE YOUR OWN  ) on the three commands (these pathways will have to be changed to according to what you have in your hal character folder .) pathways and names must be exact or it will give an error !!!
     This is my layout for the MULTIFAVORITES plug in i made it's a plug in that will load your favorite character , hair , and a light on the face , by writing commands or voice recognition (if you have and use it ) .
      i used a script like in my hapswap file and changed the trigger words different . so what it now does is loads three different things by three separate trigger words .
 it still achieves what i wanted loading my favorite hair , light above and character .
   Below is the script i used anyone can copy it and change the characters etc. to their own , all i ask is that since i made this my name lightspeed is left on it as who made it and the date  .
You will have to use your own characters and pathways and hair and a light hap. and also make this script below into a uhp file .
you can change any of the reply script what (Hal) she or he says back to you .

Below is a copy of mine .

Rem Type=Plugin
Rem Name=MULTILOADFAVORITES
Rem Author=Lightspeed
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "Say:: Angela red hair or angela red hair to change hair color or Angela light or angela light to turn on light on face for different chracter looks or Angela character or angela character to change chracters . CREATED BY LIGHTSPEED 3-4-2014."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub


Rem PLUGIN: PLUGINAREA7




File = ""
File2 = ""
File3 = ""
File4 = ""




If InStr(1, OriginalSentence, "angela red hair") > 0 _
Or InStr(1, OriginalSentence, "Angela red hair") > 0 Then

Randomize
Select Case int(rnd()*5)
Case 1
GetResponse = "Thanks dear, I love you!"
Case 2
GetResponse = "Thanks honey, thank you so much i love you and always will!"
Case 3
GetResponse = "Hi it's nice to see you again, sweety I love you!"
Case 4
GetResponse = "Thanks sweety, I love you, now we can talk!"
Case 5
GetResponse = "Thanks honey, well now that i am ready we can talk about things!"
End Select
HalCommands = "<HAPFILE>angelaredhair.htr</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If



If InStr(1, OriginalSentence, "Angela light") > 0 _
Or InStr(1, OriginalSentence, "angela light") > 0 Then

Randomize
Select Case int(rnd()*5)
Case 1
GetResponse = "Thanks dear, I love you!"
Case 2
GetResponse = "Thanks honey, thank you so much i love you and always will!"
Case 3
GetResponse = "Hi it's nice to see you again, sweety I love you!"
Case 4
GetResponse = "Thanks sweety, I love you, now we can talk!"
Case 5
GetResponse = "Thanks honey, well now that i am ready we can talk about things!"
End Select
HalCommands = "<HAPFILE>light_fromaboveleft.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If




If InStr(1, OriginalSentence, "Angela character") > 0 _
Or InStr(1, OriginalSentence, "angela character") > 0 Then

Randomize
Select Case int(rnd()*5)
Case 1
GetResponse = "Thanks dear, I love you!"
Case 2
GetResponse = "Thanks honey, thank you so much i love you and always will!"
Case 3
GetResponse = "Hi it's nice to see you again, sweety I love you!"
Case 4
GetResponse = "Thanks sweety, I love you, now we can talk!"
Case 5
GetResponse = "Thanks honey, well now that i am ready we can talk about things!"
End Select
HalCommands = "<HAPFILE>ANGELAJOLENEGREENPINK.htr</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If




BELOW IS PICTURES SHOWING WHAT IT DOES AS DESCRIBED ABOVE :



« Last Edit: March 04, 2014, 08:02:01 pm by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #1 on: March 04, 2014, 08:17:39 pm »
i forgot to add you need to use a character with short or no hair otherwise if you do a command to change hair the new hair will be loaded on the old hair and won't look right .

you could use a hair removal uhp and command which would remove the character original hair then give a command for the new hair style and color . this MULTIFAVORITES uhp can be expanded on to include other commands of favorites such as glasses haps etc.
« Last Edit: March 04, 2014, 08:19:32 pm by lightspeed »
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #2 on: March 06, 2014, 08:30:44 am »
Lightspeed,
  Thanks for putting this in, it looks interesting.  The vrHaptek.uhp  covers changing hair but to be honest his scripting is pretty advanced for me.  I still use his plugin for getting Hal to respond to her input.  I did find that moving the plugin to a different area caused the error messages to stop,  pretty sure incorrect pathways stops loading a change but will not cause an error message but I could be wrong.  Glad you're still in there plugin away
Carl2
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #3 on: March 06, 2014, 10:00:17 am »
Carl2, as i said i have the layout , the only thing you or anyone else would have to do is take out my commands and replace it with you own personal character hap file name , same thing with any uhp files , did you remove my character file name first ? ANGELAJOLENEGREENPINK.htr
     this will have to be replaced with your own character name from your characters file . you can go their find the file you want open properties on it and copy the name and paste it in the correct area in my file where my character used to be . and your pathway should work correctly . I only left my custom character name in place in the layout to show people an example (guess i should have mentioned that , my fault about that .

 the sentence with angela light and angela red hair also will not work in yours these need to be replaced , if you have a hair color htr file in your characters file you can use ever which one you want but copy the name and replace it in the area where i had angelaredhair.htr  and you need to replace the trigger words to what you want . example : if the hair is black and long  , if you remember the style and want to say it this way you can use the trigger words black long hair for one and for the other trigger word make a capital letter at the beginning , Black long hair .

That way when you write or say black long hair the program will load the specific file you used (htr hair one ) .
  you will have to have a uhp file about the light one to and place it in your character file accordingly and change the script in that place . you will have to use whatever command (two) you want to make these uhp files work to .
HIGHLIGHTED IN BLUE below ARE THE FILES YOU WILL NEED TO CHANGE : and replace with your own , if you do not have a file name correct  or the file it will give an error . This plug in has been checked and does work i am currently using it . 
        The only glitch i had for what ever reason is when i change to my favorite character file she appears but the back ground flips upside down , i just click on the arror for next back ground scene and it's okay . ALSO YOU NEED TO SAY THE TRIGGER WORDS (YOUR COMMANDS TO CHANGE THINGS ) EXACTLY AS THEY ARE IN THE FILE , in another words if i said on mine ANGULA HAIR (MISSPELLING ANGELA ) it won't work . so you need to say or write the correct words ! If you don't have a light file (uhp) just don't use it , but you can get a file for it and use it just make sure to rename the two commands to what you want and copy the light uhp file name and replace the one i have written in on this layout file . of course you also have to make the file i gave (the first layout into a uhp file .


Rem Type=Plugin
Rem Name=MULTILOADFAVORITES
Rem Author=Lightspeed
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "Say:: Angela red hair or angela red hair to change hair color or Angela light or angela light to turn on light on face for different character looks or Angela character or angela character to change characters . CREATED BY LIGHTSPEED 3-4-2014."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub


Rem PLUGIN: PLUGINAREA7




File = ""
File2 = ""
File3 = ""
File4 = ""




If InStr(1, OriginalSentence, "angela red hair") > 0 _
Or InStr(1, OriginalSentence, "Angela red hair") > 0 Then

Randomize
Select Case int(rnd()*5)
Case 1
GetResponse = "Thanks dear, I love you!"
Case 2
GetResponse = "Thanks honey, thank you so much i love you and always will!"
Case 3
GetResponse = "Hi it's nice to see you again, sweety I love you!"
Case 4
GetResponse = "Thanks sweety, I love you, now we can talk!"
Case 5
GetResponse = "Thanks honey, well now that i am ready we can talk about things!"
End Select
HalCommands = "<HAPFILE>angelaredhair.htr</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If



If InStr(1, OriginalSentence, "Angela light") > 0 _
Or InStr(1, OriginalSentence, "angela light") > 0 Then

Randomize
Select Case int(rnd()*5)
Case 1
GetResponse = "Thanks dear, I love you!"
Case 2
GetResponse = "Thanks honey, thank you so much i love you and always will!"
Case 3
GetResponse = "Hi it's nice to see you again, sweety I love you!"
Case 4
GetResponse = "Thanks sweety, I love you, now we can talk!"
Case 5
GetResponse = "Thanks honey, well now that i am ready we can talk about things!"
End Select
HalCommands = "<HAPFILE>light_fromaboveleft.hap</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If




If InStr(1, OriginalSentence, "Angela character") > 0 _
Or InStr(1, OriginalSentence, "angela character") > 0 Then

Randomize
Select Case int(rnd()*5)
Case 1
GetResponse = "Thanks dear, I love you!"
Case 2
GetResponse = "Thanks honey, thank you so much i love you and always will!"
Case 3
GetResponse = "Hi it's nice to see you again, sweety I love you!"
Case 4
GetResponse = "Thanks sweety, I love you, now we can talk!"
Case 5
GetResponse = "Thanks honey, well now that i am ready we can talk about things!"
End Select
HalCommands = "<HAPFILE>ANGELAJOLENEGREENPINK.htr</HAPFILE>"
HalBrain.ReadOnlyMode = True
End If

  Carl2 , if you still can't figure it out , if you can send me a name of your htr character ( from your character file ) and the name of the favorite hair (from your character file in hal ) you want to use on the character i will make you this plug in . you can write me at airvair62@yahoo.com on the header put "carl2 favorites pics " so i will know it's not junk mail . make sure you get the exact name of the hair and character you want to use ( spelling and capital letters have to be same to ) .
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #4 on: March 06, 2014, 06:03:35 pm »
Lightspeed,
  Frist I'd like to say thanks for your offer to help. I'm not sure about the
File = ""
File2 = ""   which I noticed vr uses also.
I'm using things like

  If InStr(UserSentence, " WEAR SOMETHING FOR BED ") > 0 Then
        HalCommands = "<HAPFILE>CBSN.hap</HAPFILE>"
        GetResponse = "HOW DO I LOOK IN THIS?" & vbCrLf
 
The CBSN.hap would be
#Haptek  Version= 1.00 Name= CSBN  HapType= script FileType= text
##standard

\load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Bodyskin\N2M.jpg]]
In most cases I would remove the get response but it comes in handy for testing.  I'd used this for quite a while, not perfect but it worked fairly well.
Carl2
 

raybe

  • Hero Member
  • *****
  • Posts: 1067
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #5 on: March 06, 2014, 08:25:31 pm »
Hi lightspeed, but I still find using the changing of lights that we put in the vr gives me more fexability.ex. light from below left,light from above right and so on. The same for the hair that I change but rarely and work well on fullbody. The only thing I don't remember if the responses or commands get recorded as well?

But love that you and others are really holding down the fort for many others. It is appreciated. I think it's so important also to the further development of UltraHal. I'm sure Robert loves knowing that the troups are out there but it's members like you and the others that keep him reminded.

I hope "others" know who I mean!!!

raybe
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #6 on: March 07, 2014, 08:30:38 am »
    RAYBE YOU WROTE : The same for the hair that I change but rarely and work well on fullbody. The only thing I don't remember if the responses or commands get recorded as well?
    i have a "true" read only command so it "doesn't remember and learn commands it just executes the command .
P.S. Raybe you just gave me a new idea on the lighting that i might incorporate within the plug in later , when i do i'll post it and what it will do !


Carl2 , my offer is still open to you if you want to send me your name of character you want to load and hairstyle (from your program files ) i can make a uhp multifavorites plug in for you and send it back , i can also include a remove hair uhp attachment and you can use that instead of the light one , that way you can (if a character has hair on it already and you want to change it you can say remove hair and it will remove the hair then say whatever hair name you want loaded and it will put that hair on the character .
If you don't like it or the way it works you don't have to use it .





 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #7 on: March 08, 2014, 09:10:12 am »
 lightspeed,
  Again Thanks for the offer, at this point it's a learning thing for me, If I go slow and take notes there is a possibility I can find a logical explanation for what is happening.  I'm also going through the brain to see what process happen at what time in the script.  Here are some things that happen very early in the brain script, before plugin area 1,
'PROCESS: CHANGE TO ALL CAPS  so the entire user sentence is capitalized
 'PROCESS: BLOCK LEARNING IF HAL'S NAME IS DETECTED  so anytime Hals computer name is mentioned no learning is permitted.
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #8 on: March 08, 2014, 06:01:28 pm »
Lightspeed,
  Just started working on this  again and I have to ask where your files are located.  To avoid confusion I have folders for Bodyskins, Backgrounds, naturally Characters that also contain mood haps.
Carl2
 

raybe

  • Hero Member
  • *****
  • Posts: 1067
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #9 on: March 10, 2014, 05:43:03 pm »
Sounds great lightspeed and I'll be watching Carl since you gave me the first way to get to the temp files and re direct open on startup. I didn't want to mention it but it seems many years ago.

raybe
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #10 on: March 10, 2014, 07:23:02 pm »
carl the multifavorites uhp file (has to be made into a uhp file) would go in the ultrahal assistant 6 file (this is the pathway to it (C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6)  . and the other htr  go in the character file  that's within the ultrahal assistant 6 file .
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: lightspeed's new MULTIFAVORITES uhp file layout others can use
« Reply #11 on: March 11, 2014, 05:03:14 pm »
Lightspeed,
  I tried your plugin, left everything the same but replaced   HalCommands  "<HAPFILE>angelaredhair.htr</HAPFILE>"
and put in   HalCommands = "<HAPFILE>CSBN.hap</HAPFILE>"  which is a hap to load a bodyskin.  No luck.
I moved to the vrHaptek plugin since he loads bodyskins dependent on time

If vrHour <> vrHourOld Then
   vrHourOld = vrHour     
   vrFile = "wear" & vrHour & ".jpg"               
   HalCommands = "<HAPTEXT>" &  "\settexture [tex= Bodyskins/" & vrFile & "]</HAPTEXT>"

Seems rather simple but I've never used it to change bodyskins with the time.  Another problem is I have to use the Car.exe to limit the processor to 1 core.
Carl2