GuideMe Scripting Engine

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

Post Reply
User avatar
rebekeplex
Explorer At Heart
Explorer At Heart
Posts: 126
Joined: Wed Mar 09, 2016 5:59 pm
Gender: Male
Sexual Orientation: Straight

Re: GuideMe Scripting Engine

Post by rebekeplex »

Hi,

I need to ask you guys something...
I downloaded the scriptig engine and after tutorial I cant tell if it can work like the "Nyx's flashtease editor" or not.

Does it ? Because i cant make content just by typing some lines in notepad.

Thanks in advance
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 778
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 Scripting Engine

Post by PlayfulGuy »

rebekeplex wrote:Hi,

I need to ask you guys something...
I downloaded the scriptig engine and after tutorial I cant tell if it can work like the "Nyx's flashtease editor" or not.

Does it ? Because i cant make content just by typing some lines in notepad.

Thanks in advance
Hi rebekeplex. Sorry for not replying sooner. I've not been around Milovana much lately and missed this post.
I'm actually working on a major update to the script engine right now and am nearly finished.

The script engine is an add-on to Guideme which you can find here: viewtopic.php?f=2&t=12944. Guideme and the script engine are tools for creating "offline" teases, like the online teases created with Nyx's flashtease editor, but they only run offline in Guideme.

If you went through the tutorial it sounds like you've managed all this so far, but for what it's worth:
First download and unzip Guideme, then run it once to confirm it's working.
Next unzip the ScriptEngine in the "Guides" folder.
Now you can run Guideme, and load the guide named "GuidemeScripts".

If you type up a script in notepad and save it in the ScriptTeases/Scripts folder with the extension .scr, it should then appear in the list of scripts when you open the GuidemScripts guide. You can then select it and run it.

If you can give a little more info on what happens or doesn't happen, or post a copy of your script I can help out further.
And stay tuned for the new improved version coming soon.

PG
User avatar
rebekeplex
Explorer At Heart
Explorer At Heart
Posts: 126
Joined: Wed Mar 09, 2016 5:59 pm
Gender: Male
Sexual Orientation: Straight

Re: GuideMe Scripting Engine

Post by rebekeplex »

Next unzip the ScriptEngine in the "Guides" folder.
Now you can run Guideme, and load the guide named "GuidemeScripts".

If you type up a script in notepad and save it in the ScriptTeases/Scripts folder with the extension .scr, it should then appear in the list of scripts when you open the GuidemScripts guide. You can then select it and run it.

If you can give a little more info on what happens or doesn't happen, or post a copy of your script I can help out further.
And stay tuned for the new improved version coming soon.
Hi Playfulguy,

Thanks for answering.

When i open the "GuidemeScripts" I get this screen
Spoiler: show
menu.jpg
menu.jpg (284.98 KiB) Viewed 2484 times
. When i click something, it shows me how it should work and etc, but it does not create any kind of code. I am honestly lazy to copy the things it shows and then put it into notepad (if it is how this should work).

So I will probably wait for the new version :)
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 778
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 Scripting Engine

Post by PlayfulGuy »

rebekeplex wrote:
Next unzip the ScriptEngine in the "Guides" folder.
Now you can run Guideme, and load the guide named "GuidemeScripts".

If you type up a script in notepad and save it in the ScriptTeases/Scripts folder with the extension .scr, it should then appear in the list of scripts when you open the GuidemScripts guide. You can then select it and run it.

If you can give a little more info on what happens or doesn't happen, or post a copy of your script I can help out further.
And stay tuned for the new improved version coming soon.
Hi Playfulguy,

Thanks for answering.

When i open the "GuidemeScripts" I get this screen
Spoiler: show
menu.jpg
. When i click something, it shows me how it should work and etc, but it does not create any kind of code. I am honestly lazy to copy the things it shows and then put it into notepad (if it is how this should work).

So I will probably wait for the new version :)
Well, unfortunately that's about how it works. The screen you are looking at is the tutorial for the script engine and the script language. The tutorial kitself is written in the script language. You use notepad or something like it to write teases in the form of scripts that the script engine turns into "GuideMe" code. Basically it's an easier method of writing teases in Guideme.

The new version will have more example files you can use for reference. In the meantime you might want to look at the file SarasTease.scr in your GuideMe folder, subfolder Guides\ScriptTeases\Scripts. This is a working example of a script that creates a full featured tease.

On the screen you've shown click the Quit button and it will take you back to the screen where you can select a script to run. Select the SarasTease script and run it, then have a look at the contents of that script file in notepad. That and the tutorial might help you see how it all fits together and how works a bit more.

PG
desertfox
Explorer At Heart
Explorer At Heart
Posts: 365
Joined: Mon Dec 03, 2012 7:26 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

