Page 7 of 13

Re: GuideMe Scripting Engine

Posted: Tue Apr 25, 2017 5:02 am
by desertfox
For playfulguy... gave a brief stab at updating for latest guideme but lost steam. I think it just needs a few tweaks but it's hard to know exactly how everything changed.

I found just a few instances of length() for strings that I replaced. Although in my code when getting an xml object back from a read I still needed to use length() to iterate through the xml.

Got an error for onButtonClicked in the scriptengine.js, the target (2nd variable) passed in was undefined. Thought it was trying to replace on a non string object or something and tried casting it to string but I think the error is actually back in the ScriptEngine.xml when it is picking out which target to pass in.

I sort of lost heart debugging here but saw the comment in code waiting for having to go through them backwards, i'm sure just needs a quick dump of page buttons and things to figure out whats going on there. Lost steam trying to figure out how to get in there consitently and check what should be there (doing too much of that at work this past month, can't do it at home ;) )

Anyway, hope that helps if you are doing any porting over. For the maze I'll just include the version of guideme that it works with when I do the next part.

Re: GuideMe Scripting Engine

Posted: Tue Apr 25, 2017 4:04 pm
by bobhill
desertfox wrote: Tue Apr 25, 2017 3:49 am Sorry, just now saw this. I struggled with the same concept trying to put something together in a similar way....
desertfox - thanks for clarifying on the duplicate labels and your debug process - all very helpful!! And yes, I also have used both PG's scripting tutorial and all of the associated scripts, along with several of your scripts for reference and all has been quite useful. I have done a couple of simple scripts that I am testing as random encounters and have one that's a little more complex that I am working on now. I have to pare back the urge to try to cover too many scenarios for the 'return' visits - lol!

Re: GuideMe Scripting Engine

Posted: Tue Apr 25, 2017 10:55 pm
by bobhill
Is there a way to use a variable to set the metronome speed?

ratio =1.5
speed = 90 * ratio

I have tried the Metronome command in various formats
Metronome speed
Metronome <speed>

And various iterations within the page setup:

001.jpg, 15, <speed> text
001.jpg, 15, <choosefrom, speed, speed> text
etc.

And none have worked. If it is possible, any help is appreciated. Thanks!

Re: GuideMe Scripting Engine

Posted: Wed Apr 26, 2017 12:32 am
by desertfox
Ooo, not sure on that one unfortunately.

You can always break off into a guideme page if you can't do what you want for a section and do it in javascript there, which you certainly can set the metronome based on a variable, but ugg yeah that doesn't work to want to vary it up normally.

Re: GuideMe Scripting Engine

Posted: Wed Apr 26, 2017 4:31 pm
by bobhill
Ok - thanks for confirming. I'm not ready to dig into the JS yet, so will build in a work around.

Re: GuideMe Scripting Engine

Posted: Fri May 05, 2017 5:29 am
by bobhill
PlayfulGuy wrote: Sat Oct 03, 2015 2:50 am For the metronome (or the delay) you can specify a random one like

Code: Select all

imagejpg,,30..60 Page text
to get a random value from 30 to 60, but you'll get odd numbers like 31,37, etc.

To get a better result you can use RandomFrom or ChooseFrom.
You use ChooseFrom like this:

Code: Select all

image.jpg,,<Choosefrom 30,60,90> Page text
This will randomly choose one of the listed values. You can give more weight to some numbers by repeating them as in

Code: Select all

<Choosefrom 30,60,90,30,60,120,30>
With a list like that 30 is most likely to occur, then 60, then 90 and 120.

You can also use <Randomfrom 30,120,30> which will give you a random number from 30 to 120 in steps of 30, which results in one of 30, 60, 90 or 120.
<Randomfrom 30,120,15> will give you a random number from 30 to 120 in steps of 15, resulting in values like 30, 45, 60, 75 etc...
I am going nuts! This is clearly explained, and yet, I can't get it to work!

My script is:

Code: Select all

SSL2_Loop:

	if (SS_Count > SS_Number) return

	*.jpg, 10..20, <randomfrom 90, 180, 30> gt Stroke!

	SS_Count = SS_Count + 1

	goto	SSL2_Loop
The image displays, with the random delay, the formatted text (gt is a format) and NO metronome?

I am using ScriptTease v1.4 and GM 1.5.

Re: GuideMe Scripting Engine

Posted: Sat May 06, 2017 12:53 am
by desertfox
Maybe try a comma after the random from?

SSL2_Loop: if (SS_Count > SS_Number) return *.jpg, 10..20, <randomfrom 90, 180, 30>, gt Stroke! SS_Count = SS_Count + 1 goto

Re: GuideMe Scripting Engine

Posted: Sat May 06, 2017 2:00 pm
by bobhill
Hi desertfox - thanks, but that didn't work. No metronome and didn't recognize the style label, just displayed "gt Stroke!".

Re: GuideMe Scripting Engine

Posted: Sat May 06, 2017 3:31 pm
by PlayfulGuy
Hi everyone,

Sorry I haven't stopped by in a while. Life has taken some twists and turns and this project has been on the back burner for a while. And to be honest, as I'm getting older (57 now) my sex drive isn't what it used to be.

@bobhill - As I was working on the new version of the script engine I discovered several bugs in the handling of the ChooseFrom and other tags, and I honestly can't remember at the moment if the version 1.4 code properly handled variables for the metronome and delays properly. I will look into this and report back later.

@desertfox As far as updating the script engine for the latest version of Guideme, I must admit that philo making those changes and completely breaking backwards compatibility really knocked the wind out of my sails. I agonized over why the behaviour was different in different places, and got everything working properly and now all that work was wasted and I have to spend a bunch more time fixing shit. It's very maddening. I also wrote a great tease that would load and convert a download tease or flash tease to a script and it's probably totally broken now too.

@all - the good news is that life has settled down a bit and this project has been coming back to mind a lot lately, and I do really want to get the new version released. I I have decided that I will just release it with the documentation that I have prepared so far, which "should" be enough for the dedicated user to get up to speed with the new features. Unfortunately, I first have to go back and fix those "bugs" created by philo's recent changes. I will make a concerted effort to get to this.

Regards,

PG

Re: GuideMe Scripting Engine

Posted: Sat May 06, 2017 6:09 pm
by d3vi0n
PlayfulGuy wrote: Sat May 06, 2017 3:31 pmSorry I haven't stopped by in a while. Life has taken some twists and turns and this project has been on the back burner for a while.
I know that problem very well :innocent: Glad you're still around here... :wave:
PlayfulGuy wrote: Sat May 06, 2017 3:31 pmphilo making those changes and completely breaking backwards compatibility
What do you mean? I only know about the ".length()" >> ".length" change, which can cause a backwards compatibility problem in some Teases. Although this is very easy fixed... Are there more backwards compatibility problems?

Re: GuideMe Scripting Engine

Posted: Sun May 07, 2017 12:15 am
by desertfox
PlayfulGuy wrote: Sat May 06, 2017 3:31 pm Hi everyone,
Totally get you. I sort of threw my hands up a bit there as well, having trouble picking it up/getting inspired again, I didn't want to go through and test all the systems, just write new content. The script engine works just fine in the previous version with all the stuff that you have, so please don't worry or feel pressured like suddenly we can't use it now.

Life it always full of ups and downs, and these projects are beyond hobby projects that already can be back burned. I find that motivation to work on any of these projects is probably like your own, I need to have not taken care of myself for like a week before I'm worked up enough to spend a few hours working on a tease or something else. Even then I still beat myself up for not using that energy for something that could see the light of day instead of tease / porn compilations ;)

Re: GuideMe Scripting Engine

Posted: Sun May 07, 2017 3:41 pm
by PlayfulGuy
Bobhill,

I'm apparently an idiot. I've reviewed the code for version 1.4 and it clearly does not properly support use of the <RandomFrom> or <Choosefrom> tags for the Metronome argument. I've no idea how that slipped through my testing. I can only offer apologies at this point. Interesting that no one else has reported that in all this time though.

