[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

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 Apr 30, 2020 7:16 pm It's case sensitive. So it's addCheckBox and not addCheckbox :whistle:
Damn how did I miss that. Thank you for the debugging.

One more thing. I wanted to note that the existence of the programstart.js functionality does not seem to be indicated anywhere on the wiki. I noted it only because Mischevious used it. The wiki only talks about load.js and unload.js. What is different about load.js and programstart.js?

Oh and a very minor thing. The tooltips for the GUI elements I just added disappear after a few seconds. Makes it difficult to read longer descriptions.

Edit: Sorry to have to plague you with another issue, but the(now functional) new settings don't seem to save. If I start up TAJ, go into settings, change one or more of the settings, and close TAJ, the next time I start it up they are unchanged. Is there something I need to do on my end to get the variables to save?
Note that one of the variables is stuck on a setting that is not the default setting(I changed everything to default to false if null, but one is stuck on true), so I don't think I'm overwriting them.

Edit2: Somehow even the regular settings are not saving. I just tried to change "Preferred Tease Duration" in "General" and that didn't save either.

Edit3: Changing the domName and subName in the main screen DOES save.

Edit4: I just changed the domme and contacts' names and image paths and all were saved correctly.

Edit5: Back in the General tab the Font Size and Default Type Speed dropdowns seem to work fine, but Text to speech one is bugged. I changed it from Personality Decides to Disabled and that worked, but now I can't change it back. But I can set it to Enabled. Strange. The Debug Mode CheckBox also doesn't save.

Edit6: The one returning error in the logs is "10:32:37 pm SEVERE: Personality with name 'null' does not exist."

Edit7: I removed my personality and now the Debug Mode checkBox seems to save sometimes, but not always. I'm at a loss to what's going on.

Edit8: I found part of the issue! The Debug Mode checkBox will only save if I also change the Text to Speech dropdown from disabled to enabled or vice versa.

Edit9: Changing the Default Type Speed dropdown also enables saving of the Debug Mode checkBox.

Edit10: I put my personality back and this changes nothing. I also tried changing the checkBoxes I added and then changing one of the dropdowns in General, but unfortunately that does not work. They still won't save.

Edit11: Another hint. Changing a variable manually in the Variables sub-tab of the Personality tab WILL save it correctly, BUT after changing it the corresponding checkbox does not change. Only after exiting TAJ and reloading it does the checkbox update.

Edit12: The "Preferred Tease Duration" setting won't even be remembered after closing the settings window and reopening it.
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 Apr 30, 2020 7:44 pm
GodDragon wrote: Thu Apr 30, 2020 7:16 pm It's case sensitive. So it's addCheckBox and not addCheckbox :whistle:
Damn how did I miss that. Thank you for the debugging.

One more thing. I wanted to note that the existence of the programstart.js functionality does not seem to be indicated anywhere on the wiki. I noted it only because Mischevious used it. The wiki only talks about load.js and unload.js. What is different about load.js and programstart.js?

Oh and a very minor thing. The tooltips for the GUI elements I just added disappear after a few seconds. Makes it difficult to read longer descriptions.

Edit: Sorry to have to plague you with another issue, but the(now functional) new settings don't seem to save. If I start up TAJ, go into settings, change one or more of the settings, and close TAJ, the next time I start it up they are unchanged. Is there something I need to do on my end to get the variables to save?
Note that one of the variables is stuck on a setting that is not the default setting(I changed everything to default to false if null, but one is stuck on true), so I don't think I'm overwriting them.

Edit2: Somehow even the regular settings are not saving. I just tried to change "Preferred Tease Duration" in "General" and that didn't save either.

Edit3: Changing the domName and subName in the main screen DOES save.

Edit4: I just changed the domme and contacts' names and image paths and all were saved correctly.

Edit5: Back in the General tab the Font Size and Default Type Speed dropdowns seem to work fine, but Text to speech one is bugged. I changed it from Personality Decides to Disabled and that worked, but now I can't change it back. But I can set it to Enabled. Strange. The Debug Mode CheckBox also doesn't save.

Edit6: The one returning error in the logs is "10:32:37 pm SEVERE: Personality with name 'null' does not exist."

Edit7: I removed my personality and now the Debug Mode checkBox seems to save sometimes, but not always. I'm at a loss to what's going on.

Edit8: I found part of the issue! The Debug Mode checkBox will only save if I also change the Text to Speech dropdown from disabled to enabled or vice versa.

Edit9: Changing the Default Type Speed dropdown also enables saving of the Debug Mode checkBox.

Edit10: I put my personality back and this changes nothing. I also tried changing the checkBoxes I added and then changing one of the dropdowns in General, but unfortunately that does not work. They still won't save.

Edit11: Another hint. Changing a variable manually in the Variables sub-tab of the Personality tab WILL save it correctly, BUT after changing it the corresponding checkbox does not change. Only after exiting TAJ and reloading it does the checkbox update.

Edit12: The "Preferred Tease Duration" setting won't even be remembered after closing the settings window and reopening it.
Log? Or/and your whole code that is being executed so I can replicate the issue?
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 »

This is the last log:

Code: Select all

11:40:18 pm INFO: Checking libraries for updates...
11:40:18 pm INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
11:40:18 pm INFO: Libraries checked and up-to-date.
11:40:18 pm INFO: Initialization done.
11:40:19 pm INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
11:40:21 pm INFO: Personality 'Amelie' version 0.0.1 loaded.
11:40:21 pm INFO: Personality 'Default Personality' version 1.0 loaded.
11:40:24 pm INFO: Loaded 0 picture sets for Widowmaker
11:40:24 pm INFO: Loaded 0 picture sets for Tracer
11:40:24 pm INFO: Loaded 0 picture sets for Pharah
11:40:24 pm INFO: Loaded 0 picture sets for Sombra
11:40:24 pm SEVERE: Personality with name 'null' does not exist.
I'll send you a PM with the personality.

Edit: When I have the time I'll try it again with a fresh install. Since the problems also kept occurring without my personality installed.
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: Fri May 01, 2020 6:59 am This is the last log:

Code: Select all

11:40:18 pm INFO: Checking libraries for updates...
11:40:18 pm INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
11:40:18 pm INFO: Libraries checked and up-to-date.
11:40:18 pm INFO: Initialization done.
11:40:19 pm INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
11:40:21 pm INFO: Personality 'Amelie' version 0.0.1 loaded.
11:40:21 pm INFO: Personality 'Default Personality' version 1.0 loaded.
11:40:24 pm INFO: Loaded 0 picture sets for Widowmaker
11:40:24 pm INFO: Loaded 0 picture sets for Tracer
11:40:24 pm INFO: Loaded 0 picture sets for Pharah
11:40:24 pm INFO: Loaded 0 picture sets for Sombra
11:40:24 pm SEVERE: Personality with name 'null' does not exist.
I'll send you a PM with the personality.

Edit: When I have the time I'll try it again with a fresh install. Since the problems also kept occurring without my personality installed.
You are right. There were quite some bugs with that system. Ski23 created it and I haven't used it yet so I never experienced any bugs. It should work now, please check if it behaves like you are expecting it to behave. The newest build (no auto update scheduled for this yet) is attached.
Attachments
TeaseAi.zip
(902.84 KiB) Downloaded 69 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 »

Thank you for the update!

Everything seems to work fine except for two things:
1) Go to "Settings > Personality > Variables" and change a variable there.
2) Go to "Settings > Personality > Amelie"
3) The variable there is not updated to the new value.

