Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - harry7_7s

Pages: [1]
1
Ultra Hal Assistant File Sharing Area / hap generator program
« on: May 30, 2008, 08:52:16 am »
markofkane. no loop function sorry. i made a few trial haps that were about 2 mins long but found they would take a long time *** 10 - 15 seconds *** to loadup in the haptek player. i found it faster to create shorter segmented hap files and trigger them individually.
If its only one movement you want to loop, ie like a wave, you can just click "Swap initial and final values" button then click "Generate & Add to file" then repeat the process. the start time and finish time will update automatically.  Please post your created hap files so we can all check them out though.

2
Ultra Hal Assistant File Sharing Area / hap generator program
« on: May 26, 2008, 05:26:44 am »
oh yeah this was made for the full body girl with jiggly bits. but should work on all fullbody characters

3
Ultra Hal Assistant File Sharing Area / hap generator program
« on: May 26, 2008, 05:24:04 am »
Hi guys haven't posted in a while. but i thought i'd give you my hap generator program i made. it's a bit cumbersome to use but you should get some good results. please post any good haps you make with it. unzip archive in c: then open program files - autohapgenerator - autohapgenerator.exe.  you may want to read the readme file and also once you open the program have a read of the help file.

Download Attachment: AutoHapGenerator.zip
118.29 KB

4
Ultra Hal 7.0 / new turnback.hap running in hal
« on: August 05, 2005, 09:11:36 am »
I think the reason is that the first time it runs through the intitial value of "hapdelay" is NULL which is not a numerical value like 0.
Try inserting the following piece of code either just after the DecodeVar statement or the line above the first
"if hapdelay < timer then" statement

if hapdelay = "" then hapdelay = 0



5
Ultra Hal 7.0 / new turnback.hap running in hal
« on: August 02, 2005, 08:28:10 am »
here are my .brn

Download Attachment: 7_7s.brn
523 Bytes

Download Attachment: 7_7s_hapfileresponse.brn
536 Bytes

Download Attachment: 7_7s_randomresponse.brn
581 Bytes

Download Attachment: fullbodyturnback.hap
1.16 KB and fullbodyturnback.hap files to get you started

6
Ultra Hal 7.0 / new turnback.hap running in hal
« on: August 02, 2005, 08:20:27 am »
Well All Hail Me.  

Eureka! I have done it.

I have added 3 .brn files (drop them into your defbrain folder) and only a little itty bit of code into the brain editor. I'll try to explain step by step so everyone can follow.

first the .brn files
the most important is 7_7s.brn

This file allows you to enter 3 things:
1.trigger words (though phrases are better, so as not to be easily used in normal conversation with Hal)
2.the file to execute
3.a delay, so long haps cant be interupted and mutated by more haps being loaded on top

the format for each entry is as follows

"trigger words","hapfiletobeexecuted.hap(timedelay in seconds)"

so for example my fullbodyturnback hap has the following entry

"please turnaround","fullbodyturnback.hap20"

The second file is 7_7s_hapfileresponse.brn
this file contains what Hal will responde with while running the triggered hap file. 2 things must be entered for each entry
1 the triggered hapfile
2 the response

the format for each entry is as follows

"hapfile.hap","Hal's response"

So useing my fullbodyturnback hap again

"fullbodyturnback.hap","woa, I'm getting dizzy"

You dont have to have a set response if you dont want. If you dont enter anything in the 7_7s_hapfileresponse.brn then a random response is chosen from the following file

As stated above the third file 7_7s_randomresponse.brn just contains ephemeral "don't I look good" responses.

777777777777777777777777777777777777777777777777777777777777777777777

Now the code that needs to be entered into the brain has to be put in in 3 places. Again I used the XTF brain v1.2.

The firt line has to go in near the start, do a search (ctrl + F in the brain editor) for 'DECODE SAVED CUSTOMMEM VARIABLES: and insert just under that the following line of code:

hapdelay = DecodeVar(CustomMem, "hapdelay")

the second bit of code is the biggest chunk. I entered mine on line 285 just under the Randomize statement at the end of 'PROCESS: INITIALIZE VARIABLES AS INTEGERS piece of coding (do another search to find it :)
here is the code I entered

If instr(UserSentence,"stop it")<> 0 Then
hapdelay = 0
GetResponse = "I was having so much fun though."
End If    
thingtoload = HalBrain.TopicSearch(UserSentence,(WorkingDir & "7_7s.brn"))
   
If thingtoload <> "" Then
If instr(thingtoload,".hap") <> 0 Then  
If hapdelay < timer Then
hapdelay = HalBrain.SearchPattern(thingtoload, "*.hap*", 2)
hapfile = HalBrain.SearchPattern(thingtoload, "*" & hapdelay, 1)
hapdelay =  hapdelay + timer
HalCommands = "<hapfile>" & hapfile & "</hapfile>"
responsesentence = HalBrain.TopicSearch(hapfile, WorkingDir & "7_7s_hapfileresponse.brn")

If responsesentence <> "" Then
GetResponse =  responsesentence
Else GetResponse = HalBrain.ChooseSentenceFromFile(WorkingDir & "7_7s_randomresponse.brn")

