[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

GodDragon
Explorer At Heart
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.2.2)

Post by GodDragon »

Triple Alfa wrote: Mon May 04, 2020 6:29 pm The reason why I did it this way was because starting the session is a guarantee, but finishing is not. And I don't really like the idea of assuming it is the first session if a variable is not set. In the end it doesn't matter if everything goes right of course.
Spicy does it like this:

Code: Select all

//Real interaction starts here!
if(!getVar(VARIABLE.FINISHED_SETUP, false)) run("Startup/Setup.js");

if(!getVar(VARIABLE.FINISHED_FIRST_SESSION, false)) run("Session/FirstSession.js");
But you can do it however you want to.
Triple Alfa wrote: Mon May 04, 2020 6:29 pm Now the last two lines are duplicated again, but there is an extra empty line before the duplicates.
I guess it's just because of rapid saving. Nothing too important for now.
Triple Alfa wrote: Mon May 04, 2020 6:29 pm I also wanted to ask, what IDE are you using or would recommend? I didn't have anything installed on this PC, so I'm just using notepad++ atm. I have amateur experience with visual studio coding in c#. Which basically means I used 1% of what it could do and probably understood just as much. :-D
I am using: https://www.jetbrains.com/webstorm/
Incredibly useful for that development imo.
There are many ways out there to activate their programs indefinetly without paying. No sketchy software but just look up "jetbrains license server list" on google for example.
In case you are a student or working on open source projects like me you can easily apply to get all free officially
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

GodDragon wrote: Mon May 04, 2020 8:58 pm I am using: https://www.jetbrains.com/webstorm/
Incredibly useful for that development imo.
There are many ways out there to activate their programs indefinetly without paying. No sketchy software but just look up "jetbrains license server list" on google for example.
In case you are a student or working on open source projects like me you can easily apply to get all free officially
I managed to get it work through "other means".
I'm already glad I did. You don't know what you're missing until you go back to a proper IDE.
I added your API.js for the IDE. Do you have any other tips/tricks or recommendations?
Currently my project just has the scope of my personality in the TAJ/Personalities folder. Is there any way to launch TAJ from within the IDE for testing?

Unrelated to the IDE:
I've somehow created a big problem.
What I did was: Add "addSettingsPanel("Domme Settings");" to programstart.js, load Variables.js in programstart.js(so I could migrate settings to the new variables system), and add:

Code: Select all

if (getVar(VARIABLE.DOMME_USES_FRENCH, null) == null){
        setVar(VARIABLE.DOMME_USES_FRENCH, false);
    }
    registerVariable(VARIABLE.DOMME_USES_FRENCH, "Domme uses some french", "The domme will use some french words to highlight her french origin."
    addCheckBox("Domme Settings", VARIABLE.DOMME_USES_FRENCH);
to my GUIutils.js that sets up the GUI.

Now I'm getting the following exception even with all the changes reverted:

Code: Select all

11:07:29 am INFO: Checking libraries for updates...
11:07:29 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
11:07:29 am INFO: Libraries checked and up-to-date.
11:07:29 am INFO: Initialization done.
11:07:30 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
11:07:31 am INFO: Personality 'Amelie' version 0.0.1 loaded.
11:07:31 am INFO: Personality 'Default Personality' version 1.0 loaded.
11:07:34 am INFO: Loaded 0 picture sets for Widowmaker
11:07:34 am INFO: Loaded 0 picture sets for Tracer
11:07:34 am INFO: Loaded 0 picture sets for Pharah
11:07:34 am INFO: Loaded 0 picture sets for Brigitte
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at me.goddragon.teaseai.gui.settings.PersonalitySettings.addPersonalityGUIs(PersonalitySettings.java:102)
	at me.goddragon.teaseai.gui.settings.PersonalitySettings.initiate(PersonalitySettings.java:35)
	at me.goddragon.teaseai.gui.settings.SettingsController.initiate(SettingsController.java:272)
	at me.goddragon.teaseai.gui.settings.SettingsController.openGUI(SettingsController.java:307)
	at me.goddragon.teaseai.gui.main.MainGuiController$5.handle(MainGuiController.java:312)
	at me.goddragon.teaseai.gui.main.MainGuiController$5.handle(MainGuiController.java:309)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
	at javafx.graphics/javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3564)
	at javafx.graphics/javafx.scene.Scene$ClickGenerator.access$8200(Scene.java:3492)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3860)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
	at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1849)
	at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
	at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556)
	at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
	at java.base/java.lang.Thread.run(Thread.java:832)
Even having just the following in programstart.js is too much:

Code: Select all

addSettingsPanel("Personality Settings");
addSettingsPanel("Domme Settings");
addSettingsPanel("Image Settings");
addSettingsPanel("Video Settings");
addSettingsPanel("Debug Settings");
(Even adding just the debug panel doesn't work.)

When I open Settings > Personality the Amelie sub-tab is gone again.
Only a completely empty programstart.js will bring the Amelie sub-tab back and eliminates the exception.
With programstart.js empty the Amelie sub-tab now contains a General Settings tab that contains all checkboxes from my GUIutils, but not the new "Domme uses some french".(only checkboxes, no other setting types.)
Importantly it also contains a checkbox that shouldn't be there anymore "Rapid Testing".
My GUIutils.js does not contain any reference to "Rapid Testing", so this is a remnant from what I used before from Mischevious.
I also find it a bit odd that the checkboxes are even there at all if my GUIutils.js never gets loaded. Is this just because there are associated variables?
GodDragon
Explorer At Heart
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.2.2)

Post by GodDragon »

Triple Alfa wrote: Tue May 05, 2020 9:47 am
GodDragon wrote: Mon May 04, 2020 8:58 pm I am using: https://www.jetbrains.com/webstorm/
Incredibly useful for that development imo.
There are many ways out there to activate their programs indefinetly without paying. No sketchy software but just look up "jetbrains license server list" on google for example.
In case you are a student or working on open source projects like me you can easily apply to get all free officially
I managed to get it work through "other means".
I'm already glad I did. You don't know what you're missing until you go back to a proper IDE.
I added your API.js for the IDE. Do you have any other tips/tricks or recommendations?
Currently my project just has the scope of my personality in the TAJ/Personalities folder. Is there any way to launch TAJ from within the IDE for testing?

Unrelated to the IDE:
I've somehow created a big problem.
What I did was: Add "addSettingsPanel("Domme Settings");" to programstart.js, load Variables.js in programstart.js(so I could migrate settings to the new variables system), and add:

Code: Select all

if (getVar(VARIABLE.DOMME_USES_FRENCH, null) == null){
        setVar(VARIABLE.DOMME_USES_FRENCH, false);
    }
    registerVariable(VARIABLE.DOMME_USES_FRENCH, "Domme uses some french", "The domme will use some french words to highlight her french origin."
    addCheckBox("Domme Settings", VARIABLE.DOMME_USES_FRENCH);
to my GUIutils.js that sets up the GUI.

Now I'm getting the following exception even with all the changes reverted:

Code: Select all

11:07:29 am INFO: Checking libraries for updates...
11:07:29 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
11:07:29 am INFO: Libraries checked and up-to-date.
11:07:29 am INFO: Initialization done.
11:07:30 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
11:07:31 am INFO: Personality 'Amelie' version 0.0.1 loaded.
11:07:31 am INFO: Personality 'Default Personality' version 1.0 loaded.
11:07:34 am INFO: Loaded 0 picture sets for Widowmaker
11:07:34 am INFO: Loaded 0 picture sets for Tracer
11:07:34 am INFO: Loaded 0 picture sets for Pharah
11:07:34 am INFO: Loaded 0 picture sets for Brigitte
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at me.goddragon.teaseai.gui.settings.PersonalitySettings.addPersonalityGUIs(PersonalitySettings.java:102)
	at me.goddragon.teaseai.gui.settings.PersonalitySettings.initiate(PersonalitySettings.java:35)
	at me.goddragon.teaseai.gui.settings.SettingsController.initiate(SettingsController.java:272)
	at me.goddragon.teaseai.gui.settings.SettingsController.openGUI(SettingsController.java:307)
	at me.goddragon.teaseai.gui.main.MainGuiController$5.handle(MainGuiController.java:312)
	at me.goddragon.teaseai.gui.main.MainGuiController$5.handle(MainGuiController.java:309)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
	at javafx.graphics/javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3564)
	at javafx.graphics/javafx.scene.Scene$ClickGenerator.access$8200(Scene.java:3492)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3860)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
	at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1849)
	at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
	at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556)
	at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
	at java.base/java.lang.Thread.run(Thread.java:832)
