Status
Not open for further replies.

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
258
Reaction score
251
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
700
Reaction score
3,469
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,609
Reaction score
1,131
First Language
Polish
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
23,210
Reaction score
12,814
First Language
English
Primarily Uses
RMMZ
[move]JavaScript/Plugin Support[/move]
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
258
Reaction score
251
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,609
Reaction score
1,131
First Language
Polish
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,609
Reaction score
1,131
First Language
Polish
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
258
Reaction score
251
First Language
Danish
Primarily Uses
RMMV
Thank you, I might need that!
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,609
Reaction score
1,131
First Language
Polish
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
258
Reaction score
251
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
3,122
Reaction score
2,394
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
10,078
Reaction score
6,380
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 Profile Posts

Proud on how this map turned out.

FnmhDLIXgAAOvIC
I just finally fixed a huge problem that wouldn’t let my game load and would crash it.. I thought that I was gonna have to trash the project and start over lol
The feeling when you finally found and killed that one gamebreaker that you could not really grasp before.:kaojoy:
Precious vet moments. Funny how smart animals are. They can tell what is happening especially a trip to the vet.

Rhythm game Super Hexagon. This looks hard as heck.

Forum statistics

Threads
128,320
Messages
1,193,585
Members
168,794
Latest member
KitzuneUdon
Top