[Tease Program] Tease-AI Java (1.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

Zefram
Explorer
Explorer
Posts: 6
Joined: Sun Feb 03, 2019 11:27 am

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by Zefram »

There seems to be a small bug in TAJ sendInput() function. The issue I have observed is that lazy sub options are only added to the GUI at the time the function returns. I suspect the code for this loop needs to come earlier:

Code: Select all

                /* ...SendInputFunction.java... */ 
       		for (int x = offset; x < args.length; x++) {
                    answer.addOption(args[x].toString(), args[x].toString());
                }
                
                return answer;
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by GodDragon »

Zefram wrote: Sat Feb 16, 2019 5:42 pm There seems to be a small bug in TAJ sendInput() function. The issue I have observed is that lazy sub options are only added to the GUI at the time the function returns. I suspect the code for this loop needs to come earlier:

Code: Select all

                /* ...SendInputFunction.java... */ 
       		for (int x = offset; x < args.length; x++) {
                    answer.addOption(args[x].toString(), args[x].toString());
                }
                
                return answer;
You are right. This is indeed an issue. I will look into it. Thanks for reporting :-)
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by GodDragon »

A small teaser for the upcoming update:

First of all there will be settings per personality which you can register in your personality files. These are easy to interact with and you don't need more than one line to add one setting to this GUI.
Image

Secondly there will be a theme manager allowing the users to create custom themes including full css support, which means if these basic settings aren't enough for you can go ahead and use css to customize your theme.
Image

Hope you are all well and stay tuned for further information!
Mochrion
Explorer
Explorer
Posts: 63
Joined: Fri Aug 10, 2012 4:49 am
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by Mochrion »

Can't believe I somehow missed that this Java port existed! Very cool!

I started an attempt to port over my unreleased TeaseAI personality, but I ran into issues when trying to play videos.

I'm a little unclear if playing videos is supported yet?

I tried the "showCategoryVideo(String type)" specifying a genre with a defined Video Path in the settings, but I get a "Error: ReferenceError: "showCategoryVideo" is not defined in <eval>"

Then I tried PlayVideo to play it directly, and get "Unrecognized file signature" error.
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by GodDragon »

Mochrion wrote: Sun Mar 10, 2019 10:34 pm Can't believe I somehow missed that this Java port existed! Very cool!

I started an attempt to port over my unreleased TeaseAI personality, but I ran into issues when trying to play videos.

I'm a little unclear if playing videos is supported yet?

I tried the "showCategoryVideo(String type)" specifying a genre with a defined Video Path in the settings, but I get a "Error: ReferenceError: "showCategoryVideo" is not defined in <eval>"

Then I tried PlayVideo to play it directly, and get "Unrecognized file signature" error.
Well playVideo should definitely work. Can you send me the file you used somehow? You are right. For some reason I haven't implemented the showCategoryVideo function yet. Will do so and send you a beta build

Edit: Here you go: https://mega.nz/#!aQYBzaZK!uz49nMD_iIki ... qjDkA75ypM Try this build with your showCategoryVideo function
Mochrion
Explorer
Explorer
Posts: 63
Joined: Fri Aug 10, 2012 4:49 am
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by Mochrion »

That was fast, thank you!

I believe the video I tried was mkv format that was renamed to avi so that the original tease ai could find it.

I'll experiment more when I have time later this week.
Mochrion
Explorer
Explorer
Posts: 63
Joined: Fri Aug 10, 2012 4:49 am
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by Mochrion »

Alright, got a chance to try it out tonight - at first it worked perfectly! But then I noticed for some reason it has trouble playing a lot of my video files. Didn't seem to be a particular extension, nor special characters in the file name. There is no log output either - it just hangs forever after trying to play.

I've upload a little video if you get a chance to try it out for yourself.

https://mega.nz/#!pxZWySZD!FQCgnpIOicwz ... eIycqqd2y8
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by GodDragon »

Mochrion wrote: Wed Mar 13, 2019 3:54 am Alright, got a chance to try it out tonight - at first it worked perfectly! But then I noticed for some reason it has trouble playing a lot of my video files. Didn't seem to be a particular extension, nor special characters in the file name. There is no log output either - it just hangs forever after trying to play.

I've upload a little video if you get a chance to try it out for yourself.

https://mega.nz/#!pxZWySZD!FQCgnpIOicwz ... eIycqqd2y8
Well the windows internal video player has issues decoding it too. Only VLC was able to play it. You might want to reencode it with mp4 standards to make it work.
Mochrion
Explorer
Explorer
Posts: 63
Joined: Fri Aug 10, 2012 4:49 am
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Location: Canada

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by Mochrion »

Crap, I just retested it in the original TeaseAI and yeah that clip doesn't work, sorry about that.

Here's one more - I doubled checked this time and at least for me, this one plays fine in the original TeaseAI (which I believe is also using windows internal video player?) but the TeaseAI java log says it can't find any files when I use the category play, and this is the only file in the folder.

https://mega.nz/#!cxBXkAQT!LS1N0wsIP-aW ... JrkPDnsllE
lotar232
Explorer
Explorer
Posts: 76
Joined: Sat Nov 01, 2008 6:34 pm

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by lotar232 »

just an observation...

Tease AI Java frequently doesn't survive laptop power state transitions (I.e. sleep/wake up) (windows 10 on older Lenovo HW)

it seems like a GFX only issue (i.e. the log is still running, and you can actually type input and see it in the log and the scripts reaction... its just the entire TAIJ window display is lost until the program is restarted)


