GodDragon wrote: Wed May 06, 2020 11:48 am
You should check isInt() before you are getting the int to make sure the answer is an int. The answer you were trying to parse in your first example is an answer object. If you'd want to parse it yourself you could use parseInt(answer.getAnswer())
Example of Spicy getting an integer:
https://github.com/GodDragoner/Spicy-TA ... ion.js#L97
Yeah I figured it out when I got to the answer page on the wiki.
Well how would you otherwise test it? You can comment out stuff or skip stuff using a some kind of test boolean or whatever.
You can also set typing speed to instant, overwrite the sendMessage function and if you have testing enabled you could set the message delay of each message to 0. This should potentially race through all the normal messages of your module
I already put typing to instant, the problem is just the message delay.
Edit:
This should work for rapid text message aswell without overwriting anything
Code: Select all
const TAJ_CHAT_HANDLER = Java.type('me.goddragon.teaseai.api.chat.ChatHandler');
const RAPID_TESTING = true;
if(RAPID_TESTING) {
TAJ_CHAT_HANDLER.getHandler().setPerMessageCharacterPauseMillis(0);
TAJ_CHAT_HANDLER.getHandler().setPausePerMessageCharacter(false);
}
If this works that's great, but I also need a way to turn it off before the point I'm testing.
What is the default value for "setPerMessageCharacterPauseMillis"? That way I can set it back to normal before the testing area of my code.
I also wanted to mention something I forgot. When I first named my personality I named it Amélie. TAJ did not like the special character "é" replacing it with some symbols. I then renamed it to Amelie to avoid any further issues.
Since characters like that are commonplace in a lot of languages it would be great if there was support for it. This is assuming there are no other concerns such as support on the OS level.
Edit:
The rapid testing is doing great work, makes testing MUCH faster, so thank you very much for that. (I'm still unsure what the proper value for "setPerMessageCharacterPauseMillis" is, but I've settled on 150 for now.)
I wanted to ask you about Lazy Sub. The Chat Methods page of the wiki taught me how to add to it via createInput(). What it didn't teach me however is how to remove the added options once they are there.
Also it would be great if there was a way to add dynamic answers to Lazy Sub without having to call createInput(). The purpose of this would be to not give away to the sub when the appropriate time is to use the options.(I'm trying to use it for a simple "thank you".)
Edit2:
I hope I'm not throwing too much at you all at once, but another thing just came up.
I'm trying to give the sub a chance to say thank you without telling him to do so. My first thought was just to add to Lazy Sub and call it a day, but since I wanted to encourage players not to use Lazy Sub(as forgetting honorifics is fun :D) that isn't ideal.
So I would love for there to be a boolean added to createInput() that stops the input from timing out while the sub is typing.
This way they would not have to rely on Lazy Sub and I wouldn't have to make the timeout time way too long.
Btw, does sendMessage() accept any code to make words/letters bold or italic?
Edit3:
Small bug report. When loading an image with ShowImage() the following lines of codes are run while the image is still loading. This can cause unwanted effects such as the chat being frozen during image loading and catching up with multiple messages after loading is done. This has been mostly noticeable with rapid testing, but may have effects during normal play too.(I can imagine issues with timing, or playing audio as well.)