Status
Not open for further replies.

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
225
Reaction score
169
First Language
Danish
Primarily Uses
RMMV
Hello,

I'm using SRD HUD plugin and I got it to show HP and MP on the screen, but I really want to show exp. I want it to count up and turn back to zero whenever the player level up.

I have struggled with making it work. Not sure what to put in current and max value, does someone know?

PgTm3OW.png
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
699
Reaction score
3,453
First Language
English
Primarily Uses
N/A
If you're comfortable doing a little scripting, or at least script calls, the following would get you the current level and next level exp values
$gameActors.actor(id).currentExp()
$gameActors.actor(id).nextLevelExp()

Replace id with the id of the actor, and it will give you the same values you'd get for current exp and To Next Level in the Status menu.

FYI,
$gameParty._actors
will return an array, with the Actor id's in order of the current party members.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,018
Reaction score
595
First Language
Poland
Primarily Uses
RMMV
I can give you "My solution" but it is "complicated, but anyway, let's do it!

#1 create 3 variables in your common event tab and set them to:
Code:
#variable 1 = Math.abs($gameParty.members()[0].expForLevel($gameParty.members()[0].level) - $gameParty.members()[0].currentExp())
#variable 2 = Math.abs($gameParty.members()[0].nextRequiredExp()) + Math.abs($gameParty.members()[0].expForLevel($gameParty.members()[0].level) - $gameParty.members()[0].currentExp())
#variable 3 = Math.ceil($gameVariables.value(variable 1) / $gameVariables.value(variable 2)*100)

//variable 3 displays exp percentage and it is optional
and In SRD HUD maker type in
Cur. Value: ${$gameVariables.value(variable #1)}
Max value: ${$gameVariables.value(variable #2)}

Dont forget to set common event to parallel in order to keep updated variables.
This calculations will keep in each actor's level current exp and required exp per level.

View my Common Event as Reference
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,333
Reaction score
11,758
First Language
English
Primarily Uses
RMVXA
[move]JavaScript/Plugin Support[/move]
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
225
Reaction score
169
First Language
Danish
Primarily Uses
RMMV
@standardplayer - EDIT: It seems to be working, thanks!!

@Soulrender - I have tried it for some time now and I can't seem to get it to work. All I do it getting an error. I'm sure that I'm doing it wrong, I just can't see where I'm doing it wrong. I will keep trying to see if I can make it work.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,018
Reaction score
595
First Language
Poland
Primarily Uses
RMMV
My mistake, in HUD maker with gauge type like this:
https://prnt.sc/pjiu5w

just replace number of variables with your own, my gauge shows now 0/0 because I didn't set variables.

This is just short video how to:
 
Last edited:

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,018
Reaction score
595
First Language
Poland
Primarily Uses
RMMV
If you wish to do it for other party members then you will need to make more variables and replace
$gameParty.members()[0] with
$gameParty.members()[1]

and so on for other party members.
$gameParty.members()[0] - first party member (leader)
$gameParty.members()[1] - 2nd member
$gameParty.members()[2] - 3rd member

etc etc
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
225
Reaction score
169
First Language
Danish
Primarily Uses
RMMV
Thank you, I might need that!
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,018
Reaction score
595
First Language
Poland
Primarily Uses
RMMV
Or you could use this and this plugin wich will save you lot of time with making hud.
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
225
Reaction score
169
First Language
Danish
Primarily Uses
RMMV
@Soulrender - I know those plugins. I decided to use SRD's plugins, because I thought that fit more to my game. I am done making the hud and it works just fine. Thanks though :)
 

jbarros35

Villager
Member
Joined
Feb 13, 2020
Messages
11
Reaction score
1
First Language
english
Primarily Uses
RMMV
Interesting enough but Hud maker is not updating the EXP when I have an event that increases the experience.

Tried a lot of combinations, still the gauge does nothing
Change EXP:Entire Party, + 15 (Show Level Up)

$gameParty.members()[0].currentLevelExp()

$gameParty.members()[0].nextLevelExp()
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,000
Reaction score
1,473
First Language
Portuguese - Br
Primarily Uses
RMMZ
Show how you set your Hud Maker config for the current value of the gauge.

It has t something like that:
JavaScript:
$gameParty.leader().currentExp() - (($gameParty.leader().level - 1) * 100)
Replace "100" with the max value you are setting.
In your case, I think that has to be:
JavaScript:
$gameParty.members()[0].currentLevelExp() - (($gameParty.members()[0].level - 1) * $gameParty.members()[0].nextLevelExp())
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,493
Reaction score
5,610
First Language
Dutch
Primarily Uses
RMXP

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

Theydies and gentlethems, presenting Touch the Stars character #1: Anna Smith and her transformed form, Sagittaria!1624568259771.png
Anyone seen Dsiver around?
I wish character bust packs had options for both side-facing and front-facing for the same characters.
Looks like I'm going to have to cancel another game.
For now it is in testing phase: Changing the game icon from Rm2k/2k3 without needing to edit the executable.
Rm2k-DinChangeIcon.png

Forum statistics

Threads
112,531
Messages
1,069,003
Members
146,218
Latest member
mpseee
Top