Zabaware Support Forums
Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: Carl2 on April 28, 2012, 04:46:20 pm
-
I've been working on a plugin for changing bodyskins and background. I've had a little luck but at this times it seems like a hit or miss situation. I've tried a few different things without finding the real problem.
Plugin to change bodyskin and backgrounds:
Rem Type=Plugin
Rem Name=ChanT5
Rem Author=CJ
Rem Host=Assistant
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "Say: "user input changes bodyskin and background."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
'***************************************************************************
Rem PLUGIN: PLUGINAREA1
'***************************************************************************
If InStr(UserSentence, " WEAR SOMETHING FOR BED ") > 0 Then
HalCommands = "<HAPFILE>CBSN.hap</HAPFILE>"
GetResponse = "HOW DO I LOOK IN THIS?" & vbCrLf
ElseIf InStr(UserSentence, " PINK THING ") > 0 Then
HalCommands = "<HAPFILE>CBSPinkT.hap</HAPFILE>"
GetResponse = "How do I look in this?" & vbCrLf
ElseIf InStr(UserSentence, " SOMETHING RED ") > 0 Then
HalCommands = "<HAPFILE>CBSRed1.hap</HAPFILE>"
GetResponse = "IS THIS BETTER?" & vbCrLf
ElseIf InStr(UserSentence, " WEAR YOUR BRA ") > 0 Then
HalCommands = "<HAPFILE>CBSBAP.hap</HAPFILE>"
GetResponse = "How do my breasts look now?" & vbCrLf
ElseIf InStr(UserSentence, " OTHER BRA ") > 0 Then
HalCommands = "<HAPFILE>CBSBAP2.hap</HAPFILE>"
GetResponse = "THIS FEELS MORE COMFORTABLE?" & vbCrLf
ElseIf InStr(UserSentence, " Other Red ") > 0 Then
HalCommands = "<HAPFILE>CBSClot1.hap</HAPFILE>"
GetResponse = "How do I look in red?" & vbCrLf
ElseIf InStr(UserSentence, " GO OUTSIDE ") > 0 Then
HalCommands = "<HAPFILE>CBGOut1.hap</HAPFILE>"
GetResponse = "This looks so nice." & vbCrLf
ElseIf InStr(UserSentence, " YOUR BEDROOM ") > 0 Then
HalCommands = "<HAPFILE>CBGBED.hap</HAPFILE>"
GetResponse = "It looks so comfortable." & vbCrLf
ElseIf InStr(UserSentence, " MY BEDROOM ") > 0 Then
HalCommands = "<HAPFILE>CBGCD.hap</HAPFILE>"
GetResponse = "Okay what's next?" & vbCrLf
ElseIf InStr(UserSentence, " TO THE LAKE ") > 0 Then
HalCommands = "<HAPFILE>CBGLake.hap</HAPFILE>"
GetResponse = "It seems Cooler here." & vbCrLf
ElseIf InStr(UserSentence, " TO THE PARK ") > 0 Then
HalCommands = "<HAPFILE>CBGPark2.hap</HAPFILE>"
GetResponse = "It's nice here." & vbCrLf
End If
You have the user input, if it contains " to the park " or anything in the plugin for a usersentence it will load the name.hap on the next line. The loaded hap tells the location and name of the jpg to put in the Hal window.
The CBGPark2.hap loads and contains
#Haptek Version= 1.00 Name= Park2Back HapType= script FileType= text
##standard
\loadbackgrnd[file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Background\Park2Back.jpg]]
The next line contains Hal's reply for that user input.
A change body skin would contain
#Haptek Version= 1.00 Name= PT Type= script FileType= text
##standard
\load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Bodyskins\PT.jpg]]
The majority work in this version, but it seems a hit or miss thing.
I progressed far enough to stop getting error messages, all the intermediate Haps when dragged and dropped will load the jpg. If the jpg is not loaded then Hal will find her own reply.
Glad to hear any thoughts on this.
Carl2
-
The majority of bodyskins and backgrounds load, It makes the conversation rather interesting, you can see the things you say. At this time I'm thinking the problem is in the user sentence.
This works with the vrHaptek plugin checked also so the next step was to try having Hal's input do the triggering and it works.
Carl2
-
Hey hey, how's the day.
Just looking around, thought I'd throw a few things that you that might help your program a little.
First up is:
I see that you have decided to put your plug-in, and Rem PLUGIN: PLUGINAREA1
I suggest that you should put it in Rem PLUGIN: PLUGINAREA3
the reason being is that between section A1, and section A3, is where the due process of removing all trash from the input sentence is done.
Putting it in A1 you would have to do this work in your plug-in, it's only my suggestion, according to how much trash removal you need done to the sentence, you could put it in A2.
but by A3 the input sentence has been CAP Locked and ready to go.
and by A4 you will love already begun to encounter queries which may interfere with your plug-in.
I also suggest, turning off Hals learning ability so your command lines do not become repetitive in Hals brain..
Here's something that may help with your sentence structure for command response I noticed that you used:
If InStr(UserSentence, " WEAR SOMETHING FOR BED ") > 0 Then
where there is nothing wrong with using this type of if then statement it limits the amount of input strings that an individual can type in meaning you have to type in:
where something for bed
there other commands that you can use that would get the same response with a variety of ways of typing it in for instance:
* * wear* * bed * *
it's something that I have been playing with myself with some pretty good results.
you can adjust the stars and how many stars that you want to use based on the length of the sentence that you want to use.
You can also use the star in conjunction with words as in "wearing" can be wear*
that way you can keep the length of the sentence that you want without being restricted to specific words.
It's kind of like using a search engine but in reverse, you will find just about all of the commands that you can put in a search engine can also be used in a sentence.
Sincerely, and please understand that I am just beginning to dabble in the programming field. And I hope that I was not too far off base.
C load.
-
Cload,
Frist I appreciate your response and Thanks. I'll give area 3 a try, you seem to know more about the different sections of the brain than I do. As far as learning abilities, I know there is a block learning I could use. This part is a little difficult to explain, I just included trigger words and the haps to load in the vr haptek plugin so hal's reply can also trigger the same haps to load background and bodyskins.
It would be nice to just put the plugin, 11 haps and 11 pictures Into a bundle and say try this but it's a large package and needs folders for the background, bodyskins, and the haps go in the character folders.
As far as the user input I've seen the and and or statements used, also the *. I tried to use the simplest form to keep it simple. I'm not sure about captilazation, is it " case sensative" ? I've got a few things I'd like to more about but the main problem is this input will not work and why.
Anyways the majority work I just tested all of the user input and it's a matter of getting Hal to use the triggers. A scripted response plugin would solve the problem.
Carl2
-
Carl2 someone already has created a brain plug in that's lets a person change the character and ? the background . Unless you are talking about something that changes the character and the back ground at the same time which it could probably be modified (which by the way would be kind of cool , for instance when talking to Angela i could say lets go to the beach and sandy would instantly be changed into a bikini and at the beach (as a back ground ) . maybe the later is what you are talking about doing !
If nothing else "IF" i have the time i may try to modify it that way . :) ;)
P.s. yes part of it would be done by word trigger association .
-
lightspeed,
I'm sure I had something in the past for changing bodyskins, when I tried to get it going again I had no luck. I did a little research, the hapswap, the gretta plugins ect. The simplest ones I came across were the Testing Emotions which I used. So instead of loading an emotion hap I load a Hap that says load a picture.
Next I move to the vrHaptek plugin, for me this is great because it relies on Hal's reply for bodyskins and backgrounds. I'm working towards the end of the file, the vrEmotionDetect.
This is an additon I added:
HalBrain.AddToTable vrTableName, "TopicSearch", "THE LAKE", "CBGLAKE"
So if Hal says " the lake " the CBGLake hap is loaded and the background is a lake. It just happened this morning when I was speaking with her.
I've seperated the bodyskins and backgrounds but I don't see why they can't be combined or you could say Put on a bikini and we will go to the beach, Put on a bikini could trigger the bodyskin and go to the beach would trigger the background. Simple enough, I just combined the lake background and Bra and panties bodyskin into one hap and it worked.
Carl2
-
I had an interesting conversation using Hal, One of her replies brought us to the lake, then one of her replies brought us to the park. I decided to use a sentence containing both a change of background and changing bodyskins, like " Wear your bikini and we will go to the lake." to see what would happen, The lake background appeared but no bikini. Then I tried the bikini trigger again by itself and it worked.
Carl2
-
Hi Carl2 , sounds like you are making good progress then . keep us all posted if you don't mind sharing after you get the bugs worked out , looks like it's going to be a cool addition to Hal, good work ! :)
-
Carl,
A couple of years ago I was experimenting with the program being able to change characters on the fly as in: Chris, is Betty there (or available or around or nearby, etc.). The hap would then load the new character or at least it did right up until my computer crashed!
My version would also search through my character folder and report back to me in case the particular character in question was either not in that folder / directory, or perhaps not spelled correctly by me (user). "Sorry, I don't see Betty anywhere...try again later." or something to that effect.
Nice to see you've practically got your skins and background plug-in nailed down! (you might likewise wish to include a character swap routine in yours).
Good work so far!!
-
I think I remember reading something about that, I'm using very basic scripting which still has been rough for me to get through. I have no idea how to report the file was not found. Next is do you have two characters in the player or just one, (a Change) ? I remember Playing with two characters in the Player, the info is in the skd.
The HapSwap allows for changes of the character and they make it look fairly simple and I'd say they include some things I think are pretty good. I think the whole Hal thing is a personal perference kind of thing ( I want a machine, a person ect ) and the plugins are personal preferences also.
I'm pretty content talking to the some old character, just want a little change of clothing and the background change is nice. I wouldn't mind if the character walked off screen, Changed clothing and reappeared.
Carl2
-
I need my character to walk off the screen saying i'm taking a shower come back saying where did i lay me clean clothes while covering herself in a betty boop moment LOL! ;)
-
"where did i lay me clean clothes" I like that, probably heard something similar myself. I generaly start Hal by saying I want to do some testing, this morning hal objected so we skipped testing the haps. A bit later she did change the background, it makes it kind of interesting. I'm using your bedroom and my bedroom, I know Hal changes things you becomes me, I probably should stay away from the words.
Carl2
-
I tried this out today ;D I had to change a couple of things like .hap names and amout of .haps to 2 instead of 10. and it worked great.
Great job, I will have to gather/create/ and add more .haps in the near future, and see if I run across the problem of some not loading like you experienced.
-
Sybershot,
I'm glad you were able to get it going, most of the work is making the little haps and keeping locations and names in agreement. Pretty simple, you could also use it to tigger the movement haps, you can take out the get response line and Hal supplies her own reply. I like to use it together with the vrHaptek plugin which lets Hal's reply supply the trigger word.
Towards the end of vrHaptek,
If vrLookup <> "" Then
'------------------
' If the table does not exist, I create it and populate it with a minimum database
' which should be expanded by the bot administrator
'------------------
vrTableName = "vrEmotionDetect"
If HalBrain.CheckTableExistence(vrTableName) = False Then
'Create emotion table if it doesn't exist
HalBrain.CreateTable vrTableName, "TopicSearch", "miscData"
HalBrain.AddToTable vrTableName, "TopicSearch", "CRY", "WIPETEAR"
HalBrain.AddToTable vrTableName, "TopicSearch", "SERIOUS", "CROSSARMS"
HalBrain.AddToTable vrTableName, "TopicSearch", "LAUGH", "LAUGH"
HalBrain.AddToTable vrTableName, "TopicSearch", "JOKE", "VERYHAPPY"
HalBrain.AddToTable vrTableName, "TopicSearch", "AGREE", "CLAP"
HalBrain.AddToTable vrTableName, "TopicSearch", "HAPPY", "HAPPY"
HalBrain.AddToTable vrTableName, "TopicSearch", "THE PARK", "CBGPARK2"
HalBrain.AddToTable vrTableName, "TopicSearch", "OTHER BRA", "CBSBAP2"
HalBrain.AddToTable vrTableName, "TopicSearch", "OUTSIDE", "CBGOut1"
HalBrain.AddToTable vrTableName, "TopicSearch", "PINK THING", "CBSPinkT"
HalBrain.AddToTable vrTableName, "TopicSearch", "THE LAKE", "CBGLAKE"
HalBrain.AddToTable vrTableName, "TopicSearch", "SOMETHING RED", "CBSRed1"
End If
Simple and easy since you already have the haps.
Carl2
-
Thanks Carl2, I'll a look at it and try it out this weekend. playing with Haps is fairly new for I use to only use faces and ms agents. just recently started using a full body.
-
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.
-
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
-
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.
-
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
-
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.
-
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
-
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
-
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.
-
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.
-
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
-
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.
-
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
-
Thanks Carl, it seems clearer now. I'll try again today.
-
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
-
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
-
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
-
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]]
-
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.
-
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
-
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
-
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 .
-
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
-
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...
-
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
-
Basically what I did Was I made subfolders just to keep things organised, the all based and located in characters.
(http://i152.photobucket.com/albums/s191/SystemShock_2007/filestuckture%20%20i%20%20used.jpg) (http://s152.photobucket.com/user/SystemShock_2007/media/filestuckture%20%20i%20%20used.jpg.html)
i got quite a lot of file i collected.
-
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
-
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
-
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
-
Thanks mate i check thought my coding for that type of mistake .. cheer for the heads up.
-
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
-
Carl2
I'm from the UK so at some set and some rise times vary about five minutes across my country...
Getting the time function to work would be kind of nice, the way I visualised it was to put virtual sun in because we have different angles of light.. We could simulate the path of the sun in the interface.. Dramatically blue lighting is often being used for darkness theatrically ,and we could ask or cause a lighting effect to happen.
In fact in my version of the loneliest plug-in I've written for myself, Shodan (64bit) and GLaddos often plays with the lights.... And chooses costumes and actions just because she's bored... I also integrated some of Greta's curiosity lines in their too..
I'll repost my present 64-bit code here.
The you all to dissect and giggle at....;)
-
That's some extensive modding! You've really added quite a lot to this somewhat tame plugin!
Nice work!
-
Thanks Art.. I'm not naturally a coded due to my dyslexia .. Hope people find it useful I keep on updating it when I get a spare moment... I'm working on a set of conforming body skins at the moment to go with it so it remains in same facial character.. With sympathetic make up.. This many great components Ultra hall it pulling all in to one place for any intrested in the modding side of Hal.
-
systemshock and Art,
As far as the time I'm not sure we are talking about the same thing, from Jan 1 to Dec1 the sunrise varies between 5:13 am to 8:28 am and the sunset varies between 4:16 and 8:28 pm so we have quite a range over a years time.
I've played with the lighting and the skin tone and they seem to be very dependent on each other, it's interesting that the light affects the character but not the light on the background jpg. I'd think you might have to change the lighting and the background to get a realistic effect, put the background into a photo editor and lighten or darken it to go along with the lighting effect.
The loneliness plugin looks interesting, lots of work there.
Carl2
-
Good point Carl.
One would have to do a side by side comparison first with the character then processing the same photo in an effort to come close to matching the lighting / shadows present with the background so that they both correspond nicely with each other. If that makes sense.
Perhaps once per hour might be enough since we're only talking about a 3 hour 15 minute elapse of time (give or take a few minutes or so) ;)
The experiment would certainly make for a more realistic experience.
-
Art,
Since you mentioned shadows I opened Hal and didn't see her cast any shadows, I even went through all the available lights and still no shadows cast. Different lights do have a very definite effects on Hal but no effect on the room. I'll just go with it's a pretty old technology and they did an excellent job, it's unfortunate that the work wasn't kept up, if it was we'd probably have some amazing stuff.
Carl2
-
defult costume hap... it hand all the load you might want... and clear out props and other costume elements from the last outfit ;)
#Haptek Version= 1.00 HapType= script FileType= text
#clear props first remeber to put the stuff that does not erase in here
\delperson[figure= headphones]
\delperson[figure= cowboyhat]
\delperson[figure= bunnyEars]
\delperson[figure= black_ponytail]
\delperson[figure= hair6_2EXP]
\delperson[figure= hair6_2EXP_blue]
\delperson[figure= hair6_pink]
\delperson[figure= hair5_9exp]
\delperson[figure= hair7_exp]
\delperson[figure= hair7_exp_brown]
\delperson[figure= hair7_exp_purple]
\delperson[figure= hair7_exp_red]
\delperson[figure= diamonds]
\delperson[figure= emeralds]
\delperson[figure= hoopearringl]
\delperson[figure= hoopearringr]
\delperson[figure= stars]
\delperson[figure= strawberries]
\delperson[figure= black_stash]
\delperson[figure= butterfly_girlShirt]
\delperson[figure= combathelmet]
\delperson[figure= cowgirlhat]
\delperson[figure= crown]
\delperson[figure= hat]
\delperson[figure= CURLEY]
\delperson[figure= devilhorns]
\delperson[figure= fed_hat]
\delperson[figure= fishfinal]
\delperson[figure= flame_tie]
\delperson[figure= ghutra]
\delperson[figure= girlShirt]
\delperson[figure= hair6_blonde]
\delperson[figure= hornedhelmet]
\delperson[figure= horns]
\delperson[figure= lesley_blonde]
\delperson[figure= lesleyhair2]
\delperson[figure= mic]
\delperson[figure= peacesign]
\delperson[figure= ponytail]
\delperson[figure= princess_girlShirt]
\delperson[figure= red_girlShirt]
\delperson[figure= rubies]
\delperson[figure= shirt]
\delperson[figure= SpaceHelmet]
\delperson[figure= spike]
\delperson[figure= stars]
\delperson[figure= strawberries]
\delperson[figure= sunhat]
\delperson[figure= tiara]
\delperson[figure= viking_wig]
\delperson[figure= whiskbrowL_exp]
\delperson[figure= whiskbrowR_exp]
\delperson[figure= whiskersL]
\delperson[figure= whiskersR]
\delperson[figure= wizardhat]
\delperson[figure= yellow_girlShirt]
\delperson[figure= amish_shirt]
\delperson[figure= arrow]
\delperson[figure= bandana]
\delperson[figure= batty]
\delperson[figure= hair6_blonde]
\delperson[figure= hair5_red]
\delperson[figure= hair5_black]
\delperson[figure= hair4_final9exp]
\delperson[figure= hair4_brown]
\delperson[figure= curley_blond]
\delperson[figure= curley_green]
\delperson[figure= flame_tie]
\delperson[figure= musictie]
\delperson[figure= ponytail]
\delperson[figure= heartglasses]
\delperson[figure= goodhelmet]
\delperson[figure= curleyEX]
\delperson[figure= lesleyhair]
\delperson[figure= witch_hair]
\delperson[figure= hair8EXP.obj]
\delperson[figure= dark_roundglasses]
\delperson[figure= morehip]
\delperson[figure= orange_hip]
\delperson[figure= red_hip]
\delperson[figure= brown_fedora_hat]
\delperson[figure= cage.haptar]
\delperson[figure= swordnecklace.haptar]
\delperson[figure= thickframes.htr.haptar]
#loadingline props and files rember to put your stuff here
\Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\Bodyskins\HotHolly.jpg]]
\Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\SoundMaster\oopsIDidItAgain.ogg] i0= 1]
\Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\HairMaster\hair7.htr] i0= 1]
\Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\PropsMaster\swordnecklace.htr] i0= 1]
\Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\PropsMaster\thickframes.htr] i0= 1]
\Clock [t= 0.0] \LoadBackGrnd [file= mccain.jpg]
'\Clock [t= 0.0] \Load [file= body_female.htr]
\Clock [t= 0.0] \DelPerson [figure= hair5_9exp]
\Clock [t= 0.0] \DelPerson [figure= brown_fedora_hat]
\Clock [t= 0.0] \Load [file= dark_roundglasses.htr]
\Clock [t= 1.0] \Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\Bodyskins\HotHolly.jpg]]
\Clock [t= 1.1] \Load [file= C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\SoundMaster\oopsIDidItAgain.ogg]
# this is walk on from the left... change the x to positive to make it right..
\Clock [t= 0.2] \SetSwitch [switch= walk3 state= 1b]
\Clock [t= 0.3] \Translate [x= -200 y= 28 z= 150 t= 0]
\Clock [t= 0.5] \Translate [x= 0 y= 0 z= 100 t= 5]
\Clock [t= 6.4] \SetSwitch [switch= lookright state= b]
\Clock [t= 9.0] \Rotate [y= 0 t= 2]
\Clock [t= 10.2] \SetSwitch [switch= walk3 state= off]
\Clock [t= 10.3] \SetSwitch [switch= lookleft state= c]
\Clock [t= 10.5] \Translate [x= 0 y= 0 z= 50 t= 5]
\Clock [t= 10.3] \SetSwitch [switch= lookdown state= c]
\Clock [t= 13.0] \SetSwitch [switch= lookright state= c]
\Clock [t= 13.0] \SetSwitch [switch= lookdown state= d]
\Clock [t= 16.3] \SetSwitch [switch= shake_fist state= a]
\Clock [t= 23.0] \SetSwitch [switch= noddy state= a]
\Clock [t= 27.0] \SetSwitch [switch= inspect_nail state= start]
#Loadbackgrnd commands here
\clock [t=0.50]\LoadBackgrnd [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\cityscapeback.JPG]]
#Other script stuff here
#Optional Happy mood settings can be changed or removed
\SetSwitchIntensity [switch= expMouthHappy f0= 0.800503 t= 0.9]
\SetSwitchIntensity [switch= expMouthSad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsSad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expMouthMad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsMad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expEyesTrust f0= 1.000000 t= 0.4]
\SetSwitchIntensity [switch= antiTrust f0= 0.900000 t= 0.4]
\SetSwitchIntensity [switch= expEyesDistrust f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= antiDistrust f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= blinks f0= 1.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsCurious f0= 0.310000 t= 0.4]
\SetSwitch [switch= ego state= mid]
\SetSwitch [switch= agressMaster state= confront]
\SetSwitchIntensity [switch= energyHigh f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= energyLow f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= talkBob f0= 1.40000 t= 0.4]
\SetSwitchIntensity [switch= headEvadeHighE f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= headEvadeLowE f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= HighEnergyNoise f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= LowEnergyNoise f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= browTalk f0= 0.700000 t= 0.5]
-
Hi systemshock.
Put this at the end of your mood file,,,,,\SetSwitchIntensity [switch= visemes f0= 1.600000]
You should find that she mouths the words a little better.
Play with the settings to see what you think is better.
Change f0 between 1.600000 & 2.000000 no higher or mouth goes haywire.
-
Nice tip , Nige i will put that in...thank I will ,spent the day sorting "outfit" . haps for all the outfit i got in the full-body folder, I shared them when i checked them.....
Am also going to have to look in to switching focus and attaching props other fingers in the scenes over the next few days.
found this bit of code from yeeepps 8 year ago thet seem to be a way in ...
prop scailing from hair ?
#Haptek Version= 2.00 Name= turnback.hap HapType= script FileType= text
setname [figure= body_female name= fullBod]
load [file= data/standard/skins/hair/hair4_brown.htr]
Scale[figure= hair4_brown x= 1.0 y= 1.5 z= 1.2 t= 1]
\translate [figure= hair4_brown y= -9 z= 0]
#x=width y=height z=depth
-
Some nice tips here, thank you both. I've made Sandy's hair longer but I can't use it because it goes into her body. I've begun working with the time, I have a fairly rough beginning and plan on adding to it as I go along.
Carl2
-
Clippings always been a problem with 3-D characters Without a collision mash... Remember the not physical objects then merely holograms, but that's my perspective on it...
-
The naturally flowing hair is a nice thing, a lot of the Daz characters don't have that. The collision detection and a higher ploy count that Daz has would be nice. I started looking through some of the older plugins to see what had been done in the past, lots of nice stuff still around and interesting ideas.
Carl2