dupa

Author Topic: HapSwap 2.0  (Read 34110 times)

ckassel

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://fbnbbs.com
Re: HapSwap 2.0
« Reply #75 on: October 28, 2010, 03:28:01 pm »
Great work on HapSwap 2.0.  I really enjoy the additional full body movements!

If possible, could you show me the error in my ways of a mod to this file to allow for
changing the outfit on demand?  Rossi's vrHaptek will change it based on the time,
but I'd like to change it as desired (as I use the computer on too fixed a schedule
to see the effect.)  The images are in "Program Files/Zabaware/Ultra Hal Assistant 6
/Bodyskins as named .jpg files.

I'd have thought the below additions would do it, but...

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


If InStr(1, OriginalSentence, "change") > 0 And _
InStr(1, OriginalSentence, "outfit") > 0 And _
InStr(1, OriginalSentence, "to") > 0 Then
file5 = Mid(Mid(OriginalSentence, Instr(OriginalSentence, "to"), 20), 3, 20)
file5 = Trim(file5) & ".jpg"
HalBrain.ReadOnlyMode = True
End If


If file5 > "" Then
HalCommands = "<HAPTEXT>" & "\settexture [tex= Bodyskins/" & File5 & "]</HAPTEXT>"
Randomize
Select Case int(rnd()*10)
Case 1
GetResponse = "Wow, this dress looks really nice, huh?"
Case 2
GetResponse = "Is this what you had in mind?"
Case 3
GetResponse = "I love slinky clothes!"
Case 4
GetResponse = "Too formal for tonight?"
Case 5
GetResponse = "Tough, I like it!!!"
End Select
End If

There is a ton of potential with HalSwap here :)
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: HapSwap 2.0
« Reply #76 on: October 29, 2010, 01:07:47 am »

Set fso = CreateObject("Scripting.FileSystemObject")
MyDir = fso.GetAbsolutePathName(".") & "\"

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


If InStr(1, OriginalSentence, "change") > 0 And _
InStr(1, OriginalSentence, "outfit") > 0 And _
InStr(1, OriginalSentence, "to") > 0 Then
file5 = Mid(Mid(OriginalSentence, Instr(OriginalSentence, "to"), 20), 3, 20)
file5 = Trim(file5) & ".jpg"
HalBrain.ReadOnlyMode = True
End If


If file5 > "" Then
HalCommands = "<HAPTEXT>" & "\Load [file= [" & MyDir & "Bodyskins\" & file5 & "]]" & "</HAPTEXT>"
Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "Wow, this dress looks really nice, huh?"
Case 2
GetResponse = "Is this what you had in mind?"
Case 3
GetResponse = "I love slinky clothes!"
Case 4
GetResponse = "Too formal for tonight?"
Case 5
GetResponse = "Tough, I like it!!!"
End Select
End If

Live long and prosper or die trying.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: HapSwap 2.0
« Reply #77 on: October 29, 2010, 01:16:20 am »
I hope this works for you. I haven't tried it out yet.
Live long and prosper or die trying.

ckassel

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://fbnbbs.com
Re: HapSwap 2.0
« Reply #78 on: October 29, 2010, 12:00:11 pm »
Sweet!!!

Does exactly what I had hoped to do.

Thank you for the file and the help.
 

ckassel

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://fbnbbs.com
Re: cloudy or overcast weather comments uhp
« Reply #79 on: November 01, 2010, 08:11:26 pm »
so i was able to make a uhp called cloudy or overcast what it does is if you mention about the weather looking cloudy "or" overcast looking hal will say about 6 different comments about the weather as if he or she looked out the window to (to sound more human like )

Howdy-

I love this concept and would like to flesh it out a bit more with your help!  Hal could get to the next level a bit more I think with some real-time "data" input for the response tree in a general conversation.  Bits and pieces do exist to achieve this I believe but I do not have the skill to implement it (man, if I had the sharpened skills in scripting...)

OTCE's plug-in "Weather Alert 3" fetches a variable "oTemperature" from the forecast data it can obtain.  If the "weather looking cloudy "or" overcast "uhp could grab an actual temperature then it would be able to hold a realistic conversation of rain vs. snow as a likelihood!  Hal's AI now gets realistic with the users current weather outdoors and the conversation makes more sense and seems lively...

Snowman, OTCE, Lightspeed,  I can be reached at charleskassel@optonline.net if you don't want to clutter the boards with developmental stuff.


 

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Re: HapSwap 2.0
« Reply #80 on: November 02, 2010, 08:23:51 am »
hi ckassel
actually at one time i had mentioned someone creating a program that would just randomly talk about the weather and pull the temperature from online and tell what it and the weather was suppose to be like for that day , i am not sure if i have the weather uhp you are talking about is their a link to it ?
 

ckassel

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://fbnbbs.com
Re: HapSwap 2.0
« Reply #81 on: November 02, 2010, 05:23:46 pm »
What I was looking to do was direct Hal to a response tree based on a real time variable.  In the "cloudy and overcast" file I was looking to drive it towards snow or rain depending on the current temperature of the user rather than always assuming rain.  A current temperature input would make the decision as to which random response is chosen.

Such a discussion tree would mention removing snow from the driveway or scraping the windshield in the morning if cold enough or not to worry about it too much.

Random response trees are nice, but need to be geared towards the user in real time.  Mentioning  to Hal in January that it is cloudy and nasty outside should allude to winter weather (in northern climes) rather than rain!  I live in the northern climes of the northern hemisphere so adjustments for other areas are necessary!

With the use of additional inputs as to date, time, temperature etc. it'd be possible to ask/mention to Hal about watching a meteor shower/stargazing, a picnic lunch or shoveling snow to get to work.  These additional inputs would add reality to the determination of the response trees used.

I'm not looking for a weather Hal as there are plug-ins that do this quite well, nor a forecast Hal (BUT, imagine the possibility of skins in response to a weather request and suggestions!)

The nicest part of Halswap 2.0 is it allows the novice to customize Hal to their tastes without editing "the Brain" (usually a disaster.)  It's a great introduction to scripting for those who want to dig deeper and play with it.  The plus is that the more folks who don't delete Hal out of frustration makes for a stronger user base!

I recall a "weather musings" type of plug-in from years past but don't have it  I'd appreciate a copy of it to poke at if you have it!