MV Soryu's GabWindow Right (ends sentence after a space)

I have attached the plugin in question.

In Japanese there arent spaces between words. Thus, it seems to work perfectly fine in japanese. However, in english there are obviously spaces. And what I have observed is after a space is made, it ends. So if I type:

"Hello! I'm Bob!"

It simply goes

"Hello!"

Plugin command is simple. Its basically:

PushGab 1 Time for the big journey!

And for more sentences

PushGab 1 Time for the big journey!|This is the second line!

Could someone help me find out if there is a setting or something that needs to be changed to not end a sentence after a space?

1643901816159.png

1643901858607.png
I think spaces are allowed, as a second line is with |

so why do you think spaces aren't allowed? do you have a screenshot
of your event and pop how it would show?
I put two screen shots at the bottom. You can see with the Japanese it works fine, but not in english. I only get the first word of each sentence.
I put two screen shots at the bottom.
that is not what the other poster asked for.
he wanted to see the event code itself to check if you made a mistake there, not the result of possible mistakes.

that said, I would ask for screenshots of your plugin manager with all plugins listed to see if there might be an incompatibility between plugins causing this.
Have you tried enclosing the string in quotes?
@Trihan I tried it, but dont quite get it, but it don't take spaces really,
as if I check YEP_GabWindow, it has a space between words, but the
setup of both are very different.

I know YEP gabWindow and Caetryl for 2 lines of text can make it work,
but this one seems spaces missing and I dont know how to get + ' ' work.
@Trihan I tried it, but dont quite get it, but it don't take spaces really,
as if I check YEP_GabWindow, it has a space between words, but the
setup of both are very different.

I know YEP gabWindow and Caetryl for 2 lines of text can make it work,
but this one seems spaces missing and I dont know how to get + ' ' work.
The reason it works in the YEP one is that all plugin command arguments are concatenated into a string. You can't do that with this one since it has an ID parameter. You'd have to rework the order of the arguments slightly.

Try modifying setGabText to the following:

JavaScript:
if(!Number.isFinite(Number(args[args.length - 1]))) return;
    var id = args[args.length - 1];
       
    if(!args[1]) return;
    var lines;
    for (var i = 0; i < args.length - 1; i++) {
        lines += args[i];
    }
    var strs = lines.split('|');
   
    var str1 = strs[0];
    var str2;
    if(!strs[1]) str2 = '';
    else str2 = strs[1];
 
    var obj = new SoR_GabWindow(str1,str2,id);
    $gameTemp.SoR_GabPush(obj);

This will take all arguments except the last one as text to be displayed in the window, and still split the lines on a pipe character.
does not work though.
does not work though.
Don't give me any more details or anything, I perfectly understand the problem just with this. 😛
that is not what the other poster asked for.
he wanted to see the event code itself to check if you made a mistake there, not the result of possible mistakes.

that said, I would ask for screenshots of your plugin manager with all plugins listed to see if there might be an incompatibility between plugins causing this.

No problem within either of those areas. I am even testing it inside the official demo itself that literally only has the community plugin and the plugin itself haha. The plugin commands are a bit too easy to mess up.

What actually made me realize it was the spaces was the | itself. Because if I have a space before or after the | it wont even do the second sentence. Or in this case, the second sentences first word. Like I removed the spaces and now it goes
Jay
In

Instead of just Jay.

1643944345043.png


Have you tried enclosing the string in quotes?

Just tried that and same result. Except has the first quote over the first word haha.

The reason it works in the YEP one is that all plugin command arguments are concatenated into a string. You can't do that with this one since it has an ID parameter. You'd have to rework the order of the arguments slightly.

Try modifying setGabText to the following:

JavaScript:
if(!Number.isFinite(Number(args[args.length - 1]))) return;
    var id = args[args.length - 1];
      
    if(!args[1]) return;
    var lines;
    for (var i = 0; i < args.length - 1; i++) {
        lines += args[i];
    }
    var strs = lines.split('|');
  
    var str1 = strs[0];
    var str2;
    if(!strs[1]) str2 = '';
    else str2 = strs[1];
 
    var obj = new SoR_GabWindow(str1,str2,id);
    $gameTemp.SoR_GabPush(obj);

This will take all arguments except the last one as text to be displayed in the window, and still split the lines on a pipe character.

I think what Shadow meant is that it literally stops working completely. I edited this in and it stopped working all together. Just nothing happens when the plugin commands are issued.
No problem within either of those areas. I am even testing it inside the official demo itself that literally only has the community plugin and the plugin itself haha. The plugin commands are a bit too easy to mess up.

What actually made me realize it was the spaces was the | itself. Because if I have a space before or after the | it wont even do the second sentence. Or in this case, the second sentences first word. Like I removed the spaces and now it goes
Jay
In

Instead of just Jay.

View attachment 215149



Just tried that and same result. Except has the first quote over the first word haha.



I think what Shadow meant is that it literally stops working completely. I edited this in and it stopped working all together. Just nothing happens when the plugin commands are issued.
If you're putting the ID first, that'll be why. The code I gave you makes it so the ID comes after the text. I'll see if I can sort it in the morning.
I did it with and without and no text is shown, empty window.
but I tried fiddle around on the initilizing the text1 and text2 if I could
do something there, which didn't either.

I cant seem to push the gabwindow from the right either with x pixels
either.

but I think you figure it out faster than I would 😛

EDIT:
@Trihan btw, if ID is last, than why doesn't number works as first if it wouldn't
be the ID of the face, but as number for item? like "1 appel would be needed",
than numbers wouldn't work, but I hope you can pull this one off 😛

but I wonder if a scriptcall will work to set the text first?
I didn't looked into that one as the helpfile didn't specify that part.
If you're putting the ID first, that'll be why. The code I gave you makes it so the ID comes after the text. I'll see if I can sort it in the morning.

DId you get a chance to look it over? I know the plugin has it so that PushGab x is what the plugin command starts with.

Also, did you happen to see anything that would allow me to use larger pictures for the faces? Not sure what I need to edit.
My code seems to have worked fine for me.
1644032880196.png


It did require a couple of tweaks:

JavaScript:
Game_Interpreter.prototype.setGabText = function(args) {
    if(!Number.isFinite(Number(args[0]))) return;
    var id = args[0];
        
    if(!args[1]) return;
    var text = "";
    for (var i = 1; i < args.length; i++) {
        text += args[i] + " ";
    }
    var strs = text.split('|');
    
    var str1 = strs[0];
    var str2;
    if(!strs[1]) str2 = '';
    else str2 = strs[1];
 
    var obj = new SoR_GabWindow(str1,str2,id);
    $gameTemp.SoR_GabPush(obj);
}
Bam! That totally worked! Thank you so much!

Though I got another question. Because it is odd... and I am not sure if it has to do with my resolution or what. But after so many lines, I start seeing a line cut through my windows. I found some coding, but not sure if changing the coding will help. I noticed this gap in one other place when drawing the box for attack names. But that is an entirely different plugin.

1644034411680.png


It only seems to happen when set to DARK instead of window skin in the plugin settings.


SoR_GabWindow.prototype.DrawBackground = function(opa) {
if(SoR.WindowStyle == 1){
var color1 = this.dimColor1();
var color2 = this.dimColor2();
this.contents.fillRect(0, 0, this.width / 2, this.height, color1);
this.contents.gradientFillRect(this.width / 2, 0, this.width / 2, this.height, color1, color2);
}
else{
this.bg_img.x = this.x;
this.bg_img.y = this.y+SoR.GabWindowYpadd_originalSkin;
this.bg_img.opacity = opa;
}

Keep disabling plugins trying to see if any are causing it. Even made the resolution default. Just odd it starts happening a few lines in.
I've seen this happen before and it's always been caused when a window is trying to size itself or its contents to a floating-point number of pixels.

Original thread: https://forums.rpgmakerweb.com/threads/soryus-gabwindow-right-ends-sentence-after-a-space.144588/