Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
Can anyone help me out? I cannot figure out why I am getting this error:
I had made an edit to the windows.js file in order to be able to move the choice box around but I cannot figure out why it is doing this. i can change the X position but i cannot change the Y position.
3497294bd012f43c2c7710d3e74b692d.png

e7b0a119fe21f48abb6c6aba04982fbd.png

here is the error that i get when trying to set the Y position of the box (the X position works just fine for whatever reason)
88fd04a371b2f6ea37f531df5d4b5567.png
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
X doesn't work either. You're calling Window_ChoiceList.prototype.updatePlacement, which is not a static function. Therefore you can't call it as a prototype function, you have to call it in relation to the particular choice list window. I recommend you to go through a C++ tutorial to learn the basics of object oriented programming.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
X doesn't work either. You're calling Window_ChoiceList.prototype.updatePlacement, which is not a static function. Therefore you can't call it as a prototype function, you have to call it in relation to the particular choice list window. I recommend you to go through a C++ tutorial to learn the basics of object oriented programming.
oh wait, i forgot i still had that in, when i DON'T have that bit in it does work for the most part:
2ee7c498e7465b93e2c8701010be3d18.png

ff01c836e41e6596efefb572a05da388.png

As you can see the Y position refuses to change, i have no idea why this is the case and why ony the x position wants to change when i tell it to. do you know why?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,789
Reaction score
14,591
First Language
English
Primarily Uses
RMVXA

I've moved this thread to Javascript Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
So now the three functions are the same just without
Window_ChoiceList.prototype.updatePlacement
line?
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
So now the three functions are the same just without
Window_ChoiceList.prototype.updatePlacement
line?
yep pretty much:
274f39ccf8df15eb62a6b95d50ca6b52.png
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
So now you are setting the window's X to 155 and Y to 425. That's what is happening.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,940
Reaction score
1,398
First Language
Portuguese - Br
Primarily Uses
RMMZ
Man, i have no idea... I made several snippets in my game with windows. When i have this error, sometimes i have to edit the rpg maker file instead of made a snippet. And then it work.
Watching the code, I see there's something different for other Windows:
Case 0
Case 1
Case 2
I think this has a relation with the position of the message box(center, left, right)
So I guess you have to figure that out.
Maybe the y position is defined through the position of the message box.
Or
You can use SRD super tools.js
And adjust the Windows with that.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
So now you are setting the window's X to 155 and Y to 425. That's what is happening.
no, that is a plugin that changes the textbox window to a certain place...although that might conflict with what i am trying to do, let me try to see if it would fix it.

(and the position of the choice box is set relative to variables 19, 20 as indicated in the event i shared a picture of.)

Man, i have no idea... I made several snippets in my game with windows. When i have this error, sometimes i have to edit the rpg maker file instead of made a snippet. And then it work.
Watching the code, I see there's something different for other Windows:
Case 0
Case 1
Case 2
I think this has a relation with the position of the message box(center, left, right)
So I guess you have to figure that out.
Maybe the y position is defined through the position of the message box.
Or
You can use SRD super tools.js
And adjust the Windows with that.
it is set outside of the cases so it would change the positioning regardless of it
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
No, it is not relative to the variables.
You set the variables to certain values and then call a function called Poppie.eleCalc.BattleChoiceOn().
This function sets the X and Y to values defined exactly in that function.

I think you wanted to make the positioning relative by the updatePlacement method, since that contains the two codes that would make the positioning relative to the variables. However, you made a mistake that instead of calling the window's method you called the prototype method, so you naturally got the error.

So if you want, edit the BattleChoiceOn function to this:

black_custom_window.x = $gameVariables.value(19);
black_custom_window.y = $gameVariables.value(20);
and it should work as you intended.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
No, it is not relative to the variables.
You set the variables to certain values and then call a function called Poppie.eleCalc.BattleChoiceOn().
This function sets the X and Y to values defined exactly in that function.

I think you wanted to make the positioning relative by the updatePlacement method, since that contains the two codes that would make the positioning relative to the variables. However, you made a mistake that instead of calling the window's method you called the prototype method, so you naturally got the error.

So if you want, edit the BattleChoiceOn function to this:

black_custom_window.x = $gameVariables.value(19);
black_custom_window.y = $gameVariables.value(20);
and it should work as you intended.
no, it doesn't affect the choice window:
3da8ced49d87990f5a5ade476d1ceec0.png

1fa889460051eaadff300c349baafb9b.png

f375f416763765bd60622a0641e6c847.png

the same issue with the Y axis of the box persists without that code, the code is reposnible for moving the message window not the choice window.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Oh, I see, so the black_custom_window is that window that says "What will you do?". It makes sense now.

In that case my previous statement is valid. The first code had the right thought, but not the right execution. Instead of Window_Choicelist.prototype you need to know the name of that exact window object. You can find it via the dev tools, should be one of the windows inside the window layer inside SceneManager._scene.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
Oh, I see, so the black_custom_window is that window that says "What will you do?". It makes sense now.

In that case my previous statement is valid. The first code had the right thought, but not the right execution. Instead of Window_Choicelist.prototype you need to know the name of that exact window object. You can find it via the dev tools, should be one of the windows inside the window layer inside SceneManager._scene.
no, it isn't that window, but rather a command for the plugin: http://www.gdunlimited.net/scripts/rpg-maker-mv/window-scripts/custom-position-message-box this plugin will move the location of all window boxes created to the point where you define while it is told to do so. i wish to figure out how to do the same thing for the choice boxes.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Oh, I see. Nevermind that custom black window then. Revert the game code back to what it was in the first post. Then find the name of that particular choice window and substitute Window_Choicelist.prototype for that name.
Type SceneManager._scene in the console (f8 or f12 in game) and look for something that has Window_ChoiceList next to it in it. It could be _choiceWindow or something, in which case the name would be
SceneManager._scene._choiceWindow
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
Oh, I see. Nevermind that custom black window then. Revert the game code back to what it was in the first post. Then find the name of that particular choice window and substitute Window_Choicelist.prototype for that name.
Type SceneManager._scene in the console (f8 or f12 in game) and look for something that has Window_ChoiceList next to it in it. It could be _choiceWindow or something, in which case the name would be
SceneManager._scene._choiceWindow
221d9653208034dc5b4eef9873ca97f8.png

"_choicewindow: window_choicelist" ? is that what you were talking about.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Yup.
Try
SceneManager._scene._messageWindow._choiceWindow.updatePlacement();

instead of Window_ChoiceList.prototype.updatePlacement();
in the code in your first post.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
Yup.
Try
SceneManager._scene._messageWindow._choiceWindow.updatePlacement();

instead of Window_ChoiceList.prototype.updatePlacement();
in the code in your first post.
0dc08ed658f97193b1aaf231dcfe882e.png

So it didn't change anything, but here is something that is very weird:
0d4a18905c61f581df802f6611be1a27.png

it works for this event, i have control over the X and Y axis
479ce85fe9df31a58d877a8ed30a8360.png

and here is that event, why does this work but the other doesn't?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Have you ever messed around with the first window using the super tools engine? If yes, it might be an option. If not, then maybe it's a different window. It's all so messy that it's stopping to make any sense to me.
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
Reaction score
54
First Language
English
Primarily Uses
RMMV
Have you ever messed around with the first window using the super tools engine? If yes, it might be an option. If not, then maybe it's a different window. It's all so messy that it's stopping to make any sense to me.
the super tools engine doesn't edit text windows:
1b08f0fc884ad126b0d0ee4bfd14180c.png

so that isn't an option, i could try to mess with common events to see if that works
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Well, it's officially gotten weird. If I could take a look at the project itself, I could explore. Without it I can only guess. Is the item guard attack skill run window a custom created one or just a default choice window?
 

Latest Threads

Latest Posts

Latest Profile Posts

How would you judge a game you played? Art/Graphics? Story? Gameplay?
Learn MV sales goal = 2%
NSFW game sales goal = 2500% (no jokes) :guffaw:
After gathering, sorting out & reconsidering hundreds of enemy battlers over the last two das, finally my favorite part begins: Inventing names and lore for them all :D
I'm running a sale for Learn RPG Maker MV on Itch.io, can I compete with NSFW games earning goals?

Forum statistics

Threads
111,376
Messages
1,060,576
Members
144,706
Latest member
DonTonyPepperoni
Top