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’s just to record stats if you’re curious about how long you have spent editing a game or programming, or how you use studio in general.
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
The UI is also draggable and I may end up making it customizable in the future. I also plan on adding more stats too.
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.
If you’re interested in getting this plugin, the link can be found here:
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
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?
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
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.