Tease Ai scripting: The HELP CORNER

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

User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

QueDrmXXX wrote: Fri Oct 19, 2018 8:51 am You're so kind.
:blush:
QueDrmXXX wrote: Fri Oct 19, 2018 8:51 am In fact, I've been peek your scripts a lot and got lots of answers from them already.
I'm happy I've been already able to help you.

:wave:
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

Xero wrote: Thu Apr 18, 2019 7:32 pm Hi I could use help with how to set something up on teaseAI
Could be something like this:

custom/start.txt

Code: Select all

hi lets start @CheckFlag(taskA_interrupted, Resume_taskA) @CheckFlag(taskB_interrupted, Resume_taskB)
@Flag(flag_taskA, flag_taskB) @NullResponse @DeleteFlag(flag_taskA, flag_taskB)
heres a task
@NullResponse @RapidCodeOn
(Choose_task)
@NullResponse @Goto(taskA, taskB)
(taskA)
@NullResponse @CheckFlag(flag_taskA, Choose_task)
@NullResponse @SetFlag(flag_taskA) @CallReturn(path_of_the_file/taskA.txt)
@NullResponse @Goto(End)
(taskB)
@NullResponse @CheckFlag(flag_taskB, Choose_task)
@NullResponse @SetFlag(flag_taskB) @CallReturn(path_of_the_file/taskB.txt)
@NullResponse @Goto(End)
(End)
ok lets end
@EndScript
@End
(Resume_taskA)
@NullResponse @CallReturn([i]path_of_the_file[/i]/taskA.txt, resume_task)
@NullResponse @Goto(End)
(Resume_taskB)
@NullResponse @CallReturn([i]path_of_the_file[/i]/taskB.txt, resume_task)
@NullResponse @Goto(End)
custom/taskA.txt

Code: Select all

set up task A
ok you can go now, turn off teaseAi and come back later @SetFlag(taskA_interrupted)
@End
(resume_task)
@NullResponse  @DeleteFlag(taskA_interrupted)
hi welcome back, lets see how task A went
@End
custom/taskB.txt

Code: Select all

set up task B
ok you can go now, turn off teaseAi and come back later @SetFlag(taskB_interrupted)
@End
(resume_task)
@NullResponse  @DeleteFlag(taskB_interrupted)
hi welcome back, lets see how task B went
@End
HOW DOES IT WORK?

The first time, since none of the flags still exist the script will output "here's a task" and go to line (Choose_task) and it will randomly choose a task. Let's say it chooses taskA.
A flag indicating that taskA has been chosen will be created, this way the script will not select it the next day,
It will run the script taskA.txt and stop at the point you want it to stop, creating a flag to indicate that it has to resume taskA, it will go back to custom/start.txt and output line "ok lets end" and close TAI (the @EndScript command).
When you run TAI again the script will check if any of the flags that indicate that a task is in progress has been created.
Flag "taskA_interrupted" exists so it will move to line "(Resume_taskA)" and resume the script taskA.txt from where you want it to resume (the ", resume_task" in the @CallReturn command will call the script taskA.txt from line "resume_task").
It will delete flag "taskA_interrupted" and check how you completed taskA then it will go back to custom/start.txt and output line "ok lets end" and close TAI.

The next day the script will choose another task and will repeat the same process. Since taskA has already been choosen the day before, if the @Goto command chooses again taskA the @CheckFlag command will take you back to line "(Choose_task)" and it will repeat the process.
If you have just 2-3 tasks I would remove the

Code: Select all

@NullResponse @CheckFlag(flag_taskA, Choose_task)
and replace it with

Code: Select all

@NullResponse @Goto(taskB)
(you will avoid the @Goto at line "(Choose_task)"to select again taskA which has already been executed) or

Code: Select all

@NullResponse @Goto(taskB,taskC)
if you have 3 tasks(in this case you can still pick a task that you have already completed in a previous day but the @Goto will eventually pick a task that still has to be completed). If you have more than that keep the @CheckFlag command, it will be easier for you to write the script. The same should be done with taskB. (and taskC if you have 3 tasks)

When all tasks have been executed the script will read line "@Flag(flag_taskA, flag_taskB) @NullResponse @DeleteFlag(flag_taskA, flag_taskB)": it gets executed once all the flags indicated in the @Flag() command exist and delete all the variables that indicate which task have been chosen and restart from scratch.

