Built-in stats, how to reference them?

Hi again folks!

RPG MV tracks many of its own stats without the need for plugins, such as time played in HH:MM:SS, steps taken etc.

Is there an easy way to copy these stats to a variable that can be referenced (for example, showing a statistics page which show the number of steps etc taken), or a script command to do this?

It's frustrating, because I know these things are there, I just don't know how to reference and check them against other things in game!

I'm particularly interested in STEPS, TIME PLAYED and CHARACTER LEVELS 🙂

Cheers

Mat
when you have a variable that saves the steps, its easy to call it within
a message box with \v[x].

in a seperate window, you can call this one too, if it allows escapes codes,
it depends how you want to show it and where, but you can built one
fairly easy in some ways without a plugin, nicer way if you use 1 or 2.

depending how it will look like, at the credits page, most looks like
the default way, some with extra features from a plugin, so the you
could create it in any creative way 🙂
That's great, thank you @ShadowDragon

What I need to know, is how do I capture those stats in variables, and can they auto update?
This seems like it'll require a plugin. I'm not sure of any way to do this in-engine.

In a plugin, however, you could create plugin commands to move data into one of the variables in $gameVariables. Unfortunately, you would have to do that every time you wanted to refer to the variable so it really depends on use-case.

I'd be willing to volunteer my time to do this, however I'd need a bit more information about the use-case to better understand if a plugin is a viable road, and if so how best to implement.
This seems like it'll require a plugin. I'm not sure of any way to do this in-engine.
I'm not sure why...for example:
Event Commands -> Control Variable -> Script -> $gameSystem.playtimeText()

Then display that variable anyplace you like (such as \V[x] in a message window).
In a plugin, however, you could create plugin commands to move data into one of the variables in $gameVariables.
That's all over-complicated - you can do that inside of any event, as I described above. If you were to use a plugin, it should be a plugin that allows you to define custom escape codes in message windows (Caethyril has one) so that you could display those system values without using variables at all.

RPG MV tracks many of its own stats without the need for plugins, such as time played in HH:MM:SS, steps taken etc.
As far as I know, you're not correct. MV does not track steps taken during the game.

However, if you do a quick Google, you will find huge tons of threads about tracking steps, whether to count them or to make footstep sounds. Most of these threads include the code for use in events, and it should be simple to modify that to increment a variable instead. No need for a plugin for this.
I'm particularly interested in STEPS, TIME PLAYED and CHARACTER LEVELS 🙂
Do you just mean, like, the total of levels gained by all actors?

You can do this without a plugin with a few lines in a script box inside an event:
Code:
var levels=0;
for (var i=1; i<$gameActors._data.length; i++)
    levels+=$gameActors.actor(i).level-1;
$gameVariables.setValue(X, levels);
where X is the variable ID you want to store it in.

If you're using it multiple places and don't want to copy that around, there's a plugin to call a common event when a character gains a level - you would simply make that common event increment your variable by 1 (make sure you initialize it to 0 on your game's first map).
Actually, MV does track steps:
Screenshot at 2021-08-18 14-01-39.png

As to how to access that in script, I’d have to defer to someone with more experience than myself.
Thank you everyone for your input, it's been most helpful. I'll let you all know how I proceed. In the meantime, if anyone has any further input, fire away!
I'm not sure why...for example:
Event Commands -> Control Variable -> Script -> $gameSystem.playtimeText()

Then display that variable anyplace you like (such as \V[x] in a message window).

That's all over-complicated - you can do that inside of any event, as I described above. If you were to use a plugin, it should be a plugin that allows you to define custom escape codes in message windows (Caethyril has one) so that you could display those system values without using variables at all.
I had a feeling I was over-complicating things. Thanks for explaining the solution. This has actually illustrated that you can accomplish a lot of nuanced functionality without always having to resort to a plugin. Awesome!
Actually, MV does track steps:
Cool, I've never noticed that. It makes me feel like many of the events/plugins for footsteps are more complicated than they need to be, then.
As to how to access that in script, I’d have to defer to someone with more experience than myself.
You don't need to, for the OP's purposes - he can put it into a variable then use the value of that in a message box.

But a quick Google reveals it's $gameParty._steps
This has all been incredibly helpful, thank you everyone so much!
This can now be marked as RESOLVED.

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.

Original thread: https://forums.rpgmakerweb.com/threads/built-in-stats-how-to-reference-them.139703/