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.
player card script

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 71
RMRK Junior
Hello I am new to this forum though i have read over and liked this site very much.

That said, I need help with a script I am working on.
I am trying to make a new menu where the player can access a player card
where he or she can look at the gold and time played in one popup menu from
the orginal menu, something like this:

Party
item
Player Name
save
exit

Along those lines.
When the player clicks on "Player Name" i would like a new window to appear with:

"Name / Player Name"
"Gold / Player Gold"
"Time/ Player Time"

I have managed everything up to "Name / Player Name" but i cannot for the life of me figure out how to
put the gold and time played in the same box.

Any help or suggestions would be grateful.
Thanks in advance.

*
Rep:
Level 82
The amount of gold the party has can be accessed with $game_party.gold

As for time, it is calculated with a bit of mathematics. The way VX does it might be a little confusing, but Yanfly had this code to work it out:

Code: [Select]
def game_time
    @gametime = Graphics.frame_count / Graphics.frame_rate
    hours = @gametime / 3600
    minutes = @gametime / 60 % 60
    seconds = @gametime % 60
    result = sprintf("%d:%02d:%02d", hours, minutes, seconds)
    return result
  end

Which should work to get the game time, you'll then need to add some code to draw the result.

I'm not sure what difference is needed for RMXP if you're using that. I only work with VX.

If indeed that was the info you wanted.
(Why do I always feel like it's the end of the world and I'm the last man standing?)