[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

Brickx
Explorer
Explorer
Posts: 10
Joined: Sun Jun 13, 2010 6:44 pm

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

Post by Brickx »

GodDragon wrote: Tue Dec 22, 2020 1:26 pm
Brickx wrote: Tue Dec 22, 2020 1:12 pm i just followed al the steps in the setup , including the java download. but when i load the program it's just a single black box (cmd) and it's gone.. anybody tips?
What Java version are you running? Any logs? You could try the quick start kit from the Spicy thread.

Open cmd (Windows + R -> Type cmd -> Enter). Navigate to your TAJ directory: "cd C:\Me\TAJ" or whatever. Then do "java -jar TeaseAI.jar" and see what happens.

:\Users\%uname%\Desktop\Java>java -jar TeaseAI.jar
'java' is not recognized as an internal or external command,
operable program or batch file.

i've downloaded 2 now, 14.02 and 14.01

when i start them manually (opening TEASAI) Open with: --> browse, my java folder on C: /JDK14.0.1 --> JAVA nothing :(

edit: quickstart seems to work, wil be continuing with that ! thanks!
nvx
Explorer
Explorer
Posts: 5
Joined: Thu May 17, 2018 9:48 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Submissive

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

Post by nvx »

Is there a way to make the tease images go in order? I prefer to have each set go from beginning to end instead of jumping between random images, is there a way to change it in TAIJ like there is in TAI?
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.3)

Post by GodDragon »

nvx wrote: Mon Dec 28, 2020 9:27 am Is there a way to make the tease images go in order? I prefer to have each set go from beginning to end instead of jumping between random images, is there a way to change it in TAIJ like there is in TAI?
No not yet, but something that can be added. What does it do if it reaches the end? It btw. should also already naturally progress through image tags like clothed to nude
nvx
Explorer
Explorer
Posts: 5
Joined: Thu May 17, 2018 9:48 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Submissive

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

Post by nvx »

GodDragon wrote: Tue Dec 29, 2020 12:42 am
nvx wrote: Mon Dec 28, 2020 9:27 am Is there a way to make the tease images go in order? I prefer to have each set go from beginning to end instead of jumping between random images, is there a way to change it in TAIJ like there is in TAI?
No not yet, but something that can be added. What does it do if it reaches the end? It btw. should also already naturally progress through image tags like clothed to nude
Ah I see, that should work fine then honestly. I have some sets that are not tagged yet that made it messed up. In TAI if it reaches the end it just jumps to a new set, but would be interesting to have it trigger a script if it reaches the end to make the change seem more natural. Just wanted to say great work on this btw, love how many more options there are in creating personalities compared to TAI where it comes to flow.
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.3)

Post by GodDragon »

nvx wrote: Tue Dec 29, 2020 1:55 am
GodDragon wrote: Tue Dec 29, 2020 12:42 am
nvx wrote: Mon Dec 28, 2020 9:27 am Is there a way to make the tease images go in order? I prefer to have each set go from beginning to end instead of jumping between random images, is there a way to change it in TAIJ like there is in TAI?
No not yet, but something that can be added. What does it do if it reaches the end? It btw. should also already naturally progress through image tags like clothed to nude
Ah I see, that should work fine then honestly. I have some sets that are not tagged yet that made it messed up. In TAI if it reaches the end it just jumps to a new set, but would be interesting to have it trigger a script if it reaches the end to make the change seem more natural. Just wanted to say great work on this btw, love how many more options there are in creating personalities compared to TAI where it comes to flow.
Yea I can dig into that if I have the time at some point
DatFace
Explorer
Explorer
Posts: 5
Joined: Mon Jul 08, 2019 1:59 pm

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

Post by DatFace »

Hi,
two little questions..

1. Is there any way to switch from part to full time slave and reverse, so I can unlock the Academy?
As long as my progress isn't going to be lost I would also try it manually by editing system files... just want to try it out without having to reinstall everything

2. Is there any way to list and delete toys without having to inspect and manually delete them in the system files with editor/notepad++?
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.3)

Post by GodDragon »

DatFace wrote: Sun Jan 03, 2021 3:42 pm Hi,
two little questions..

1. Is there any way to switch from part to full time slave and reverse, so I can unlock the Academy?
As long as my progress isn't going to be lost I would also try it manually by editing system files... just want to try it out without having to reinstall everything

2. Is there any way to list and delete toys without having to inspect and manually delete them in the system files with editor/notepad++?
1. Well there are a few things that need to done for fulltime transition to work. I can write something to check all marks.

2. I am planning on adding a delete button to my gui edit function for toys. For normal toys except plugs, dildos, chastity and heels I don't think I will add something soon if that's what you are thinking of.

Btw. wrong thread
Last edited by GodDragon on Sun Jan 03, 2021 10:04 pm, edited 1 time in total.
meaculpa_uk
Explorer
Explorer
Posts: 85
Joined: Mon Jan 11, 2016 9:46 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

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

Post by meaculpa_uk »

GodDragon wrote: Sun Jan 03, 2021 8:37 pm
DatFace wrote: Sun Jan 03, 2021 3:42 pm Hi,
two little questions..

1. Is there any way to switch from part to full time slave and reverse, so I can unlock the Academy?
As long as my progress isn't going to be lost I would also try it manually by editing system files... just want to try it out without having to reinstall everything

2. Is there any way to list and delete toys without having to inspect and manually delete them in the system files with editor/notepad++?
1. Well there are a few things that need to done for fulltime transition to work. I can write something to check all marks.

2. I am planning on adding a delete button to my gui edit function for toys. For normal toys except plugs, dildos, chastity and heels I don't think I will add something soon if that's what you are thinking of.
I'm confused. Is this a TAIJ thread, or a Spicy thread, or have the two things become synonymous?

Mea
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.3)

Post by GodDragon »

meaculpa_uk wrote: Sun Jan 03, 2021 9:01 pm
GodDragon wrote: Sun Jan 03, 2021 8:37 pm
DatFace wrote: Sun Jan 03, 2021 3:42 pm Hi,
two little questions..

1. Is there any way to switch from part to full time slave and reverse, so I can unlock the Academy?
As long as my progress isn't going to be lost I would also try it manually by editing system files... just want to try it out without having to reinstall everything

2. Is there any way to list and delete toys without having to inspect and manually delete them in the system files with editor/notepad++?
1. Well there are a few things that need to done for fulltime transition to work. I can write something to check all marks.

2. I am planning on adding a delete button to my gui edit function for toys. For normal toys except plugs, dildos, chastity and heels I don't think I will add something soon if that's what you are thinking of.
I'm confused. Is this a TAIJ thread, or a Spicy thread, or have the two things become synonymous?

Mea
It's the TAJ thread. He just posted it in the wrong thread.
lotar232
Explorer
Explorer
Posts: 76
Joined: Sat Nov 01, 2008 6:34 pm

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

Post by lotar232 »

delivering "media modules" / organization:

so I've been playing around with a spicy fork, and mostly have been doing video modules... i.e. I've found some video where a mistress shocks a slave(Pishock now , or potentially e-STIM), or milks via controlling a vibrator or fleshlight (Lovense), and have been writing a script that actuates toys in sequence with the video( if I get the timing correct and the RF/BT/network gods are smiling. ;) )....


I was wondering how to share these modules since the scripts are tightly coupled with the media... and the media is heavy (500MB-1GB videos)... typically we put all the media in one directory and all the personality code in another...

I was wondering if it made sense to create some top level folder for "modules" (similar to video, audio, and Images) where code could sit next to the media... and if anyone had thought about this, or if it made sense to have a standard "module structure" (i.e. like mini-personalities that could be called)

any thoughts?
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.3)

Post by GodDragon »

lotar232 wrote: Fri Jan 08, 2021 10:59 pm delivering "media modules" / organization:

so I've been playing around with a spicy fork, and mostly have been doing video modules... i.e. I've found some video where a mistress shocks a slave(Pishock now , or potentially e-STIM), or milks via controlling a vibrator or fleshlight (Lovense), and have been writing a script that actuates toys in sequence with the video( if I get the timing correct and the RF/BT/network gods are smiling. ;) )....


I was wondering how to share these modules since the scripts are tightly coupled with the media... and the media is heavy (500MB-1GB videos)... typically we put all the media in one directory and all the personality code in another...

I was wondering if it made sense to create some top level folder for "modules" (similar to video, audio, and Images) where code could sit next to the media... and if anyone had thought about this, or if it made sense to have a standard "module structure" (i.e. like mini-personalities that could be called)

any thoughts?
You can quite easily play a video from a file inside your personality code files even though I don't think that's optimal. I mean probably the best way to go about this would be to upload the videos to some video plattform and then stream them into TAJ with via a new feature.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 323
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

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

Post by FrozenWolf »

I've discovered why GIF animations don't play under Linux.

This line changes the path to be all lowercase which means the file won't be found on a case-sensitive file system:
'80cd022:src/me/goddragon/teaseai/utils/media/GifDecoder.java:334'

Code: Select all

name = name.trim().toLowerCase();
From here:

Code: Select all

    public int read(String name) {
        status = STATUS_OK;
        try {
            name = name.trim().toLowerCase();
            if ((name.indexOf("file:") >= 0) ||
                    (name.indexOf(":/") > 0)) {
                URL url = new URL(name);
                in = new BufferedInputStream(url.openStream());
            } else {
                in = new BufferedInputStream(new FileInputStream(name));
            }
            status = read(in);
        } catch (IOException e) {
            status = STATUS_OPEN_ERROR;
        }

        return status;
    }
Moving the call to toLowerCase to the following line fixes it, i.e.

Code: Select all

            name = name.trim();
            if ((name.toLowerCase().indexOf("file:") >= 0) ||
                    (name.indexOf(":/") > 0)) {
I haven't verified this on Windows however because I no longer have a Windows installation.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 323
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

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

Post by FrozenWolf »

Each call to ShowImage() ends up calling MediaHandler.getHandler().showPicture() twice, once from each of these locations:

'80cd022:src/me/goddragon/teaseai/api/scripts/nashorn/ShowImageFunction.java:48'

Code: Select all

                if (file == null) {
                    TeaseLogger.getLogger().log(Level.SEVERE, "Matching image file for path " + args[0] + " does not exist.");
                } else {
                    MediaHandler.getHandler().showPicture(file);
                }
'80cd022:src/me/goddragon/teaseai/api/scripts/nashorn/ShowImageFunction.java:62'

Code: Select all

            if (args.length == 2) {
                if (args[1] instanceof Number) {
                    MediaHandler.getHandler().showPicture(file, ((Number)args[1]).intValue());
                    return file;
                }
            } else {
                MediaHandler.getHandler().showPicture(file, 0);
                return file;
            }
Adding a return statement to the first block fixes it, i.e.

Code: Select all

                if (file == null) {
                    TeaseLogger.getLogger().log(Level.SEVERE, "Matching image file for path " + args[0] + " does not exist.");
                } else {
                    MediaHandler.getHandler().showPicture(file);
+                   return file;
                }
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 323
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

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

Post by FrozenWolf »

TeaseAI.application.getSession().end() ends up being called twice when a Personality finishes. I don't think this has any discernible side effects, and I appreciate that most Personalities keep running anyway.

The two places where the call is made are here:
'80cd022:src/me/goddragon/teaseai/api/scripts/ScriptHandler.java:128'

Code: Select all

    public void startPersonality(Personality personality) {
        File mainScript = new File(personality.getFolder().getAbsolutePath() + File.separator + "main.js");

        if (!mainScript.isFile() || !mainScript.exists()) {
            TeaseLogger.getLogger().log(Level.SEVERE, "Personality '" + currentPersonality.getName() + "' is missing the main.js script");
        } else {
            startPersonality(personality, mainScript);
        }

        TeaseAI.application.getSession().end();
    }
'80cd022:src/me/goddragon/teaseai/api/scripts/ScriptHandler.java:150'

Code: Select all

    public void startPersonality(Personality personality, File startScript) {
        //Reassign because we want to clear the catch
        this.engine = new ScriptEngineManager().getEngineByName("nashorn");
        ScriptHandler.getHandler().load();

        this.currentPersonality = personality;

        currentPersonality.getVariableHandler().setVariable("personalityVersion", currentPersonality.getVersion().getValue(), true);

        VocabularyHandler.getHandler().loadVocabulariesFromPersonality(personality);
        ResponseHandler.getHandler().loadResponsesFromPersonality(personality);


        try {
            runScript(startScript);
        } catch (FileNotFoundException e) {
            TeaseLogger.getLogger().log(Level.SEVERE, "Tried to run non-existent script '" + startScript.getName() + "'.");
        }

        TeaseAI.application.getSession().end();
    }
The change (if you think it's worth it!) is to move the call to getSession().end() earlier within the first block, i.e.

Code: Select all

    public void startPersonality(Personality personality) {
        File mainScript = new File(personality.getFolder().getAbsolutePath() + File.separator + "main.js");

        if (!mainScript.isFile() || !mainScript.exists()) {
            TeaseLogger.getLogger().log(Level.SEVERE, "Personality '" + currentPersonality.getName() + "' is missing the main.js script");
+           TeaseAI.application.getSession().end();
        } else {
            startPersonality(personality, mainScript);
        }
    }
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 323
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

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

Post by FrozenWolf »

Audio should also be stopped at the end of a session along with the video.
'80cd022:src/me/goddragon/teaseai/api/session/Session.java:145'

Code: Select all

                //Reset playing video
                if (MediaHandler.getHandler().getCurrentVideoPlayer() != null) {
                    MediaHandler.getHandler().getCurrentVideoPlayer().stop();
                    
+                MediaHandler.getHandler().stopAllAudio();
                }
I'm currently digging in to the MediaHandler code to try and determine why there are occasional MediaPlayer exceptions when playing audio. I think it's related to the MediaHandlers not being disposed and (at least under Linux) it ends up hogging resources. I've found a few other issues in here such as if the same audio is played twice, the entry in the map is replaced with the second entry, and therefore stopAllAudio() will only stop the second playing audio, not the first one. I think I've fixed that and few other issues, but that's a bigger change that'll be more suitable as a pull request.

One of the things I'm fighting against is that if MediaPlayer is trying to play a broken mp3 file, when calling stop() on it, it blocks and never returns and hence causes the TAJ session to freeze. While the obvious fix is to fix the mp3 file, I'd like to understand why MediaPlayer is misbehaving, and hopefully tame it to make it more robust.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests