[Plugin] Studio Stats | Record stats across your places

Studio Stats logo smaller

What is Studio Stats?

Studio Stats is a plugin that allows you to track various statistics across the different Roblox places that you edit and these stats are presented to you in a very clean and easy-to-digest format.

What is it for?

There is no overall purpose for this plugin, it is simply to record stats if you’re curious about how long you have spent editing a game or programming, or how long you use studio for per session.
This plugin is an excellent way to handle time management.

What stats does it record?

Currently, it records the following:

  • The date when the place was last opened,
  • Your current (or previous) session time,
  • Your total time recorded in that place,
  • Your total time scripting in that place,

This list will be updated as I update the plugin.

How does it look in-game?

View Images

image

The UI is also draggable and I may end up making it customizable in the future. I also plan on adding more stats too.
9LmZfSxL

Recorded stats for places can be removed from the list with ease just by clicking the X next to them. Note that the place you are currently viewing the stats from cannot be removed from the list; it is also highlighted and will appear at the top of the list for convenience’s sake.

This is the first plugin which I’ve made, and any type of feedback is greatly appreciated. :slight_smile:
If you’re interested in getting this plugin, the link can be found here:

8 Likes

Cool plugin, it’s curious to see how much time we spend on studio/coding.

1 Like

Thanks! I totally agree. Never realised just how much time goes into programming. What feels like 10 minutes can easily be an hour+.

1 Like

Fixed an issue that would cause the plugin to rarely not load.

Hey! Awesome plugin but if you open a local file it’ll error because the game’s place ID is zero and it can’t fetch any info on that.

1 Like

Ah, didn’t even consider that. Should be fixed in the latest version. It will now use tick() if it’s unable to get the PlaceId. Thanks!

1 Like

Cool! Maybe you could also use ‘game.Name’ for local files (if ID == 0)

And to differentiate them you could assign like a GUID to a random service (one that worked well for me was TestService)

Working sample:

Sample 1
local marketplaceService = game:GetService("MarketplaceService")
local assignedService = game:GetService("TestService")
local httpService = game:GetService("HttpService")
local name = "TimeTrackGuid"

local getGameName = function()
	if game.PlaceId ~= 0 then
		local success,name = pcall(function()
			return marketplaceService:GetProductInfo(game.PlaceId,Enum.InfoType.Asset)["Name"]
		end)
		return tostring(game.PlaceId),(success and name or "[failed]")
	else
		local id;
		if assignedService:GetAttribute(name) then
			id = assignedService:GetAttribute(name)
		else
			id = httpService:GenerateGUID()
		end
		assignedService:SetAttribute(name,id)
		return id,game.Name
	end
end

local id,name = getGameName()
-- save time / fetch time with the ID argument and display the name

Edit:

Made this more for you after reviewing your code
local AssignedService = game:GetService("TestService")
local AttributeName = "TimeTrackGuid"

local GetIdAndGameName = function()
	if game.PlaceId ~= 0 then
		local success,name = pcall(function()
			return MarketplaceService:GetProductInfo(game.PlaceId,Enum.InfoType.Asset)["Name"]
		end)
		return tostring(game.PlaceId),(success and name or "[failed]")
	else
		local SaveId;
		if AssignedService:GetAttribute(AttributeName) then
			SaveId = AssignedService:GetAttribute(AttributeName)
		else
			SaveId = HttpService:GenerateGUID()
		end
		AssignedService:SetAttribute(AttributeName,SaveId)
		return SaveId,game.Name
	end
end

local Id,Name = GetIdAndGameName()
-- save time / fetch time with the ID argument and display the name
2 Likes

That’s a good idea. I was actually thinking of turning the place-name into bytes and using that as the key rather than tick if it can’t fetch the PlaceId, but that method is a lot easier. Good job!

You are very welcome! This plugin is awesome to see how much progress I get done on my games in like time-wise. What if you added like the game icons next to the title as well and allowed them to be edited and stuff?

Sure. It’s nice to see that my useless plugin isn’t so useless after all haha.

Update 1.3

  • The GameIcon is now displayed in the top-corner of each place stats below the name. (You will need to open the places already saved to generate one for them)
Preview

image

  • Local Files should now create a fake PlaceId to save rather than making a new entry each time they’re loaded.

I also added support for editing the PlaceName to something custom. Functionality for that will probably come next update when I get some spare time. Thanks to @Jumpathy for these ideas. :slight_smile: