Manually changing position of text boxes

I've been trying to create a custom menu system in my game in addition to the main menu, and it requires that I be able to specify the height/width of text boxes AND their position on the screen.

I tried using script to change Graphics.boxHeight and Graphics.boxWidth to change where they were positioned, which worked until I would then open the main menu. After changing the Graphics.boxHeight/-Width, even if I changed them back to what I believed the original values were (624 and 816?), all windows, whether in the main menu, or text messages, got positioned out of place AND my custom menu was misplaced. To make things worse, there's a picture I bring up that ALSO gets misplaced after this.

Does changing Graphics.boxHeight/-Width change something else I'm unaware of? Does it change padding or something? I'm still fairly novice to Javascript so I'm not sure if some other variable or class gets affected if I manually change this one variable.

Help? If you can help me figure out hot to manually position/resize boxes OR what I'm doing wrong, I'd be grateful either way!
Graphics.width/height/boxWidth/boxHeight are mainly used for changing the dimensions of the screen and display resolution of the game. That's the -whole- game, not just individual message boxes. So yes, they affect many, many things.

If you want to alter the size of individual text boxes without anything else, you need to edit the code for the individual text boxes. Ordinarily, the code for these would be located in the "rpg_windows.js" file in your game's "js" folder but since you say you are using a custom menu, you are probably using a bunch of plugins that modify it as well and so you will need to take a look at those plugins too.
I'd like to resize Choice windows and regular Text Message windows, but I haven't been able to find the exact code that I can use to change the position on the screen. I'd also like to resize them if possible. I have looked through all the .js files but haven't found exactly what I need, I'm assuming because I don't exactly know what to look for.
The code for text message windows (for Show Text event command) is under the Window_Message object. Check line 4238 of rpg_windows.js (might be a different line depending on your version of MV but it's 4238 for v1.6.2). You can see where it sets width and height and x and y in the very first function (the Initialize function).

Similarly, the choices window is Window_ChoiceList, the code starts at line 3818. Both objects have a property called windowWidth/windowHeight used to calculate their dimensions but the x and y position is usually set when a window is created. However, it is different for ChoiceList since the position has to change depending on the position of the text message window. So it sets it dynamically with a special function called updatePlacement instead.
This might be rude, but I found that I do not like a lot of SRD's scripts.

However, this one has been a godsend to me: http://sumrndm.site/super-tools-engine/

I think it will do what you seek.
The code for text message windows (for Show Text event command) is under the Window_Message object. Check line 4238 of rpg_windows.js (might be a different line depending on your version of MV but it's 4238 for v1.6.2). You can see where it sets width and height and x and y in the very first function (the Initialize function).

Ah, this would be why I've had a hard time finding tutorials on doing what I've been trying. So you're saying since it's set upon the Initialize function, the window placement can't be altered once a scene is loaded? Is there no sort of update function for text messages? And if not, is there no way to create another type of window without initializing the scene?

Also, for the Choice window, my main question there is still how would I create a choice list with a specific x and y position? What might the code look like for that?

(You've already been immensely helpful to me, by the way. Thank you!)
This might be rude, but I found that I do not like a lot of SRD's scripts.

However, this one has been a godsend to me: http://sumrndm.site/super-tools-engine/

I think it will do what you seek.

Personally I think his scripts are decent, though they're often covered by other plugin creators, and sometimes with more complexity. However his tutorial on making custom windows was the closest I've gotten to solving my problem. I'd consider myself a fan of his.

Also what does his Super Tools Engine do that would help? Does it identify code lines for certain objects and such?
Super Tools Engine seems to have a bug where Window_Message doesn't save the Y position value. ;(
Any work around this?
Ah, this would be why I've had a hard time finding tutorials on doing what I've been trying. So you're saying since it's set upon the Initialize function, the window placement can't be altered once a scene is loaded? Is there no sort of update function for text messages? And if not, is there no way to create another type of window without initializing the scene?

Also, for the Choice window, my main question there is still how would I create a choice list with a specific x and y position? What might the code look like for that?
There is an update function for text boxes, if you scroll down you will find the update function (Window_Message.prototype.update). This is the function that is called every frame (MV operates at 60 FPS, so it is run 60 times every second). And the placement CAN be altered when the scene is loaded, this is what happens whenever you use a different message box Position in the Show Text command. Each Position (bottom/middle/top) is associated with a specific Y coordinate and it shifts the message box depending on which one you selected (and yes, there is only 1 message box, it just hides it and makes it invisible when it's not being used). If I'm not wrong I think its "update" function is coded to close and reopen the message box when it detects a change in the selected position.

The settings for that and for other stuff (like Faces, Background Type, Scroll Type, etc) actually all stored in Game_Message (found in rpg_objects.js). They made a whole object to store the settings since there are so many of them for the message box and choice window. The settings for the Choice Window's position, background and default selected choice are all stored in there too.

And of course, as you know, there are only 3 Choice Window Positions supplied by default (Left, Middle, Right).
The Choice Window itself is wired to automatically re-position itself based on detected Position stored in there (see Window_ChoiceList.prototype.updatePlacement, "0" refers to Left, "1" to Middle and "2" to Right). And you can see in that function, it sets the Y position to the Message Window's own Y position as well.

If you want to add more positions/put it to arbitrary position, you're going to need to edit the code or make a plugin that change how it automatically sets the coordinates based on the settings provided by Game_Message (i.e. the ones you set in the Show Text/Show Choice command).

I can't say how the code would look, because it will all be fresh code purpose-written for what you want it to do, because you won't be able to use anything from the default updatePlacement function. Since all it does by default is set the X-coordinate to one of 3 templates based on your Show Choice position settings and Message Box position.
How put an arbitrary position for choicelist?
I tried all the plugins on earth, none do that, I also tried setting up arbitrary Y number for the choicelist in source code but nothing works!!! Please help me

Original thread: https://forums.rpgmakerweb.com/threads/manually-changing-position-of-text-boxes.108361/