Version 1.4 did not support use of a variable for the metronome either. Sorry about that.

The good news is that I tested your code in the new version I'm working on, and while your code uncovered a small bug, it was an easy fix, and it now works as expected.

In the new version of the script engine I have completely revised how tags are handled and it is much more complete and robust. I will get back on that project over the next few weeks and do some testing with the new version of Guideme as well.

Regards,

PG

bobhill wrote: Fri May 05, 2017 5:29 am
PlayfulGuy wrote: Sat Oct 03, 2015 2:50 am For the metronome (or the delay) you can specify a random one like

Code: Select all

imagejpg,,30..60 Page text
to get a random value from 30 to 60, but you'll get odd numbers like 31,37, etc.

To get a better result you can use RandomFrom or ChooseFrom.
You use ChooseFrom like this:

Code: Select all

image.jpg,,<Choosefrom 30,60,90> Page text
This will randomly choose one of the listed values. You can give more weight to some numbers by repeating them as in

Code: Select all

<Choosefrom 30,60,90,30,60,120,30>
With a list like that 30 is most likely to occur, then 60, then 90 and 120.

You can also use <Randomfrom 30,120,30> which will give you a random number from 30 to 120 in steps of 30, which results in one of 30, 60, 90 or 120.
<Randomfrom 30,120,15> will give you a random number from 30 to 120 in steps of 15, resulting in values like 30, 45, 60, 75 etc...
I am going nuts! This is clearly explained, and yet, I can't get it to work!

My script is:

Code: Select all

SSL2_Loop:

	if (SS_Count > SS_Number) return

	*.jpg, 10..20, <randomfrom 90, 180, 30> gt Stroke!

	SS_Count = SS_Count + 1

	goto	SSL2_Loop
The image displays, with the random delay, the formatted text (gt is a format) and NO metronome?

I am using ScriptTease v1.4 and GM 1.5.

Re: GuideMe Scripting Engine

Posted: Sun May 07, 2017 3:50 pm
by PlayfulGuy
d3vi0n wrote: Sat May 06, 2017 6:09 pm
PlayfulGuy wrote: Sat May 06, 2017 3:31 pmphilo making those changes and completely breaking backwards compatibility
What do you mean? I only know about the ".length()" >> ".length" change, which can cause a backwards compatibility problem in some Teases. Although this is very easy fixed... Are there more backwards compatibility problems?
Yeah, I'm probably being overly negative there. I need to test it and find out how much of an impact it really has, but I do have A LOT of work I've done on the script engine and another project I've had in the works for over two years now. I've spent many hours debugging problems caused by that inconsistency of return types, and the news that it's suddenly changed and all that time was kind of wasted just threw me for a bit of a loop. Of course, I was already in a bit of a loop so it wasn't hard to throw me further.

Anyway, time to strap in and get it done!

PG

Re: GuideMe Scripting Engine

Posted: Sun May 07, 2017 3:58 pm
by d3vi0n
I know that feeling :whistle: Just was curious if i missed some changes... :wave:

Re: GuideMe Scripting Engine

Posted: Thu May 11, 2017 1:15 pm
by bobhill
PlayfulGuy wrote: Sun May 07, 2017 3:41 pm Bobhill,

I'm apparently an idiot. I've reviewed the code for version 1.4 and it clearly does not properly support use of the <RandomFrom> or <Choosefrom> tags for the Metronome argument. I've no idea how that slipped through my testing. I can only offer apologies at this point. Interesting that no one else has reported that in all this time though.

Version 1.4 did not support use of a variable for the metronome either. Sorry about that.

The good news is that I tested your code in the new version I'm working on, and while your code uncovered a small bug, it was an easy fix, and it now works as expected.

In the new version of the script engine I have completely revised how tags are handled and it is much more complete and robust. I will get back on that project over the next few weeks and do some testing with the new version of Guideme as well.

Regards,

PG
Hi PG - thanks for the reply and for taking a look at this. Glad to see to will be fixed in next version! Also, I appreciate the effort you have put in to make the script engine, without it I would have never tried to take the time to learn JS!

Bob