Hi, this is the v2 of BadgeService3, BadgeService3 allows you to have free badges, without paying 100 robux, using datastores. It allows even for notifications!
BadgeService3 is light-weight and easy to use!
It’s super easy to use, and to add to your current datastoring! The data is loaded by you, and then you can do whatever you want to it, award a badge, remove a badge, get owned badges, check if a badge is owned, etc :D
You can add it to your DS2 or ProfileService system easily if you want! It’s entirely local, no datastore work is done by this v2.
If you want to connect this to your ProfileService system, look at the documentation, there’s an entire example of how to do it!
BadgeService3 is a profile-based module which allows you to have free badges, with notifications, and everything you need. Unlike some other options, it allows you to connect it to other datastoring modules, or mechanics. You can ue it for example, with DataStore2, or ProfileService, and many others, or just simple-old normal datastores.
But WHY use it? Why do I need free badges?
They can be used as normal badges, or to migrate later to actual badges. It woudn’t be hard to do so either. It allows you to easily keep, and also create an illusion that someone got a badge, when did they didn’t. For example, if you want to have an event, and keep a badge to the people who participated, you can do that with BadgeService3. Later on, you can create an actual badge for it.
No they don’t, that’s literally impossible. However, it’s a “simulator” for that effect. The main thing being that you can turn these into actual badges later without doing much. I actually plan on adding something to allow you to do that even more easily.
I would love if anyone were to test this module in a project or really anything for me. If you did use this, I would love to see your opinion and feedback, this module was only used at my game on which I wanted to combine all DataStore use into one key. This only was released because someone wanted acess to this v2 and I decided to give it to them. I don’t know if I can name them but um yeah.
Anyhow, this has been a thing for a bit of time, I was gonna release it but “forgot” to. Then I kind of did a rewrite of some stuff and released it.
Maybe make it like customizable like u could change it to goal reached or achievement achieved ya know?
also make it look less like roblox badge some people might have thought that image was actual real getting a badge.
Love this. Have a quick question though, how would I make a gui that displays how many badges a player owns out of the total amount of badges like “2/12 badges owned”? Like get the two number values. I have put these print statements but both output wrong.
if profile then
local badgeProfile = badgeService3:LoadProfile(plr, profile.Data.Badges)
if badgeProfile.Data then
local owned = badgeProfile.Data
local badgers = BadgeService3:GetBadges()
both print 0 though…
Here are the two badges right now.
Does the print statements not return because they are dictionaries and the #(table) only works on arrays? Would I have to loop through the tables and count the items in them instead?
Actually # should works on any table. This is pretty odd, can you try printing what these are before printing how many values are inside them? Btw, :GetOwnedBadges() actually returns an array! So it would work, you’re using :onUpdate() to update the profile store profile right?
I just noticed you’re using profile.Data to count the badges, it’s fine, but try using :GetOwnedBadges() for testing. It will transform it into an array, so it should work.
If it ends up not really working, i guess you can illerate through the table if it ends up not working.
(pool removed, just went with per-profile onBadgeAwarded event)
I actually forgot to talk about this, but I still recommend using :Delete() if you’re working with your own solution. In this case basic datastores, BadgeService3 currently yields for 5 seconds before garbage collecting the profile automatically. I still highly recommend that you do a DeepCopy of the profile.Data table before trying to save if you’re messing around with basic datastore use. This is not needed if you’re using a solution like ProfileService/DS2 which changes data as it changes.
New function added to BadgeService3, :SetGlobalSettings(SettingsTable), this function will change the settings you ask for!
New usable “variable” into badges, Image which can be set to a image id, not a decal id, and with the setting usesBadgeImageForNotifications enabled, it will use that as the notification image for that badge.
New function added :GetBadgeAmount() will return you the number of all badges.
:GetBadges() will now return the badges, and also the result from :GetBadgeAmount()
Disable notifications! isNotificationsDisabled
Add your own notification system if you want! using :onBadgeAwarded()
Use the default, gold color for the badge notification! usesGoldBadgeNotification
Change the default notification image to whatever you want! defaultBadgeNotificationImage
Use specific badge images! usesBadgeImageForNotifications
Change the notification’s text, and description! NotificationDescription and NotificationTitle
If you use BadgeService3, please follow the update topic.
That’s where updates will be kept now.