Damn, must've forgotten that one. Thanks!GodDragon wrote: Sat Dec 19, 2020 7:03 pmI fixed this internally, but it's probably because you don't have any folder for images regarding tease selected:hzsmd wrote: Sat Dec 19, 2020 6:20 pm Oh yes, of course:
- Spoiler: show
- Just watch this little slide showwhile you fondle my cum filled balls
Exception in thread "Thread-29" java.lang.NullPointerException
at me.goddragon.teaseai.api.media.MediaCollection.getRandomTeaseFile(MediaCollection.java:122)
at me.goddragon.teaseai.api.scripts.nashorn.ShowTeaseImageFunction.call(ShowTeaseImageFunction.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$Recompilation$209$11229A$\^eval\_.:scopeCall-5(<eval>)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$209$11229A$\^eval\_.workmodeTease(<eval>:262)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$193$\^eval\_.:program(<eval>:135)
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.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$189$\^eval\_.:scopeCall-4(<eval>)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$189$\^eval\_.:program(<eval>:63)
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.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$44$\^eval\_.:scopeCall(<eval>)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$44$\^eval\_.:program(<eval>:123)
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)
04:58:30 PM CHAT: 04:58 PM Joe: Yes
05:10:53 PM CHAT: 05:10 PM Joe: Exit
ession$1.run(Session.java:41)
Just do so.
[Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Moderator: 1885
- candriver
- Explorer

- Posts: 96
- Joined: Sat Jun 22, 2013 8:18 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Something failed during BasicChastityTaunts.js:
- Spoiler: show
FlashTease to TeaseMe conversions.
-
GodDragon
- Explorer At Heart

- Posts: 795
- Joined: Sun Jun 11, 2017 4:30 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Should be done. And I am glad you like it. However it's probably gonna merge into the academy or change a bit at least in the future. Don't worry though, it won't be removed in any case. Try the latest build in github (extract it manually).Spielers wrote: Sun Dec 20, 2020 1:53 pm I'm in the anal training and i love it. At the end there is always a task like fuck your dildo x or wear your plug x for x hours/minutes. there is always the name from the dildo or plug but no pic from this dildo or plug. And it would be so helpfull if it shows the plug which to wear for x hours. Can you please add the picture to the command? Thank you
Should be hopefully fixed by adding a clear history if we go above 40 attempts. However seeing the loop of punishment search before that would help too (like there should be debug messages above the exception).candriver wrote: Sun Dec 20, 2020 3:16 pm runPunishment() loops on itself for me after a couple of tasks when running a punishment.
runPunishment() runs a random *.js punishment file.
Those files begin with:If that first check ends up being true in all files than runPunishment() loops endlessly:Code: Select all
if (condition) { runPunishment(PUNISHMENT_CURRENT_LEVEL); } else ...Always happens for me after "Next punishment level 2".Code: Select all
... 01:15:10 AM INFO: Next punishment level 2 Exception in thread "Thread-13" java.lang.StackOverflowError ...
After 20 repeats "if(findPunishmentTries>20)" will start changing punishment level from 2 to 3 every loop, but that does not help.
Edit:
- Spoiler: show
I took another look at the code and if I understand correctly, punishment level currently does not matter since only "Easy" and "All" folders exist. So increasing level after 20 failed repeats to find punishment does not add any new files to the pool.
Maybe after 20 tries it should tell something like "can’t come up with any more punishments today" and end punishment session as a temporary fix.
Should be fixed as well (hopefully). Try the latest github build (unzip the file manually and overwrite existing files).
Thanks for the reports guys and please keep reporting (also if stuff that was supposed to be fixed isn't fixed yet).
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
one recurring logic bug in missingcardmemory.js in games:
lines 29 and 118 have:
-----
for (let number = 1; number < 14; number++) {
if (number !== numberMissing) {
numberArray[number - 1] = number;
}
}
------
but they should be:
------
for (let number = 1; number < 14; number++) {
if (number != numberMissing) {
if (number < numberMissing) {
numberArray[number - 1] = number;
}
else {
numberArray[number - 2] = number;
}
}
}
------
(to properly fill the array pre-shuffle)... I think otherwise you end up getting reference /undefined errors.
lines 29 and 118 have:
-----
for (let number = 1; number < 14; number++) {
if (number !== numberMissing) {
numberArray[number - 1] = number;
}
}
------
but they should be:
------
for (let number = 1; number < 14; number++) {
if (number != numberMissing) {
if (number < numberMissing) {
numberArray[number - 1] = number;
}
else {
numberArray[number - 2] = number;
}
}
}
------
(to properly fill the array pre-shuffle)... I think otherwise you end up getting reference /undefined errors.
- candriver
- Explorer

- Posts: 96
- Joined: Sat Jun 22, 2013 8:18 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
It was meeting first condition in every punishment file, so it was calling runPunishment() again without interacting with history in any way. History comes into play after it chose a punishment to try, and it would log "Punishment was run too recently (X punishments ago)" after "Next punishment level X" if repeating history was the case.GodDragon wrote: Sun Dec 20, 2020 5:49 pmShould be hopefully fixed by adding a clear history if we go above 40 attempts. However seeing the loop of punishment search before that would help too (like there should be debug messages above the exception).
For me loop happens because at a certain point all files meet conditions to ignore them.
There are 10 files (9 Any, 1 Easy):
CBTPunishment.js; EStimPunishment.js; ParachutePunishment.js; PegsPunishment.js; SpankingPunishment.js
Those 5 will not run if (..._LIMIT.isAllowed()) we were not asked about certain limit yet or if we answered "maybe" (like I did). Some also will not run without some toys or while in chastity.
BondagePunishment.js
Will not run if (PUNISHMENTS_DONE >= 2) we have done some punishments in this session already.
CornerTimePunishment.js
Will not run if punishment level is greater than 1.
DeepthroatPunishment.js
Will not run if (getVar(VARIABLE.BLOWJOB_LEVEL) < 30) we have not encountered blowjobs or something.
LineWritingPunishment.js
Will not run if punishment level is greater than 1.
WaitingPunishment.js
Dos not have a condition, but will not be in a pool of files to choose from if punishment level is greater than 0.
I have not been asked about all limits for (..._LIMIT.isAllowed()), and the ones I was asked for I answered "maybe". And I have not yet encountered anything that sets (VARIABLE.BLOWJOB_LEVEL).
Thus only CornerTimePunishment, LineWritingPunishment, BondagePunishment and WaitingPunishment can run at level 0(Easy).
Then at level 2(Hard) only BondagePunishment can run, but it will also be skipped when (PUNISHMENTS_DONE >= 2)
Apart from ending punishment session I guess the solution could be to drop level back to level 1(Medium) after 40 repeats. Or to somehow ignore level requirement altogether if we can’t find punishment for current level.
("level" inside runPunishment() only affects the pool of files, so "PUNISHMENT_CURRENT_LEVEL" which is used in conditions of those files, should be changed or ignored)
FlashTease to TeaseMe conversions.
-
GodDragon
- Explorer At Heart

- Posts: 795
- Joined: Sun Jun 11, 2017 4:30 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Hopefully fixed in newest build.operwt wrote: Sun Dec 20, 2020 7:29 pm After a video the picture gallery didn't return, video hanged
That is quite a detailed theory and I guess you are right. I changed the code so it now will remove file by file from a possibility list and if non is found will try a higher level if at highest level it will go back to easy. It should guarantee you finding a punishment even if there is only one that works. Please try if it works for you (just unzip the newest build from github and overwrite files). Thanks for putting so much thought into it!candriver wrote: Sun Dec 20, 2020 8:13 pmIt was meeting first condition in every punishment file, so it was calling runPunishment() again without interacting with history in any way. History comes into play after it chose a punishment to try, and it would log "Punishment was run too recently (X punishments ago)" after "Next punishment level X" if repeating history was the case.GodDragon wrote: Sun Dec 20, 2020 5:49 pmShould be hopefully fixed by adding a clear history if we go above 40 attempts. However seeing the loop of punishment search before that would help too (like there should be debug messages above the exception).
For me loop happens because at a certain point all files meet conditions to ignore them.
There are 10 files (9 Any, 1 Easy):
CBTPunishment.js; EStimPunishment.js; ParachutePunishment.js; PegsPunishment.js; SpankingPunishment.js
Those 5 will not run if (..._LIMIT.isAllowed()) we were not asked about certain limit yet or if we answered "maybe" (like I did). Some also will not run without some toys or while in chastity.
BondagePunishment.js
Will not run if (PUNISHMENTS_DONE >= 2) we have done some punishments in this session already.
CornerTimePunishment.js
Will not run if punishment level is greater than 1.
DeepthroatPunishment.js
Will not run if (getVar(VARIABLE.BLOWJOB_LEVEL) < 30) we have not encountered blowjobs or something.
LineWritingPunishment.js
Will not run if punishment level is greater than 1.
WaitingPunishment.js
Dos not have a condition, but will not be in a pool of files to choose from if punishment level is greater than 0.
I have not been asked about all limits for (..._LIMIT.isAllowed()), and the ones I was asked for I answered "maybe". And I have not yet encountered anything that sets (VARIABLE.BLOWJOB_LEVEL).
Thus only CornerTimePunishment, LineWritingPunishment, BondagePunishment and WaitingPunishment can run at level 0(Easy).
Then at level 2(Hard) only BondagePunishment can run, but it will also be skipped when (PUNISHMENTS_DONE >= 2)
Apart from ending punishment session I guess the solution could be to drop level back to level 1(Medium) after 40 repeats. Or to somehow ignore level requirement altogether if we can’t find punishment for current level.
("level" inside runPunishment() only affects the pool of files, so "PUNISHMENT_CURRENT_LEVEL" which is used in conditions of those files, should be changed or ignored)
Working on a fix. Hopefully got it ready soon.
Well I did so so you can recover the image if something goes wrong but I can add an advanced mode featuring encryption. For now you gotta deal with the image though. However obviously since it is done client side it can always be reverse engineered.operwt wrote: Sun Dec 20, 2020 9:51 pm Renaming code picture for the lock is not enough, can we implement more secure way?
-
FluffyKitten~
- Explorer

- Posts: 6
- Joined: Thu Jun 01, 2017 5:53 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Not sure if I did something wrong in the setup, but it hangs itself when it tries to load media.
- Spoiler: show
-
GodDragon
- Explorer At Heart

- Posts: 795
- Joined: Sun Jun 11, 2017 4:30 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
You problably don't have any tease media (images in this case) assigned folder wise:FluffyKitten~ wrote: Sun Dec 20, 2020 11:00 pm Not sure if I did something wrong in the setup, but it hangs itself when it tries to load media.
- Spoiler: show

- candriver
- Explorer

- Posts: 96
- Joined: Sat Jun 22, 2013 8:18 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
I took a quick look at code and while it looks a lot better at choosing files (before it just randomly run them, which sometimes resulted in needlessly trying to run same file multiple times) it does not seem to address the issue of those files looping back to runPunishment().
In runPunishment(level) the "level" argument only decides which folders to run. Currently it does not really matter since all but one punishment use folder "Any". It will always try to run all files from “Any” same as before, just more efficiently since they will not repeat until “availableFiles” empties.
Trouble is, actual level check happens inside the files (LineWritingPunishment.js as example):
- this file will run runPunishment() straight away, if punishment level is 2 or 3, regardless of level inside runPunishment()
runPunishment() does not change PUNISHMENT_CURRENT_LEVEL (nor does it affect any other condition at the beginning of those files)
In runPunishment(level) the "level" argument only decides which folders to run. Currently it does not really matter since all but one punishment use folder "Any". It will always try to run all files from “Any” same as before, just more efficiently since they will not repeat until “availableFiles” empties.
Trouble is, actual level check happens inside the files (LineWritingPunishment.js as example):
Code: Select all
{
//No punishments with higher than medium should be line writing
if (PUNISHMENT_CURRENT_LEVEL.id > PUNISHMENT_LEVEL.MEDIUM.id) {
runPunishment(PUNISHMENT_CURRENT_LEVEL);
} else {
...runPunishment() does not change PUNISHMENT_CURRENT_LEVEL (nor does it affect any other condition at the beginning of those files)
FlashTease to TeaseMe conversions.
-
FluffyKitten~
- Explorer

- Posts: 6
- Joined: Thu Jun 01, 2017 5:53 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Oh you are right. I do not have any image folder under tease. Did not get what it was for. Thank you for the help, will give it another tryGodDragon wrote: Sun Dec 20, 2020 11:24 pm You problably don't have any tease media (images in this case) assigned folder wise: https://i.imgur.com/PrtH24g.png
Also thank you for doing this, looks like quite a lot of work went into it
-
GodDragon
- Explorer At Heart

- Posts: 795
- Joined: Sun Jun 11, 2017 4:30 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Very true. I completely forgot about that. Thanks for the help. I now adjust the PUNISHMENT_CURRENT_LEVEL inside the run function if I am changing the level scope. I guess that should workcandriver wrote: Mon Dec 21, 2020 12:07 am I took a quick look at code and while it looks a lot better at choosing files (before it just randomly run them, which sometimes resulted in needlessly trying to run same file multiple times) it does not seem to address the issue of those files looping back to runPunishment().
In runPunishment(level) the "level" argument only decides which folders to run. Currently it does not really matter since all but one punishment use folder "Any". It will always try to run all files from “Any” same as before, just more efficiently since they will not repeat until “availableFiles” empties.
Trouble is, actual level check happens inside the files (LineWritingPunishment.js as example):
- this file will run runPunishment() straight away, if punishment level is 2 or 3, regardless of level inside runPunishment()Code: Select all
{ //No punishments with higher than medium should be line writing if (PUNISHMENT_CURRENT_LEVEL.id > PUNISHMENT_LEVEL.MEDIUM.id) { runPunishment(PUNISHMENT_CURRENT_LEVEL); } else { ...
runPunishment() does not change PUNISHMENT_CURRENT_LEVEL (nor does it affect any other condition at the beginning of those files)
- candriver
- Explorer

- Posts: 96
- Joined: Sat Jun 22, 2013 8:18 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
In PunishmentBase.js there is a typo on lines 403 and 405, %SlaveNam% instead of %SlaveName%
FlashTease to TeaseMe conversions.
- candriver
- Explorer

- Posts: 96
- Joined: Sat Jun 22, 2013 8:18 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
runPunishment() has an error:
availableFiles.push(anyFiles[x])
Probably because availableFiles is defined as:
And only becomes an array under certain conditions:
Edit:
I changed it to:
availableFiles.push(anyFiles[x])
Code: Select all
Error: TypeError: Cannot read property "push" from undefined in <eval> at line number 235Code: Select all
let availableFiles = undefined;Code: Select all
if (getFile(getPersonalityPath() + PATH_SEPARATOR + levelPath).exists()) {
availableFiles = getScriptFilesInFolder(levelPath + PATH_SEPARATOR);
}I changed it to:
Code: Select all
if (getFile(getPersonalityPath() + PATH_SEPARATOR + levelPath).exists()) {
availableFiles = getScriptFilesInFolder(levelPath + PATH_SEPARATOR);
} else {
availableFiles = [];
}FlashTease to TeaseMe conversions.
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
Downloaded the latest github build and did copy/replace, am now getting some errors every session with "MODULES_FOR_CATEGORY".
An error like this will kick me from session to assistant:
An error like this will kick me from session to assistant:
- Spoiler: show
- Spoiler: show
Re: [Tease AI Java] Spicy (Open Alpha | 16.12 | v0.1.5.1)
AnalDepth.js contains
It should probably be
Code: Select all
if (DILDOS[y].diameter >= getVar(VARIABLE.MAX_ANAL_DIAMETER)) {Code: Select all
if (DILDOS[y].diameter >= getVar(VARIABLE.MAX_ANAL_LENGTH)) {