I'm treating my TP meter in my game like a battery charge, so I would love to have a % next to all TP numbers in my game. Is there a way/plugin to do this?
% next to TP?
Javascript/Plugin SupportPut it down by whatever term you're using for the thing in the Database?
I don't know much JS and there's probably some other BETTER way to do it, but you can add this
line after line 580 in your rpg_windows.js
or you can do like Weremole suggested it
TBH imo I would suggest using a fancy icon of a battery instead perhaps? There's probably a plugin somewhere that would allow that I think.
Code:
this.drawText('%', x, y, 64, 'right');
or you can do like Weremole suggested it
TBH imo I would suggest using a fancy icon of a battery instead perhaps? There's probably a plugin somewhere that would allow that I think.
Well, I want it to be like "21%"
Ops... I wasn't sure where the symbol would go, I'm half asleep, sorry.
Try this as line 581 and 582:
Code:
this.drawText(actor.tp, x + width - 44, y, 44);
this.drawText('%', x + width - 64, y, 64, 'right');
EDIT:
NO WAIT DO THIS INSTEAD As line 581, just that, without the other line
Code:
this.drawText(actor.tp + '%', x + width - 64, y, 64, 'right');
Now the number doesn't float in the middle of the middle of everything if it's only 1 digit, yey
EDIT2:
im a mess
@WhiteW @Ichida za Zeal
STOP
Editing the core files is a VERY BAD idea. Whenever a project gets updated to a new version those core files are overwritten, removing all changes.
And MV is still in support, so you can expect further updates beyond the current 1.6.2
Those updates are not automatic exactly because there are cases where people need to stay at older versions (for plugin compatibility for example), but artificially blocking yourself from updates is not a good idea.
All you need to do is to take the original function you want to modify and overwrite it with a plugin that contains such changes and no matter how the core files get updated the change would stay.
STOP
Editing the core files is a VERY BAD idea. Whenever a project gets updated to a new version those core files are overwritten, removing all changes.
And MV is still in support, so you can expect further updates beyond the current 1.6.2
Those updates are not automatic exactly because there are cases where people need to stay at older versions (for plugin compatibility for example), but artificially blocking yourself from updates is not a good idea.
All you need to do is to take the original function you want to modify and overwrite it with a plugin that contains such changes and no matter how the core files get updated the change would stay.
But what if something in the function gets changed in an update?
I get your point, although I'm not sure if it's really worth it for a change of only 6 extra characters that can be easily readded in case of update...
At a surface level you are correct, only 1 line of code is changed, but it's a slippery slope. You'll think - what's another few lines - more times and then all of a sudden your core files are 20+ lines different than everyone else's, which might be significant.
Two other points to consider:
1.) If the game crashes, it spits out the line number of the crash. If you ask for help, your line number may be different than other people's, which will cause confusion when troubleshooting.
2.) If you're messing around in the core files and actually cause an issue (say, a compatibility issue that doesn't reveal itself until much later) you'll have to track it down manually. All your development and testing has to stop until you find the issue. Whereas if you had put the changed code into a separate file, you can just turn that file Off.
So yeah, changing one line of code is probably fine, if you want to change that line again each time you upgrade your project. But it would be much better to get in the habit of separating changes to the core code into a separate file.
So is there a way to do this without having to fear for my life every time an upgrade happens? XD
That worked! Did you have that on hand or did you custom make this for me?
Either way, thanks a lot! I will be sure to credit you. 😀
Either way, thanks a lot! I will be sure to credit you. 😀
It's... all I did was add 6 characters in the end really, don't worry too much, happy to help!
Original thread: https://forums.rpgmakerweb.com/threads/next-to-tp.107061/