New account registration is temporarily disabled.

RMXP RGSS X COƖRDINATES WINDOW_TARGET + QUESTION ABOUT EXPRESSIONS

Posts

Pages: 1
Hey guys, this must be the most stupid question ever, but I can't help it. I'm currently trying to work my magic on the RMXP default menu and I stumbled upon a problem. I've looked into the scene and window methods of "everything" (as far as I can tell) that has to do with dealing with the skill tab in the menu and I just can't seem to relocate the target window.

At the moment when you select an item/skill in the left part of their respective menu a target window will pop up at the right side of the screen. I didn't test it, but I guess when you select something in the right side of menu the target window will pop-up at the left. I'm trying to get this thing to pop up at the top left corner (normally 0, 0) but I just can't seem to find the right line for it. I thought I had found the solution when I found this line in scene_skill, but it didn't help me much:

102 @target_window.x = (@skill_window.index + 1) % 2 * 304

I thought I could simply change it to 0 or delete the whole line.

So could somebody help me with this?

Next to that, since you are reading this topic anyways, I would like to ask what this expression does "%". It's used in the described line and it make me wonder about it's effect. It must be something small but I couldn't find the awnser in some of the online libaries and tutorials about RGSS and the help file didn't help me much either.

I feel very stupid for asking these minor thing, but I hope you guys believe me when I say I've tried to do my research before posting this topic.

Thanks in advance =).



% is the "mod" command - it divides by the number, but returns the remainder; in the case here, it's used to determine which column the item is in.

I'll look into the part about relocating the window - it's actually one of the next things I need to work on for LSX (and that I've been putting off because... well, my eyes are going @_@ from the amount of code I've looked at lately).

EDIT: So, changing that line into:
@target_window.x = 0
will work and cause the target window to show up on the left side always. In the default script, this means essentially the entire Status window showing up on the left hand side of the window, unless you do edits to the Window_Target script.

Removing the line entirely will have the same effect.
Thanks for the help, I need to explain something though.

As stated, I allready thought that line was responsible for changing the x coordinate of window_target so I could have it in the upper left corner. It didn't work for me however and thus your suggestion didn't work (since I allready tried that).

However you did confirmed to me that this was the line that was dealing with it, so something else must have been going on. Then I discovered that ATOA battle system (a custom script I never talked about (my bad)) also handled some scenes and windows in the game. I looked into those scripts and found the exact same line, changed it and it finally worked =).

So thanks again for helping me, I'm glad you could confirm for me that that line was the line that was handeling the position =). So everything is fixed now, thanks!
Pages: 1