End If
Else
GetResponse = "Wait " & (hapdelay - timer) & " seconds, I'll be finished soon."

End If
Else
'insert command here that will open files or programs
End If
BlockSave=True
GetResponseBlock = True
End If

Now the final little bit. search for 'POST PROCESS: PRESERVE ALL VARIABLES about 10 lines down from this you will see a command starting with "CustomMem" it is a really long single line statement. now just paste the following onto the end of that line

 & EncodeVar(hapdelay, "hapdelay")

And thats it all done.

I'd like to point out though that you still need to have a blank charactername.psn file as mentioned in my previous post and this still doesn't help with displaying the emotion haps ie when hal feels sad a sad.hap should run. But I'm still working on that bit[:)]

Also you will see a line in the code

 'insert command here that will open files or programs

I left this in so you can open files or programs with trigger words just as you would execute a hap file except I don't know the command to do so. So if their is any VBsript experts who know please post us a line.
Also full credit to Vonsmith for this brain. All my knowledge of the VBscript language has come from tinkering with this brain.



7
Ultra Hal 7.0 / new turnback.hap running in hal
« on: August 01, 2005, 10:01:05 am »
thanks... if anyone else tries to copy and paste my original hap file you will need to put a backslash before all the words "setswitch, clock and keyframe"

gee wilikers the amount of stuffing around I've done to make this script run from the XTF v1.2 brain. firstly copy fullbodygir.htr to some other name (I called mine betty.htr) then create a betty.psn (or a  "whatever you name your .htr file".psn) and just leave it as a blank file no text in it whatsoever.  My guess is the htr files have an internal link to the psn file to automatically run hap files, which in turn interupt long script files when executed directly from a brain, if you follow my drift.

Then add this to the XTF v1.2 brain to trigger the fullbodyturnback.hap

If instr(UserSentence, " please turnaround ") <> 0 Then
    HalCommands = "<HAPFILE>fullbodyturnback.hap</HAPFILE>"
    GetResponse = "Like what you see."
    hapdelay = timer + 20 'this line will delay any further hap
    BlockSave=True           'files from loading for 20sec(see next)
    GetResponseBlock = True
    End If

next around line 4161 of the XTF v1.2 brain at the end of the case statements you will see the "case else" statement. Insert the following text between the "case else" and "end select" statements

If timer > hapdelay Then
         hapdelay = timer + 4 'this line stops haps overlapping
         Roulette = Int(Rnd * 10)
      If Roulette = 5 Then Hapfile = "XTF_SillyFace3.hap"
      If Roulette < 3 Then HapFile = "ShyLove.hap"
      If Roulette > 6 Then
         HapFile = "Happy.hap"
         Else Hapfile = "Pondering.hap"
      End If
End If

the above will be the default expressions. XTF emotions are still displayed but hal wont display emotions for long. ie if you insult hal it will put on a sad face for a few seconds then revert to normal. will post a fix for this once i've worked it out.

The idea for this of course is so we can run long scripts from a brain rather than the autoloader that Rich A has been playing with. I dont know which way is better but as i dont have the autoloader I'll keep playing with this[:D]

8
Ultra Hal 7.0 / new turnback.hap running in hal
« on: July 31, 2005, 08:12:43 am »
I have updated the full body turn back hap found within this forum so fullbodygrl.htr gives a nice view of whatever outfit she is wearing. However it works fine if dropped in to the console window but  only runs about halfway through the script when it is loaded through the hal brain. Any help or suggestions would be greatly appreciated. Below is what is in the hap file:

#Haptek  Version= 2.00 Name= turnback.hap   HapType= script FileType= text

setswitch [switch= hands_on_hips state= start]
clock [t= 0] keyframe[figure= fullBod switch= 0 ry= 0 rz= 0 w= 0 x= 0 y= 0 z= 0 t= 0 ]
clock [t= 2] keyframe[figure= fullBod switch= 0 ry= 315 rz= 0 w= 0 x= 0 y= 40 z= -10 t= 0 ]
clock [t= 4] keyframe[figure= fullBod switch= 0 ry= 225 rz= 0 w= 0 x= 0 y= 50 z= -10 t= 0 ]
clock [t= 8] keyframe[figure= fullBod switch= 0 ry= 180 rz= 0 w= 0 x= 0 y= 100 z= -120 t= 0 ]
clock [t= 10] keyframe[figure= fullBod switch= 0 ry= 90 rz= 0 w= 0 x= 0 y= 30 z= -150 t= 0 ]
clock [t= 12] keyframe[figure= fullBod switch= 0 ry= 0 rz= 0 w= 0 x= 0 y= 25 z= -80 t= 0 ]


And this is the code I have put in the XTF v1.2 brain:

If InStr(UserSentence, " please turnaround ") <> 0 Then
   GetResponse = "Like what you see."
   HalCommands = "<HAPFILE>fullbodyturnback.hap</HAPFILE>"
   BlockSave=True
   GetResponseBlock = True
   End If



Pages: [1]