The script is modular so you can add all the tasks you want.

That's all. I hope the explanation is clear enough; it's quite late and I'm a bit tired...

If this is not how you wanted the script to work or need more help let me know.
:wave:
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

Xero wrote: Sat Apr 20, 2019 3:25 pm
tigrotto wrote: Thu Apr 18, 2019 11:01 pm
If this is not how you wanted the script to work or need more help let me know.
:wave:

Thanks Tigrotto! This is exactly the kind of thing I was looking for
You're welcome!
User avatar
avatarbr
Experimentor
Experimentor
Posts: 1185
Joined: Fri Aug 18, 2006 3:33 am
Gender: Male
Sexual Orientation: Straight

Re: Tease Ai scripting: The HELP CORNER

Post by avatarbr »

Xero wrote: Thu Jul 25, 2019 10:03 pm hi

Im writing a script using teaseAI sweet patch version. I'm getting some seemingly inconsistent behaviour, where a piece of code will work many times in a row and then malfunction (as if it skipped setting a variable or reading a variable). The piece of code in question uses @RapidCodeOn and several @NullReponse lines with various operations (gotos, checking/setting/deleting flags)

is it possible that teaseAI can get a bit out of sync and execute lines in the wrong order? Or any other known issues where teaseAI behaves inconsistently?


thanks
Xero
Did you tried without the @RapidCodeOn to see if you still get the inconsistent behaviour?