and:

1) Go to "Settings > Personality > Variables" and select a variable there.
2) Go to "Settings > Personality > Amelie" and change that same variable there.
3) Go back to "Settings > Personality > Variables".
4) The selected variable is unchanged (visually).
5) Select a different variable.
6) Re-select the original variable.
7) It has now updated correctly.

Additionally my last log has three severe warnings:
1) The same warning as before: "01:16:10 am SEVERE: Personality with name 'null' does not exist."
2) New: "01:16:06 am SEVERE: getVar called with invalid args or variable was not found. Args:[responsesDisabled, null]"
3) New: "01:16:06 am SEVERE: Infos about object given: Class: class jdk.nashorn.api.scripting.ScriptObjectMirror"

Full Log:

Code: Select all

01:16:03 am INFO: Checking libraries for updates...
01:16:04 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
01:16:04 am INFO: Libraries checked and up-to-date.
01:16:04 am INFO: Initialization done.
01:16:04 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
01:16:06 am SEVERE: getVar called with invalid args or variable was not found. Args:[responsesDisabled, null]
01:16:06 am SEVERE: Infos about object given:  Class: class jdk.nashorn.api.scripting.ScriptObjectMirror
01:16:06 am INFO: Personality 'Amelie' version 0.0.1 loaded.
01:16:06 am INFO: Personality 'Default Personality' version 1.0 loaded.
01:16:09 am INFO: Loaded 0 picture sets for Widowmaker
01:16:09 am INFO: Loaded 0 picture sets for Trace
01:16:09 am INFO: Loaded 0 picture sets for Pharah
01:16:09 am INFO: Loaded 0 picture sets for Sombra
01:16:10 am SEVERE: Personality with name 'null' does not exist.
01:17:07 am CHAT: 01:17 am Anon: Yes Mistress
01:17:09 am CHAT: 01:17 am Anon: No Mistress
01:17:11 am CHAT: 01:17 am Anon: I am sorry Mistress
01:17:11 am CHAT: 01:17 am Anon: I am on the edge
01:17:16 am CHAT: 01:17 am Anon: Hello Mistress
ress
01:17:11 am CHAT: 01:17 am Anon: I am on the edge
01:17:16 am CHAT: 01:17 am Anon: Hello Mistress
Note this was with no changes to my personality since I sent it to 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: Fri May 01, 2020 11:27 pm Thank you for the update!

Everything seems to work fine except for two things:
1) Go to "Settings > Personality > Variables" and change a variable there.
2) Go to "Settings > Personality > Amelie"
3) The variable there is not updated to the new value.

and:

1) Go to "Settings > Personality > Variables" and select a variable there.
2) Go to "Settings > Personality > Amelie" and change that same variable there.
3) Go back to "Settings > Personality > Variables".
4) The selected variable is unchanged (visually).
5) Select a different variable.
6) Re-select the original variable.
7) It has now updated correctly.

Additionally my last log has three severe warnings:
1) The same warning as before: "01:16:10 am SEVERE: Personality with name 'null' does not exist."
2) New: "01:16:06 am SEVERE: getVar called with invalid args or variable was not found. Args:[responsesDisabled, null]"
3) New: "01:16:06 am SEVERE: Infos about object given: Class: class jdk.nashorn.api.scripting.ScriptObjectMirror"

Full Log:

Code: Select all

01:16:03 am INFO: Checking libraries for updates...
01:16:04 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
01:16:04 am INFO: Libraries checked and up-to-date.
01:16:04 am INFO: Initialization done.
01:16:04 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
01:16:06 am SEVERE: getVar called with invalid args or variable was not found. Args:[responsesDisabled, null]
01:16:06 am SEVERE: Infos about object given:  Class: class jdk.nashorn.api.scripting.ScriptObjectMirror
01:16:06 am INFO: Personality 'Amelie' version 0.0.1 loaded.
01:16:06 am INFO: Personality 'Default Personality' version 1.0 loaded.
01:16:09 am INFO: Loaded 0 picture sets for Widowmaker
01:16:09 am INFO: Loaded 0 picture sets for Trace
01:16:09 am INFO: Loaded 0 picture sets for Pharah
01:16:09 am INFO: Loaded 0 picture sets for Sombra
01:16:10 am SEVERE: Personality with name 'null' does not exist.
01:17:07 am CHAT: 01:17 am Anon: Yes Mistress
01:17:09 am CHAT: 01:17 am Anon: No Mistress
01:17:11 am CHAT: 01:17 am Anon: I am sorry Mistress
01:17:11 am CHAT: 01:17 am Anon: I am on the edge
01:17:16 am CHAT: 01:17 am Anon: Hello Mistress
ress
01:17:11 am CHAT: 01:17 am Anon: I am on the edge
01:17:16 am CHAT: 01:17 am Anon: Hello Mistress
Note this was with no changes to my personality since I sent it to you.
Will look into your variable stuff soon. It's only a visual update thing I guess.


1) Seems like: String latestSelectedPersonality = TeaseAI.application.LAST_SELECTED_PERSONALITY.getValue();
is not set properly or saved properly. You can change that manually in the config file. If it's not null but something different then we might need to dig deeper. It doesn't make any difference though when it comes to usage
2)
chatutils.js
if (getVar("responsesDisabled", null) == null) {
setTempVar("responsesDisabled", false);
}

Well variable is not found, default value to return is null, now internally it looks for a null value which could mean that the given variable is not found but only if no default value was given. Now the default value given is null. This just triggers the error message but it has no consequences. The proper way to achieve what's in those line is actually: !isVar("responsesDisabled") {
3) That is connected to the 2) error. It's just debug I was printing for Spicy because there were some strange getVar calls and I wasn't able to pin point where they were coming from. If you fix the second error this will disappear too

Edit:
You should probably use the attached version because if I remember correctly normal chat messages don't work in the version I gave you :whistle:
Attachments
TeaseAi.zip
(903.92 KiB) Downloaded 59 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: Sat May 02, 2020 12:52 pm Will look into your variable stuff soon. It's only a visual update thing I guess.


1) Seems like: String latestSelectedPersonality = TeaseAI.application.LAST_SELECTED_PERSONALITY.getValue();
is not set properly or saved properly. You can change that manually in the config file. If it's not null but something different then we might need to dig deeper. It doesn't make any difference though when it comes to usage
I found: "lastSelectedPersonality=null" in TeaseAI.properties. I assume you were referring to this?

Edit: Selecting the default personality and re-selecting Amelie seems to have worked.
2)
chatutils.js
if (getVar("responsesDisabled", null) == null) {
setTempVar("responsesDisabled", false);
}

Well variable is not found, default value to return is null, now internally it looks for a null value which could mean that the given variable is not found but only if no default value was given. Now the default value given is null. This just triggers the error message but it has no consequences. The proper way to achieve what's in those line is actually: !isVar("responsesDisabled") {
Please note that I did not write that line. It is a part of the default chatutils.js.

Edit: I tried your solution of replacing

Code: Select all

if (getVar("responsesDisabled", null) == null) {
		setTempVar("responsesDisabled", false);
	}
with

Code: Select all

if (!isVar("responsesDisabled")) {
        setTempVar("responsesDisabled", false);
    }
But when I do that TAJ gets stuck on "Checking Personalities" at 50% on startup.
3) That is connected to the 2) error. It's just debug I was printing for Spicy because there were some strange getVar calls and I wasn't able to pin point where they were coming from. If you fix the second error this will disappear too

Edit:
You should probably use the attached version because if I remember correctly normal chat messages don't work in the version I gave you :whistle:
Done and thank you.

Edit2: I've found a strange shortcoming. In Settings > Contacts the Avatars accept both .png and .jpg, but not .jpeg. Since .jpeg is a very common format and pretty much the same as .jpg it just seems like an oversight.
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: Sat May 02, 2020 4:57 pm
GodDragon wrote: Sat May 02, 2020 12:52 pm Will look into your variable stuff soon. It's only a visual update thing I guess.


1) Seems like: String latestSelectedPersonality = TeaseAI.application.LAST_SELECTED_PERSONALITY.getValue();
is not set properly or saved properly. You can change that manually in the config file. If it's not null but something different then we might need to dig deeper. It doesn't make any difference though when it comes to usage
I found: "lastSelectedPersonality=null" in TeaseAI.properties. I assume you were referring to this?

Edit: Selecting the default personality and re-selecting Amelie seems to have worked.
2)
chatutils.js
if (getVar("responsesDisabled", null) == null) {
setTempVar("responsesDisabled", false);
}

Well variable is not found, default value to return is null, now internally it looks for a null value which could mean that the given variable is not found but only if no default value was given. Now the default value given is null. This just triggers the error message but it has no consequences. The proper way to achieve what's in those line is actually: !isVar("responsesDisabled") {
Please note that I did not write that line. It is a part of the default chatutils.js.

Edit: I tried your solution of replacing

Code: Select all

if (getVar("responsesDisabled", null) == null) {
		setTempVar("responsesDisabled", false);
	}
with

Code: Select all

if (!isVar("responsesDisabled")) {
        setTempVar("responsesDisabled", false);
    }
But when I do that TAJ gets stuck on "Checking Personalities" at 50% on startup.
3) That is connected to the 2) error. It's just debug I was printing for Spicy because there were some strange getVar calls and I wasn't able to pin point where they were coming from. If you fix the second error this will disappear too

Edit:
You should probably use the attached version because if I remember correctly normal chat messages don't work in the version I gave you :whistle:
Done and thank you.

Edit2: I've found a strange shortcoming. In Settings > Contacts the Avatars accept both .png and .jpg, but not .jpeg. Since .jpeg is a very common format and pretty much the same as .jpg it just seems like an oversight.
Yes that was what I was talking about in the config.

Fixed the picture thing. I know but it's not my chat util. It's by ski, so I can't do anything about it. I don't even use it in Spicy.
Are you sure the loading is caused by that change? Can you check what your log has to say? Debug message right before that line maybe?
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: Sat May 02, 2020 10:28 pm Yes that was what I was talking about in the config.

Fixed the picture thing. I know but it's not my chat util. It's by ski, so I can't do anything about it. I don't even use it in Spicy.
Are you sure the loading is caused by that change? Can you check what your log has to say? Debug message right before that line maybe?
Making just that change causes it to freeze at 50%. Reverting fixes it.
Logs:

Code: Select all

12:45:47 am INFO: Checking libraries for updates...
12:45:48 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
12:45:48 am INFO: Libraries checked and up-to-date.
12:45:48 am INFO: Restarting TAJ with JAVA-FX startup parameters...
: Libraries checked and up-to-date.
12:45:48 am INFO: Restarting TAJ with JAVA-FX startup parameters...

Code: Select all

12:45:48 am INFO: Checking libraries for updates...
12:45:49 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
12:45:49 am INFO: Libraries checked and up-to-date.
12:45:49 am INFO: Initialization done.
12:45:49 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
Btw these two logs are generated by one startup. I assume that's normal, but I thought I'd mention it.

I should check how you are handling chat with Spicy then.

Edit: Ok this is interesting. I added a warning message right before and right after the block of code. Like so:

Code: Select all

logger.getLogger().log(java.util.logging.Level.WARNING, "Before new responsesDisabled");
    if (!isVar("responsesDisabled")) {
        setTempVar("responsesDisabled", false);
    }
	/* if (getVar("responsesDisabled", null) == null) {
		setTempVar("responsesDisabled", false);
	} */
    else
    {
        getVar("responsesDisabled", false);
    }
	logger.getLogger().log(java.util.logging.Level.WARNING, "After new responsesDisabled");
The log shows the before warning being hit twice before the freeze and the after one doesn't:

Code: Select all

01:12:23 am INFO: Checking libraries for updates...
01:12:24 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
01:12:24 am INFO: Libraries checked and up-to-date.
01:12:24 am INFO: Initialization done.
01:12:24 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
01:12:25 am WARNING: Before new responsesDisabled
ne is planned to be removed from a future JDK release
01:12:25 am WARNING: Before new responsesDisabled
It also seems to cut off the beginning of the second Nashorn warning.
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: Sat May 02, 2020 10:55 pm
GodDragon wrote: Sat May 02, 2020 10:28 pm Yes that was what I was talking about in the config.

Fixed the picture thing. I know but it's not my chat util. It's by ski, so I can't do anything about it. I don't even use it in Spicy.
Are you sure the loading is caused by that change? Can you check what your log has to say? Debug message right before that line maybe?
Making just that change causes it to freeze at 50%. Reverting fixes it.
Logs:

Code: Select all

12:45:47 am INFO: Checking libraries for updates...
12:45:48 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
12:45:48 am INFO: Libraries checked and up-to-date.
12:45:48 am INFO: Restarting TAJ with JAVA-FX startup parameters...
: Libraries checked and up-to-date.
12:45:48 am INFO: Restarting TAJ with JAVA-FX startup parameters...

Code: Select all

12:45:48 am INFO: Checking libraries for updates...
12:45:49 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
12:45:49 am INFO: Libraries checked and up-to-date.
12:45:49 am INFO: Initialization done.
12:45:49 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
Btw these two logs are generated by one startup. I assume that's normal, but I thought I'd mention it.

I should check how you are handling chat with Spicy then.

Edit: Ok this is interesting. I added a warning message right before and right after the block of code. Like so:

Code: Select all

logger.getLogger().log(java.util.logging.Level.WARNING, "Before new responsesDisabled");
    if (!isVar("responsesDisabled")) {
        setTempVar("responsesDisabled", false);
    }
	/* if (getVar("responsesDisabled", null) == null) {
		setTempVar("responsesDisabled", false);
	} */
    else
    {
        getVar("responsesDisabled", false);
    }
	logger.getLogger().log(java.util.logging.Level.WARNING, "After new responsesDisabled");
The log shows the before warning being hit twice before the freeze and the after one doesn't:

Code: Select all

01:12:23 am INFO: Checking libraries for updates...
01:12:24 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
01:12:24 am INFO: Libraries checked and up-to-date.
01:12:24 am INFO: Initialization done.
01:12:24 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
01:12:25 am WARNING: Before new responsesDisabled
ne is planned to be removed from a future JDK release
01:12:25 am WARNING: Before new responsesDisabled
It also seems to cut off the beginning of the second Nashorn warning.
Fixed. Problem with it was, that that feature on programstart wasn't very well tested on my end. Never thought about onprogramstart really being used that way. But btw. why are you loading chat utils etc. onprogramstart?
OnProgramStart is only supposed to be used for changes with the gui etc. because functions loaded at that point aren't available to you during normal run time
Attachments
TeaseAi.zip
(904.32 KiB) Downloaded 73 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: Sun May 03, 2020 3:50 pm Fixed. Problem with it was, that that feature on programstart wasn't very well tested on my end. Never thought about onprogramstart really being used that way. But btw. why are you loading chat utils etc. onprogramstart?
OnProgramStart is only supposed to be used for changes with the gui etc. because functions loaded at that point aren't available to you during normal run time
The only reason I did that was because that was what Mischevious did. I tried to use that as a basis to start from.
Now that I've looked through your Spicy code I've started to move away from that and are switching to using Spicy as the basis instead.

I also have a question regarding fontsizes and typing speed.
I made a function based on one of your message functions:

Code: Select all

function sendNarratorMessage(message, wait) {
    let textName = new javafx.scene.text.Text(replaceVocab("[Narrator]: "));
    textName.setFill(javafx.scene.paint.Color.INDIANRED);
    textName.setFont(javafx.scene.text.Font.font(null, javafx.scene.text.FontWeight.BOLD, 16));

    message = replaceVocab(message);
    let text = new javafx.scene.text.Text(message);
    text.setFill(javafx.scene.paint.Color.BLACK);
    text.setFont(javafx.scene.text.Font.font(null, javafx.scene.text.FontWeight.NORMAL, 16));

    sendCustomMessage(textName, text);

    if (wait === undefined) {
        sleep(3000 + message.length * 50, "MILLISECONDS");
    } else if(!wait.isNaN){
        sleep(wait * 1000, "MILLISECONDS");
    }
}
And it uses fixed fontsize and typing speed. Since there are settings for both in the settings menu, is there any way to obtain these variables so my function can adapt along with the regular text?
It would be a bit silly to have this display at size 16 if the user has set a way different size for the default text.

Another thing I wanted to ask about is your method of storing variables in a "const VARIABLE".
I've implemented this myself, but am running into the issue that the variables do not seem to exist until I give them a value. How do I give these variables default values that do not reapply/overwrite on every startup.

Lastly I would like to note that even with your new .jar the logs still end with a repeat:

Code: Select all

10:30:12 pm CHAT: 10:30 pm Widowmaker: I knew you wouldn't be able to resist my offer.
10:30:17 pm INFO: main: End
 CHAT: 10:30 pm Widowmaker: I knew you wouldn't be able to resist my offer.
10:30:17 pm INFO: main: End
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: Sun May 03, 2020 8:38 pm
GodDragon wrote: Sun May 03, 2020 3:50 pm Fixed. Problem with it was, that that feature on programstart wasn't very well tested on my end. Never thought about onprogramstart really being used that way. But btw. why are you loading chat utils etc. onprogramstart?
OnProgramStart is only supposed to be used for changes with the gui etc. because functions loaded at that point aren't available to you during normal run time
The only reason I did that was because that was what Mischevious did. I tried to use that as a basis to start from.
Now that I've looked through your Spicy code I've started to move away from that and are switching to using Spicy as the basis instead.

I also have a question regarding fontsizes and typing speed.
I made a function based on one of your message functions:

Code: Select all

function sendNarratorMessage(message, wait) {
    let textName = new javafx.scene.text.Text(replaceVocab("[Narrator]: "));
    textName.setFill(javafx.scene.paint.Color.INDIANRED);
    textName.setFont(javafx.scene.text.Font.font(null, javafx.scene.text.FontWeight.BOLD, 16));

    message = replaceVocab(message);
    let text = new javafx.scene.text.Text(message);
    text.setFill(javafx.scene.paint.Color.BLACK);
    text.setFont(javafx.scene.text.Font.font(null, javafx.scene.text.FontWeight.NORMAL, 16));

    sendCustomMessage(textName, text);

    if (wait === undefined) {
        sleep(3000 + message.length * 50, "MILLISECONDS");
    } else if(!wait.isNaN){
        sleep(wait * 1000, "MILLISECONDS");
    }
}
And it uses fixed fontsize and typing speed. Since there are settings for both in the settings menu, is there any way to obtain these variables so my function can adapt along with the regular text?
It would be a bit silly to have this display at size 16 if the user has set a way different size for the default text.

Another thing I wanted to ask about is your method of storing variables in a "const VARIABLE".
I've implemented this myself, but am running into the issue that the variables do not seem to exist until I give them a value. How do I give these variables default values that do not reapply/overwrite on every startup.

Lastly I would like to note that even with your new .jar the logs still end with a repeat:

Code: Select all

10:30:12 pm CHAT: 10:30 pm Widowmaker: I knew you wouldn't be able to resist my offer.
10:30:17 pm INFO: main: End
 CHAT: 10:30 pm Widowmaker: I knew you wouldn't be able to resist my offer.
10:30:17 pm INFO: main: End
Font Size already done in spicy:
https://github.com/GodDragoner/Spicy-TA ... il.js#L112
Mind that TeaseAI is a variable in that case refering to: const TeaseAI = Java.type("me.goddragon.teaseai.TeaseAI");


Variables:
Right now my Variable thing is just for the sake of having it all in one place and especially easy auto completion in my IDE. I avoid typos when using the variable over and over again because I have the actually string stored statically and let my IDE help me with auto completing the variables.
You could however modify it so it registers the variables with TAJ internally automatically if that's what you want. What do you want to achieve? Right now non of my variables have a default value by default. I always set or use them when needed.
So like if I can't be sure a variable is set I either use isVar(...) or I use the get with fallback if(getVar(...., false))...

What exactly happens in the log? Like the last line before the end session is printed twice?

Edit: Since ski is not really active rn and I am back to being the sole developer of TAJ and I would suggest to stick to my practices. However you are free to do whatever you want. Spicy's usage is tested though so you should find no issues wit hcopying Spicys functions. Especially because Spicy does cover A LOT of cases.
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: Sun May 03, 2020 9:29 pm Font Size already done in spicy:
https://github.com/GodDragoner/Spicy-TA ... il.js#L112
Mind that TeaseAI is a variable in that case refering to: const TeaseAI = Java.type("me.goddragon.teaseai.TeaseAI");
Thank you, that works great for the fontsize. I don't see typing speed implemented there yet. Are you planning on adding that functionality later?
Variables:
Right now my Variable thing is just for the sake of having it all in one place and especially easy auto completion in my IDE. I avoid typos when using the variable over and over again because I have the actually string stored statically and let my IDE help me with auto completing the variables.
You could however modify it so it registers the variables with TAJ internally automatically if that's what you want. What do you want to achieve? Right now non of my variables have a default value by default. I always set or use them when needed.
So like if I can't be sure a variable is set I either use isVar(...) or I use the get with fallback if(getVar(...., false))...
I have a variable I want to use to make sure an introduction module is only run on the first session.
The method I was using to check whether the variable was not false(would be false on every other session) worked, but it gave me an error in the log because I was checking a variable that didn't exist.
So if I get you correctly using:

Code: Select all

if (getVar(VARIABLE.FIRST_SESSION, true)){
	run("Starts" + separator + "FirstSession.js");
	setVar(VARIABLE.FIRST_SESSION, false);
}
Should run the code in the if statement and set VARIABLE.FIRST_SESSION to true, if the variable does not exist yet?
And setting it to false after the module has run should prevent it from ever running again.
What exactly happens in the log? Like the last line before the end session is printed twice?
The last two lines of the log are repeated, but the second to last line has part of its beginning missing on the repeat.
Actually I just tested by spamming Lazy Sub and something different happened:

Code: Select all

12:23:45 am INFO: Checking libraries for updates...
12:23:46 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
12:23:46 am INFO: Libraries checked and up-to-date.
12:23:46 am INFO: Initialization done.
12:23:46 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
12:23:48 am INFO: Personality 'Amelie' version 0.0.1 loaded.
12:23:48 am INFO: Personality 'Default Personality' version 1.0 loaded.
12:23:51 am INFO: Loaded 0 picture sets for Widowmaker
12:23:51 am INFO: Loaded 0 picture sets for Tracer
12:23:51 am INFO: Loaded 0 picture sets for Pharah
12:23:51 am INFO: Loaded 0 picture sets for Brigitte
12:23:55 am CHAT: 12:23 am Anon: Yes Mistress
12:23:55 am CHAT: 12:23 am Anon: No Mistress
12:23:55 am CHAT: 12:23 am Anon: I am sorry Mistress
12:23:56 am CHAT: 12:23 am Anon: I am on the edge
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
e edge
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
As you can see the last two lines are repeated again(I clicked Hello Mistress twice), but the cut off text is now coming from the third to last line.
Edit: Since ski is not really active rn and I am back to being the sole developer of TAJ and I would suggest to stick to my practices. However you are free to do whatever you want. Spicy's usage is tested though so you should find no issues wit hcopying Spicys functions. Especially because Spicy does cover A LOT of cases.
Since you seem to be much more experienced with coding and the active dev, it seems logical to follow your examples.
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: Sun May 03, 2020 10:31 pm
GodDragon wrote: Sun May 03, 2020 9:29 pm Font Size already done in spicy:
https://github.com/GodDragoner/Spicy-TA ... il.js#L112
Mind that TeaseAI is a variable in that case refering to: const TeaseAI = Java.type("me.goddragon.teaseai.TeaseAI");
Thank you, that works great for the fontsize. I don't see typing speed implemented there yet. Are you planning on adding that functionality later?
Variables:
Right now my Variable thing is just for the sake of having it all in one place and especially easy auto completion in my IDE. I avoid typos when using the variable over and over again because I have the actually string stored statically and let my IDE help me with auto completing the variables.
You could however modify it so it registers the variables with TAJ internally automatically if that's what you want. What do you want to achieve? Right now non of my variables have a default value by default. I always set or use them when needed.
So like if I can't be sure a variable is set I either use isVar(...) or I use the get with fallback if(getVar(...., false))...
I have a variable I want to use to make sure an introduction module is only run on the first session.
The method I was using to check whether the variable was not false(would be false on every other session) worked, but it gave me an error in the log because I was checking a variable that didn't exist.
So if I get you correctly using:

Code: Select all

if (getVar(VARIABLE.FIRST_SESSION, true)){
	run("Starts" + separator + "FirstSession.js");
	setVar(VARIABLE.FIRST_SESSION, false);
}
Should run the code in the if statement and set VARIABLE.FIRST_SESSION to true, if the variable does not exist yet?
And setting it to false after the module has run should prevent it from ever running again.
What exactly happens in the log? Like the last line before the end session is printed twice?
The last two lines of the log are repeated, but the second to last line has part of its beginning missing on the repeat.
Actually I just tested by spamming Lazy Sub and something different happened:

Code: Select all

12:23:45 am INFO: Checking libraries for updates...
12:23:46 am INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
12:23:46 am INFO: Libraries checked and up-to-date.
12:23:46 am INFO: Initialization done.
12:23:46 am INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
12:23:48 am INFO: Personality 'Amelie' version 0.0.1 loaded.
12:23:48 am INFO: Personality 'Default Personality' version 1.0 loaded.
12:23:51 am INFO: Loaded 0 picture sets for Widowmaker
12:23:51 am INFO: Loaded 0 picture sets for Tracer
12:23:51 am INFO: Loaded 0 picture sets for Pharah
12:23:51 am INFO: Loaded 0 picture sets for Brigitte
12:23:55 am CHAT: 12:23 am Anon: Yes Mistress
12:23:55 am CHAT: 12:23 am Anon: No Mistress
12:23:55 am CHAT: 12:23 am Anon: I am sorry Mistress
12:23:56 am CHAT: 12:23 am Anon: I am on the edge
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
e edge
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
12:23:56 am CHAT: 12:23 am Anon: Hello Mistress
As you can see the last two lines are repeated again(I clicked Hello Mistress twice), but the cut off text is now coming from the third to last line.
Edit: Since ski is not really active rn and I am back to being the sole developer of TAJ and I would suggest to stick to my practices. However you are free to do whatever you want. Spicy's usage is tested though so you should find no issues wit hcopying Spicys functions. Especially because Spicy does cover A LOT of cases.
Since you seem to be much more experienced with coding and the active dev, it seems logical to follow your examples.
Right now the custom messages have no typing animation but if you want that I can code it for you. But it's basically just copying the internal TAJ code and making it work in Javascript by using the correct references.
Sadly the function is private right now: https://github.com/GodDragoner/TeaseAIJ ... .java#L270
But you can copy it and impl it in javascript. Or maybe use reflection to access the private function in javscript which might work too. Only makes sense though if your custom message is supposed to be send by an existing contact.

Yes that is exactly how you'd do it. I actually prefer it by setting a boolean to true instead like FIRST_SESSION_FINISHED but that's not really important.

Interesting. Is it only the log or also the chat? Might just be it writing to the log async and overwriting it self.
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 11:19 am Right now the custom messages have no typing animation but if you want that I can code it for you. But it's basically just copying the internal TAJ code and making it work in Javascript by using the correct references.
Sadly the function is private right now: https://github.com/GodDragoner/TeaseAIJ ... .java#L270
But you can copy it and impl it in javascript. Or maybe use reflection to access the private function in javscript which might work too. Only makes sense though if your custom message is supposed to be send by an existing contact.
For what I'm trying to do right now I wouldn't want typing, as narrator text really should be instant. But I could definitely foresee uses for custom text that gets typed. So no rush, but something to add to the list for sure.
Yes that is exactly how you'd do it. I actually prefer it by setting a boolean to true instead like FIRST_SESSION_FINISHED but that's not really important.
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.
Interesting. Is it only the log or also the chat? Might just be it writing to the log async and overwriting it self.
There is nothing unusual about the chat.
I just did another test by spamming lazy sub with another different result:

Code: Select all

07:59:59 pm INFO: Checking libraries for updates...
07:59:59 pm INFO: Library uber-EstimAPI-0.0.1-SNAPSHOT.jar is only local but keeping and not deleting.
07:59:59 pm INFO: Libraries checked and up-to-date.
08:00:00 pm INFO: Initialization done.
08:00:00 pm INFO: Launching TAJ 1.2.2
Warning: Nashorn engine is planned to be removed from a future JDK release
08:00:02 pm INFO: Personality 'Amelie' version 0.0.1 loaded.
08:00:02 pm INFO: Personality 'Default Personality' version 1.0 loaded.
08:00:05 pm INFO: Loaded 0 picture sets for Widowmaker
08:00:05 pm INFO: Loaded 0 picture sets for Tracer
08:00:05 pm INFO: Loaded 0 picture sets for Pharah
08:00:05 pm INFO: Loaded 0 picture sets for Brigitte
08:00:08 pm CHAT: 08:00 pm Anon: Hello Mistress
08:00:09 pm CHAT: 08:00 pm Anon: Yes Mistress
08:00:10 pm CHAT: 08:00 pm Anon: No Mistress
08:00:10 pm CHAT: 08:00 pm Anon: I am sorry Mistress
08:00:11 pm CHAT: 08:00 pm Anon: I am on the edge
08:00:11 pm CHAT: 08:00 pm Anon: Yes Mistress
08:00:11 pm CHAT: 08:00 pm Anon: Yes Mistress
08:00:12 pm CHAT: 08:00 pm Anon: No Mistress
08:00:14 pm CHAT: 08:00 pm Anon: No Mistress
08:00:14 pm CHAT: 08:00 pm Anon: No Mistress
08:00:15 pm CHAT: 08:00 pm Anon: I am sorry Mistress
08:00:16 pm CHAT: 08:00 pm Anon: Yes Mistress
08:00:17 pm CHAT: 08:00 pm Anon: No Mistress
08:00:18 pm CHAT: 08:00 pm Anon: Hello Mistress
08:00:19 pm CHAT: 08:00 pm Anon: I am on the edge
08:00:19 pm CHAT: 08:00 pm Anon: I am sorry Mistress

08:00:19 pm CHAT: 08:00 pm Anon: I am on the edge
08:00:19 pm CHAT: 08:00 pm Anon: I am sorry Mistress
Now the last two lines are duplicated again, but there is an extra empty line before the duplicates.

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
Post Reply