RMMV YEP Job Points, moving the Job Points name and Icon?

Status
Not open for further replies.

ZCSully

Veteran
Veteran
Joined
Nov 28, 2021
Messages
139
Reaction score
45
First Language
English
Primarily Uses
RMMV
Hi I just wanted to ask a quick question before I get off here for the night, I just started using YEP Job Points (and Stat Allocation) and I just want to move the Job Points from the base location to the left of TP like where AP is located! Is there a way to achieve this?

1679636887269.png
I toggled AP off because I don't like it but in the next picture you can see how it overlaps with the subclass name!

1679636934525.png

Thanks for your time in advance!
 

Prince_Eric

Villager
Member
Joined
Aug 22, 2019
Messages
16
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
Great question. I was wondering this myself. The only way I found is messing with .js file itself.

If you modify this line in Window_Base part of the file, you can change position of name and icon:
this.drawTextEx(JpText, wx, wy);

wx = x-axis, wy = y-axis. If you type something like
this.drawTextEx(JpText, 290, 108);
you can get this:
1.jpg

Obviously, you need to input your own numbers.
 
Last edited:

ZCSully

Veteran
Veteran
Joined
Nov 28, 2021
Messages
139
Reaction score
45
First Language
English
Primarily Uses
RMMV
Great question. I was wondering this myself. The only way I found is messing with .js file itself.

If you modify this line in Window_Base part of the file, you can change position of name and icon:
this.drawTextEx(JpText, wx, wy);

wx = x-axis, wy = y-axis. If you type something like
this.drawTextEx(JpText, 290, 108);
you can get this:
View attachment 257219

Obviously, you need to input your own numbers.
Yeah this works great thank you! It's just the other characters end up losing their job points until you enter like the class or skill change menu, did you find this result too?

EDIT: I think all of the actors values are overlapping in that first screen, there has to be a code to seperate them or something?

1679918600219.png
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
7,513
Reaction score
3,022
First Language
Dutch
Primarily Uses
RMMV
I wont directly change the drawTextEx function if wx,wy is specified!

you can do better var wx = x-axis to => var wx = 290; // x-axis

that way, you keep the drawTextEx intact and keep their function with
hardcoded number, but if x-axis is set in the parameter, change it there instead.
 

ZCSully

Veteran
Veteran
Joined
Nov 28, 2021
Messages
139
Reaction score
45
First Language
English
Primarily Uses
RMMV
I wont directly change the drawTextEx function if wx,wy is specified!

you can do better var wx = x-axis to => var wx = 290; // x-axis

that way, you keep the drawTextEx intact and keep their function with
hardcoded number, but if x-axis is set in the parameter, change it there instead.
Wow that is actually a lot better just so I don't screw with the actual code!
The problem still persists where the Job Points (RM in my game) overlaps though? It just seems to not register on the other actor windows with the new parameters?
It looks normal on the top one since they both have 0 RM right now:

1679918889733.png
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
7,513
Reaction score
3,022
First Language
Dutch
Primarily Uses
RMMV
depends on the X numbers you use there, as the status in devided
in 3 sections ([face]. [name, level], [classname, gauges]) where
JP is added next to the class, you can change this, but you need
probably a bit more to get the formula correctly to calculate the width
and height correctly, based on numbers.

I cannot really help you there, but you get the point :)
 

ZCSully

Veteran
Veteran
Joined
Nov 28, 2021
Messages
139
Reaction score
45
First Language
English
Primarily Uses
RMMV
depends on the X numbers you use there, as the status in devided
in 3 sections ([face]. [name, level], [classname, gauges]) where
JP is added next to the class, you can change this, but you need
probably a bit more to get the formula correctly to calculate the width
and height correctly, based on numbers.

I cannot really help you there, but you get the point :)
Thank you so much for your help I hope I can figure it out from here and I will get back to you :D
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,896
Reaction score
6,700
First Language
English
Primarily Uses
RMMV
EDIT: I think all of the actors values are overlapping in that first screen, there has to be a code to seperate them or something?
Well...yes. You're giving the function a static value, print it at 290, 108. That's a specific spot on your screen. So everything you tell to print on that specific spot will...print at that specific spot :wink:

If you don't want them all to print in the same place, then you need to do what the original code did and calculate the x and y based on which actor in the list it is. If you want it inline with SP, then find where the coordinates for TP are determined and use that Y value.

That's on line 2481 of Yanfly's Core Engine, and the Y value is + this.lineHeight() * 3 so try that.

Code:
this.drawTextEx(JpText, wx, wy+this.lineHeight()*3);
 

ZCSully

Veteran
Veteran
Joined
Nov 28, 2021
Messages
139
Reaction score
45
First Language
English
Primarily Uses
RMMV
Well...yes. You're giving the function a static value, print it at 290, 108. That's a specific spot on your screen. So everything you tell to print on that specific spot will...print at that specific spot :wink:

If you don't want them all to print in the same place, then you need to do what the original code did and calculate the x and y based on which actor in the list it is. If you want it inline with SP, then find where the coordinates for TP are determined and use that Y value.

That's on line 2481 of Yanfly's Core Engine, and the Y value is + this.lineHeight() * 3 so try that.

Code:
this.drawTextEx(JpText, wx, wy+this.lineHeight()*3);
1679921804374.png
That actually did seem to move it down to the next actor in a nice spot, but they still overlap. When I look in the Core Engine I see that it says

Code:
this.draw[B]Actor[/B]Tp([B]actor[/B], x2, y + lineHeight * 3, width2);

Could using Actor inside the syntax designate them to go into each actor's rectangle?
tried this and it did not work haha oh well, time to keep searching
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,896
Reaction score
6,700
First Language
English
Primarily Uses
RMMV
Okay, so the suggestion from @Prince_Eric was well-intentioned but had a few errors.

One is the idea of using static coordinates.

The other is it appears to be quoting the wrong line of code. The code in his post (with JpText as an argument) is down in the Gained JP in the victory screen. That's not what you're asking to modify.

To do what you want, change line 684 to read
Code:
    this.drawActorJp(actor, classId, wx-Window_Base._faceWidth, wy+this.lineHeight()*3, ww, 'left');

then change line 693 to read
Code:
      wx = wx;

This displays properly in my project.
 

ZCSully

Veteran
Veteran
Joined
Nov 28, 2021
Messages
139
Reaction score
45
First Language
English
Primarily Uses
RMMV
Okay, so the suggestion from @Prince_Eric was well-intentioned but had a few errors.

One is the idea of using static coordinates.

The other is it appears to be quoting the wrong line of code. The code in his post (with JpText as an argument) is down in the Gained JP in the victory screen. That's not what you're asking to modify.

To do what you want, change line 684 to read
Code:
    this.drawActorJp(actor, classId, wx-Window_Base._faceWidth, wy+this.lineHeight()*3, ww, 'left');

then change line 693 to read
Code:
      wx = wx;

This displays properly in my project.
This shows exactly where I want it to show! :D Does yours overlap? Mine still does :(

1679924995661.png


(I just put a chest with some XP to make the number higher then 0)
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,777
First Language
EN
Primarily Uses
RMMZ
Note that the focus here has been on the "simple status" block found on the pause menu, skill screen, etc. But the status screen has a different layout, so you may want an alternative for that one.

Suggestion based on default layouts (untested):
JavaScript:
/*:
 * @target MV
 * @plugindesc Load after YEP_JobPoints - change where job points are displayed.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/156095/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Normally drawn right-aligned in "actor class" draw area.

// Change core script "simple status" draw coordinates
;void (function(alias) {
  Window_Base.prototype.drawActorJp = function(actor, id, wx, wy, ww, align) {
    // Shift left by "face width" px, down by 3 lines, and align left.
    alias.call(this, actor, id, wx - Window_Base._faceWidth, wy + this.lineHeight() * 3, ww, "left");
  };
})(Window_Base.prototype.drawActorJp);

// Change core script status screen draw coordinates
void (function(alias) {
  Window_Status.prototype.drawActorJp = function(actor, id, wx, wy, ww, align) {
    // Align to far right of status screen, Y unchanged.
    alias.call(this, actor, id, 0, wy, this.contentsWidth(), "right");
  };
})(Window_Status.prototype.drawActorJp);
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,896
Reaction score
6,700
First Language
English
Primarily Uses
RMMV
This shows exactly where I want it to show! :D Does yours overlap? Mine still does :(
No - as I said in my post, it displays correctly for me. The only way you can have something overlapping is if you're still referencing a static number someplace instead of a variable (wy).

You may want to replace your plugin file with a copy of the original in case you edited a line someplace and forgot to undo the change.

If you're not looking at this in the Escape menu (or if you want a similar layout in the Status screen), you may also want to just implement caethyril's plugin.

Note that the focus here has been on the "simple status" block found on the pause menu, skill screen, etc. But the status screen has a different layout, so you may want an alternative for that one.
Y'know, I never look at the status screen, so I pretty much forget that it exists and has its own layout :guffaw:
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,646
Reaction score
3,777
First Language
EN
Primarily Uses
RMMZ
Great! :kaojoy:

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

This could probably be an entire thread, but it’s really interesting how replaying a game several years later can change how you relate to a character. I think Tidus from FFX got such a bad rap. I getchu. Completely different reaction as an adult now.
As you see, I still enjoy writing tutorials. Is there anything specific you want to see? (I know mapping and editing/resource making is usually popular, but those are very broad topics)
Well, I wanted to expand player battlers visually and now have 3 sheets and counting for each of my players party.
1. Regular sheet
2. The character has turned stone sheet.
3. Using potions sheet.

Technically the main hero has 4 since he starts with a wooden sword, and I felt that the battler should reflect that until he gets a metal one.

Right back to the RM game dev grind in about 15 minutes. :LZSexcite:
Days ago I gave someone the sage advice not to steer away from your main project or take up another one to abandon the first. After figuring a way that would save me years of development, I am forced to redo a lot of stuff on my own turf, near to remake half of what I have already made.
Somewhere down the line I must have crossed paths with bad karma.
:kaomad2:

Forum statistics

Threads
131,733
Messages
1,222,754
Members
173,483
Latest member
Lumaru
Top