Re: GuideMe Scripting Engine

Post by desertfox »

I just found and fixed an odd bug with video playback. For some reason parseInt was returning NaN on the split time strings of length 3.

I thought there might be some sort of string issue or hanging quotes, but I am not 100% sure why it was happening. After some googling and experimentation though the fix seemed to be to call parseInt(var, 10). The 10 being the 'radix' whatever that is, perhaps base number?

Fix/change was to just add the ,10 to parse int calls in the makeTimeString function and it appears to be working correctly now.

ScriptEngine.js
Spoiler: show

Code: Select all

~line 554
function makeTimeString(str) {

...

else if ( words.length == 3 ) {
      hrs = parseInt(words[0],10);

      temp = parseInt(words[1],10);
      if ( temp < 10 ) min = "0" + temp; // Add leading zero
      else min = ""+temp;

      temp = parseInt(words[2],10);
      if ( temp < 10 ) sec = "0" + temp; // Add leading zero
      else sec = ""+temp;
    }
    return hrs + ":" + min + ":" + sec
  }
}
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 778
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 Scripting Engine

Post by PlayfulGuy »

desertfox wrote:I just found and fixed an odd bug with video playback. For some reason parseInt was returning NaN on the split time strings of length 3.

I thought there might be some sort of string issue or hanging quotes, but I am not 100% sure why it was happening. After some googling and experimentation though the fix seemed to be to call parseInt(var, 10). The 10 being the 'radix' whatever that is, perhaps base number?

Fix/change was to just add the ,10 to parse int calls in the makeTimeString function and it appears to be working correctly now.
Thanks for that. I've added the fix to the new version, which I hope to release eventually. I'm working on the tutorial and testing the heck out of everything. You're going to love the new version. So many new features I can't keep track. If you want a preview I'd be happy to send you a copy to play with. Send me a PM.

I'm not on here every day though, so be patient.

PG
desertfox
Explorer At Heart
Explorer At Heart
Posts: 365
Joined: Mon Dec 03, 2012 7:26 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

Re: GuideMe Scripting Engine

Post by desertfox »

No rush!

I'm going slow myself with things and getting distracted on side projects and life so whenever it is ready it's ready!
User avatar
bobhill
Explorer At Heart
Explorer At Heart
Posts: 164
Joined: Tue Mar 15, 2016 8:49 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

Re: GuideMe Scripting Engine

Post by bobhill »

Hi PG - thanks for posting this scripting engine, it is really cool. Trying to write some simple scripts to get up the learning curve and the tutorial is very helpful. Not sure how to debug or test without waiting through delays, so if there are any tips maybe you could include in the Readme? Thanks again!
User avatar
Trusfrated
Explorer At Heart
Explorer At Heart
Posts: 450
Joined: Mon Nov 08, 2010 8:41 am
Gender: Male

Re: GuideMe Scripting Engine

Post by Trusfrated »

bobhill wrote: Sun Apr 16, 2017 3:58 pm Not sure how to debug or test without waiting through delays, so if there are any tips maybe you could include in the Readme? Thanks again!
Not directly related to the scripting engine, but if you enable GuideMe's Debug mode (Application settings), it adds a button to skip delays on applicable pages. :-)
ImageImage
User avatar
bobhill
Explorer At Heart
Explorer At Heart
Posts: 164
Joined: Tue Mar 15, 2016 8:49 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

Re: GuideMe Scripting Engine

Post by bobhill »

Trusfrated wrote: Mon Apr 17, 2017 12:27 am
bobhill wrote: Sun Apr 16, 2017 3:58 pm Not sure how to debug or test without waiting through delays, so if there are any tips maybe you could include in the Readme? Thanks again!
Not directly related to the scripting engine, but if you enable GuideMe's Debug mode (Application settings), it adds a button to skip delays on applicable pages. :-)
Terrific - thanks!
User avatar
bobhill
Explorer At Heart
Explorer At Heart
Posts: 164
Joined: Tue Mar 15, 2016 8:49 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

Re: GuideMe Scripting Engine

Post by bobhill »

Question for anyone (sorry if obvious one): if you have I character with multiple encounters and I want to create separate scripts and use "Include" - how are duplicate labels managed? For example, if the main script uses Edge1, Edge2 labels and the Encounter2 script, which is referenced by the "include" command in Main.scr also has Edge1, Edge2 - how does the engine resolve which label to use? Or is it a conflict? Thanks!
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 Scripting Engine

Post by philo »

