% next to TP?

Ichida za Zeal

Veteran
Veteran
Joined
Oct 23, 2015
Messages
69
Reaction score
7
First Language
English
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?
 

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
267
Reaction score
228
First Language
Swedish
Primarily Uses
Put it down by whatever term you're using for the thing in the Database?
 

WhiteW

The Murderous Clown
Veteran
Joined
Oct 16, 2016
Messages
170
Reaction score
127
First Language
EN/PT
Primarily Uses
RMMV
I don't know much JS and there's probably some other BETTER way to do it, but you can add this
Code:
    this.drawText('%', x, y, 64, 'right');
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.

 
Last edited:

WhiteW

The Murderous Clown
Veteran
Joined
Oct 16, 2016
Messages
170
Reaction score
127
First Language
EN/PT
Primarily Uses
RMMV
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
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,764
Reaction score
7,868
First Language
German
Primarily Uses
RMMV
@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.
 

WhiteW

The Murderous Clown
Veteran
Joined
Oct 16, 2016
Messages
170
Reaction score
127
First Language
EN/PT
Primarily Uses
RMMV
@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.
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...
 
Last edited:

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,118
First Language
English
Primarily Uses
RMMV
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.
 

Ichida za Zeal

Veteran
Veteran
Joined
Oct 23, 2015
Messages
69
Reaction score
7
First Language
English
So is there a way to do this without having to fear for my life every time an upgrade happens? XD
 

Ichida za Zeal

Veteran
Veteran
Joined
Oct 23, 2015
Messages
69
Reaction score
7
First Language
English
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. :D
 

WhiteW

The Murderous Clown
Veteran
Joined
Oct 16, 2016
Messages
170
Reaction score
127
First Language
EN/PT
Primarily Uses
RMMV
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. :D
It's... all I did was add 6 characters in the end really, don't worry too much, happy to help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

While we prepare the official trailer, enjoy this kind-of-second teaser! ^^
-Ele
New Episodes of RPG Shenanigans Uploaded to Youtube!

Episode 5 - Surprise Party!
Youtube Link:
Episode 6 - Killer Gin
Youtube Link:
Episode 7 - Gaia's Melody: Echoed Melodies
(Coming soon!)

Episode 8 - Clarent Saga: Tactics
(Coming soon!)

Episode 9 - Star Shift
(Coming soon!)
When the Map Generator throws in the assets in the most dumbest way possible - your path is blocked :D

I went to sleep at 3 am because of my anxiety. Set up my alarm for 7 am so that I could have sasagues for breakfast and do morning routine before lessons starts at 8 am. I knew I wouldn't be able to sleep even after my lessons finished because I have to visit my grandparents today I was sad bc I was really tired. Thats when I realised. My lesson starts at 9 am. I could get one extra hour of sleep if I didnt forget it

Forum statistics

Threads
107,561
Messages
1,030,562
Members
139,672
Latest member
WDRS
Top