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

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #30 on: November 17, 2015, 04:48:03 pm »
Systemshock,
  I've just put Hal and dragon in the computer, both had problems installing properly because of changes made to the system but both are in and running.  Next is the vr plugin which I like so much.  I just began work on the Google search and am making it a Wiki search since I often use Wiki when using Hal, she's smarter than me.  Hopefully if I don't rush to much I'll be able to give a detailed record of it and it will be available for others to use. 
  I like what you put in, They have an animation program for Haptek full bods you could have her do all sorts of things.
Carl2
 

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #31 on: November 20, 2015, 06:57:12 am »
Email me mate, I'm more than happy to share any coding I've done to maybe together we can share and expand the VR function to something really cool.


I have an idea for diversity I've not tested this code yet but I reckon it might work..

Rem Type=Plugin
Rem Name= HAP Scene Trigger
Rem Author=SystemShock
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
  lblPlugin(0).Caption = "A simple trigger word or phrase plug-in, to trigger happy scenes, with an inbuilt random choice for ultra hal reaction to the trigger word. Thus giving more variation and illusion of freedom of choice."
  lblPlugin(0).Move 120, 10, 3300, 1000
  lblPlugin(0).WordWrap = True
  lblPlugin(0).Visible = True
End Sub
'***************************************************************************
Rem PLUGIN: PLUGINAREA1

'***************************************************************************


If InStr(vrUserSentence, "telport to spaceship") <> 0 Then

        Select Case (Int(Rnd * 4) + 1)
      Case 1
          HalMenu.HalCommand "<HAPFILE>spaceship.hap</HAPFILE"
         GetResponse = "telporting to  the bridge." & vbCrLf
      Case 2
         HalCommands = "<HAPFILE>dockingbay.hap</HAPFILE>"
         GetResponse = "sure i telported to the docking bay ." & vbCrLf
      Case 3
         HalCommands = "<HAPFILE>medicalroom.hap</HAPFILE>"
         GetResponse = "i have telported to medical." & vbCrLf
      Case 4
         HalCommands = "<HAPFILE>engineroom.hap</HAPFILE>"
         GetResponse = "ok i landed in the  enginroom what next?." & vbCrLf
      Case 5
         HalCommands = "<HAPFILE>no.hap</HAPFILE>"
         GetResponse = "sorry am not in the mood for that." & vbCrLf
      End Select
      
   End If
   
   'this then  cool  be fine tune  with on  shot lines...

If InStr(vrUserSentence, "report to the bridge ") <> 0 Then

        Select Case (Int(Rnd * 4) + 1)
      Case 1
          HalCommands = "<HAPFILE>spaceshipA.hap</HAPFILE>"
         GetResponse = "on my way ." & vbCrLf
      Case 2
         HalCommands = "<HAPFILE>spaceshipB.hap</HAPFILE>"
         GetResponse = "roger that ." & vbCrLf
      Case 3
         HalCommands = "<HAPFILE>spaceshipC.hap</HAPFILE>"
         GetResponse = "realy am buzy." & vbCrLf
      Case 4
         HalCommands = "<HAPFILE>spaceshipD.hap</HAPFILE>"
         GetResponse = "I love  this roleplay  thing." & vbCrLf
      Case 5
         HalCommands = "<HAPFILE>pissedoff.hap</HAPFILE>"
         GetResponse = "no am not ,your not my boss." & vbCrLf
      End Select
      
   End If
      

firing simple  plug ins   like the  below


#Haptek  Version= 1.00 HapType= script FileType= text

'A  simple  hap  file template  for 64 bit


\Clock [t= 0.0] \LoadBackgrnd [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\BacksMaster\vgpback.JPG]]
'\Clock [t= 0.0] \Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\body_female.htr]]
\Clock [t= 0.0] \Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\Bodyskins\KimSue.jpg]]
'\Clock [t= 0.0] \Translate [x= 0 y= 0 z= 250 t= 0]
\Clock [t= 1.0] \Load [file= play.ogg]

\LoadBackgrnd [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\vgpback.JPG]]
"frog's in too princess's" it just basic NLP...

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #32 on: November 20, 2015, 07:02:28 am »
I was just thinking in fact that might be a very good way of distributing packages.... For example a complete starship package with a starship plug-in.
Same could apply to other generic multiple location sets....