this probably isn't a big deal given the typical session use-case, but I thought I'd mention it
User avatar
genome231
Explorer At Heart
Explorer At Heart
Posts: 683
Joined: Wed Nov 12, 2014 8:35 am

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by genome231 »

Quick simple question that hadn't occured or been a problem so far :-)

When I declare a variable in TAJ, does it then save it between sessions when I write

Code: Select all

var x = 1;
Or do I have to use

Code: Select all

setVar("x",1);
?

Until this point I've been using the test function and not tested against multiple sessions.

Best regards
Genome
Tribute to 1885 & those involved with Tease-AI.
Thank you for spending time on this awesome project! :-)
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by GodDragon »

genome231 wrote: Thu Mar 21, 2019 2:34 pm Quick simple question that hadn't occured or been a problem so far :-)

When I declare a variable in TAJ, does it then save it between sessions when I write

Code: Select all

var x = 1;
Or do I have to use

Code: Select all

setVar("x",1);
?

Until this point I've been using the test function and not tested against multiple sessions.

Best regards
Genome
You have to use setVar to save it. var x = 1 is just a normal javascript variable and only sits in ram. When using setVar TAJ interally saves the var to the corresponding file. When using setTempVar the variable is only stored in RAM too however it's different than a normal javascript variable, because you can access it globally using getVar. A javascript variable is only accessable in the code block its defined in.
User avatar
genome231
Explorer At Heart
Explorer At Heart
Posts: 683
Joined: Wed Nov 12, 2014 8:35 am

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by genome231 »

Thanks!

1 more.
How would you write a piece of code so it only runs once?
Like in the beginning when i want to set the required variables?
EDIT: Found the solution to the above on https://github.com/GodDragoner/TeaseAIJ ... le-Methods:

Second question:
If I want to update a variable, can it be done this way:

Code: Select all

getVar("x") += 2;
?
Or would it have to be something like:

Code: Select all

setVar("x",getVar("x") + 2);
?

Best regards
Genome
Tribute to 1885 & those involved with Tease-AI.
Thank you for spending time on this awesome project! :-)
ilikelatex
Explorer
Explorer
Posts: 30
Joined: Sat Aug 26, 2017 4:34 pm

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by ilikelatex »

I have also a short question is it possible to call a specific function when you run a file or do i have to handle it in the file itself with flags?

Code: Select all

@Call(Custom\AV_Scripts\AV_Mistress.txt, promise)
->
run("Custom" + java.io.File.separator + "AV_Scripts" + java.io.File.separator + "AV_Mistress.js"); //, promise())
ski23
Explorer At Heart
Explorer At Heart
Posts: 464
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease Program] Tease-AI Java (1.0.18)

Post by ski23 »

genome231 wrote: Fri Mar 22, 2019 7:38 am Thanks!

1 more.
How would you write a piece of code so it only runs once?
Like in the beginning when i want to set the required variables?
EDIT: Found the solution to the above on https://github.com/GodDragoner/TeaseAIJ ... le-Methods:

Second question:
If I want to update a variable, can it be done this way:

Code: Select all

getVar("x") += 2;
?
Or would it have to be something like:

Code: Select all

setVar("x",getVar("x") + 2);
?

Best regards
Genome
So, first off, I recommend loading all of your variables an everything in the onload.js file which will get run when the personality is selected.
For your question about the variables, let me explain it a bit more in depth so you fully understand. So, in a programming language, if you say x = 2. This variable is being stored in ram and will only be accessible while the program is running. Furthermore, variables also have something called a scope as GodDragon was mentioning. So for example:

Code: Select all

var y = 1;
while ( y < 7)
{
y = y + 1;
var x = 6;
}
x = x + 1;
This code would give an error because var x was defined inside of the while loop and therefore it's scope is limited to the while loop so after we exit the while loop, it's as if it no longer exists.
So, if you execute the following statement:

Code: Select all

var x = getVar("varx")
What this is really doing is saying, "create a local variable in ram and set the value to whatever the value of "varx" is."
So, if you change the value of x, it will change the value of your local copy in ram. However, it won't change the value in the file where it is stored which is why you need to do:

Code: Select all

setVar("varx",getVar("varx")+1)
if you want to change the value of a variable.
If it still doesn't make sense let me know and I can try to explain it more or do some searching on "Scoping".

ilikelatex wrote: Sun Mar 24, 2019 10:53 am I have also a short question is it possible to call a specific function when you run a file or do i have to handle it in the file itself with flags?

Code: Select all

@Call(Custom\AV_Scripts\AV_Mistress.txt, promise)
->
run("Custom" + java.io.File.separator + "AV_Scripts" + java.io.File.separator + "AV_Mistress.js"); //, promise())
I see what you're asking and I've looked at ways of doing this myself as well. So, here is my current opinion on how to do this:

With my script converter, it creates a bunch of functions inside of the files including one at the beginning called main(). It also executes main() on the very first line of the file. If you have a file where you want to execute a specific method in the file instead of just running from the beginning, rename the file's main function to something unique like <filename>main. Then to accomplish what you showed above, do the following:

Code: Select all

run(<filename>);
promise();
This takes advantage of the fact that once a file has been run in javascript, its functions are available to be called. And, if you make the main function not execute automatically, then all the run(<filename>) is doing is making sure all the methods are available. One thing to watch out for here. If you use this approach, make sure any other time you want to run that file from the beginning, you're also going to now have to do:

Code: Select all

run(<filename>)
<filename>main()
so that it will actually execute the main function.

Alternatively, you could use flags if you want instead.
Post Reply

Who is online

Users browsing this forum: meowla and 28 guests