You most likely know that part of the player ID contains a timestamp.
The player ID is a hexadecimal string of characters that identifies the player. In this guide, I’ll be showing how to use blockcode to convert a hexadecimal string to a decimal number, and also how to use this decimal number to come up with a date. This date can be used to have seasonal events without you having to change your game (and change it back) every time an important date occurs.
How to Make
Materials
You'll need
4390 memory
8 properties
9 triggers
A good knowledge and comfortability with blockcode
Properties
Properties
I’ll be listing each property, the name that I made for the property and the type. Scope has to be set to global. (the property names will not make sense, so please change the names. Just make sure to update the names in the blockcode too)
Property 1
Name: index
Type: Number
NOT REQUIRED (HERE FOR REFERENCE)
Name: id
Type: Text
Property 3
Name: date (This property’s name does not relate to its function)
Type: Number
Property 4
Name: leapyear?
Type: Number
Property 5
Name: day of year
Type: Number
Property 6
Name: Month
Type: Text
Property 7
Name: Year
Type: Text
Property 8
Name: Day
Type: Number
Triggers
Triggers
I’ll be listing each trigger, the channel that triggers them and the blockcode.
NOT REQUIRED
I updated the guide to use less memory. This is still here for reference.
This has not been completely tested and is usually off ± 1 day. But here’s a working date finder using the player ID . If you have questions or something isn’t working, please post a reply and tell me.
This took a very long time to design and create, so please leave a . It would be very appreciated.
Using this code and creating properties for 0 = 0, 1 = 1…a = 10…etc, we can easily get the time in seconds from January 1st 1970, in case you wanted less memory for this guide.
Mine only goes through how to get the seconds, I love that you’re expanding on it (even though I posted mine 2 hours later than yours)
Yes, and @Boss_1s pretty much answered that, but if your players had to select which timezone they were in, that would defeat the entire purpose of finding the time automatically.