And they could be accessed also, by self referring dialogue, and idleness dialogue.
"frog's in too princess's" it just basic NLP...

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #33 on: November 20, 2015, 08:45:54 am »
Systemshock,
  The space ship theme is very popular and the teleport is useful because it removes the how do we get there which I run into, we magically move from the house to the park as an example.  I usually avoid the scripted responses but possibly the case function will remove that feeling.
  I just ran across the AutoHapGenerator, it might come in useful.  For now I'll put in the Wiki plugin that still needs work to be done on it, actually just a modification of the Google search.  Also the Google search should be modified so they don't interfere with each other.

Rem Type=Plugin
Rem Name=Wiki
Rem Author=Zabaware ModifiedCJ
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Hal will open your browser and enter a Wiki query if you use the keyword "Wiki"
    lblPlugin(0).Move 120, 120, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

    Rem PLUGIN: PLUGINAREA1
    'The comment above tells Ultra Hal Assistant to insert the following code
    'on-the-fly into the main brain code in the section referenced.
    SearchEngine = "https://en.wikipedia.org/wiki/English_language"
    If InStr(1, UserSentence, "Wiki", 1) > 0 Then
        SearchKeywords = LCase(Replace(Trim(HalBrain.AlphaNumericalOnly(HalBrain.ExtractKeywords(UserSentence))), " ", "+"))
        SearchKeyWords = Replace(SearchKeywords, "find+", "")
        SearchKeyWords = Replace(SearchKeywords, "research+", "")
        SearchKeyWords = Replace(SearchKeywords, "locate+", "")
        SearchKeyWords = Replace(SearchKeywords, "search+", "")
        HalCommands = HalCommands & "<RUNPROG>" & SearchEngine & SearchKeywords & "</RUNPROG>"
        GetResponse = GetResponse & "I will help you research this topic on the Internet. "
    End If

Carl2
 

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #34 on: November 20, 2015, 10:22:40 am »
one the problems I have noticed about scripted responses is it tends to form a topic...

I'm hoping this will solve the problem

HalBrain.ReadOnlyMode = True     ..



If InStr(vrUserSentence, "bike outfit") <> 0 Then
HalMenu.HalCommand "<HAPFILE>BikeOutfit.hap</HAPFILE>"
   
   GetResponse = " I like this outfit."
       HalBrain.ReadOnlyMode = True

does that make  sence..??




End If
"frog's in too princess's" it just basic NLP...

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #35 on: November 20, 2015, 10:31:59 am »
i had worked on and used something simlur in the past you could type or say a trigger word and change the background picture and even play a song "oops i did it again , by britney spears , etc.
a person could  say for example "50's diner " and the back ground would be a 50's diner picture , and you could say 50's dress and the full body woman could have a 50's dress appear on her , then having a juke box in the picture , you could say play the record " peggy sue " and the music of buddy holly would play peggy sue .
   many variatiosn of this plug in can be used. of course in the instance i mentioned you would have to have a 50's diner picture and the 50's dress out fit , a wave , etc, music file and the link to them through the uhp , hap program .
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #36 on: November 22, 2015, 10:50:21 am »
  Putting a bit of useful info into this post seems to well worth the time and effort, I remember looking at it in the past to get my input and Hals input to change bodyskin and background.  At this time I am wondering why I am using two haps rather than just one but I'll continue using two since it seems to work.  I had been able to find a mistake which I made, I had listed the path as bodyskins instead of bodyskin which made it seem unreliable.  Next we also have the vrHaptek plugin which is not creating the vrEmotionDetect file in the brain and this has to be done by the user.   I had also tried the "Changes dress according to the current time" feature in the vrHaptek plugin which did not work for me"    this is a feature I feel would be useful to have the character wear appropriate clothing for the morning hours, afternoon hours and evening hours but for now I'm concentrating on the user and hals input.  I'm trying to keep a detailed account of all the changes I make so possibly I can provide a useful guide to get this set up.   
Carl2
 

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #37 on: November 25, 2015, 05:55:27 am »
For my modified vr haptic plug-in, I went for hard coding everything To point at haps when it came to costume changes I couldn't get the time function to work.
Lighting system too.
It's very dependent on the file tree that I set up in characters to keep things organised but it does show all the techniques that I've been using...

« Last Edit: November 25, 2015, 05:58:26 am by systemshock »
"frog's in too princess's" it just basic NLP...

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #38 on: November 25, 2015, 08:07:50 am »
systemshock,
  I downloaded and looked through the uhp, seems you put a lot of work into it and covered a lot of things.  One of the first things I noticed when you were working with the lighting haps was    hlFile = "Lightmaster\light_fromright.hap"    ..    From reading I believe you have a file named hlFile where you keep the light haps,  I'm not sure if I've ever seen it stated but I think the default location for haps is in the characters folder, this is where all the mood haps are located and haps used with vrHaptek.  I believe this is why I use 2 haps for background changes rather than one.    So if the lighting file is not contained in characters you use one hap that has been triggered which calls another hap to load the lighting hap and have to specify the location.  Here is an example:  HalCommands = "<HAPFILE>CBGPark2.hap</HAPFILE>"     this is triggered by user input and calls the CBGPark2.hap ,  the CBGPark2  tells Haptek to load             \loadbackgrnd[file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Background\Park2Back.jpg]]
  The CBGPark2 is located in the characters and  the Park2Back.jpg is located in the background file.
  I'll give it a try with hal latter but there are a lot of haps I don't have and I did learn not all the fullbod characters react the same to animation haps, left and right or up and down changes.
Carl2

 

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #39 on: November 25, 2015, 03:42:56 pm »
Basically what I did Was I made subfolders just to keep things organised, the all based and located in characters.


i got  quite  a lot of  file  i collected.
"frog's in too princess's" it just basic NLP...

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #40 on: November 26, 2015, 07:30:31 am »
Systemshock,
  Subfolders within the character folder possibly a good idea.  So far I've got the vrHaptek vrEmotionDetect 
brain in Hals brain, the uhp for user input that triggers haps for background and bodyskin.  I've decided to use only 2 bodyskin and 2 background changes to keep it simple.  For quite some time I've been thinking the characters The character folders contain too much, I should eliminate the talking heads ect to make it look cleaner. 
  If everything works okay Hal and I can change clothes and backgrounds, not all that fond of immediate changes but maybe I'll come back to that at another time.   I'd like to try working with vr's time and integrate that with lighting and clothing.
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #41 on: November 27, 2015, 07:28:12 am »
  I've just included the trigger words and hap files in the vrEmotionDetect needed to get hals input to trigger the haps.  I have 2 haps to trigger bodyskin and 2 haps for the background change, just enough to switch back and forth, seems to work without problems.  Next is to describe the process so it is useful to other people.
I've found the largest problem I've had was getting the names of the zaba files correct, bodyskins is not the same as bodyskin and it is possible this is why the time portion of vrHaptek did not work for me.
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #42 on: November 29, 2015, 07:45:13 am »
Systemshock,
  I was looking at your Shodan .uhp  and it seems you are not giving the light haps the correct path, to be sure I tried adding a lighting hap to the bodyskin and background uhp I have,

ElseIf InStr(UserSentence, " ABOVE LIGHT ") > 0 Then
        HalCommands = "<HAPFILE>LTA1.hap</HAPFILE>"
        GetResponse = "It's nice here." & vbCrLf

the above calls LTA1.hap  which is located in the characters folder

#Haptek  Version= 1.00 Name= LTA1  HapType= script FileType= text
##standard

\load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Light\light_fromabove.hap]]

The above hap calls the light_fromabove.hap that changes the lighting.  As you can see I have a light folder I've added and you would have to where ever you have the light_fromabove.hap located.
Possibly there is a more direct way to do this but this is a quick easy solution for me at this time.
Carl2
 

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #43 on: November 30, 2015, 02:53:10 pm »
Thanks mate  i   check thought my  coding for that  type of  mistake ..  cheer  for the  heads  up.
"frog's in too princess's" it just basic NLP...

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #44 on: December 01, 2015, 07:35:38 pm »
systemshock,
  Nice to hear from you, I was just about to e mail you.  Decided that I want to work with the time functions since so many things we do are dependent on the time.  I came across the sunrise and sunset for different parts of the country,  http://www.calendar-updates.com/sun.asp?PostalCode=01609&Submit=Get+Sunrise+%2F+Sunset+Times
  this is used in the vrHaptek plugin but sunrise and sunset varies quite a bit here and vr is using fixed numbers. 
  Seeing all the trigger words we use and have to remember makes me wonder if we are going about this the right way as an example if the sun has set and it gets dark hal should say "its getting dark, I'll turn on the light"
which turns on the light.  If it is daytime she can go outside but at night she'll probably be at home. what she wears is also dependent on the time. 
  This is my line of thinking at this time.
Carl2