GuideMe (TeaseMe v2.0) - Current Build 0.4.4

Webteases are great, but what if you're in the mood for a slightly more immersive experience? Chat about Tease AI and other offline tease software.

Moderator: 1885

philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

ypslave wrote:Hey,

Bit of a noobie question but, I got TeaseMe to work but when I download GuideMe I cant seem to open the program. How should I "install" it?

Thanks!
If you extract it to a folder you should be able to run guideme.bat or guideme.jar
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

candriver wrote:@BoundSquirrel
GuideMe doesn’t support flags inside <Metronome />
e.g. <Metronome if-set="m25" bpm="25" />

Something simple like <Metronome bpm="25" /> should work without problems.
There was a bug, it checked the ifset flags, but then just ran the last metronome node anyway :-(
Images had the same bug.

I will release a fix soon.
BoundSquirrel
Explorer At Heart
Explorer At Heart
Posts: 282
Joined: Sat Mar 15, 2014 5:07 am

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by BoundSquirrel »

Is it possible to add the 'if-set' / 'if-set' flags to lines of text (<p></p>) as well? This would be useful in a few instances I can think of, particularly in adventure-based settings where certain text might be applicable if you've found an item or encountered an area. It's easy enough to have alternate pages using if-set / if-not-set in the buttons, but having it in the text would allow to minimize duplicate lines in headers, page references, etc.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

BoundSquirrel wrote:Is it possible to add the 'if-set' / 'if-set' flags to lines of text (<p></p>) as well? This would be useful in a few instances I can think of, particularly in adventure-based settings where certain text might be applicable if you've found an item or encountered an area. It's easy enough to have alternate pages using if-set / if-not-set in the buttons, but having it in the text would allow to minimize duplicate lines in headers, page references, etc.
The flags are only really in Guideme for backwards compatibility with teaseme.
It is better to use javascript in Guideme if you are going to do sophisticated logic like that

So for your example code it would be coded like below
This will
dynamically change the text to show the metronome speed
dynamically add buttons depending on the current speed
Set the new speed based on the current speed when you click a button

The buttons also have hot keys so you can press s or f on the keyboard to go faster or slower

Code: Select all

     <Page id="start">       <Text>        <p>TestM</p>      </Text>            <Image id="TestM.jpg" />          <Button target="test">start</Button>      <javascript><![CDATA[        function pageLoad() {            scriptVars.put("speed", "60");        }        ]]></javascript>    </Page>    <Page id="test">       <Text />      <Image id="TestM.jpg" />          <javascript><![CDATA[        function pageLoad() {            var speed = scriptVars.get("speed");            jscriptLog("speed " + speed);            overRide.setMetronome(speed, "4", "0", "");            if (parseInt(speed) < 180) {                overRide.addButton("test", "Faster","", "", "faster()", "", "f");            }            if (parseInt(speed) > 20) {                overRide.addButton("test", "Slower","", "", "slower()", "", "s");            }            overRide.html = "<p>TestM</p><p>Metronome Speed: " + speed + "</p>";        }        function faster() {            var speed = scriptVars.get("speed");            jscriptLog("faster speed: " + speed);            switch (parseInt(speed)) {                case 60:                    speed = "180";                    jscriptLog("faster speed 60 : " + speed);                    break;                case 20:                    speed = "60";                    jscriptLog("faster speed 20 : " + speed);                    break;            }            scriptVars.put("speed", speed);        }        function slower() {            var speed = scriptVars.get("speed");            jscriptLog("slower speed start : " + speed);            switch (parseInt(speed)) {                case 60:                    speed = "20";                    jscriptLog("slower speed 60 : " + speed);                    break;                case 180:                    speed = "60";                    jscriptLog("slower speed 180 : " + speed);                    break;            }            jscriptLog("slower speed end : " + speed);            scriptVars.put("speed", speed);        }        ]]></javascript>    </Page>  
(jscriptlog writes the values out to the javascript.log file generated by guideme this helps working out what is happening when it doesn't work)

speed is stored as text parseInt() converts it to a whole number so we can do numeric comparisons to it.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

BoundSquirrel wrote:Is it possible to add the 'if-set' / 'if-set' flags to lines of text (<p></p>) as well? This would be useful in a few instances I can think of, particularly in adventure-based settings where certain text might be applicable if you've found an item or encountered an area. It's easy enough to have alternate pages using if-set / if-not-set in the buttons, but having it in the text would allow to minimize duplicate lines in headers, page references, etc.
alternatively if you still want to use flags

Code: Select all

     <Page id="test">       <Text>        <p>TestM</p>      </Text>      <Image id="TestM.jpg" />          <Metronome if-set="m20" bpm="20" />      <Metronome if-set="m60" bpm="60" />      <Metronome if-set="m180" bpm="180" />      <Button target="test" if-set="m20" unset="m20" set="m60">Faster</Button>          <Button target="test" if-set="m60" unset="m60" set="m20">Slower</Button>      <Button target="test" if-set="m60" unset="m60" set="m180">Faster</Button>         <Button target="test" if-set="m180" unset="m180" set="m60">Slower</Button>      <javascript><![CDATA[        function pageLoad() {            var speed = "";            if (comonFunctions.canShow(guide.getFlags(), "m20", "")) {                speed = "20";            }            if (comonFunctions.canShow(guide.getFlags(), "m60", "")) {                speed = "60";            }            if (comonFunctions.canShow(guide.getFlags(), "m180", "")) {                speed = "180";            }            overRide.html = "<p>TestM</p><p>Metronome Speed: " + speed + "</p>";        }        ]]></javascript>    </Page>  
The "canShow" function looks at the current flags and does the TeaseMe logic for checking the flags.
The first item passed is always the same, the second is what you would put in if set, the third would be if not set.
You can test multiple flags in the same way you would in teaseme using AND / OR logic.
User avatar
candriver
Explorer
Explorer
Posts: 96
Joined: Sat Jun 22, 2013 8:18 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by candriver »

Example code was mine. I use TeaseMe to test my remakes of FlashTeases. Someone noticed that one of the teases failed in GuideMe, so I checked what fails and reported it.

- Dorothy does whatever Miss Linda wants -
FlashTease to TeaseMe conversions.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

candriver wrote:Example code was mine. I use TeaseMe to test my remakes of FlashTeases. Someone noticed that one of the teases failed in GuideMe, so I checked what fails and reported it.

- Dorothy does whatever Miss Linda wants -
:blush: answering two people when I thought I was answer 1
User avatar
PlayfulGuy
Experimentor
Experimentor
Posts: 1068
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by PlayfulGuy »

philo wrote:
BoundSquirrel wrote:Is it possible to add the 'if-set' / 'if-set' flags to lines of text (<p></p>) as well? This would be useful in a few instances I can think of, particularly in adventure-based settings where certain text might be applicable if you've found an item or encountered an area. It's easy enough to have alternate pages using if-set / if-not-set in the buttons, but having it in the text would allow to minimize duplicate lines in headers, page references, etc.
The flags are only really in Guideme for backwards compatibility with teaseme.
It is better to use javascript in Guideme if you are going to do sophisticated logic like that
@Philo,

Adding if-set and if-not-set support to the text node has also been on my list of requested features since the first time I tried writing a tease in teaseme.

There are several "concerns" I have with the answer "you can do that in javascript".
One is that in many cases it's far simpler and requires much less typing/coding to use flags.
Second, not everyone is a programmer, or even wants to be, so if it has to be done in javascript that might just be the end of that idea for most people.

I'm a strong believer in the keep it simple approach. Javascript support is fantastic, and I'm working on some great things with it, but requiring javascript to do something that could be done more simply pushes Guideme tease development further out of reach for many people and limits the audience.

Consider the following:

Code: Select all

 <Page id="GoalOne" set="ReachedGoalOne"> <Text>Congratulations</Text></Page> <Page id="GoalTwo" set="ReachedGoalTwo"> <Text>Congratulations</Text></Page> <Page id="NextGoal">  <Text if-not-set="ReachedGoalOne">    To reach goal one you need to.....   </Text>  <Button if-not-set="ReachedGoalOne">Going for goal one</Button>   <Text if-set="ReachedGoalOne" if-not-set="ReachedGoalTwo">    To reach goal two you need to.....   </Text>  <Button  if-set="ReachedGoalOne" if-not-set="ReachedGoalTwo">Going for goal two</Button>   <Text if-set="ReachedGoalTwo">     You have achieved greateness!  </Text>  <Button  if-set="ReachedGoalTwo">Experience Greatness</Button> </Page>  
This is pretty straightforward and understandable for most people, and is easily expanded to as many goals as you want. You can't get much simpler than that. Please re-consider adding this feature.

PlayfulGuy
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

@playfulguy
I have been a developer for over 20 years I sometimes forget java script is not trivial for most people.
there are a few minor changes I am doing I will add if-set to the text if it is an easy change.
I kind of didn't want to add stuff that would make it difficult to write for teaseme and guideme so was keeping the changes to java script, but I think what you are suggesting is sensible.

*Edit
I have had a look and it is not a trivial change.
The items that use if-set are stored in arrays (lists) so having multiple copies per page works.
Text is stored once, I would need to convert it to an array and change everywhere it is used.
I will add it to the list of future changes, but it will not be in the near future
BoundSquirrel
Explorer At Heart
Explorer At Heart
Posts: 282
Joined: Sat Mar 15, 2014 5:07 am

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by BoundSquirrel »

Thanks for the speedy responses! Thanks, playfulguy for your insight that we're not all programmers. :-) I have gotten the hang of just about everything outside of javascripting.

I'm trying to teach myself the javascripting side of this and for one that isn't a programmer, it's pretty intimidating. I'm stumped at the moment. Specifics are behind the spoiler.
Spoiler: show
I'm trying to have one page decide how long a delay timer will be for a subsequent page but want the option to pause on that page if one edges. I tried using the example on the Github page for "did they press the button in time" but I've realized that what that is and what I'm doing are different. Here's what I want to do:

Page 1 sets delay of 120 seconds for this example. That timer is called out in one of several other pages to determine how long an action goes on for (I'm using a single page in the example text for simplicity). During that timer, if the person hits the edge, they can press a "wait" button, go to a "cool down" page for x seconds, and then are thrown back to the task page where the timer picks up where it left off.

I know how to send them back and forth to all of the pages, and I can get a static timer or even a random timer set. What I can't figure out is how to get the timer to pick back up when they come back.

Script I've written so far:

<Page id="round1-1">
<Text>
<p>Generic Text</p>
</Text>
<Image id="004.jpg" />
<Button target="round1-2" onclick="R1" hotkey="a">0 (a)</Button>
<javascript>
<![CDATA[
function R1() {
var delayEnd = new Date(new Date().getTime() + 120000);
scriptVars.put("delayEnd",delayEnd);}

]]>
</javascript>
</Page>
<Page id="round1-2">
<Text>
<p>Tease Text-This is where the instructions go.</p>
<p>If you hit the edge, click, "Wait"</p>
<p>Otherwise, continue until the timer runs out.</p>
</Text>
<Image id="005.jpg" />
<Button target="Wait" onclick="wait" hotkey="w">Wait (w)</Button>
<javascript>
<![CDATA[
function pageLoad() {
var delayEnd = scriptVars.get("delayEnd");
overRide.setDelay("round1repeat",delayEnd,delayEnd,"normal","","","");
}
function wait() {}
]]>
</javascript>

The time is being translated as 2 minutes past current time correctly. What I'm missing is translating that back to 120 seconds for the delay timer to recognize.

I see two possible solutions but I don't know how to do either of them:

1: Continue down this path, learning how to pass the time difference into a number (2 minutes from now into 120 seconds) for the delay timer to handle, and then, using the current time function to calculate the time left when the wait button is pushed, and passing that back when the timer is continued.

2: Not using the current time at all, but setting a variable with an initial value of 120 and then, when the Wait button is pushed, grabbing the remaining time on the delay as the new value for that variable. This seems far easier, but I don't know how to grab the remaining time, or how to pass it back to the "overRide.setDelay" function

Can you please help with how that would look?

Thank you.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

BoundSquirrel wrote:I'm trying to have one page decide how long a delay timer will be for a subsequent page but want the option to pause on that page if one edges. I tried using the example on the Github page for "did they press the button in time" but I've realized that what that is and what I'm doing are different. Here's what I want to do:

Page 1 sets delay of 120 seconds for this example. That timer is called out in one of several other pages to determine how long an action goes on for (I'm using a single page in the example text for simplicity). During that timer, if the person hits the edge, they can press a "wait" button, go to a "cool down" page for x seconds, and then are thrown back to the task page where the timer picks up where it left off.

I know how to send them back and forth to all of the pages, and I can get a static timer or even a random timer set. What I can't figure out is how to get the timer to pick back up when they come back.
I think you want something like this.
Store the date/time the delay finishes
On the page load, calculate how many seconds between now and when the delay finishes and pass that to the page delay
If they rest, add 10 seconds to the time it currently finishes and store it as the new finish time.
When the page loads it then calculates the delay based on the new time

Code: Select all

     <Page id="round1-1">        <Text>            <p>Generic Text</p>        </Text>        <Button target="round1-2" onclick="R1" hotkey="a">0 (a)</Button>        <javascript>            <![CDATA[            function R1() {                //date / time delay will finish                //Current date / time plus 120 seconds                var delayEnd = new Date(new Date().getTime() + 120000);                scriptVars.put("delayEnd",delayEnd);            }            ]]>        </javascript>    </Page>    <Page id="round1-2">        <Text>            <p>Tease Text-This is where the instructions go.</p>            <p>If you hit the edge, click, "Wait"</p>            <p>Otherwise, continue until the timer runs out.</p>        </Text>        <Button target="Wait" onclick="wait" hotkey="w">Wait (w)</Button>        <javascript>            <![CDATA[            function pageLoad() {                var delayEnd = scriptVars.get("delayEnd");                //date time now                var delay = new Date();                //time left in milliseconds is the difference between the two values                delay = delayEnd.getTime() - delay.getTime();                //time left in seconds                delay = delay / 1000;                //get rid of any value that is less than a second                 delay = parseInt(delay);                //convert to store the number as text as delay wants it as a string                delay = String(delay);                overRide.setDelay("round1repeat",delay,"","normal","","","");            }            function wait() {                 // get the time the delay currently ends                var delayEnd = scriptVars.get("delayEnd");                // add 10 seconds                delayEnd = new Date(delayEnd.getTime() + 10000);                // store the new time the delay ends                scriptVars.put("delayEnd",delayEnd);            }            ]]>        </javascript>    </Page> 
BoundSquirrel
Explorer At Heart
Explorer At Heart
Posts: 282
Joined: Sat Mar 15, 2014 5:07 am

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by BoundSquirrel »

That's really close to what I was trying to accomplish, philo. Thanks.

Details of what I've tried to modify your script to and what did(n't) work behind the cut
Spoiler: show
Ideally, I was hoping to make the "wait" page a delay or button option, so that if you wanted to end the cooldown early, you could click and go right back to the time you had left.

With the script you provided (which worked great), if I add a button to end the cool-down early, it adds whatever time is left in the cooldown back on top of the activity. It's not a really big deal, but if there's an easy way to track how much of the cooldown is used and only add that amount of time back, it'd be great. I tried about 10 different things and what I think was close, but something in my code kept double-deducting a time so my activity time got shorter than intended. Now I've changed something and it's not working so I've just put in what you posted (modifying the times to my needs)
On another note, in the next update, would it be possible to integrate the "onmouseover" event for buttons and image areas?

Thanks again!
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

BoundSquirrel wrote:That's really close to what I was trying to accomplish, philo. Thanks.

Details of what I've tried to modify your script to and what did(n't) work behind the cut
Spoiler: show
Ideally, I was hoping to make the "wait" page a delay or button option, so that if you wanted to end the cooldown early, you could click and go right back to the time you had left.

With the script you provided (which worked great), if I add a button to end the cool-down early, it adds whatever time is left in the cooldown back on top of the activity. It's not a really big deal, but if there's an easy way to track how much of the cooldown is used and only add that amount of time back, it'd be great. I tried about 10 different things and what I think was close, but something in my code kept double-deducting a time so my activity time got shorter than intended. Now I've changed something and it's not working so I've just put in what you posted (modifying the times to my needs)
On another note, in the next update, would it be possible to integrate the "onmouseover" event for buttons and image areas?

Thanks again!
will do an example of the java script when I am on my main machine.

What were you thinking of doing on mouse over?
BoundSquirrel
Explorer At Heart
Explorer At Heart
Posts: 282
Joined: Sat Mar 15, 2014 5:07 am

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by BoundSquirrel »

philo wrote: What were you thinking of doing on mouse over?
I was kicking around a few different ideas; putting in tease text of "don't even THINK about edging now" and using the mouseover function to send the tease to a certain page if they just mouseover the edge button.
Alternatively, having the user have to find something in a picture within a certain time in order to advance/be rewarded-either a spot-the-difference style or finding something small within a picture.
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: GuideMe (TeaseMe v2.0): BETA Thread

Post by philo »

BoundSquirrel wrote:
philo wrote: What were you thinking of doing on mouse over?
I was kicking around a few different ideas; putting in tease text of "don't even THINK about edging now" and using the mouseover function to send the tease to a certain page if they just mouseover the edge button.
Alternatively, having the user have to find something in a picture within a certain time in order to advance/be rewarded-either a spot-the-difference style or finding something small within a picture.
onmouseover on a button having a target and possibly a script as well like click would be possible.

I will have a look at doing it over the html on the left, it may be possible but coding the tease would probably be difficult.

Try something like this for the delay
It records the time they paused and then adds the elapsed seconds to the end time when it comes back to the main page.
(jscriptLog writes the text to the jscript.log file which can really help to see what is going on
also any errors generated by your java script get written there)

Code: Select all

     <Page id="round1-1">        <Text>            <p>Generic Text</p>        </Text>        <Button target="round1-2" onclick="R1" hotkey="a">0 (a)</Button>        <javascript>            <![CDATA[            function R1() {                //date / time delay will finish                //Current date / time plus 120 seconds                var delayEnd = new Date(new Date().getTime() + 120000);                scriptVars.put("delayEnd",delayEnd);                scriptVars.put("delayStop",delayEnd);            }            ]]>        </javascript>    </Page>    <Page id="round1-2">        <Text>            <p>Tease Text-This is where the instructions go.</p>            <p>If you hit the edge, click, "Wait"</p>            <p>Otherwise, continue until the timer runs out.</p>        </Text>        <Button target="Wait" onclick="wait" hotkey="w">Wait (w)</Button>        <javascript>            <![CDATA[            function pageLoad() {                var delayEnd = scriptVars.get("delayEnd");                var delayStop = scriptVars.get("delayStop");                jscriptLog("main load end: " + delayEnd);                jscriptLog("main load stop: " + delayStop);                 //we have a wait so recalculate new end time                if (delayStop < delayEnd) {                    //time now                    delayNow = new Date();                    jscriptLog("Now: " + delayNow);                    var tEnd = delayEnd.getTime();                    var tNow = delayNow.getTime();                    var tStop = delayStop.getTime();                    //get the differnce between now and when they stopped                    var tDiff = tNow - tStop;                    //add that to the current end time                    var tNew = tEnd + tDiff;                    // convert to a date                    delayEnd = new Date(tNew);                    jscriptLog("tEnd:" + tEnd);                    jscriptLog("tNow:" + tNow);                    jscriptLog("tStop:" + tStop);                    jscriptLog("tDiff:" + tDiff);                    jscriptLog("tNew:" + tNew);                    //reset the pause time                    scriptVars.put("delayEnd",delayEnd);                    scriptVars.put("delayStop",delayEnd);                    jscriptLog("New end: " + delayEnd);                }                //date time now                var delay = new Date();                //time left in milliseconds is the difference between the two values                delay = delayEnd.getTime() - delay.getTime();                //time left in seconds                delay = delay / 1000;                //get rid of any value that is less than a second                 delay = parseInt(delay);                //convert to store the number as text as delay wants it as a string                delay = String(delay);                overRide.setDelay("round1repeat",delay,"","normal","","","");            }            function wait() {                 // get time the pause started                var delayStop = new Date();                // store the paused date / time                jscriptLog("Changed stop: " + delayStop);                scriptVars.put("delayStop",delayStop);            }            ]]>        </javascript>    </Page>    <Page id="Wait">       <Text>        <p>Rest</p>      </Text>            <Button target="round1-2" hotkey="b">Back (b)</Button>      <Delay seconds="10" style="normal" target="round1-2"/>    </Page> 
Post Reply