bobhill wrote: Sat Apr 22, 2017 3:49 am Question for anyone (sorry if obvious one): if you have I character with multiple encounters and I want to create separate scripts and use "Include" - how are duplicate labels managed? For example, if the main script uses Edge1, Edge2 labels and the Encounter2 script, which is referenced by the "include" command in Main.scr also has Edge1, Edge2 - how does the engine resolve which label to use? Or is it a conflict? Thanks!
Certainly as far as Guideme is concerned page names have to be unique, include just allows you to split a large tease into multiple small files.
I haven't looked at the scripting engine, but as it runs within guideme I assume it works in a similar way..
User avatar
bobhill
Explorer At Heart
Explorer At Heart
Posts: 164
Joined: Tue Mar 15, 2016 8:49 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

Re: GuideMe Scripting Engine

Post by bobhill »

philo wrote: Sat Apr 22, 2017 6:53 am Certainly as far as Guideme is concerned page names have to be unique, include just allows you to split a large tease into multiple small files.
Right - that's what I wanted to do, split the larger story with multiple teases into multiple files. So if the first script (i.e., Kara.scr) uses the label "Edge1:" to call a subroutine then an included script "Kara2.scr" can't have an "Edge1:" subroutine, but would need to be unique to avoid a conflict? Such as, "K2_Edge1:"?
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 Scripting Engine

Post by philo »

bobhill wrote: Sat Apr 22, 2017 2:34 pm
philo wrote: Sat Apr 22, 2017 6:53 am Certainly as far as Guideme is concerned page names have to be unique, include just allows you to split a large tease into multiple small files.
Right - that's what I wanted to do, split the larger story with multiple teases into multiple files. So if the first script (i.e., Kara.scr) uses the label "Edge1:" to call a subroutine then an included script "Kara2.scr" can't have an "Edge1:" subroutine, but would need to be unique to avoid a conflict? Such as, "K2_Edge1:"?
Yes, and you can call pages in Kara.scr from kara2.scr (or you can in Guideme, not 100% sure in the scripting engine)
desertfox
Explorer At Heart
Explorer At Heart
Posts: 365
Joined: Mon Dec 03, 2012 7:26 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above

Re: GuideMe Scripting Engine

Post by desertfox »

Sorry, just now saw this. I struggled with the same concept trying to put something together in a similar way.

To break down how to think of the script engine, in the regular old guideme xml portion of it, when it is ready to run one of the scripts it passes the filename of the script to a function loadscript(). That function parses your script file and sets everything up to display all your pages.

To show the pages it basically only has one or two guideme pages it flips between. In java you have a bunch of variables primed with what the delay, image, text, metronome, buttons and whatever else the page needs. The display guideme page then reads those variables and is set up off them. When you navigate away from that page the engine changes all the variables to be for the new page and the display page will show those.

Page names and script engine labels will have to be unique. The script engine will look through all the guideme page_id's you have (if you have a standard guideme page) as well as the labels you have if you do a goto <page_name> command in the script engine.

Includes really just stitch multiple files together before they get parsed by loadscript(). You can think of all the files included as basically being one giant file in itself, and the multiple files are just for your own piece of mind sorting.

For example I have a "styles" page I use that has all of the character's fonts defined that I just include with each script I do.

But I think this is fine, I think a script can get pretty huge and it's no big deal.

What I got in the habit of doing is to think of a short for all my labels within a file. So if the file is kara1.scr I would have labels like k1_edge1: , k1_failure: , k1_cool_story_branch: , etc etc. This way you won't ever get a name collision going on between files. At first you'll find you want to keep filling up with similar branches like edge, edgefail, cum, cum failed etc.

If you look at any of the stuff I have though i'm cheating a bit in that I'm constantly calling loadscript when I have an encounter, so I bounce between my maze navigation pages and the script engine when you have an encounter, so I don't have to worry as much about name collisions between scripts. The downside to that is a lot of load time when you have an encounter, so overall I think it is better to just have one big script with the includes like you are doing.

If you missed it also playfulguy has a tutorial and a few help files in the script engine zip that are a really good reference for how everything works that might be worth a check through, i found myself referring back to it a whole bunch.

Oh one other tip for debugging, to get your changes to take affect you have to make sure the loadscript function is somehow called, so you can just use the guideme debug menu to navigate back to whatever the name of the load script page without having to reload the tease itself. I also got in the habit of putting a little bit like this at the top of some pages


ifSet maze_debug goSub debug_setup

debug_setup:
set flag_1
unset flag2
goto DEBUG
return

<somewhere in the tease>
DEBUG:

Basically at the top you can drop into the debug_setup and have a bunch of flags you might want to arrange, then wherever you were working you can drop the DEBUG: label in there, that way you can get right back to the point in the tease where you had to change something while testing without having to click through a bunch of delay windows and stuff. At the least just having goto DEBUG and a DEBUG: label is a good way to save a lot of time.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 27 guests