Even having just the following in programstart.js is too much:

Code: Select all

addSettingsPanel("Personality Settings");
addSettingsPanel("Domme Settings");
addSettingsPanel("Image Settings");
addSettingsPanel("Video Settings");
addSettingsPanel("Debug Settings");
(Even adding just the debug panel doesn't work.)

When I open Settings > Personality the Amelie sub-tab is gone again.
Only a completely empty programstart.js will bring the Amelie sub-tab back and eliminates the exception.
With programstart.js empty the Amelie sub-tab now contains a General Settings tab that contains all checkboxes from my GUIutils, but not the new "Domme uses some french".(only checkboxes, no other setting types.)
Importantly it also contains a checkbox that shouldn't be there anymore "Rapid Testing".
My GUIutils.js does not contain any reference to "Rapid Testing", so this is a remnant from what I used before from Mischevious.
I also find it a bit odd that the checkboxes are even there at all if my GUIutils.js never gets loaded. Is this just because there are associated variables?
Well you could configure the run option of webstorm to execute your TAJ jar but that wouldn't hold any debugging benefit. Since I am also coding in the Java Code of TAJ I have IntelliJ up and running which runs the jar and also allows for debugging.

Try this build. Since ski coded this part I am partly lost in his code. His coding style isn't that similar to mine so I have to comment everything once I understood what it actually does.
Attachments
TeaseAi.zip
(903.5 KiB) Downloaded 81 times
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

GodDragon wrote: Tue May 05, 2020 1:16 pm Well you could configure the run option of webstorm to execute your TAJ jar but that wouldn't hold any debugging benefit. Since I am also coding in the Java Code of TAJ I have IntelliJ up and running which runs the jar and also allows for debugging.

Try this build. Since ski coded this part I am partly lost in his code. His coding style isn't that similar to mine so I have to comment everything once I understood what it actually does.
I couldn't figure out how to configure the run option to run a specific file, but it's not that big of a deal. I just keep the folder open on my second monitor most of the time.

The exception is gone and the GUI works(including the newly added option referring to the new variable system), but there is still a "General Settings"-tab that now contains "Rapid Testing" and "Debug Mode". Neither of which should be there and the "General Settings"-tab shouldn't exist either.
GodDragon
Explorer At Heart
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.2.2)

Post by GodDragon »

Triple Alfa wrote: Tue May 05, 2020 2:21 pm
GodDragon wrote: Tue May 05, 2020 1:16 pm Well you could configure the run option of webstorm to execute your TAJ jar but that wouldn't hold any debugging benefit. Since I am also coding in the Java Code of TAJ I have IntelliJ up and running which runs the jar and also allows for debugging.

Try this build. Since ski coded this part I am partly lost in his code. His coding style isn't that similar to mine so I have to comment everything once I understood what it actually does.
I couldn't figure out how to configure the run option to run a specific file, but it's not that big of a deal. I just keep the folder open on my second monitor most of the time.

The exception is gone and the GUI works(including the newly added option referring to the new variable system), but there is still a "General Settings"-tab that now contains "Rapid Testing" and "Debug Mode". Neither of which should be there and the "General Settings"-tab shouldn't exist either.
Just delete these two variable files from your variable folder. I just reverted the system ski created where supported variable tags are saved to the files aswell, which is useless and additionally makes it so even if you don't register a variable anymore it will still recognize it as registered and fill in all the tags if it was registered before.
The general tab is automatically created IF you have supported variables that are not assigned to a certain other settings window.
It's ski's work so I am just figuring that all out in depth.
I just created a save and restore session function. Which cannot jump back into the line you were in but extracts and saves all temporary variables aswell so you can restore them at a point and then it asks you to pick a .js file similar to the run option to continue from. This will be helpful for spicy because if something has stopped working you will be able to backup the current session, restart TAJ, restore the session alongside the temp variables in memory and then just run the Decide Module Part or something along those lines again to get partly back into buisness.
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

GodDragon wrote: Tue May 05, 2020 4:11 pm Just delete these two variable files from your variable folder. I just reverted the system ski created where supported variable tags are saved to the files aswell, which is useless and additionally makes it so even if you don't register a variable anymore it will still recognize it as registered and fill in all the tags if it was registered before.
The general tab is automatically created IF you have supported variables that are not assigned to a certain other settings window.
It's ski's work so I am just figuring that all out in depth.
I just created a save and restore session function. Which cannot jump back into the line you were in but extracts and saves all temporary variables aswell so you can restore them at a point and then it asks you to pick a .js file similar to the run option to continue from. This will be helpful for spicy because if something has stopped working you will be able to backup the current session, restart TAJ, restore the session alongside the temp variables in memory and then just run the Decide Module Part or something along those lines again to get partly back into buisness.
Where is this variable folder? Maybe I'm blind but I don't see it in the main directory. Where does TAJ store its variables?
Edit: Found it.

I also had one question/suggestion. Is it possible to change the color of the typing text?("%domName% is Typing") As it is currently not very legible on the default background.
GodDragon
Explorer At Heart
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.2.2)

Post by GodDragon »

Triple Alfa wrote: Tue May 05, 2020 5:54 pm
GodDragon wrote: Tue May 05, 2020 4:11 pm Just delete these two variable files from your variable folder. I just reverted the system ski created where supported variable tags are saved to the files aswell, which is useless and additionally makes it so even if you don't register a variable anymore it will still recognize it as registered and fill in all the tags if it was registered before.
The general tab is automatically created IF you have supported variables that are not assigned to a certain other settings window.
It's ski's work so I am just figuring that all out in depth.
I just created a save and restore session function. Which cannot jump back into the line you were in but extracts and saves all temporary variables aswell so you can restore them at a point and then it asks you to pick a .js file similar to the run option to continue from. This will be helpful for spicy because if something has stopped working you will be able to backup the current session, restart TAJ, restore the session alongside the temp variables in memory and then just run the Decide Module Part or something along those lines again to get partly back into buisness.
Where is this variable folder? Maybe I'm blind but I don't see it in the main directory. Where does TAJ store its variables?
Edit: Found it.

I also had one question/suggestion. Is it possible to change the color of the typing text?("%domName% is Typing") As it is currently not very legible on the default background.
No that is currently not possible I could add it to the theme gui though.
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

GodDragon wrote: Tue May 05, 2020 8:25 pm No that is currently not possible I could add it to the theme gui though.
That would be great.

I also have another technical question for you if you don't mind.
When asking a question to the sub I'm trying to convert the answer to an integer so I did this:

Code: Select all

answer = createInput();
answernumber = parseInt(answer);
But if I input "0" in the chat my debug tells me answernumber is NaN. Why is that and how do I solve that problem?

Edit: I think I found my answer.

Code: Select all

answernumber = answer.getInt();
Edit2: Yeah that works.

I wish there was a faster way to test big modules. It takes forever to get to where I'm editing now. I guess I could start commenting out stuff, but that won't work when things rely on happening in sequence.
GodDragon
Explorer At Heart
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.2.2)

Post by GodDragon »

Triple Alfa wrote: Tue May 05, 2020 9:40 pm
GodDragon wrote: Tue May 05, 2020 8:25 pm No that is currently not possible I could add it to the theme gui though.
That would be great.

I also have another technical question for you if you don't mind.
When asking a question to the sub I'm trying to convert the answer to an integer so I did this:

Code: Select all

answer = createInput();
answernumber = parseInt(answer);
But if I input "0" in the chat my debug tells me answernumber is NaN. Why is that and how do I solve that problem?

Edit: I think I found my answer.

Code: Select all

answernumber = answer.getInt();
Edit2: Yeah that works.

I wish there was a faster way to test big modules. It takes forever to get to where I'm editing now. I guess I could start commenting out stuff, but that won't work when things rely on happening in sequence.
You should check isInt() before you are getting the int to make sure the answer is an int. The answer you were trying to parse in your first example is an answer object. If you'd want to parse it yourself you could use parseInt(answer.getAnswer())
Example of Spicy getting an integer: https://github.com/GodDragoner/Spicy-TA ... ion.js#L97

Well how would you otherwise test it? You can comment out stuff or skip stuff using a some kind of test boolean or whatever.
You can also set typing speed to instant, overwrite the sendMessage function and if you have testing enabled you could set the message delay of each message to 0. This should potentially race through all the normal messages of your module

Edit:
This should work for rapid text message aswell without overwriting anything

Code: Select all

const TAJ_CHAT_HANDLER = Java.type('me.goddragon.teaseai.api.chat.ChatHandler');
const RAPID_TESTING = true;

if(RAPID_TESTING) {
    TAJ_CHAT_HANDLER.getHandler().setPerMessageCharacterPauseMillis(0);
    TAJ_CHAT_HANDLER.getHandler().setPausePerMessageCharacter(false);
}
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

GodDragon wrote: Wed May 06, 2020 11:48 am You should check isInt() before you are getting the int to make sure the answer is an int. The answer you were trying to parse in your first example is an answer object. If you'd want to parse it yourself you could use parseInt(answer.getAnswer())
Example of Spicy getting an integer: https://github.com/GodDragoner/Spicy-TA ... ion.js#L97
Yeah I figured it out when I got to the answer page on the wiki.
Well how would you otherwise test it? You can comment out stuff or skip stuff using a some kind of test boolean or whatever.
You can also set typing speed to instant, overwrite the sendMessage function and if you have testing enabled you could set the message delay of each message to 0. This should potentially race through all the normal messages of your module
I already put typing to instant, the problem is just the message delay.
Edit:
This should work for rapid text message aswell without overwriting anything

Code: Select all

const TAJ_CHAT_HANDLER = Java.type('me.goddragon.teaseai.api.chat.ChatHandler');
const RAPID_TESTING = true;

if(RAPID_TESTING) {
    TAJ_CHAT_HANDLER.getHandler().setPerMessageCharacterPauseMillis(0);
    TAJ_CHAT_HANDLER.getHandler().setPausePerMessageCharacter(false);
}
If this works that's great, but I also need a way to turn it off before the point I'm testing.
What is the default value for "setPerMessageCharacterPauseMillis"? That way I can set it back to normal before the testing area of my code.

I also wanted to mention something I forgot. When I first named my personality I named it Amélie. TAJ did not like the special character "é" replacing it with some symbols. I then renamed it to Amelie to avoid any further issues.
Since characters like that are commonplace in a lot of languages it would be great if there was support for it. This is assuming there are no other concerns such as support on the OS level.

Edit:
The rapid testing is doing great work, makes testing MUCH faster, so thank you very much for that. (I'm still unsure what the proper value for "setPerMessageCharacterPauseMillis" is, but I've settled on 150 for now.)

I wanted to ask you about Lazy Sub. The Chat Methods page of the wiki taught me how to add to it via createInput(). What it didn't teach me however is how to remove the added options once they are there.
Also it would be great if there was a way to add dynamic answers to Lazy Sub without having to call createInput(). The purpose of this would be to not give away to the sub when the appropriate time is to use the options.(I'm trying to use it for a simple "thank you".)

Edit2:
I hope I'm not throwing too much at you all at once, but another thing just came up.
I'm trying to give the sub a chance to say thank you without telling him to do so. My first thought was just to add to Lazy Sub and call it a day, but since I wanted to encourage players not to use Lazy Sub(as forgetting honorifics is fun :D) that isn't ideal.
So I would love for there to be a boolean added to createInput() that stops the input from timing out while the sub is typing.
This way they would not have to rely on Lazy Sub and I wouldn't have to make the timeout time way too long.

Btw, does sendMessage() accept any code to make words/letters bold or italic?

Edit3:
Small bug report. When loading an image with ShowImage() the following lines of codes are run while the image is still loading. This can cause unwanted effects such as the chat being frozen during image loading and catching up with multiple messages after loading is done. This has been mostly noticeable with rapid testing, but may have effects during normal play too.(I can imagine issues with timing, or playing audio as well.)
GodDragon
Explorer At Heart
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.2.2)

Post by GodDragon »

Triple Alfa wrote: Thu May 07, 2020 6:46 am If this works that's great, but I also need a way to turn it off before the point I'm testing.
What is the default value for "setPerMessageCharacterPauseMillis"? That way I can set it back to normal before the testing area of my code.
It's 100: https://github.com/GodDragoner/TeaseAIJ ... r.java#L42
Triple Alfa wrote: Thu May 07, 2020 6:46 am I also wanted to mention something I forgot. When I first named my personality I named it Amélie. TAJ did not like the special character "é" replacing it with some symbols. I then renamed it to Amelie to avoid any further issues.
Since characters like that are commonplace in a lot of languages it would be great if there was support for it. This is assuming there are no other concerns such as support on the OS level.
Dunno, but I guess it could be caused by OS support stuff.
Triple Alfa wrote: Thu May 07, 2020 6:46 am Edit:
The rapid testing is doing great work, makes testing MUCH faster, so thank you very much for that. (I'm still unsure what the proper value for "setPerMessageCharacterPauseMillis" is, but I've settled on 150 for now.)

I wanted to ask you about Lazy Sub. The Chat Methods page of the wiki taught me how to add to it via createInput(). What it didn't teach me however is how to remove the added options once they are there.
Also it would be great if there was a way to add dynamic answers to Lazy Sub without having to call createInput(). The purpose of this would be to not give away to the sub when the appropriate time is to use the options.(I'm trying to use it for a simple "thank you".)
answer::addOption(String optionMessage) Adds an option to the lazy sub interface that sends the message provided when clicked

answer::addOption(String optionName, String optionMessage) Adds an option to the lazy sub interface and sends the message provided when clicked

answer::clearOptions() Clears all non default options from the lazy sub interface, always use when done with an answer unless you want those options to remain available

https://github.com/GodDragoner/TeaseAIJ ... wer-Object
Triple Alfa wrote: Thu May 07, 2020 6:46 am Edit2:
I hope I'm not throwing too much at you all at once, but another thing just came up.
I'm trying to give the sub a chance to say thank you without telling him to do so. My first thought was just to add to Lazy Sub and call it a day, but since I wanted to encourage players not to use Lazy Sub(as forgetting honorifics is fun :D) that isn't ideal.
So I would love for there to be a boolean added to createInput() that stops the input from timing out while the sub is typing.
This way they would not have to rely on Lazy Sub and I wouldn't have to make the timeout time way too long.

Btw, does sendMessage() accept any code to make words/letters bold or italic?
Right now there is no such boolean but I have done it in Spicy multiple times. Well not like not timing out but I guess 5 seconds is enough to type thank you mistress. There is a lazy sub option for that. However I can add that no timeout thing. Might even make it default because I think a hard time out is rarer than a wait for sub typing thing.

Spicy doing stuff like that:
https://github.com/GodDragoner/Spicy-TA ... il.js#L272

Edit:
Yes in your current build it should be fully functionining: you can do this: "It's not like you <i>have</i> to cum anyway"
Same goes for <b> and you can also do this: "It's not like you <i, b>have</i> to cum anyway" to make it bold and italic
Triple Alfa wrote: Thu May 07, 2020 6:46 am Edit3:
Small bug report. When loading an image with ShowImage() the following lines of codes are run while the image is still loading. This can cause unwanted effects such as the chat being frozen during image loading and catching up with multiple messages after loading is done. This has been mostly noticeable with rapid testing, but may have effects during normal play too.(I can imagine issues with timing, or playing audio as well.)
Hmmm. If I was to wait for images to load it might slow down the experience but I guess I can try it.
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

GodDragon wrote: Thu May 07, 2020 2:06 pm It's 100: https://github.com/GodDragoner/TeaseAIJ ... r.java#L42
Thank you. Btw I had no idea that TAJ was on github.
Dunno, but I guess it could be caused by OS support stuff.
Does this mean that you can name a personality with "é" with no issues?
I'm on English Windows 10 and I can name folders and files with "é" no problem.
It's just TAJ that doesn't display it correctly in the personality list. Since I thought it might be more than just a display issue I was cautious and decided to rename.
answer::addOption(String optionMessage) Adds an option to the lazy sub interface that sends the message provided when clicked

answer::addOption(String optionName, String optionMessage) Adds an option to the lazy sub interface and sends the message provided when clicked

answer::clearOptions() Clears all non default options from the lazy sub interface, always use when done with an answer unless you want those options to remain available

https://github.com/GodDragoner/TeaseAIJ ... wer-Object
I did not realize that the Lazy Sub Dynamic Answers were tied to the answer object.
But this does mean that there is no way to add to the Lazy Sub without an answer object having been created.
So If I wanted to have say "Thank You" and "Thank You Mistress" added to the Lazy Sub before any questions were asked to the sub, would it be safe to do:

Code: Select all

answer = createInput("Thank You", "Thank You Mistress");
without actually using the answer object for anything?
Right now there is no such boolean but I have done it in Spicy multiple times. Well not like not timing out but I guess 5 seconds is enough to type thank you mistress. There is a lazy sub option for that. However I can add that no timeout thing. Might even make it default because I think a hard time out is rarer than a wait for sub typing thing.

Spicy doing stuff like that:
https://github.com/GodDragoner/Spicy-TA ... il.js#L272
The problem with the typing is twofold. You don't know how fast people can type(especially with one hand) and you also have no control over when people realize that they need to type.(Like with my current "thank you" implementation where I'm actually trying to distract subs into not realizing on time.)
Hmmm. If I was to wait for images to load it might slow down the experience but I guess I can try it.
Another possibility would be to add a boolean option to showImage() that enables/disables waiting for loading. But since the loading seems to actually freeze the chat I think there might be more issues to resolve if you leave the current way in.


I also want to reiterate a question as you seem to have missed it: Does sendMessage() accept any code to make words/letters bold or italic?
Using capital letters is often appropriate for emphasis, but sometimes you need something more subtle.

Thank you again for all the help. It's also great to have a back and forth with you.
GodDragon
Explorer At Heart
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.2.2)

Post by GodDragon »

Triple Alfa wrote: Thu May 07, 2020 4:42 pm Does this mean that you can name a personality with "é" with no issues?
I'm on English Windows 10 and I can name folders and files with "é" no problem.
It's just TAJ that doesn't display it correctly in the personality list. Since I thought it might be more than just a display issue I was cautious and decided to rename.
No, I haven't tested that yet. I just said that this might be because Java is cross plattform compatible and stuff. But I can look into it.
Triple Alfa wrote: Thu May 07, 2020 4:42 pm I did not realize that the Lazy Sub Dynamic Answers were tied to the answer object.
But this does mean that there is no way to add to the Lazy Sub without an answer object having been created.
So If I wanted to have say "Thank You" and "Thank You Mistress" added to the Lazy Sub before any questions were asked to the sub, would it be safe to do:

Code: Select all

answer = createInput("Thank You", "Thank You Mistress");
without actually using the answer object for anything?
You could just use:

Code: Select all

let AnswerClass = Java.type("me.goddragon.teaseai.TeaseAI.Answer");
let MyAnswerObject = new AnswerClass().addOption("Thank You", "Thank You Mistress") ;
to do it without sendInput etc. But yes you can obviously let createInput just rest. But createInput will wait for an input from the sub before continuing. So I would do what I just suggested.
Triple Alfa wrote: Thu May 07, 2020 4:42 pm The problem with the typing is twofold. You don't know how fast people can type(especially with one hand) and you also have no control over when people realize that they need to type.(Like with my current "thank you" implementation where I'm actually trying to distract subs into not realizing on time.)
Indeed. I will look into it.
Triple Alfa wrote: Thu May 07, 2020 4:42 pm Another possibility would be to add a boolean option to showImage() that enables/disables waiting for loading. But since the loading seems to actually freeze the chat I think there might be more issues to resolve if you leave the current way in.


I also want to reiterate a question as you seem to have missed it: Does sendMessage() accept any code to make words/letters bold or italic?
Using capital letters is often appropriate for emphasis, but sometimes you need something more subtle.
Yes, I will look into changing this to wait by default.

I have edited my previous answer to answer that last question but probably it was too late. So yea, it is possible. <i>test</i> should work with your current build (not the public one). Look into my previous post for mor examples. Or look into the code:
https://github.com/GodDragoner/TeaseAIJ ... .java#L109
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

GodDragon wrote: Thu May 07, 2020 5:48 pm You could just use:

Code: Select all

let AnswerClass = Java.type("me.goddragon.teaseai.TeaseAI.Answer");
let MyAnswerObject = new AnswerClass().addOption("Thank You", "Thank You Mistress") ;
to do it without sendInput etc. But yes you can obviously let createInput just rest. But createInput will wait for an input from the sub before continuing. So I would do what I just suggested.
I just tried that, but I'm getting a ClassNotFoundException:

Code: Select all

09:42:02 pm INFO: Checking libraries for updates...
09:42:02 pm INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
09:42:02 pm INFO: Libraries checked and up-to-date.
09:42:02 pm INFO: Initialization done.
09:42:03 pm INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
09:42:05 pm INFO: Personality 'Amelie' version 0.0.1 loaded.
09:42:05 pm INFO: Personality 'Default Personality' version 1.0 loaded.
09:42:08 pm INFO: Loaded 0 picture sets for Widowmaker
09:42:08 pm INFO: Loaded 0 picture sets for Tracer
09:42:08 pm INFO: Loaded 0 picture sets for Pharah
09:42:08 pm INFO: Loaded 0 picture sets for Brigitte
Set script thread!
Warning: Nashorn engine is planned to be removed from a future JDK release
09:42:11 pm INFO: Loaded 8 vocabularies.
09:42:11 pm INFO: Loaded 0 responses.
09:42:12 pm INFO: main: Beginning
Exception in thread "Thread-29" java.lang.RuntimeException: java.lang.ClassNotFoundException: me.goddragon.teaseai.TeaseAI.Answer
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:531)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:157)
	at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
	at me.goddragon.teaseai.api.scripts.ScriptHandler.runScript(ScriptHandler.java:191)
	at me.goddragon.teaseai.api.scripts.ScriptHandler.evalScript(ScriptHandler.java:172)
	at me.goddragon.teaseai.api.scripts.nashorn.RunFunction.call(RunFunction.java:30)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.JSObjectLinker.jsObjectScopeCall(JSObjectLinker.java:254)
	at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$4$\^eval\_/0x000000080114c440.:program(<eval>:9)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:157)
	at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
	at me.goddragon.teaseai.api.scripts.ScriptHandler.runScript(ScriptHandler.java:191)
	at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:145)
	at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:125)
	at me.goddragon.teaseai.api.session.Session$1.run(Session.java:41)
Caused by: java.lang.ClassNotFoundException: me.goddragon.teaseai.TeaseAI.Answer
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:435)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:427)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.Context.findClass(Context.java:1180)
	at jdk.scripting.nashorn/jdk.nashorn.internal.objects.NativeJava.simpleType(NativeJava.java:546)
	at jdk.scripting.nashorn/jdk.nashorn.internal.objects.NativeJava.type(NativeJava.java:326)
	at jdk.scripting.nashorn/jdk.nashorn.internal.objects.NativeJava.type(NativeJava.java:318)
	at jdk.scripting.nashorn/jdk.nashorn.internal.objects.NativeJava.type(NativeJava.java:314)
	at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$9$\^eval\_/0x00000008011b8840.:program(<eval>:5)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
	at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
	... 22 more
scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
	... 22 more
Edit:
Solved it!

Code should have been:

Code: Select all

let AnswerClass = Java.type('me.goddragon.teaseai.api.chat.Answer');
let MyAnswerObject = new AnswerClass().addOption("Thank You Mistress");
I have edited my previous answer to answer that last question but probably it was too late. So yea, it is possible. <i>test</i> should work with your current build (not the public one). Look into my previous post for mor examples. Or look into the code:
https://github.com/GodDragoner/TeaseAIJ ... .java#L109
Thank you, that is very helpful. I did indeed miss your edit.
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

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

Post by Triple Alfa »

Bug report:
Images in main viewer do not rescale when the window is resized.
Steps to repeat:
1) Start with TAJ in a small window.
2) Start personality that loads a high resolution image.
3) Enlarge TAJ to fullscreen.
4) The high-res image is now low-res.
5) Start with TAJ in fullscreen.
6) Start personality that loads a high resolution image.
7) Observe the difference.
Post Reply