I have a lot of code behind @RapidCodeOn without problems, but sometimes I think something goes wrong (it's hard to detect)
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

Xero wrote: Thu Jul 25, 2019 10:55 pm
avatarbr wrote: Thu Jul 25, 2019 10:16 pm

Did you tried without the @RapidCodeOn to see if you still get the inconsistent behaviour?

I have a lot of code behind @RapidCodeOn without problems, but sometimes I think something goes wrong (it's hard to detect)
Thanks for the quick response. I could not reproduce the error without rapidCodeOn, but the error is intermittent so maybe I just go lucky with testing. Ill try more tomorrow and see if i can work out whats going on
If you post the script (if you want) maybe we could help you checking if there's an error in the script or if it's a bug in the patch.
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

Xero wrote: Fri Jul 26, 2019 9:18 am thanks for the help, I've attached a file which is a simplified complete personality, the 5 files involved in the issue are a start script, and 4 files in custom/day_task folder, nothing else is used. unfortunatly i couldnt make the example any smaller as i dont know where the bug is
I just gave a quick read to your post, but I remember working on something like this for you in the past: viewtopic.php?f=26&t=16051&p=262205#p262205

Is this a new version of that script? Did the script I created work? If it's a newer version of the script I worked on I think you can adapt that to the new iteration.

I'll check your script now.
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

Xero wrote: Sat Jul 27, 2019 2:20 pm
tigrotto wrote: Sat Jul 27, 2019 12:00 pm
Is this a new version of that script? Did the script I created work? If it's a newer version of the script I worked on I think you can adapt that to the new iteration.

I'll check your script now.

yes its a more complicated version of what i asked about before. The script you gave me then was great and thanks again for it. This one is based of the concepts in your original one but i ended up changing it a fair bit as it became more complicated. Maybe I should have stuck closer to what you did or not complicated it so much
I checked your script and it looks correct. So assuming it was a bug in the patch I tested it with the latest patch 55, but still the error happened.
But not when I removed all those @CallReturn command in the start script and left only one and TAI turned off after every cycle. I tried it multiple times and it always worked (but maybe I've just been lucky, who knows?).
In the end...
Spoiler: show
I don't know where the problem is.
Sorry :\'-(
I hope someone else will give a look at your script because I can't find an error at the moment.
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

Xero wrote: Sat Jul 27, 2019 3:30 pm thanks for trying! its a difficult one because its intermittent. It's useful to know you can also produce the bug though and its not jsut me, and also good to know the logic looks correct.

in practise the program would be turned off after every call, so if there is an issue with multiple callreturns then it will be ok
I'll try to check it tomorrow too. Maybe after a good night's sleep I'll notice something I didn't today.
malaru
Explorer
Explorer
Posts: 31
Joined: Thu Mar 03, 2016 4:07 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Tease Ai scripting: The HELP CORNER

Post by malaru »

Xero wrote: Fri Jul 26, 2019 9:18 am the idea is that the task selector should be called twice per day, once in morning, once in evening. the evening call should refer to the same task as the morning so for example

task 3
task 3 followup2

would be a correct output from two calls, but sometimes i get

task 3
task 1

or other weird behaviour (but only after several correct outputs)

to complicate things further:

-there is code to stop the same task being called two days in a row
-module 1 and 2 have introductory sections that should be ran only the first time its called
-module 2 should never repeat and is marked as complete when finished (task 1 and 3 can repeat)

this all seems to mostly work, but occasionally goes wrong!

any help or even jsut knowing if you see a bug too would be great (it only appears after a while)

thanks
Xero
hi Xero,
I just had a look at the scripts and while I currently can't test it myself, I think it is likely that the checks for "xero_task_*_complete" could be the culprit here.
In the first run, lets say you choose task 1, so you are redirected to 1. you check if the task has already been completed and if it was called yesterday. If not, you call it and set the progressing tag.
Next run, you check for this tag an go to (1p), clear the progressing flag and are then send to (1b). But here you only enter the task module, if it hasn't been completed yet. This check is unnecessary I think. Maybe it is causing you the issues?
(The flag is not set in the example, so I'm not quite sure)

malaru
PtheV
Explorer At Heart
Explorer At Heart
Posts: 202
Joined: Sat May 30, 2015 10:18 am
Gender: Male
Sexual Orientation: Straight

Re: Tease Ai scripting: The HELP CORNER

Post by PtheV »

Xero wrote: Fri Jul 26, 2019 9:18 am
thanks for the help, I've attached a file which is a simplified complete personality, the 5 files involved in the issue are a start script, and 4 files in custom/day_task folder, nothing else is used. unfortunatly i couldnt make the example any smaller as i dont know where the bug is

the idea is that the task selector should be called twice per day, once in morning, once in evening. the evening call should refer to the same task as the morning so for example

task 3
task 3 followup

would be a correct output from two calls, but sometimes i get

task 3
task 1

or other weird behaviour (but only after several correct outputs)

to complicate things further:

-there is code to stop the same task being called two days in a row
-module 1 and 2 have introductory sections that should be ran only the first time its called
-module 2 should never repeat and is marked as complete when finished (task 1 and 3 can repeat)

this all seems to mostly work, but occasionally goes wrong!

any help or even jsut knowing if you see a bug too would be great (it only appears after a while)

thanks
Xero
The script looks correct to me. My guess is that Tease AI doesn't like going back to (select) at the top of task_select.txt so much, but I'm not sure. Here's how I would do this script:
Spoiler: show
@NullResponse @RapidCodeOn @RapidTextOn
@NullResponse @CheckFlag(xero_task1_progressing, 1p)
@NullResponse @CheckFlag(xero_task2_progressing, 2p)
@NullResponse @CheckFlag(xero_task3_progressing, 3p)
@Flag(xero_task2_complete) SKIP 2 @Goto(skip2)
@Variable[xero_last_day_task]=[1] 2 OR 3 @Goto(2,3)
@Variable[xero_last_day_task]=[2] 1 OR 3 @Goto(1,3)
@Variable[xero_last_day_task]=[3] 1 OR 2 @Goto(1,2)
1 OR 2 OR 3 @RapidCodeOn @Goto(1,2,3)
(skip2)
@Variable[xero_last_day_task]=[1] ONLY 3 @Goto(3)
@Variable[xero_last_day_task]=[3] ONLY 1 @Goto(1)
1 OR 3 @RapidCodeOn @Goto(1,3)
(1p)
Prog 1 @DeleteFlag(xero_task1_progressing) @Goto(1b)
(1)
@NullResponse @SetFlag(xero_task1_progressing)
(1b)
@NullResponse @SetVar[xero_last_day_task]=[1]
@NullResponse @CallReturn(Custom/day_task/task1.txt)
@End
(2p)
Prog 2 @DeleteFlag(xero_task2_progressing) @Goto(2b)
(2)
@NullResponse @SetFlag(xero_task2_progressing)
(2b)
@NullResponse @SetVar[xero_last_day_task]=[2]
@NullResponse @CallReturn(Custom/day_task/task2.txt)
@End
(3p)
Prog 3 @DeleteFlag(xero_task3_progressing) @Goto(3b)
(3)
@NullResponse @SetFlag(xero_task3_progressing)
(3b)
@NullResponse @SetVar[xero_last_day_task]=[3]
@NullResponse @CallReturn(Custom/day_task/task3.txt)
@End
I replaced some of the @NullResponse with text to see if the right lines get called in a test. Seems to work. Haven't tested it with the NullResponses back in though.
pv
User avatar
avatarbr
Experimentor
Experimentor
Posts: 1185
Joined: Fri Aug 18, 2006 3:33 am
Gender: Male
Sexual Orientation: Straight

Re: Tease Ai scripting: The HELP CORNER

Post by avatarbr »

Xero wrote: Thu Aug 01, 2019 7:26 pm thank you all for the help, ive read all your responses carefully.

@pv my apologies for not mentioning this before but in the final version there will probably be more modules and more than one may be unrepeatable. Your example handles the test case really well and simplifies the logic well, unfortunately i think it would be more difficult to extend

Ive been testing my version with resets of teaseAI inbetween and so far it seems ok (instead of calling it many times in one session). My best guess is either:

1) theres a subtle bug none of us can see

2) the call return function overflows or doesnt reset correctly on many subsequent calls (since this would be a difficult function to write i suspect there may be a bug in the patch here)
Make sure to delete all the flags when starting a new test.

One thing I remember having problems is something like (xero_task1_complete,select) sometimes don't work, but if you put a space after the "," works (xero_task1_complete, select) .

PS: After so many scripts, I didn't know you could use @CheckFlag to go to a specific line :lol: I just use @Flag(something) @Goto(Line)
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

Xero wrote: Fri Aug 02, 2019 9:44 am the command guide im using doesnt seem to mention this, is there a more up to date command list?
You'll find it here.
Xero wrote: Fri Aug 02, 2019 9:44 am @Flag() optionally run the line its on?
@Flag() executes the line only the the flag you put inside the command exist(you can use multiple flags too. In this case the line will be executed only if all flags exist. Same for @NotFlag() but it works the opposite of @Flag())
Xero wrote: Fri Aug 02, 2019 9:44 am also is there a way to set a varible to text? i know you can use @InputVar to get text from user
I don't know, I haven't tried using @SetVar[] with text. Remember to use the square brackets after @SetVar[] though:
@SetVar[last_session]=[tease and denial]
TyCaine
Curious Newbie
Curious Newbie
Posts: 3
Joined: Fri Jan 04, 2019 2:07 pm

Re: Tease Ai scripting: The HELP CORNER

Post by TyCaine »

Quick question!

I've used someone else's idea to add, effectively, two more Glitter contacts by 'faking' their entry and exit, and forcing images to show, and it works pretty well, though one glaring issue is that I have to use @SystemMessage to display their text (since anything else marks it as me) and with some font tags (added through a vocab file) I can get their name colored just like everyone else's, however, the time stamp at the beginning of the line is missing.

I assume this is because it's being rendered through @SystemMessage, however, is there possibly a command or var that can be used to fake the time stamp to further complete the illusion of the 4th and 5th Glitter contacts being added to the chat room (since they are not being added with @ContactX like the other three)?

Hopefully that made sense.... :-)
User avatar
tigrotto
Explorer At Heart
Explorer At Heart
Posts: 547
Joined: Sat Jul 15, 2017 5:13 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Tease Ai scripting: The HELP CORNER

Post by tigrotto »

TyCaine wrote: Fri Aug 02, 2019 8:26 pm is there possibly a command or var that can be used to fake the time stamp to further complete the illusion of the 4th and 5th Glitter contacts being added to the chat room (since they are not being added with @ContactX like the other three)?
Yes. You can add the command #CurrentTime in the vocab file you made and you'll have the current time. You'll probably have to add some font tags too to make it identical to the real time stamp.

You'll find it in TAI command guide selecting System keywords in the command type box.
TyCaine
Curious Newbie
Curious Newbie
Posts: 3
Joined: Fri Jan 04, 2019 2:07 pm

Re: Tease Ai scripting: The HELP CORNER

Post by TyCaine »

Awesome, thank you!

I'll give that a try!

And thank you all for your hard work on this!
Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests