RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] Showing the Hero's level in a CMS?

0 Members and 1 Guest are viewing this topic.

*
Rise From The Ashes!
Rep:
Level 91
"Time to bring the Law!"
Project of the Month winner for September 2009
So far my Job System is almost complete, but there is one problem I can't get passed; showing the actual Hero's base level in the menu.

Here I have the menu layout:



I have pictures with the numbers 1-9 which would be used to show the base level of the hero (where 00 are), but I can't figure out how I could actually do this.

Does anyone know how I could do this?

Also lol at doing a whole job system, but can't show the base level. :x

EDIT: The numbers have black backgrounds as I am using ImagePositioner to show you the layout.
« Last Edit: February 26, 2009, 11:28:34 PM by Tezuka »

*
Rise From The Ashes!
Rep:
Level 91
"Time to bring the Law!"
Project of the Month winner for September 2009
Whoops, I lied. What I thought I would work didn't.

So, anyone got an idea on how I could show the base level of the character?

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
incoming pseudocode

Code: [Select]
if level < 10
   display 0 in the tens spot
   if level == 1
       display 1 in the ones spot
   [if level == 2,3,4,5,6,7,8,9 obviously]
else
   if level % 10 == 1
       display 1 in the tens spot
        if level - 10 == 1
            display 1 in the ones spot
       [if level - 10 == 2,3,4,5,6,7,8,9 obviously]
   else
      if level % 10 == 2
         [etc...]

might not be the best way and I just came up with it off the top of my head
but that could work.

do you get the idea I was trying to give you?

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah, that's more or less what I would do. It's a good idea to use a binary tree though.

Something like


Code: [Select]
if digit < 4
  if digit < 2
    if digit == 0
      Show 0
    else
      Show 1
    end
  else
    if digit == 2
      Show 2
    else
      Show 3
    end
  else
    if digit < 8
      if digit < 6
        if digit == 4
          Show 4
        else
          Show 5
        end
      else
        if digit == 6
          Show 6
        else
          Show 7
        end
      end
    else
      if digit == 8
        Show 8
      else
        Show 9
      end
    end
  end
end

It's not a big deal, but it, on average, reduces the number of con. branches that the program will run through any time it is run. And yeah, NAM's right on for the rest.

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
I really need to make a FAQ for showing up numbers

Code: [Select]
Variable: thousand is set equal to hero HP
Thousand /1000
Thousand mod 10

if thousand = 1 show pic: 1.png

Variable: hundred is set equal to hero HP
hundred /100
hundred mod 10

if hundred = 1 show pic: 1.png

same thing applies to that.


*
Rise From The Ashes!
Rep:
Level 91
"Time to bring the Law!"
Project of the Month winner for September 2009
Well I tried Nessiah's way of doing it and it looks like it works!

Thanks to all three of you for your help! :)