I made a plugin that allows connection of google sheets and roblox studio!

I havent seen anybody talk about using google sheets as a storage for in-game stats (like weapon damage or armor health) and decided to take this into my own hands. This plugin uses a module made by another developer (@7z99) for keeping data saved. Please go check some of his things if you have questions about the data storage of this, I use a very slightly modified version of his ToTable module.

The plugin allows you to add pages from google sheets to get data for your game, I will add a little guide here that you can use.

Keep in mind that I am still working on this, and this is by no means the final state of the project.

GUI Image

image

Connecting a Spreadsheet

The image in the dropdown above is the GUI of the plugin. It can be dragged around and docked just like any studio GUI.

This is a google sheets link, below is how you will use this to connect a sheet.

h.ttps://docs.google.com/spreadsheets/d/spreadsheetID/edit#gid=pageID
(I am not responsible for what happens if you use this link)

  • the spreadsheet ID textbox is where you will put the first bold part of the link

  • the page ID textbox is where you will put the second bold part of the link

  • the spreadsheet name textbox is where you will name the spreadsheet, this doesnt matter too much as the internals dont rely on it, but it is highly recommended to use the page names that you give them in google sheets itself

  • the auto update is denoted as experimental because I havent figured out how to get it to work yet

After filling out these fields, you can hit the “connect a new sheet” button to add this to the internal list.

Updating your Data

So you may have seen the “update all spreadsheets” button from the GUI image and are wondering “what is this about?”

Well this button is where the magic of my plugin is hidden. Whenever you press it, the “sheets” folder in ServerStorage will be deleted and replaced with a new one.

Image of "sheets" Folder

image

This new one will have all of the data in your google sheets, and all of the data will get the newest version instead of old ones.

Managing Data
Folder Structure

Folder Structure

"Interpreted" Data

The image above is the structure of the data

When you want to use the data, duplicate the “Interpreted” folder to your desired storage location, a new one will be created each time you press the update button.

You CAN drag the interpreted folder, but the view widget will most likely error

"Junk" Data

The data that isn’t parsed through the interpretted (I call it junk data) is still there for access in case you need it. This junk data is the raw data from google sheets and is quite unreadable, which is why interpretted data exists in the first place.

Junk Data Structure

image

I will maybe edit this later to explain the structure more, but I am too lazy right now. Please remind me to do it.

Above is where you will find dropdowns for different forms of data within the plugin

I got an error, what do I do?

If you get any yellow/orange errors in the output, then it might be a small issue in the code that doesn’t matter at all. If the errors say “an unknown error occurred” then contact me and I will help resolve this. If a red error pops up, then PLEASE tell me, I want to fix any issues within the scripts and your help is greatly appreciated!

view function

The view button on the main widget pulls up another widget. This new widget can be docket and dragged just like any other roblox widget, similar to the main menu.
The viewing widget is a widget that allows you to check your data without searching through folders to make sure it is correct, and it allows you to delete unwanted aspects of your data (if you are reading this directly after the edit then the feature may not be implemented yet)

Thank you for your time and attention, have a good day fellow developers!

P.S.
My post may be hard to read because of the heavy use of dropdowns, but trust me when I say that this format is better than it would have been.

I somehow forgot to add the plugin link to my post after all this, so im going to edit it

here’s the link:

I also have my plugin open for reviews, so you can put criticism there and I may come around to address your concerns!

second edit:
Since I was asked for the link to ToTable and ToInstance, here you go!

14 Likes

This seems really cool!
It’s such an innovative and unique idea, I’ll plan to try this out someday as I have some ideas on implementing it
Eventually I’ll share my experience using the plugin here
I wish you the best of luck with developing this plugin further!

3 Likes

wow, I didnt expect to get someone here so fast! I was really confused why I saw a thingy below the heart button lol.
Once again, you may experience problems as I originally developed the plugin for my own purposes without factoring in user-friendliness until the last second.

1 Like

do you have the link to @7z99’s ToTable module? I’m intrested on how you did this

3 Likes

there you go

3 Likes

I am making a second version with a much better GUI now!

2 Likes