Event Variables Help

Discussion in 'RPG Maker MV' started by Silenity, Nov 25, 2016.

  1. Silenity

    Silenity Veteran Veteran

    Messages:
    599
    Likes Received:
    213
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV
    So I have some non-combat skills that the player can level up outside of battle.


    In this case I'm working with thieving.


    I'm trying to set variables so that the player can see how much progress is needed until they level up.


    The formula for leveling up is 100 x Skill Level.


    100 XP from level 1 to level 2.


    200 XP from level 2 to level 3.


    For a total of 300 XP from 1-3.


    I'd like the player to be able to see their XP they've earned and how much XP for the next level.


    I've got the formula and stuff down, I'm having trouble displaying it.


    If their current thieving experience is greater than or equal to how much they need to level up it will increase their level.


    [​IMG]


    Any help would be appreciated.
     
    Last edited by a moderator: Nov 25, 2016
    #1
  2. Heirukichi

    Heirukichi Veteran Veteran

    Messages:
    676
    Likes Received:
    182
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMVXA
    You could use pictures to display it. How to use them depends on how you want to display them. Honestly I'd say just show those pictures in the upper right corner when the skill is used.


    Example:


    If the skill is level 1 then show a picture with one dot (or three dots whith only one of them colored), if the skill is level 2 show two dots or two colored dots over 3 and if it's 3 show 3 dots or 3 colored dots.
     
    Last edited by a moderator: Nov 25, 2016
    #2
  3. Silenity

    Silenity Veteran Veteran

    Messages:
    599
    Likes Received:
    213
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV
    Hmm. Perhaps I didn't explain it right. 


    I've got it showing using Yanfly's Status Menu Variables. So they can see it.


    I'm having trouble with how to make it show up correctly with the right numbers.


    I don't know how to make it show current xp / xp to next level.


    And that's what I'm trying to figure out.


    Sorry for any confusion.
     
    #3
  4. Noobk

    Noobk Boo-Boo'Da'Foo Veteran

    Messages:
    154
    Likes Received:
    175
    Location:
    Austin, TX
    First Language:
    English
    Sorry I need the question further clarified. Is it just the math your having trouble with and using the variables to get it? I have not used the Yanfly plugin you're using yet, so I don't know anything about it. So if it's getting the numbers to display in the plugin I can't help.


    But if it's the math then you just need a couple of extra variables to store the data that you want to spit back out to the player.
     
    #4
  5. Silenity

    Silenity Veteran Veteran

    Messages:
    599
    Likes Received:
    213
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV


    Yeah it's just the math and variables I need help with.
     
    #5
  6. Noobk

    Noobk Boo-Boo'Da'Foo Veteran

    Messages:
    154
    Likes Received:
    175
    Location:
    Austin, TX
    First Language:
    English
    You need a variable that has the player/characters total xp. It looks like you have 0107 Thieving XP there to track just that, I just don't see the event for how you have the counting set up.


    To get XP needed for the next level, you can use your variable 0112 Thieving XP Lv. It looks like if I'm reading the event right, that variable will always be 100, 200, or 300. And from the 0112 variable, subtract 0107, and store that result in another variable, call it whatever you want. That is the variable to show XP needed for the next level.


    So X/Y =  Thieving XP / ( Thieving XP Lv -  Thieving XP).


    Unless the XP is getting reset every level to 0, then it's going to look something like 20 xp / 80 xp or 120/80 if they have hit level 2.


    There are a lot of ways to approach this. But I hope I explained that okay enough. I'm sure a mod on here could have explained that better! But it looks like you have everything already.
     
    Last edited by a moderator: Nov 25, 2016
    #6
  7. Silenity

    Silenity Veteran Veteran

    Messages:
    599
    Likes Received:
    213
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV
    Here's my initial set-up for the players stats and what not:


    [​IMG]


    I have the thieving xp resetting back to 0 and the thieving xp to level back to 100 because it was the only way I could make it work.


    I tried doing what you suggested but that doesn't seem to work either.


    Thanks for trying though! Appreciate it!
     
    #7
  8. Silenity

    Silenity Veteran Veteran

    Messages:
    599
    Likes Received:
    213
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV
    Could still use some help with the variable situation!
     
    #8
  9. Dad3353

    Dad3353 Veteran Veteran

    Messages:
    421
    Likes Received:
    108
    Location:
    France
    First Language:
    English


    It's not clear exactly what help you need, I'd say. Could you please clarify, or give a more precise example of what you're having trouble with..? It may be easily explained (or not..!), but it's too vague a the moment. What are you trying to do, and what have you already got..?
     
    #9
  10. Silenity

    Silenity Veteran Veteran

    Messages:
    599
    Likes Received:
    213
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm trying to display current experience / experience to the next levelwith the variables I've setup. 


    Idk if I need more variables or if I need to redo the formula to achieve this. 


    The current formula is level * 100.


    So from level 1 to 2 it would take 100 experience. From level 2 to 3 it would take 200 experience. So 300 total experience from level 1 to 3.


    So if I just hit level 2 and checked my progress to the next level it would display as 100/300.
     
    #10
  11. Dad3353

    Dad3353 Veteran Veteran

    Messages:
    421
    Likes Received:
    108
    Location:
    France
    First Language:
    English


    I would suggest, at start of Game, to set  the Experience needed for next Level in a Variable (Next_Leve...), so 1*100 (100...). At each Level change, replace this value with the new value. So, upon reaching Level 2 (assuming this can be detected...), Next_Level becomes 300 (calculated from Next_Level + (Level*100)...), Once Level 2 has been reached, Next_Level becomes 600 (Next_Level + (Level*100) again...), and so on... At any moment, then, it's possible to display Current Experience, whatever that may be, and Next_Leve.The only 'difficulty', is detecting the Level change. I don't know how that's done; maybe someone else..? That's the Variables part, though. Any use..?
     
    Last edited by a moderator: Nov 27, 2016
    #11
    Silenity likes this.
  12. Silenity

    Silenity Veteran Veteran

    Messages:
    599
    Likes Received:
    213
    Location:
    Oregon
    First Language:
    English
    Primarily Uses:
    RMMV


    Thanks! I've got it working pretty much now. I know how to update the level ups and everything already but now you can finally see total xp/xp to next level.


    Now each skill has 6 variables right now. I'll try to polish it up so you don't need so many variables per skill after work. 
     
    #12

Share This Page