YEP Message Core Ext 1 - Multiple Choices no alignment

I'm sorry about the title, I don't know how to explain the problem in it (which may have affected my ability to search for this problem, since I could not find it on the internet).

So I'm using Yanfly Messsage Core Extension 1 to have multiple choices.
- Image 1: I have multiple choices at once.
imagem_2023-02-23_140606980.png

- Image 2: I go to the last choice (option 7).
imagem_2023-02-23_140638745.png

- Image 3: I select the last choice and go to another Choice Window, which only has 2 choices. You can see that the window is messed. There is a blank space there that is not an option, it is just a blank space.
imagem_2023-02-23_140805199.png

- Image 4: I go up on the window, and the blank space from Image 3 disappears. Now the window is 100% fine.
imagem_2023-02-23_140857015.png


So this problem happens whenever I have multiple choices, and I scroll down (the scroll down exists because all choices can't appear at once). If I scroll down and go to another Choice Window, it will have the blank space from Image 3, no matter how many choices there are on this next choice window.

The cause of the issue seems to be because I hide and show choices. When I don't hide and show choices, the system works fine, with no issues. But if choices can be hidden for whatever reason, the system works this way.

I am making these windows from Image 3 to open with the First Choice by default, this way the problem does not happen. But that is not a proper fix.

- Image 5: Here I first hide all choices, then turn them on if a Switch is On.
imagem_2023-02-23_142442791.png


This problem can be complicated if the reason is behind the way I am hiding and showing choices. But if someone has seen a similar problem, it might help me track why it happens.
So I'm using Yanfly Messsage Core Extension 1 to have multiple choices.
Just so you know, once you've attached an image to your post, you can mouse over it and there's a little button that says Insert. You can use that to put the thumbnail of the image in the middle of your post, where your cursor currently is. That makes it much easier to reference than going Image 1-4 and having to look down to the bottom.

I am making these windows from Image 3 to open with the First Choice by default, this way the problem does not happen. But that is not a proper fix.
Out of curiosity, why? If it's a UI glitch, and opening the new window on the first choice causes the UI to display properly, why is that not a proper fix?

It's certainly easier than reading through the plugin's code and trying to find the part that opens and formats the window and figuring out how to modify it. Does it negatively impact another part of your project?

- Image 5: Here I first hide all choices, then turn them on if a Switch is On.
What's the purpose in setting the max based on the quest_id, doing nothing else with it, then immediately adding 1? Why not just set it to 5, 2, or 7 in the first place?

Similarly, why do you have variables id and id_base when you don't do anything with id except set it equal to id_base? And then you don't do anything separate with id_base after that? It seems you could have just used one id variable for the entire thing.

None of this breaks your code that I can see, but it makes it more confusing to read.
Out of curiosity, why? If it's a UI glitch, and opening the new window on the first choice causes the UI to display properly, why is that not a proper fix?
I can come across the same issue later on, but I might not want to set the first as the default option. I don't know if that will happen though.

What's the purpose in setting the max based on the quest_id, doing nothing else with it, then immediately adding 1? Why not just set it to 5, 2, or 7 in the first place?
There are 3 types of quests, so each type of quests has its own choices. Each type of quest has a different amount of quests. Each type of quest has a max amount of quests.
I tried to automate this part but failed at it. Each time I add a new quest, I change the max value manually. So to make it easier for me to know which type of quest I'm changing the max value, I structured the code this way.

The +1 happens because the first choice is ALWAYS "Nothing", the cancel choice. So I skip it, adding a +1. This is also why the "i" on the loop starts with 2, since it needs to be on the second choice.

Similarly, why do you have variables id and id_base when you don't do anything with id except set it equal to id_base?
I thought it makes it easier to understand. I first tell the base id of the quests, which starts at a specific number, like 400.
Then the REAL id of the quest is called just Id, which is calculated at the loop (id += 1).
I want to remind myself that each type of quest starts with a different Id, so I used base_id to make it clear on the code, if I come back to it months later.

Original thread: https://forums.rpgmakerweb.com/threads/yep-message-core-ext-1-multiple-choices-no-alignment.155231/