Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] Multi-World Calendar (Rework)

1723295852

Edited 1723296531
Julexar
Pro
API Scripter
This is a complete rework of my old Calendar DND Script and features cleaner code as well as the worlds I hadn't implemented yet. Current implemented Worlds: Faerûn, Eberron, Greyhawk, Tal'Dorei and Modern. Note: Leap years don't exist in my Calendar since they're annoying to implement. Issues/Bugs posted here will not be worked on. Either make a post in my Discord Server or open an Issue on the GitHub Repository. (Links in Bio) Installation You can install the Script by going to your  Game > Settings > Mod (API) Scripts  and searching for  Multi-World Calendar  in the dropdown menu. Make sure you're using the Latest version (1.2). Other versions will have issues. Alternatively, you can add it manually, by copying the Code from my GitHub Repository. Commands You can find all available Commands in the Wiki of my GitHub Repository. How to use First, type  !mwcal  in the Chat. Make sure that you are a GM in the Game, otherwise the displayed Menu won't have any Buttons. Next, you can click on any of the various Categories, which will make several Prompts show up, where you can further customize the Calendar. Calendar Menu Top Buttons The Buttons on the top, next to Day, Month, Year, Time and Moon let you edit the Value written within them. Bottom Buttons The Buttons at the bottom have various functions, described by the Label on the Button. Advance Time This will first ask for a Number. Make sure you don't input a negative or decimal number in here. Afterward, it will ask for a Selection between  Short Rest ,  Long Rest ,  Minute ,  Hour ,  Day ,  Month , or  Year . The time will then be advanced based on the selection you made and the Number you inserted. Toggle Weather Display This toggles the point  Weather:  at the top. If you toggle it off, it will no longer be displayed and the Button  Randomize Weather  will disappear. Toggle Moon Display This does the same as  Toggle Weather Display , but with the point  Moon:  and the Button  Randomize Moon Phase . Randomize Weather This will randomize the weather and change the text written next to  Weather: . Randomize Moon Phase This will reset the Moon Phases to be dependent on Day and Month. Open Alarm Menu This will open the Alarm Menu that will be covered further down. Show to Players This will show the current Calendar to the Players. (see below for an example) Reset Calendar This will reset the Calendar to its base values. Only use this if you're experiencing issues with the Display. Alarm Menu The base Alarm Menu can be displayed by pressing  Open Alarm Menu  in the  Calendar Menu . Create Alarm This will first ask for a Title, then for a Date, a Time as well as a Message. The Date needs to be in the format  DD.MM.YYYY  and the Time needs to be in the 24-hour format  HH:MM . Upon completion, a chat notification will appear, letting you know that the Alarm has been created. The Alarm will be triggered ONCE as soon as the Calendar reaches or passes the configured Time/Date. Afterward, the Alarm will be automatically deleted. Open Calendar This will open the  Calendar Menu .
1724402059

Edited 1724402239
Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.  More info...  If this script was installed from the Mod Library, you might find help in the Community API Forum. For reference, the error message generated was:  TypeError: Cannot read properties of undefined (reading 'push') TypeError: Cannot read properties of undefined (reading 'push') at createAlarm (apiscript.js:38905:28) at handleInput (apiscript.js:37842:8) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:169:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:169:1), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1763:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)
1724495311

Edited 1724498240
Julexar
Pro
API Scripter
Novercalis said: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.  More info...  If this script was installed from the Mod Library, you might find help in the Community API Forum. For reference, the error message generated was:  TypeError: Cannot read properties of undefined (reading 'push') TypeError: Cannot read properties of undefined (reading 'push') at createAlarm (apiscript.js:38905:28) at handleInput (apiscript.js:37842:8) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:169:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:169:1), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1763:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) Issues posted here will not be worked on. Either make a post in my Discord Server or open an Issue on the GitHub Repository. (Links in Bio) That said, I had noticed some issues and made a quick fix, so maybe your issue will be fixed with that as well.