How to make a daily challenge system

I’m not asking for a script, I just need guidance on how this would work. I’m also aware this has been posted before, but I couldn’t get an answer in the same style. I want the daily challenge system in my game similar to Entry Point, where it is a random mission, same for all players, which changes every day. I don’t want to have to manually update it every day, because that would be tedious.

Thank you!

2 Likes

I think you can get what you’re looking for by using tables and selecting a random item from that table

2 Likes

I’m looking for something that will stay the same for all players in all servers, but change each day to something different. If I used what you did, it would be different for all players.

1 Like

not exactly, you could do it in a server script and save it in a datastore then detect when a day has gone by you just cycle through another daily challenge

1 Like

So for example, I detect when a day has gone by, and then save a random challenge (ex. from a table) in a datastore?

1 Like

I guess, I’ve never made a daily challenge system, but there are resources I can link

1 Like

that is somewhat what you should do

1 Like

I’m not familiar with entry point. Would banners from tower defense be an example?

(data that update every [x] hours and then broadcasted to all online users. Data is the same at all given times for all users)

1 Like

I would create a table containing the list of challenges a user could obtain. Each day, I would generate a random index in this table and save it with the DataStore service so that all servers can acess it globally. I’d use os.time to record the time at which the index number was generated. Each time a server checks the index in the database (with an interval of 1/2h), if the os.time value saved next to the index number is greater than 24h, I generate a new index number and change the os.time to the current time.

However, this method has a flaw, for example, two or more servers could decide to generate a new index number at the same time, this wouldn’t break anything in itself, but it would be better to find a way to prevent this. I don’t have ideas about how to do so as of now however.

1 Like

Yes, what is what I am aiming for.

That’s what I was thinking. I’ll try that out!

Thank you! I’ll look at those.

I can’t tell you what their devs did, but what I did.

Made an infinite loop with node.js
It communicates with each active rbx server. (This is the only event you need to trigger rerolling your missions/banner since you can rely on it happening every 24 hours GLOBALy)
I followed this documentation.

--That's a lie. I weaved this into my discord bot to save some memory

You may find yourself using a server but if resources are limited, you can always use replit.com. I just installed termux on my old android phone because free replit crashed a lot.

Its a lot of unessesary work so I can’t recommend it.

But your welcome to ask for clarity on any part of it :slight_smile: