[Tease AI Java] Developer's Guide and Help Thread

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

ski23
Explorer At Heart
Explorer At Heart
Posts: 464
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by ski23 »

GodDragon wrote: Sun Nov 25, 2018 7:26 pm
ski23 wrote: Sun Nov 25, 2018 6:53 pm
genome231 wrote: Sun Nov 25, 2018 3:36 pm Okay!

So I feel like I'm almost there, but something is still eluding me...

So this is run in the setup.

Code: Select all

let separator = java.io.File.separator; //Why is this necessary?
let teasePath;

function setUpMedia() {
    let TeaseAI = Java.type("me.goddragon.teaseai.TeaseAI");
    let file = new java.io.File(TeaseAI.class.getProtectionDomain().getCodeSource().getLocation().toURI());
    //The path to the main directory
    teasePath = file.getParent();
    sendMessage(teasePath); //Produces the correct path, tested it.
}
So I'm confident this part works. Because the sendMessage at the end produces the right path.
The full path for which I'm testing is:

A:\TeaseAI_Java\Images\General_Pics\Charlotte Springer\1
and sendMessage(teasePath); produces A:\TeaseAI_Java when I test it.

So there seems to be something wrong with this one..

Code: Select all

function showTaggedPic(imagePath, imageTags, delay) {
    let path = teasePath + separator + imagePath;
    let pictureHandler = Java.type("me.goddragon.teaseai.api.picture.PictureHandler");
    let matchingImages = pictureHandler.getHandler().getTaggedPicturesExact(new java.io.File(path), imageTags);
    if (matchingImages === null) {
    	sendMessage("BUG: matchingImages was equal to null",4);
    } else {
    	let randomImage = matchingImages.get(randomInteger(0, matchingImages.length - 1));
    	let toReturn = showImage(randomImage.getFile().getPath());
    if (delay != null) {
        sleep(delay);
    }
    return toReturn;
    }
}
This is my test file:

Code: Select all

sendMessage("Test_Start");
setTypeSpeed("INSTANT");
run("Functions/01_functions_Basic.js");
run("Functions/02_functions_Chat.js");
run("Functions/03_functions_Media.js");
run("Functions/04_functions_Stroking.js");
run("Functions/05_functions_Structure.js");
run("Functions/06_functions_Check.js");
sendMessage("Loading stroking routines");
setUpMedia();
setTypeSpeed("MEDIUM");
showTaggedPic("Images/General_Pics/Charlotte Springer/1",["TagFullyDressed"],5);
sendMessage("Test_End", 60);
When it runs the showTaggedPic it produces the error: sendMessage("BUG: matchingImages was equal to null",4);

What is it that I'm missing or not quite getting and please get into details :P I'm very new at this.

Cheers
And thank you for all the patience so far xD
Second, don't use "/" in your paths. "/" will cancel out the meaning of the next character. So, for example, if you wanted to print out a quotation mark, you would do it like this "/"" because it will nullify the special meaning of the quotation mark. It is possible to use "//" instead. However, DON'T do this because it will be incompatible with MacOs and Linux. Instead, in paths, you should always use "\" or use the separator variable at the top. (I recommend using the separator var)
Actually \ is used to escape the next character not / :-)
good catch. Just edited that.
User avatar
genome231
Explorer At Heart
Explorer At Heart
Posts: 684
Joined: Wed Nov 12, 2014 8:35 am

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by genome231 »

ski23 wrote: Sun Nov 25, 2018 6:53 pm So there are a couple issues I see. The first one isn't really causing your issue but it's important to note. In your function, you print out that if matchingImages is null, it is a bug. That isn't true. If you call showTaggedPic("Images/General_Pics/Charlotte Springer/1",["Boobs"],5); and there aren't any images that have the tag boobs, then that isn't a bug. It just means none were found and you should do whatever you want in that case.
I know this :-)
But in my case I would considder this a bug (or at least something that shouldn't occur ever). Basically my domme sets have 4 tags and 4 tags only.
FullyDressed, HalfDressed, GarmentCovering and boobs. Only 1 tag per image.
ski23 wrote: Sun Nov 25, 2018 6:53 pm Second, for why separator is at the top, don't use "\" in your paths. "\" will cancel out the meaning of the next character. So, for example, if you wanted to print out a quotation mark, you would do it like this "\"" because it will nullify the special meaning of the quotation mark. It is possible to use "\\" instead. However, DON'T do this because it will be incompatible with MacOs and Linux. Instead, in paths, you should always use "/" or use the separator variable at the top. (I recommend using the separator var)
I understand that I am correct using "/"? from Goddragons post?
ski23 wrote: Sun Nov 25, 2018 6:53 pm Third, don't include tag in the tag name, just the name. For example, use "boobs" not "TagBoobs".
Finally, I checked and the showTaggedImagesExact function only shows images with the provided tags and will not search for dress states such as "naked", "halfdressed", "fullydressed", etc. I'll change this when I get the chance though. For now, try using any tags listed in the tags list with the other changes above.
This last statement confuses me a bit. Please elaborate.
Where can I find a list of available tags? I assumed the different tags you can set through settings in the program were all working?
showTaggedImagesExact function, what function is that? Never heard of it. It's not in the github, but I cant seem to find it in your scripts as well?

Cheers
Genome
Tribute to 1885 & those involved with Tease-AI.
Thank you for spending time on this awesome project! :-)
ski23
Explorer At Heart
Explorer At Heart
Posts: 464
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by ski23 »

genome231 wrote: Mon Nov 26, 2018 4:31 pm
ski23 wrote: Sun Nov 25, 2018 6:53 pm So there are a couple issues I see. The first one isn't really causing your issue but it's important to note. In your function, you print out that if matchingImages is null, it is a bug. That isn't true. If you call showTaggedPic("Images/General_Pics/Charlotte Springer/1",["Boobs"],5); and there aren't any images that have the tag boobs, then that isn't a bug. It just means none were found and you should do whatever you want in that case.
I know this :-)
But in my case I would considder this a bug (or at least something that shouldn't occur ever). Basically my domme sets have 4 tags and 4 tags only.
FullyDressed, HalfDressed, GarmentCovering and boobs. Only 1 tag per image.
ski23 wrote: Sun Nov 25, 2018 6:53 pm Second, for why separator is at the top, don't use "\" in your paths. "\" will cancel out the meaning of the next character. So, for example, if you wanted to print out a quotation mark, you would do it like this "\"" because it will nullify the special meaning of the quotation mark. It is possible to use "\\" instead. However, DON'T do this because it will be incompatible with MacOs and Linux. Instead, in paths, you should always use "/" or use the separator variable at the top. (I recommend using the separator var)
I understand that I am correct using "/"? from Goddragons post?
ski23 wrote: Sun Nov 25, 2018 6:53 pm Third, don't include tag in the tag name, just the name. For example, use "boobs" not "TagBoobs".
Finally, I checked and the showTaggedImagesExact function only shows images with the provided tags and will not search for dress states such as "naked", "halfdressed", "fullydressed", etc. I'll change this when I get the chance though. For now, try using any tags listed in the tags list with the other changes above.
This last statement confuses me a bit. Please elaborate.
Where can I find a list of available tags? I assumed the different tags you can set through settings in the program were all working?
showTaggedImagesExact function, what function is that? Never heard of it. It's not in the github, but I cant seem to find it in your scripts as well?

Cheers
Genome
1. Ok that sounds fine then.
2. Yea you are correct
3. The issue you are running into is this:
A tagged image in TAJ has a list of PictureTags. Here is the list of all picture Tags. However, a tagged Picture also has a variable for a "dress state" that denotes the dress state in the image. If you look at the method I gave you that you're using, the guts of it that is actually getting the list of pictures is this line:

Code: Select all

let matchingImages = pictureHandler.getHandler().getTaggedPicturesExact(new java.io.File(path), imageTags);
This is accessing the getTaggedPicturesExact method in this class inside of TAJ and will return the list of files that have the "Picture Tags" given to the function. However, since "naked", "halfdressed", etc. aren't actually picture tags but dress states, the function doesn't currently recognize pictures that have those dress states. I will modify this function to recognize dress states as well as picture tags in an upcoming release though.
User avatar
genome231
Explorer At Heart
Explorer At Heart
Posts: 684
Joined: Wed Nov 12, 2014 8:35 am

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by genome231 »

Okay so with that in mind I gave it another try using "boobs", which should work.
Still cant get it to work.

Code: Select all

showTaggedPic("Images" + separator + "General_Pics" + separator + "Charlotte Springer" + separator + "1",["boobs"],5);
When the above command is tested this will print out:
A:\TeaseAI_Java\Images\General_Pics\Charlotte Springer\1 (so it gets the path right :-) )
Then crash for unknown reason.

These are the functions I call:

Code: Select all

let teasePath;

function setUpMedia() {
    let TeaseAI = Java.type("me.goddragon.teaseai.TeaseAI");
    let file = new java.io.File(TeaseAI.class.getProtectionDomain().getCodeSource().getLocation().toURI());
    //The path to the main directory
    teasePath = file.getParent();
}


function showTaggedPic(imagePath, imageTags, delay) {
    let path = teasePath + separator + imagePath;
    sendMessage(path);
    let pictureHandler = Java.type("me.goddragon.teaseai.api.picture.PictureHandler");
    let matchingImages = pictureHandler.getHandler().getTaggedPicturesExact(new java.io.File(path), imageTags);
    if (matchingImages = null) {
    	sendMessage("BUG: matchingImages was equal to null",4);
    } else {
    	let randomImage = matchingImages.get(randomInteger(0, matchingImages.length - 1));
    	let toReturn = showImage(randomImage.getFile().getPath());
    if (delay != null) {
        sleep(delay);
    }
    return toReturn;
    }
}
I confirmed that there are multiple images in that folder with the tag: TagBoobs,

These have all been tagged using Tease-AI Java.
Spoiler: show

Code: Select all

IMG_0001.JPG TagFullyDressed
IMG_0002.JPG TagFullyDressed
IMG_0003.JPG TagFullyDressed
IMG_0004.JPG TagFullyDressed
IMG_0005.JPG TagFullyDressed
IMG_0006.JPG TagFullyDressed
IMG_0007.JPG TagFullyDressed
IMG_0008.JPG TagFullyDressed
IMG_0009.JPG TagFullyDressed
IMG_0010.JPG TagFullyDressed
IMG_0011.JPG TagFullyDressed
IMG_0012.JPG TagFullyDressed
IMG_0013.JPG TagFullyDressed
IMG_0014.JPG TagFullyDressed
IMG_0015.JPG TagFullyDressed
IMG_0016.JPG TagFullyDressed
IMG_0017.JPG TagFullyDressed
IMG_0018.JPG TagFullyDressed
IMG_0019.JPG TagFullyDressed
IMG_0020.JPG TagFullyDressed
IMG_0021.JPG TagFullyDressed
IMG_0022.JPG TagFullyDressed
IMG_0023.JPG TagFullyDressed
IMG_0024.JPG TagFullyDressed
IMG_0025.JPG TagFullyDressed
IMG_0026.JPG TagFullyDressed
IMG_0027.JPG TagFullyDressed
IMG_0028.JPG TagFullyDressed
IMG_0029.JPG TagFullyDressed
IMG_0030.JPG TagFullyDressed
IMG_0031.JPG TagFullyDressed
IMG_0032.JPG TagFullyDressed
IMG_0033.JPG TagFullyDressed
IMG_0034.JPG TagFullyDressed
IMG_0035.JPG TagFullyDressed
IMG_0036.JPG TagFullyDressed
IMG_0037.JPG TagFullyDressed
IMG_0038.JPG TagFullyDressed
IMG_0039.JPG TagFullyDressed
IMG_0040.JPG TagFullyDressed
IMG_0041.JPG TagFullyDressed
IMG_0042.JPG TagFullyDressed
IMG_0043.JPG TagFullyDressed
IMG_0044.JPG TagFullyDressed
IMG_0045.JPG TagFullyDressed
IMG_0046.JPG TagFullyDressed
IMG_0047.JPG TagFullyDressed
IMG_0048.JPG TagFullyDressed
IMG_0049.JPG TagFullyDressed
IMG_0050.JPG TagFullyDressed
IMG_0051.JPG TagFullyDressed
IMG_0052.JPG TagFullyDressed
IMG_0053.JPG TagFullyDressed
IMG_0054.JPG TagFullyDressed
IMG_0055.JPG TagFullyDressed
IMG_0056.JPG TagFullyDressed
IMG_0057.JPG TagFullyDressed
IMG_0058.JPG TagFullyDressed
IMG_0059.JPG TagFullyDressed
IMG_0060.JPG TagFullyDressed
IMG_0061.JPG TagFullyDressed
IMG_0062.JPG TagFullyDressed
IMG_0063.JPG TagFullyDressed
IMG_0064.JPG TagFullyDressed
IMG_0065.JPG TagFullyDressed
IMG_0066.JPG TagFullyDressed
IMG_0067.JPG TagFullyDressed
IMG_0068.JPG TagFullyDressed
IMG_0069.JPG TagFullyDressed
IMG_0070.JPG TagFullyDressed
IMG_0071.JPG TagHalfDressed
IMG_0072.JPG TagHalfDressed
IMG_0073.JPG TagHalfDressed
IMG_0074.JPG TagHalfDressed
IMG_0075.JPG TagHalfDressed
IMG_0076.JPG TagHalfDressed
IMG_0077.JPG TagHalfDressed
IMG_0078.JPG TagHalfDressed
IMG_0079.JPG TagHalfDressed
IMG_0080.JPG TagHalfDressed
IMG_0081.JPG TagHalfDressed
IMG_0082.JPG TagHalfDressed
IMG_0083.JPG TagHalfDressed
IMG_0084.JPG TagHalfDressed
IMG_0085.JPG TagHalfDressed
IMG_0086.JPG TagHalfDressed
IMG_0087.JPG TagHalfDressed
IMG_0088.JPG TagHalfDressed
IMG_0089.JPG TagHalfDressed
IMG_0090.JPG TagHalfDressed
IMG_0091.JPG TagHalfDressed
IMG_0092.JPG TagHalfDressed
IMG_0093.JPG TagHalfDressed
IMG_0094.JPG TagHalfDressed
IMG_0095.JPG TagHalfDressed
IMG_0096.JPG TagHalfDressed
IMG_0097.JPG TagHalfDressed
IMG_0098.JPG TagHalfDressed
IMG_0099.JPG TagHalfDressed
IMG_0100.JPG TagHalfDressed
IMG_0101.JPG TagHalfDressed
IMG_0102.JPG TagHalfDressed
IMG_0103.JPG TagHalfDressed
IMG_0104.JPG TagHalfDressed
IMG_0105.JPG TagHalfDressed
IMG_0106.JPG TagHalfDressed
IMG_0107.JPG TagHalfDressed
IMG_0108.JPG TagHalfDressed
IMG_0109.JPG TagHalfDressed
IMG_0110.JPG TagHalfDressed
IMG_0111.JPG TagHalfDressed
IMG_0112.JPG TagHalfDressed
IMG_0113.JPG TagHalfDressed
IMG_0114.JPG TagHalfDressed
IMG_0115.JPG TagHalfDressed
IMG_0116.JPG TagHalfDressed
IMG_0117.JPG TagHalfDressed
IMG_0118.JPG TagHalfDressed
IMG_0119.JPG TagHalfDressed
IMG_0120.JPG TagHalfDressed
IMG_0121.JPG TagHalfDressed
IMG_0122.JPG TagHalfDressed
IMG_0123.JPG TagGarmentCovering
IMG_0124.JPG TagGarmentCovering
IMG_0125.JPG TagGarmentCovering
IMG_0126.JPG TagGarmentCovering
IMG_0127.JPG TagGarmentCovering
IMG_0128.JPG TagGarmentCovering
IMG_0129.JPG TagBoobs
IMG_0130.JPG TagBoobs
IMG_0131.JPG TagBoobs
IMG_0132.JPG TagBoobs
IMG_0133.JPG TagBoobs
IMG_0134.JPG TagGarmentCovering
IMG_0135.JPG TagGarmentCovering
IMG_0136.JPG TagGarmentCovering
IMG_0137.JPG TagGarmentCovering
IMG_0138.JPG TagGarmentCovering
IMG_0139.JPG TagGarmentCovering
IMG_0140.JPG TagBoobs
IMG_0141.JPG TagBoobs
IMG_0142.JPG TagBoobs
What is wrong?

This is the test-script btw:

Code: Select all

run("Functions/01_functions_Chat.js");
setUpChat();
setTypeSpeed("INSTANT");
SMessage("Test_Start",0);
SMessage("Loading 1 / 6",0);
run("Functions/02_functions_Basic.js");
run("Functions/03_functions_Media.js");
setUpMedia();
run("Functions/04_functions_Stroking.js");
run("Functions/05_functions_Structure.js");
run("Functions/06_functions_Check.js");
run("Functions/Routines/list.js");
run("Test/TestVar.js");
setTypeSpeed("MEDIUM");
showTaggedPic("Images" + separator + "General_Pics" + separator + "Charlotte Springer" + separator + "1",["boobs"],5);
sendMessage("Test_End", 60);

Last edited by genome231 on Mon Nov 26, 2018 5:03 pm, edited 1 time in total.
Tribute to 1885 & those involved with Tease-AI.
Thank you for spending time on this awesome project! :-)
ski23
Explorer At Heart
Explorer At Heart
Posts: 464
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by ski23 »

genome231 wrote: Mon Nov 26, 2018 5:00 pm Okay so with that in mind I gave it another try using "boobs", which should work.
Still cant get it to work.

Code: Select all

showTaggedPic("Images" + separator + "General_Pics" + separator + "Charlotte Springer" + separator + "1",["boobs"],5);
When the above command is tested this will print out:
A:\TeaseAI_Java\Images\General_Pics\Charlotte Springer\1 (so it gets the path right :-) )
Then crash for unknown reason.

These are the functions I call:

Code: Select all

let teasePath;

function setUpMedia() {
    let TeaseAI = Java.type("me.goddragon.teaseai.TeaseAI");
    let file = new java.io.File(TeaseAI.class.getProtectionDomain().getCodeSource().getLocation().toURI());
    //The path to the main directory
    teasePath = file.getParent();
}


function showTaggedPic(imagePath, imageTags, delay) {
    let path = teasePath + separator + imagePath;
    sendMessage(path);
    let pictureHandler = Java.type("me.goddragon.teaseai.api.picture.PictureHandler");
    let matchingImages = pictureHandler.getHandler().getTaggedPicturesExact(new java.io.File(path), imageTags);
    if (matchingImages = null) {
    	sendMessage("BUG: matchingImages was equal to null",4);
    } else {
    	let randomImage = matchingImages.get(randomInteger(0, matchingImages.length - 1));
    	let toReturn = showImage(randomImage.getFile().getPath());
    if (delay != null) {
        sleep(delay);
    }
    return toReturn;
    }
}
I confirmed that there are multiple images in that folder with the tag: TagBoobs,

These have all been tagged using Tease-AI Java.
Spoiler: show

Code: Select all

IMG_0001.JPG TagFullyDressed
IMG_0002.JPG TagFullyDressed
IMG_0003.JPG TagFullyDressed
IMG_0004.JPG TagFullyDressed
IMG_0005.JPG TagFullyDressed
IMG_0006.JPG TagFullyDressed
IMG_0007.JPG TagFullyDressed
IMG_0008.JPG TagFullyDressed
IMG_0009.JPG TagFullyDressed
IMG_0010.JPG TagFullyDressed
IMG_0011.JPG TagFullyDressed
IMG_0012.JPG TagFullyDressed
IMG_0013.JPG TagFullyDressed
IMG_0014.JPG TagFullyDressed
IMG_0015.JPG TagFullyDressed
IMG_0016.JPG TagFullyDressed
IMG_0017.JPG TagFullyDressed
IMG_0018.JPG TagFullyDressed
IMG_0019.JPG TagFullyDressed
IMG_0020.JPG TagFullyDressed
IMG_0021.JPG TagFullyDressed
IMG_0022.JPG TagFullyDressed
IMG_0023.JPG TagFullyDressed
IMG_0024.JPG TagFullyDressed
IMG_0025.JPG TagFullyDressed
IMG_0026.JPG TagFullyDressed
IMG_0027.JPG TagFullyDressed
IMG_0028.JPG TagFullyDressed
IMG_0029.JPG TagFullyDressed
IMG_0030.JPG TagFullyDressed
IMG_0031.JPG TagFullyDressed
IMG_0032.JPG TagFullyDressed
IMG_0033.JPG TagFullyDressed
IMG_0034.JPG TagFullyDressed
IMG_0035.JPG TagFullyDressed
IMG_0036.JPG TagFullyDressed
IMG_0037.JPG TagFullyDressed
IMG_0038.JPG TagFullyDressed
IMG_0039.JPG TagFullyDressed
IMG_0040.JPG TagFullyDressed
IMG_0041.JPG TagFullyDressed
IMG_0042.JPG TagFullyDressed
IMG_0043.JPG TagFullyDressed
IMG_0044.JPG TagFullyDressed
IMG_0045.JPG TagFullyDressed
IMG_0046.JPG TagFullyDressed
IMG_0047.JPG TagFullyDressed
IMG_0048.JPG TagFullyDressed
IMG_0049.JPG TagFullyDressed
IMG_0050.JPG TagFullyDressed
IMG_0051.JPG TagFullyDressed
IMG_0052.JPG TagFullyDressed
IMG_0053.JPG TagFullyDressed
IMG_0054.JPG TagFullyDressed
IMG_0055.JPG TagFullyDressed
IMG_0056.JPG TagFullyDressed
IMG_0057.JPG TagFullyDressed
IMG_0058.JPG TagFullyDressed
IMG_0059.JPG TagFullyDressed
IMG_0060.JPG TagFullyDressed
IMG_0061.JPG TagFullyDressed
IMG_0062.JPG TagFullyDressed
IMG_0063.JPG TagFullyDressed
IMG_0064.JPG TagFullyDressed
IMG_0065.JPG TagFullyDressed
IMG_0066.JPG TagFullyDressed
IMG_0067.JPG TagFullyDressed
IMG_0068.JPG TagFullyDressed
IMG_0069.JPG TagFullyDressed
IMG_0070.JPG TagFullyDressed
IMG_0071.JPG TagHalfDressed
IMG_0072.JPG TagHalfDressed
IMG_0073.JPG TagHalfDressed
IMG_0074.JPG TagHalfDressed
IMG_0075.JPG TagHalfDressed
IMG_0076.JPG TagHalfDressed
IMG_0077.JPG TagHalfDressed
IMG_0078.JPG TagHalfDressed
IMG_0079.JPG TagHalfDressed
IMG_0080.JPG TagHalfDressed
IMG_0081.JPG TagHalfDressed
IMG_0082.JPG TagHalfDressed
IMG_0083.JPG TagHalfDressed
IMG_0084.JPG TagHalfDressed
IMG_0085.JPG TagHalfDressed
IMG_0086.JPG TagHalfDressed
IMG_0087.JPG TagHalfDressed
IMG_0088.JPG TagHalfDressed
IMG_0089.JPG TagHalfDressed
IMG_0090.JPG TagHalfDressed
IMG_0091.JPG TagHalfDressed
IMG_0092.JPG TagHalfDressed
IMG_0093.JPG TagHalfDressed
IMG_0094.JPG TagHalfDressed
IMG_0095.JPG TagHalfDressed
IMG_0096.JPG TagHalfDressed
IMG_0097.JPG TagHalfDressed
IMG_0098.JPG TagHalfDressed
IMG_0099.JPG TagHalfDressed
IMG_0100.JPG TagHalfDressed
IMG_0101.JPG TagHalfDressed
IMG_0102.JPG TagHalfDressed
IMG_0103.JPG TagHalfDressed
IMG_0104.JPG TagHalfDressed
IMG_0105.JPG TagHalfDressed
IMG_0106.JPG TagHalfDressed
IMG_0107.JPG TagHalfDressed
IMG_0108.JPG TagHalfDressed
IMG_0109.JPG TagHalfDressed
IMG_0110.JPG TagHalfDressed
IMG_0111.JPG TagHalfDressed
IMG_0112.JPG TagHalfDressed
IMG_0113.JPG TagHalfDressed
IMG_0114.JPG TagHalfDressed
IMG_0115.JPG TagHalfDressed
IMG_0116.JPG TagHalfDressed
IMG_0117.JPG TagHalfDressed
IMG_0118.JPG TagHalfDressed
IMG_0119.JPG TagHalfDressed
IMG_0120.JPG TagHalfDressed
IMG_0121.JPG TagHalfDressed
IMG_0122.JPG TagHalfDressed
IMG_0123.JPG TagGarmentCovering
IMG_0124.JPG TagGarmentCovering
IMG_0125.JPG TagGarmentCovering
IMG_0126.JPG TagGarmentCovering
IMG_0127.JPG TagGarmentCovering
IMG_0128.JPG TagGarmentCovering
IMG_0129.JPG TagBoobs
IMG_0130.JPG TagBoobs
IMG_0131.JPG TagBoobs
IMG_0132.JPG TagBoobs
IMG_0133.JPG TagBoobs
IMG_0134.JPG TagGarmentCovering
IMG_0135.JPG TagGarmentCovering
IMG_0136.JPG TagGarmentCovering
IMG_0137.JPG TagGarmentCovering
IMG_0138.JPG TagGarmentCovering
IMG_0139.JPG TagGarmentCovering
IMG_0140.JPG TagBoobs
IMG_0141.JPG TagBoobs
IMG_0142.JPG TagBoobs
What is wrong?
Can you post the logs from the crash. Also, I fixed some issues with images and tagging a bit back that I believe GodDragon should be pushing to live today so you might be running into those bugs. I'll be able to tell from your logs.
User avatar
genome231
Explorer At Heart
Explorer At Heart
Posts: 684
Joined: Wed Nov 12, 2014 8:35 am

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by genome231 »

ski23 wrote: Mon Nov 26, 2018 5:03 pm
Can you post the logs from the crash. Also, I fixed some issues with images and tagging a bit back that I believe GodDragon should be pushing to live today so you might be running into those bugs. I'll be able to tell from your logs.
05:59:10 PM INFO: Loaded 19 vocabularies.
05:59:10 PM INFO: Loaded 0 responses.
05:59:10 PM INFO: Finished setting up chat.
05:59:10 PM CHAT: Test_Start
05:59:10 PM CHAT: Loading 1 / 6
05:59:11 PM CHAT: Loading 2 / 6
05:59:11 PM CHAT: Loading 3 / 6
05:59:11 PM CHAT: 05:59 PM Charlotte: A:\TeaseAI_Java
05:59:12 PM CHAT: Loading 4 / 6
05:59:13 PM CHAT: Loading 5 / 6
05:59:13 PM CHAT: Loading 6 / 6
05:59:13 PM CHAT: R1
05:59:13 PM CHAT: R2
05:59:14 PM CHAT: Loaded Test-Var's
05:59:20 PM CHAT: 05:59 PM Charlotte: A:\TeaseAI_Java\Images\General_Pics\Charlotte Springer\1
05:59:26 PM SEVERE: Latest loaded file was 'A:\TeaseAI_Java\Personalities\Test\Test\TestVar.js' and error was found in line 61
Error: TypeError: null has no such function "get" in <eval> at line number 61
javax.script.ScriptException: TypeError: null has no such function "get" in <eval> at line number 61
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(Unknown Source)
at java.scripting/javax.script.AbstractScriptEngine.eval(Unknown Source)
at me.goddragon.teaseai.api.scripts.ScriptHandler.runScript(ScriptHandler.java:159)
at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:120)
at me.goddragon.teaseai.api.session.Session$2.run(Session.java:46)
Caused by: <eval>:61 TypeError: null has no such function "get"
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(Unknown Source)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1067$1237AAI$\^eval\_$cu1$restOf.showTaggedPic(<eval>:61)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1007$\^eval\_.:program(<eval>:15)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(Unknown Source)
... 8 more
Tribute to 1885 & those involved with Tease-AI.
Thank you for spending time on this awesome project! :-)
ski23
Explorer At Heart
Explorer At Heart
Posts: 464
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by ski23 »

genome231 wrote: Mon Nov 26, 2018 5:05 pm
ski23 wrote: Mon Nov 26, 2018 5:03 pm
Can you post the logs from the crash. Also, I fixed some issues with images and tagging a bit back that I believe GodDragon should be pushing to live today so you might be running into those bugs. I'll be able to tell from your logs.
05:59:10 PM INFO: Loaded 19 vocabularies.
05:59:10 PM INFO: Loaded 0 responses.
05:59:10 PM INFO: Finished setting up chat.
05:59:10 PM CHAT: Test_Start
05:59:10 PM CHAT: Loading 1 / 6
05:59:11 PM CHAT: Loading 2 / 6
05:59:11 PM CHAT: Loading 3 / 6
05:59:11 PM CHAT: 05:59 PM Charlotte: A:\TeaseAI_Java
05:59:12 PM CHAT: Loading 4 / 6
05:59:13 PM CHAT: Loading 5 / 6
05:59:13 PM CHAT: Loading 6 / 6
05:59:13 PM CHAT: R1
05:59:13 PM CHAT: R2
05:59:14 PM CHAT: Loaded Test-Var's
05:59:20 PM CHAT: 05:59 PM Charlotte: A:\TeaseAI_Java\Images\General_Pics\Charlotte Springer\1
05:59:26 PM SEVERE: Latest loaded file was 'A:\TeaseAI_Java\Personalities\Test\Test\TestVar.js' and error was found in line 61
Error: TypeError: null has no such function "get" in <eval> at line number 61
javax.script.ScriptException: TypeError: null has no such function "get" in <eval> at line number 61
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(Unknown Source)
at java.scripting/javax.script.AbstractScriptEngine.eval(Unknown Source)
at me.goddragon.teaseai.api.scripts.ScriptHandler.runScript(ScriptHandler.java:159)
at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:120)
at me.goddragon.teaseai.api.session.Session$2.run(Session.java:46)
Caused by: <eval>:61 TypeError: null has no such function "get"
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(Unknown Source)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(Unknown Source)
at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(Unknown Source)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1067$1237AAI$\^eval\_$cu1$restOf.showTaggedPic(<eval>:61)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1007$\^eval\_.:program(<eval>:15)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(Unknown Source)
... 8 more
You do
if (matchingImages = null) {
sendMessage

This needs to be an ==. Use = to assign the value of a variable and == to test what the value of a variable is.
CatCrap
Explorer
Explorer
Posts: 24
Joined: Tue Jul 12, 2016 9:08 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by CatCrap »

Hi

I am exploring TeaseAI java and trying to create a mini game module.
Before I go down the rabbit hole of java, let me explain what I am trying to do. You can then advise if it is possible with TeaseAI.

I would like to draw a rectangle in a location over the current image.

Sounds simple right?

I tried using the javafx library to do it, but can not figure out how to output to the current stage...
Don't know if I am barking up the wrong tree.

Is it possible to interact with the stage in this way? perhaps some other fashion besides the javafx library that I might not have thought of?

If not, could it be considered for a future release?
Bonus points if we can detect mouse movements and keyboard presses outside the chat box.
It opens up possibilities such as a user must click a specific location in a picture to succeed.
Or using the arrow keys to move stuff around on the screen.

For what it is worth, here is the code I played with in the module.
I tried manipulating the "primaryStage" in the TeaseAI.java class. But that was just me grasping at straws.

Code: Select all

DMessage("Module game1 start", 1); 


rectangle = new javafx.scene.shape.Rectangle();  
      
      //Setting the properties of the rectangle 
      rectangle.setX(150); 
      rectangle.setY(75); 
      rectangle.setWidth(300); 
      rectangle.setHeight(150);      
         
      //Creating a Group object  
      root = new javafx.scene.Group(rectangle); 
         
      //Creating a scene object 
      scene = new javafx.scene.Scene(root, 600, 300);  

      
      //Setting the title to the Stage as a test
      TeaseAI.primaryStage.setTitle("Please work"); 
         
      //Adding the scene object to the stage 
      TeaseAI.primaryStage.setScene(scene); 
         
      //Displaying the contents of the stage again in an attempt to refresh...
      TeaseAI.primaryStage.show(); 
	  
	  
	  
	  
Dmessage("Module game1 End");
ski23
Explorer At Heart
Explorer At Heart
Posts: 464
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by ski23 »

CatCrap wrote: Sun Jan 06, 2019 9:56 pm Hi

I am exploring TeaseAI java and trying to create a mini game module.
Before I go down the rabbit hole of java, let me explain what I am trying to do. You can then advise if it is possible with TeaseAI.

I would like to draw a rectangle in a location over the current image.

Sounds simple right?

I tried using the javafx library to do it, but can not figure out how to output to the current stage...
Don't know if I am barking up the wrong tree.

Is it possible to interact with the stage in this way? perhaps some other fashion besides the javafx library that I might not have thought of?

If not, could it be considered for a future release?
Bonus points if we can detect mouse movements and keyboard presses outside the chat box.
It opens up possibilities such as a user must click a specific location in a picture to succeed.
Or using the arrow keys to move stuff around on the screen.

For what it is worth, here is the code I played with in the module.
I tried manipulating the "primaryStage" in the TeaseAI.java class. But that was just me grasping at straws.

Code: Select all

DMessage("Module game1 start", 1); 


rectangle = new javafx.scene.shape.Rectangle();  
      
      //Setting the properties of the rectangle 
      rectangle.setX(150); 
      rectangle.setY(75); 
      rectangle.setWidth(300); 
      rectangle.setHeight(150);      
         
      //Creating a Group object  
      root = new javafx.scene.Group(rectangle); 
         
      //Creating a scene object 
      scene = new javafx.scene.Scene(root, 600, 300);  

      
      //Setting the title to the Stage as a test
      TeaseAI.primaryStage.setTitle("Please work"); 
         
      //Adding the scene object to the stage 
      TeaseAI.primaryStage.setScene(scene); 
         
      //Displaying the contents of the stage again in an attempt to refresh...
      TeaseAI.primaryStage.show(); 
	  
	  
	  
	  
Dmessage("Module game1 End");
I personally havent yet attempted to try doing javafx stuff within the javascript. I’ve only done jfx stuff in the Java of TAI so far. Since I am on vacation right now and don’t have my computer, unfortunately I can’t write any example code to help with this. Two things I suggest looking at though are: try using the scene that is already being used instead of a new one maybe by accessing the one in TeaseAI. Secondly, since javafx was removed on java11, you might be running into an issue when you do:
new javafx.scene ...
I would add some debug messages in to check the value of your variables you’re creating to make sure they are actually getting created. Also, if there are any error messages in the logs, look at those or post them and I can try to look.

Your code looks pretty good though. It seems like you are close. I’m working on a gui update for TAI btw and I’ll add in some stuff so that what you’re doing is much easier in the future.
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by GodDragon »

CatCrap wrote: Sun Jan 06, 2019 9:56 pm Hi

I am exploring TeaseAI java and trying to create a mini game module.
Before I go down the rabbit hole of java, let me explain what I am trying to do. You can then advise if it is possible with TeaseAI.

I would like to draw a rectangle in a location over the current image.

Sounds simple right?

I tried using the javafx library to do it, but can not figure out how to output to the current stage...
Don't know if I am barking up the wrong tree.

Is it possible to interact with the stage in this way? perhaps some other fashion besides the javafx library that I might not have thought of?

If not, could it be considered for a future release?
Bonus points if we can detect mouse movements and keyboard presses outside the chat box.
It opens up possibilities such as a user must click a specific location in a picture to succeed.
Or using the arrow keys to move stuff around on the screen.

For what it is worth, here is the code I played with in the module.
I tried manipulating the "primaryStage" in the TeaseAI.java class. But that was just me grasping at straws.

Code: Select all

DMessage("Module game1 start", 1); 


rectangle = new javafx.scene.shape.Rectangle();  
      
      //Setting the properties of the rectangle 
      rectangle.setX(150); 
      rectangle.setY(75); 
      rectangle.setWidth(300); 
      rectangle.setHeight(150);      
         
      //Creating a Group object  
      root = new javafx.scene.Group(rectangle); 
         
      //Creating a scene object 
      scene = new javafx.scene.Scene(root, 600, 300);  

      
      //Setting the title to the Stage as a test
      TeaseAI.primaryStage.setTitle("Please work"); 
         
      //Adding the scene object to the stage 
      TeaseAI.primaryStage.setScene(scene); 
         
      //Displaying the contents of the stage again in an attempt to refresh...
      TeaseAI.primaryStage.show(); 
	  
	  
	  
	  
Dmessage("Module game1 End");
The problem with your code is that you aren't providing a path to the TeaseAI.class file.
So you should try to use: me.goddragon.teaseai.TeaseAI (if that works)
Furthermore primaryStage is a class based private field. First you need the current TAJ instance:
let instance = me.goddragon.teaseai.TeaseAI.application;

Now currently there is no getter for your primaryStage. However there is the main scene that you can access:
instance.getScene(); will return it
You can play around with that. Currently I have no PC that I can use to test it, but tomorrow I might be able to work on something to show you how exactly you could do that ;)
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by GodDragon »

GodDragon wrote: Sun Jan 06, 2019 11:27 pm
The problem with your code is that you aren't providing a path to the TeaseAI.class file.
So you should try to use: me.goddragon.teaseai.TeaseAI (if that works)
Furthermore primaryStage is a class based private field. First you need the current TAJ instance:
let instance = me.goddragon.teaseai.TeaseAI.application;

Now currently there is no getter for your primaryStage. However there is the main scene that you can access:
instance.getScene(); will return it
You can play around with that. Currently I have no PC that I can use to test it, but tomorrow I might be able to work on something to show you how exactly you could do that ;)
Here is an example for your rectangle:
https://hastebin.com/oqanujumuv.js

One big example with controlling the size and stuff of the rectangle using w, a, s, d: (wasn't able to move it for some reason, but I guess that is because it is centered in the image view, there probably are solutions to this). However I would suggest creating your own window any.
https://hastebin.com/piwosuveka.js

Example for own window:
https://hastebin.com/votileqono.js
User avatar
genome231
Explorer At Heart
Explorer At Heart
Posts: 684
Joined: Wed Nov 12, 2014 8:35 am

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by genome231 »

Hey!

Having a minor issue

Creating a running vocabulary called Test.js which contains

Code: Select all

function TestVocabulary() {
	if (pHandValue == 230) {
		return "nice";
	} else {
		return "error";
	}
}
Then I'm running it in a script
var pHandValue = 230;
sendMessage("%Test%",2);

Getting error:

Code: Select all

SEVERE: Vocabulary 'Test is missing the function to trigger it. Create the function 'testVocabulary()' for this to work.
Which has me confused because the function has been created??
The chat simply prints !test!
I have this running vocabulary and it works fine..

Code: Select all

function slaveNameVocabulary() {
	var answers = ["slave","slut","pig"];
    	return answers[randomInteger(0, answers.length - 1)];
}
What am I missing?

Best regards
Tribute to 1885 & those involved with Tease-AI.
Thank you for spending time on this awesome project! :-)
GodDragon
Explorer At Heart
Explorer At Heart
Posts: 790
Joined: Sun Jun 11, 2017 4:30 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by GodDragon »

genome231 wrote: Wed Jan 09, 2019 12:55 pm Hey!

Having a minor issue

Creating a running vocabulary called Test.js which contains

Code: Select all

function TestVocabulary() {
	if (pHandValue == 230) {
		return "nice";
	} else {
		return "error";
	}
}
Then I'm running it in a script
var pHandValue = 230;
sendMessage("%Test%",2);

Getting error:

Code: Select all

SEVERE: Vocabulary 'Test is missing the function to trigger it. Create the function 'testVocabulary()' for this to work.
Which has me confused because the function has been created??
The chat simply prints !test!
I have this running vocabulary and it works fine..

Code: Select all

function slaveNameVocabulary() {
	var answers = ["slave","slut","pig"];
    	return answers[randomInteger(0, answers.length - 1)];
}
What am I missing?

Best regards
First letter of the function needs to be lower case as in the warning: testVocabulary instead of TestVocabulary (case sensitive)
CatCrap
Explorer
Explorer
Posts: 24
Joined: Tue Jul 12, 2016 9:08 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by CatCrap »

GodDragon wrote: Mon Jan 07, 2019 7:34 pm
GodDragon wrote: Sun Jan 06, 2019 11:27 pm
The problem with your code is that you aren't providing a path to the TeaseAI.class file.
So you should try to use: me.goddragon.teaseai.TeaseAI (if that works)
Furthermore primaryStage is a class based private field. First you need the current TAJ instance:
let instance = me.goddragon.teaseai.TeaseAI.application;

Now currently there is no getter for your primaryStage. However there is the main scene that you can access:
instance.getScene(); will return it
You can play around with that. Currently I have no PC that I can use to test it, but tomorrow I might be able to work on something to show you how exactly you could do that ;)
Here is an example for your rectangle:
https://hastebin.com/oqanujumuv.js

One big example with controlling the size and stuff of the rectangle using w, a, s, d: (wasn't able to move it for some reason, but I guess that is because it is centered in the image view, there probably are solutions to this). However I would suggest creating your own window any.
https://hastebin.com/piwosuveka.js

Example for own window:
https://hastebin.com/votileqono.js

Awe yes! Exactly what I was looking for!
I can now play around and script my game.
I'll share the results once something comes from this.
ski23
Explorer At Heart
Explorer At Heart
Posts: 464
Joined: Sun Jun 11, 2017 12:53 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): Courtney
Sub/Slave(s): Courtney
Location: Virginia
Contact:

Re: [Tease AI Java] Developer's Guide and Help Thread

Post by ski23 »

CatCrap wrote: Wed Jan 09, 2019 9:36 pm
GodDragon wrote: Mon Jan 07, 2019 7:34 pm
GodDragon wrote: Sun Jan 06, 2019 11:27 pm
The problem with your code is that you aren't providing a path to the TeaseAI.class file.
So you should try to use: me.goddragon.teaseai.TeaseAI (if that works)
Furthermore primaryStage is a class based private field. First you need the current TAJ instance:
let instance = me.goddragon.teaseai.TeaseAI.application;

Now currently there is no getter for your primaryStage. However there is the main scene that you can access:
instance.getScene(); will return it
You can play around with that. Currently I have no PC that I can use to test it, but tomorrow I might be able to work on something to show you how exactly you could do that ;)
Here is an example for your rectangle:
https://hastebin.com/oqanujumuv.js

One big example with controlling the size and stuff of the rectangle using w, a, s, d: (wasn't able to move it for some reason, but I guess that is because it is centered in the image view, there probably are solutions to this). However I would suggest creating your own window any.
https://hastebin.com/piwosuveka.js

Example for own window:
https://hastebin.com/votileqono.js

Awe yes! Exactly what I was looking for!
I can now play around and script my game.
I'll share the results once something comes from this.
Sounds awesome! Can’t wait to see it!
Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests