Script compatibility

I was rummaging through some of my scripts and stumbled upon a demo of this one:

https://www.rpgmakercentral.com/topic/2191-saba-kans-galge-conversation-system-07/

However when I added YEA Message System to the demo, it crashed:

9fb8e235900f228f65d24f63b10f602b.png


I think it has to do with the namebox. Any clue how to fix this? It'd save me a truckload of common eventing with the busts.

Ace Message System:
commenting out that one line seems to work
#~ @name_window.start_close
However I see that the name window is not in the right place with both of those in there.
I manually adjusted the numbers and it works.
conversion system line 388
change Graphics.height - 126 to Graphics.height - 146
and line 395
change Graphics.height - 146 to Graphics.height - 166
It messes the namebox up completely though. Looks very bad.
https://i.gyazo.com/e725200b6052da269174522f1bd4788d.png
The problem here lies within the fact that both author used an instance variable with the same name. This leads to two main issues:
  1. the obvious error you get because Yanfly script expects that to be an instance of Window_NameMessage, but the other script simply puts an instance of Window_Base in it;
  2. the less obvious one (that is more troublesome and might spell trouble later on) where two different window objects are created and a new window overwrites the old one without the old one being disposed of.
The first one can easily be solved, but that much is not going to solve the second one. There are a lot of ways to fix that, the fastest might be opening one of the two scripts in a text editor like Notepad++, use the replace function and replace each "@name_window" with "@name_window_yea" or "@name_window_gal". As long as you set the replace function to work on the whole word with exact spelling it is not going to touch anything else. This allows you to use both name boxes and hide/show them separately (as well as disposing them correctly).

EDIT
Just in case you are wondering what to do if you have two different name windows, in Gal's script you can hide the name window by setting its width to 0 when configuring the script.
messes the namebox up completely though
I just updated my post above with that info

replace each "@name_window" with "@name_window_yea"
Works perfectly.
9 entries
Works perfectly.
9 entries
Thank you for taking your time testing it. I was quite confident since it had solid theoretical basis, but having direct proof through tests is always better.
It's still breaking left and right. Now the namebox dissapeared completely.
ddc2e90808048a3d8a13b21f879eba8d.gif

Not to mention, it's breaking some of the text.
(The line is supposed to say "
She also proves it's possible to use icons in here. \i[122]")
Looks like you're putting the message in the name box.
upload_2019-8-24_14-11-50.png

That message box is also up a little bit.
what did you change?

The Arrow that shows also needs to be changed.
Line 404 change the Graphics.height - 384 to Graphics.height - 404
Now the namebox dissapeared completely.
That is what it is supposed to do once you set its width to be 0. Since both those scripts are using a name box you have to get rid of one of them. It is better to get rid of Gal's because it gives you an easy configuration to remove it, but this means that you have to set your script to work with Yanfly's script configuration.

The Arrow that shows also needs to be changed.
That too, you can change it either by editing the said line, or by changing the number of available lines in the message window. Both are very simple steps, but one of them is absolutely required. I cannot understand why the author did not write it so that the position would be calculated automatically...but that is another story.
Looks like you're putting the message in the name box.
View attachment 121881
That message box is also up a little bit.
what did you change?

The Arrow that shows also needs to be changed.
Line 404 change the Graphics.height - 384 to Graphics.height - 404

I'm not sure. I just added Galv's message background and YEA message system. The moment I eidtted that one line out, it all got messy.
With YEA message system you're supposed to add the namebox to the message itself by \n[NAMES], or at least, that's how I've always done it.
@BCj what do you mean by "the moment I edited that one line out"?
@BCj what do you mean by "the moment I edited that one line out"?

This:


commenting out that one line seems to work
#~ @name_window.start_close
However I see that the name window is not in the right place with both of those in there.
I manually adjusted the numbers and it works.
conversion system line 388
change Graphics.height - 126 to Graphics.height - 146
and line 395
change Graphics.height - 146 to Graphics.height - 166
Commenting that line leads to issues with your memory handling later on, I explained it in my previous post. You should refrain from doing it that way unless you are prepared to have issues in the long run.
I see. I still don't know how to make it compatible though. It still bugs out, the namebox font is really weird.

5e8b430885f998889cb1e4613e3d7705.png


Edit: it also breaks when using this script (ATS Text Formatting):
https://rmrk.net/index.php?topic=44964.0

And it doesn't format text on itself :/
it also breaks when using this script
Yes you are right. But that's because the paragraph format is set to true, which causes the two to not work together.
If you set the paragraph format to false, it will look better.

Also if you put on line 391 in Galge script (should be an empty space)
@name_window.windowskin = Cache.system("")
thewindows for the name will not show
upload_2019-8-25_16-28-57.png
.
Yes you are right. But that's because the paragraph format is set to true, which causes the two to not work together.
If you set the paragraph format to false, it will look better.

Also if you put on line 391 in Galge script (should be an empty space)
@name_window.windowskin = Cache.system("")
thewindows for the name will not show
View attachment 121972.

I can't see a paragraph option in Saba Kan's script anywhere??

Also, I don't want the namebox to dissapear. I want it to look normally.

EDIT:
I turned off the paragraph option in ATS, but that completely defeats the purpose of the script, since all text longer than the messagebox gets cut off, instead of on a different line. This is no option.

EDIT2: I set SabaKan's namebox width to 0, but any changes I've made in YEA Message options to show in the message box (e.g. font, font color), just don't work. They do work without Saba Kan's script.. Can't the whole message namebox thing just be editted out??
I see the problem now.

With MA - ATS formatting script, It causes the text to be pushed up into a magical name box that is about 200 pixels wide.
without this script then text boxes have to be formatted to as to not be too long so as to cause words to disappear.

This is beyond me.
Unless someone can look into it and make a patch, I would suggest looking for a different bust display script. Galv has one, but you would have to test it.
I cannot see how it breaks since I cannot test it right now, but Yanfly's message box is not an instance of Window_Message, which means that any script that changes the default font for contents of that class does not change the font for contents of the other class. However, the said plugin already has a way to format your name font. Did you set it up properly?

I don't know if any part of the other plugin overwrites Yanfly's script formatting for the name itself, but since everything else in Yanfly's script uses proper namespaces, as long as the characters used to format your text are not messed up, you should be able to configure the text in your name box according to Yanfly's instructions.

And do not mind the visible box, removing it can be done very easily:
Code:
class Window_NameMessage < Window_Base
  alias hrk_init_invisible_box_old  initialize
  def initialize(msg_win)
    hrk_init_invisible_box_old(msg_win)
    self.opacity = 0
  end # Initialize
end #end of Window_NameMessage class
I see the problem now.

With MA - ATS formatting script, It causes the text to be pushed up into a magical name box that is about 200 pixels wide.
without this script then text boxes have to be formatted to as to not be too long so as to cause words to disappear.

This is beyond me.
Unless someone can look into it and make a patch, I would suggest looking for a different bust display script. Galv has one, but you would have to test it.

I have tried every bust system available for VX Ace, and I'm not a fan of Galv's. This one is way more dynamic, makes it look like a visual novel.


However, the said plugin already has a way to format your name font. Did you set it up properly?
Are you talking about YEA Message? Yes I have formatted it properly. It works perfectly in my own game. Once I add Saba Kan's plugin, it doesn't work at all with the namebox.

This is how it SHOULD look
4a10a021b7a1052bcd75b9df3390c6d7.png

Saba Kan makes the namebox look like a shrill, weird, white, misplaced cramped up font mess. (depsite setting width to 0)
83d49ac29116ad98c13b076fb408ab61.png

Hence my question.. is it possible to remove the namebox function of SabaKan, since it messes everything up?
I don't know if any part of the other plugin overwrites Yanfly's script formatting for the name itself
Based on your description of the problem this seems to be the case. I honestly don't think that the namebox function is at fault here. After replacing the entries in Yanfly's script the two functions are completely independent from each other. The only thing they have in common is the formatting itself, which I think being the cause of this issue.

However, I have to ask you to wait a bit longer, because doing so requires an amount of time that I currently lack. I will be able to study the issue between the two scripts in a few days.

Original thread: https://forums.rpgmakerweb.com/threads/script-compatibility.112514/