[Tease Program] Tease-AI Java (1.4)
Moderator: 1885
- MrSawyerr
- Explorer

- Posts: 18
- Joined: Tue Oct 27, 2020 10:16 am
- Gender: Male
- Sexual Orientation: Straight
Re: [Tease Program] Tease-AI Java (1.3)
Does anyone know if @RapidCodeOn is working correctly?
It feels like it is skipping lines now and then but I'm not sure of it.
It feels like it is skipping lines now and then but I'm not sure of it.
Last edited by MrSawyerr on Thu Jan 21, 2021 6:55 pm, edited 2 times in total.
- FrozenWolf
- Explorer At Heart

- Posts: 434
- 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)
Create a pull request to support images and animations in chat messages:
https://github.com/GodDragoner/TeaseAIJava/pull/25
Note that this is a massive change to reduce the complexity of the existing code. Adding the <img> tag support was trivial after that. I think I caught all of the nuances of StringUtils.processString().
This is (an extreme) example of the added functionality with the animated banana:
https://github.com/GodDragoner/TeaseAIJava/pull/25
Note that this is a massive change to reduce the complexity of the existing code. Adding the <img> tag support was trivial after that. I think I caught all of the nuances of StringUtils.processString().
This is (an extreme) example of the added functionality with the animated banana:
- Spoiler: show
- Spoiler: show
Author of:
MiloDB: Finding Old Teases
- FrozenWolf
- Explorer At Heart

- Posts: 434
- 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)
I understand what you mean, but that could be very tricky. There was some effort put into producing a consistent build script, but these things are always complicated, even for experienced developers, particularly when intending to provide it to third parties (i.e. general users) when there is a great difference between each individual's setup of their PC. For example, I've hammered together my own gradle build script, but the rest of my environment is based on Linux Mint with JavaFX 15. I've got the advantage of having 25 years of software development experience though, so when things don't quite go to plan, I can normally whack it enough times to get it back in to shape.illit wrote: Thu Jan 21, 2021 8:42 am Hello, I have a small request. Would be great to have some brief instructions on how to build TAJ from source (for non-Java developers), or maybe a build script. I would like to have the latest changes, even if there is no new release yet, but I don't want to learn how to work with Java compiler.
Some projects run build servers; these compile the latest version of the software when the code changes. That's still not trivial to set up, and then the question might be about the delivery mechanism. If the pre-releases consisted only of a new TeaseAI.jar, then perhaps it could be made available to user to drop in place of the old one, but that would have to come with the caveat that if it breaks, it's not going to be supported at all. Sometimes it's better to let the changes be thoroughly vetted before releasing any update to users; we don't want to annoy them after all!
It's worth noting that there aren't that many behavioural changes to the current source for TAJ compared to release version 1.3, at least nothing that I'd expect to affect Windows users anyway (assuming you are a Windows user).
Listen to me, rambling on like an old man
Author of:
MiloDB: Finding Old Teases
- FrozenWolf
- Explorer At Heart

- Posts: 434
- 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)
When you say by file name, do you mean that it gradually steps through the Domme images in order alphabetically with each chat message, like TAI does?operwt wrote: Thu Jan 21, 2021 5:39 pm A domme images are shown randomly, could you please make it by file name?
My Domme images are normally sorted to be become more scantily glad as it goes further down the list. In TAI, when it reached the end of the list, I think it just switched to a different image set, starting at the top again. TAJ, as you say, sticks with the same image set and shows images randomly.
I suppose it depends on the features of the Personality as to whether the experience would still be as desired by the author. Perhaps it could work, but I'm not sure. Are you running the Spicy personality?
I could look into it, but I'll be honest, it won't be a high priority for me to do it at the moment as I'm trying to help debug and fortify the existing functionality. If the feature does get added, I think it'll have to be a configuration option to choose between random or sequenced images. If GodDragon would be happy for me to take a look at that sort of change, I will do.
Author of:
MiloDB: Finding Old Teases
- FrozenWolf
- Explorer At Heart

- Posts: 434
- 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)
Is that a TAJ or TAI thing? I can't find any reference to it in TAJ unless I'm looking in the wrong place?MrSawyerr wrote: Thu Jan 21, 2021 9:48 am Does anyone know if @RapidCodeOn is working correctly?
It feels like it is skipping lines now and then but I'm not sure of it.
Author of:
MiloDB: Finding Old Teases
- MrSawyerr
- Explorer

- Posts: 18
- Joined: Tue Oct 27, 2020 10:16 am
- Gender: Male
- Sexual Orientation: Straight
Re: [Tease Program] Tease-AI Java (1.3)
Woops my bad. That's a TAI thing. And I finally found out how it works.FrozenWolf wrote: Thu Jan 21, 2021 11:10 pmIs that a TAJ or TAI thing? I can't find any reference to it in TAJ unless I'm looking in the wrong place?MrSawyerr wrote: Thu Jan 21, 2021 9:48 am Does anyone know if @RapidCodeOn is working correctly?
It feels like it is skipping lines now and then but I'm not sure of it.Can you provide a short script example of how it's used?
Thanks for asking though!
- FrozenWolf
- Explorer At Heart

- Posts: 434
- 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)
Created small pull request for protection against potentially missing media:
https://github.com/GodDragoner/TeaseAIJava/pull/26
https://github.com/GodDragoner/TeaseAIJava/pull/26
Author of:
MiloDB: Finding Old Teases
-
GodDragon
- Explorer At Heart

- Posts: 795
- 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)
All pull requests look good to me. I'll take a closer look though.FrozenWolf wrote: Sat Jan 23, 2021 10:02 pm Created small pull request for protection against potentially missing media:
https://github.com/GodDragoner/TeaseAIJava/pull/26
Generally the reflection is a great idea I haven't thought of actually. I didn't think of using reflection since like the function already had everything I wanted but that's definitely a bit cleaner and more readable.
The html chat tag function is also great! Appreciate the work you put into it. Since ski implemented this and I only added the image tag back then (but for some reason he changed it back and then it was apparently left in this state) I never found the time (since it "worked" and I focused on spicy) to do a proper OOP rewriting of this.
I have set up continuous integration before and when it's running it's great but you are right with your concern about making it usable on every system. I can try to provide an automatic (nightly) build at some point but it's not that high on my priority list.FrozenWolf wrote: Thu Jan 21, 2021 10:53 pmI understand what you mean, but that could be very tricky. There was some effort put into producing a consistent build script, but these things are always complicated, even for experienced developers, particularly when intending to provide it to third parties (i.e. general users) when there is a great difference between each individual's setup of their PC. For example, I've hammered together my own gradle build script, but the rest of my environment is based on Linux Mint with JavaFX 15. I've got the advantage of having 25 years of software development experience though, so when things don't quite go to plan, I can normally whack it enough times to get it back in to shape.illit wrote: Thu Jan 21, 2021 8:42 am Hello, I have a small request. Would be great to have some brief instructions on how to build TAJ from source (for non-Java developers), or maybe a build script. I would like to have the latest changes, even if there is no new release yet, but I don't want to learn how to work with Java compiler.
Some projects run build servers; these compile the latest version of the software when the code changes. That's still not trivial to set up, and then the question might be about the delivery mechanism. If the pre-releases consisted only of a new TeaseAI.jar, then perhaps it could be made available to user to drop in place of the old one, but that would have to come with the caveat that if it breaks, it's not going to be supported at all. Sometimes it's better to let the changes be thoroughly vetted before releasing any update to users; we don't want to annoy them after all!
It's worth noting that there aren't that many behavioural changes to the current source for TAJ compared to release version 1.3, at least nothing that I'd expect to affect Windows users anyway (assuming you are a Windows user).
Listen to me, rambling on like an old man![]()
To build TAJ you don't really need anything special. Get yourself some IDE of your choice, mine would be IntelliJ, setup the project and just press run. That'd normally sufficient. Maybe there might be some quircks but usually there shouldn't.
TAJ does not show images randomly. It should display them accordingly to the session state:FrozenWolf wrote: Thu Jan 21, 2021 11:08 pmWhen you say by file name, do you mean that it gradually steps through the Domme images in order alphabetically with each chat message, like TAI does?operwt wrote: Thu Jan 21, 2021 5:39 pm A domme images are shown randomly, could you please make it by file name?
My Domme images are normally sorted to be become more scantily glad as it goes further down the list. In TAI, when it reached the end of the list, I think it just switched to a different image set, starting at the top again. TAJ, as you say, sticks with the same image set and shows images randomly.
I suppose it depends on the features of the Personality as to whether the experience would still be as desired by the author. Perhaps it could work, but I'm not sure. Are you running the Spicy personality?
I could look into it, but I'll be honest, it won't be a high priority for me to do it at the moment as I'm trying to help debug and fortify the existing functionality. If the feature does get added, I think it'll have to be a configuration option to choose between random or sequenced images. If GodDragon would be happy for me to take a look at that sort of change, I will do.
https://github.com/GodDragoner/TeaseAIJ ... ector.java if that is not working for you, we need to debug it.
In spicy it is also overwritten by a custom implementation:
https://github.com/GodDragoner/Spicy-TA ... elector.js
It could be that you don't have any fully dressed and face images of your domme? But now that you are mentioning it I am actually a bit confused because I don't think the spicy picture selector was supposed to left in this awkward state
Sequenced images can be added for sure, but I guess if the current selector is actually functional and not broken it should be superior to sequence anyway.
- FrozenWolf
- Explorer At Heart

- Posts: 434
- 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)
Good stuff. I think when looking back at it, the only thing that might be different is that the new onCall() methods take Integers as duration values whereas you tweaked the original version to accept Numbers to cope with fractional values. I was doing a cross-comparison at the the time with the sendMessage implementation that only deals with Integers as duration values and probably got my wires crossed. Do you think that all of the API functions that accept durations should handle fractions (even if they're rounded to the nearest integer)? The actual media functions could even use the Duration type for stronger internal consistency.GodDragon wrote: Sun Jan 24, 2021 1:47 am All pull requests look good to me. I'll take a closer look though.
Generally the reflection is a great idea I haven't thought of actually. I didn't think of using reflection since like the function already had everything I wanted but that's definitely a bit cleaner and more readable.
I did have a go at modifying the original, and my poor brain couldn't handle itGodDragon wrote: Sun Jan 24, 2021 1:47 am The html chat tag function is also great! Appreciate the work you put into it. Since ski implemented this and I only added the image tag back then (but for some reason he changed it back and then it was apparently left in this state) I never found the time (since it "worked" and I focused on spicy) to do a proper OOP rewriting of this.
Are any other parts of TAJ that you'd like me to look at? I could look into the other API implementations and convert those to use reflection too; it might weed out other some other bugs. Other than that I'll just see if I can find potential issues.
Author of:
MiloDB: Finding Old Teases
-
GodDragon
- Explorer At Heart

- Posts: 795
- 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)
I made it accept fractional values since for some reason the behaviour of Nashorn seemed to change from Java Version to Java Version. Beforehand I provided the JavaScript call with a 1 and it would yield a 1 as an integer, but in a higher Java Version it ended up being translated to a double in java and thus broke it. Additionally there might be cases where in JavaScript these Integers are calculated using float precision and then casting it just to get it to be a valid parameter seems to much for me. I think it should indeed accept fractional values just for the case of safety. I couldn't guarantee Spicy wouldn't break without the support for it.FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm Good stuff. I think when looking back at it, the only thing that might be different is that the new onCall() methods take Integers as duration values whereas you tweaked the original version to accept Numbers to cope with fractional values. I was doing a cross-comparison at the the time with the sendMessage implementation that only deals with Integers as duration values and probably got my wires crossed. Do you think that all of the API functions that accept durations should handle fractions (even if they're rounded to the nearest integer)? The actual media functions could even use the Duration type for stronger internal consistency.
Well, yes indeed reworking the other API calls might be worth a shot.FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm I did have a go at modifying the original, and my poor brain couldn't handle it. Luckily I've got enough spare time at the moment to be able to tackle bits like this.
Are any other parts of TAJ that you'd like me to look at? I could look into the other API implementations and convert those to use reflection too; it might weed out other some other bugs. Other than that I'll just see if I can find potential issues.
Apart from that the statistic system was made by ski (I don't use it aynway, dunno if any personality would use it rather than use a custom one, but since I never used it it could need a major rework, because from what I've seen the code isn't optimal in my eyes.
Same goes for the Personality Settings, although I think that one looks better and I've made a few minor changes to fix some things back then.
The Lazy Sub Interface could be prettier and alllow for more and custom options possibly.
The Image ripping from reddit (using a library) was implemented by ski too, so no idea how that one compares.
I mean design wise TAJ could be a bit prettier or allow the theme to change more than that if you want to dig into that.
Estim integration was also made by ski, I can't really test it anyway, since I am lacking such a device for now.
Re: [Tease Program] Tease-AI Java (1.3)
The old Tease-AI have the ability to read op text.
Will it be possible to add this the the Java edition?
Will it be possible to add this the the Java edition?
-
GodDragon
- Explorer At Heart

- Posts: 795
- 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)
op text?SettlersX wrote: Tue Jan 26, 2021 11:19 pm The old Tease-AI have the ability to read op text.
Will it be possible to add this the the Java edition?
There is already an option for text to speech in the settings.
Re: [Tease Program] Tease-AI Java (1.3)
You are right. I cannot read....
- FrozenWolf
- Explorer At Heart

- Posts: 434
- 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)
Ah, I'd heard about that somewhere, that makes sense now.GodDragon wrote: Mon Jan 25, 2021 7:07 pmI made it accept fractional values since for some reason the behaviour of Nashorn seemed to change from Java Version to Java Version. Beforehand I provided the JavaScript call with a 1 and it would yield a 1 as an integer, but in a higher Java Version it ended up being translated to a double in java and thus broke it. Additionally there might be cases where in JavaScript these Integers are calculated using float precision and then casting it just to get it to be a valid parameter seems to much for me. I think it should indeed accept fractional values just for the case of safety. I couldn't guarantee Spicy wouldn't break without the support for it.FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm Good stuff. I think when looking back at it, the only thing that might be different is that the new onCall() methods take Integers as duration values whereas you tweaked the original version to accept Numbers to cope with fractional values. I was doing a cross-comparison at the the time with the sendMessage implementation that only deals with Integers as duration values and probably got my wires crossed. Do you think that all of the API functions that accept durations should handle fractions (even if they're rounded to the nearest integer)? The actual media functions could even use the Duration type for stronger internal consistency.
I've made some changes to the CustomFunctionExtended that now supports more intelligent matching and I've been running with it for over a week now without any issues. For example, the implementation of sendMessage() has the following handlers:
Code: Select all
void onCall(String message);
void onCall(String message, Number durationSeconds);
void onCall(String message, String imagePath);
void onCall(String message, Number durationSeconds, Boolean showTyping);
Code: Select all
sendMessage("foo");
sendMessage("foo", 1);
sendMessage("foo", 1.5);
sendMessage("foo", "bar");
sendMessage("foo", 1, true);
sendMessage("foo", 1.5, false);
Great, I've been working through a bunch of the more complex ones. As part of testing them, I found quite a few issues with the audio and video playback, although most of the issues are associated with specifying media with unknown codecs, or missing media. The API part works fine thoughGodDragon wrote: Mon Jan 25, 2021 7:07 pmWell, yes indeed reworking the other API calls might be worth a shot.FrozenWolf wrote: Mon Jan 25, 2021 5:34 pm I did have a go at modifying the original, and my poor brain couldn't handle it. Luckily I've got enough spare time at the moment to be able to tackle bits like this.
Are any other parts of TAJ that you'd like me to look at? I could look into the other API implementations and convert those to use reflection too; it might weed out other some other bugs. Other than that I'll just see if I can find potential issues.
The current API for playVideo and playAudio returns the MediaPlayer object. I couldn't find anywhere where that return value was used, and I think it would be better to return null and encapsulate the MediaPlayer behind the API because of the need to carefully manage it. Do you have any thoughts on that?
The current pull request for the API, https://github.com/GodDragoner/TeaseAIJava/pull/24 is still valid and doesn't include any of the experimental MediaHandler API changes.
That's a great list, thanks. I've tried to track roughly what I'm doing through a wiki page:GodDragon wrote: Mon Jan 25, 2021 7:07 pm Apart from that the statistic system was made by ski (I don't use it aynway, dunno if any personality would use it rather than use a custom one, but since I never used it it could need a major rework, because from what I've seen the code isn't optimal in my eyes.
Same goes for the Personality Settings, although I think that one looks better and I've made a few minor changes to fix some things back then.
The Lazy Sub Interface could be prettier and alllow for more and custom options possibly.
The Image ripping from reddit (using a library) was implemented by ski too, so no idea how that one compares.
I mean design wise TAJ could be a bit prettier or allow the theme to change more than that if you want to dig into that.
Estim integration was also made by ski, I can't really test it anyway, since I am lacking such a device for now.
https://github.com/FrozenWolf4887/Tease ... activities
I can change the order around to see what would suit us best; feel free to make requests!
Author of:
MiloDB: Finding Old Teases
-
ThePurpleSnowglobe
- Explorer

- Posts: 5
- Joined: Sun Feb 07, 2021 10:55 pm
- I am a: Switch
Re: [Tease Program] Tease-AI Java (1.3)
I have a question regarding the Tumblr images issue, mentioned in the pull request #23 by FrozenWolf. In my understandig this fix was included in the version 1.3 of TAJ, so the issue should be resolved, I guess.
The thing is, I still expierence this problem. While playing Spicy I get lots and lots of black screens. After every session the Downloaded Images folder is filled with seemingly corrupted images. By closer inspection I noticed that these files, though having the normal .jpg, .gif extensions in reality containing HTML code of a tumblr page with the actual image embeded.
I am using Windows 10 and started TAJ two weeks ago (after several months of abstinence) when it updated to version 1.3 automatically. Only thereafter I installed and configured Spicy. At first I missed to configure a media folder for tease images and so I thought the black screens were my fault of having something else not configured correctly. Only recently I discorved what was going on in the Downloaded Images folder.
The thing is, I still expierence this problem. While playing Spicy I get lots and lots of black screens. After every session the Downloaded Images folder is filled with seemingly corrupted images. By closer inspection I noticed that these files, though having the normal .jpg, .gif extensions in reality containing HTML code of a tumblr page with the actual image embeded.
I am using Windows 10 and started TAJ two weeks ago (after several months of abstinence) when it updated to version 1.3 automatically. Only thereafter I installed and configured Spicy. At first I missed to configure a media folder for tease images and so I thought the black screens were my fault of having something else not configured correctly. Only recently I discorved what was going on in the Downloaded Images folder.
