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 .
×

[Script] Chronicle - Full Calendar and Event Tracking for Your Campaign

1781385659
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Saul J. said: Okay, now some questions. :-) All of this relates to a Gregorian calendar which is what I'm using for my game, but I suspect the same questions arise for more than one calendar type. Is there a way to: Show a different version of a week? Right now, it shows Sunday-Saturday. What if I want to show Wednesday-Tuesday? What if I want to have it show the next 7 days basically "on the fly"? That is, right now I want Wed-Tue, a little later or on a different game day I might want Thu-Wed. Show a full month, instead of a week? Show all the events/notes for the calendar displayed (i.e. for that week if showing a week, or month if showing a month, etc.)? For example, right now, in my game, I have an event on May 28, May 31, June 1, and June 2. I want to display a calendar week or month, that shows all of those events so that the players can see the full timeline of events. In the current system, that's two different weeks. And the events only show for the featured date, not all dates in that time period. Display the timeline to players for a specific set of dates? Thanks. I have had some requests for alternate spans, since some calendars (Faerun) have longer than 7 day weeks. My thought was to default 3 days before and after, centered on the current date. The more I complicate the interface, the harder it becomes for new users. Constructing custom grids also sounds like a pain. I would suggest for custom spans, to use the timeline and constrain the dates there, since that is already built-in. When I add Send to Chat code for that, it should capture most use cases. Remember that not only can you constrain by date range, if you want discontinuous events while not showing intervening non-sequiturs, you can always control the visibility with tags. I do have Send to Chat planned for Timeline. I'll keep this pinned and in mind for the update. That's not going to be for the immediate, though, since I have some RL stuff going on for the next couple of weeks.
keithcurtis said: Saul J. said: Okay, now some questions. :-) All of this relates to a Gregorian calendar which is what I'm using for my game, but I suspect the same questions arise for more than one calendar type. Is there a way to: Show a different version of a week? Right now, it shows Sunday-Saturday. What if I want to show Wednesday-Tuesday? What if I want to have it show the next 7 days basically "on the fly"? That is, right now I want Wed-Tue, a little later or on a different game day I might want Thu-Wed. Show a full month, instead of a week? Show all the events/notes for the calendar displayed (i.e. for that week if showing a week, or month if showing a month, etc.)? For example, right now, in my game, I have an event on May 28, May 31, June 1, and June 2. I want to display a calendar week or month, that shows all of those events so that the players can see the full timeline of events. In the current system, that's two different weeks. And the events only show for the featured date, not all dates in that time period. Display the timeline to players for a specific set of dates? Thanks. I have had some requests for alternate spans, since some calendars (Faerun) have longer than 7 day weeks. My thought was to default 3 days before and after, centered on the current date. The more I complicate the interface, the harder it becomes for new users. Constructing custom grids also sounds like a pain. I would suggest for custom spans, to use the timeline and constrain the dates there, since that is already built-in. When I add Send to Chat code for that, it should capture most use cases. Remember that not only can you constrain by date range, if you want discontinuous events while not showing intervening non-sequiturs, you can always control the visibility with tags. I do have Send to Chat planned for Timeline. I'll keep this pinned and in mind for the update. That's not going to be for the immediate, though, since I have some RL stuff going on for the next couple of weeks. Ok. Well. That means I won't have it for this coming Wednesday. :-) But it will help me out in the future.  This is a really useful tool for Call of Cthulhu games especially where players are uncovering happenings on particular days, leading up to some "event". Being able to show phases of the moon, events/notes on days, a timeline... is going to be a REAL help for my players since keeping all the dates/events straight gets complicated and confusing. This tool will help me stop repeating dates/events so often.
1781446812

Edited 1781453089
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You could copy and paste from the timeline or calendar view as a workaround. It's just text formatted with tables. A handout even includes images, and is better suited than just copying and pasting to chat. Auto-show the players the handout by using the show to players button. This also has the benefit of being persistent so they can study it at leisure, as well as being somewhat editable using the handout editing tools. Here's a quick example:
Does it do a 10 day week yet? My campaign is based in Fayrun.
1781767306
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hultz (Keeper of Secrets) said: Does it do a 10 day week yet? My campaign is based in Fayrun. If you mean in the chat display, no. I'll need a different solution there, because it would become unwieldy with any more days. I am currently thinking about chat sending the three days before and after the featured date, instead of the week as displayed on the grid. If you mean a ten day week as displayed in the  calendar grid, then yes, it can handle any week length, and Faerun is one of the pre-installed calendars. I am currently travelling for the next week and a half, so there won't be any updates during that time. A list of potential features to refine would be appreciated, though.
1781825641

Edited 1781825725
Once again God bless you and the work you do this is amazing. I do have 2 suggestions and one small bug I found. The bug is when you try to edit a moon the color always defaults to yellow even when it isn't the color you picked, but once it's yellow and you edit it again the color you pick will be correct. No big deal First suggestion would to be able to generate weather for more than one day at a time or for the whole month. Since you can edit or remove the ones you don't like/want this would be such a time saver.  Second is more of a question than a suggestion, I'm using this with your table format and it will only work for one of the pages. Whatever page you were on when you format is the only one that works, and if you had say the timeline formatted and then try to format the calendar then it will remove the format from the timeline. So would it be possible to have it work on all the pages or because it's different "pages" in one handout it's not something that really feasible? 
1781831846
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Master Azroth said: Once again God bless you and the work you do this is amazing. I do have 2 suggestions and one small bug I found. The bug is when you try to edit a moon the color always defaults to yellow even when it isn't the color you picked, but once it's yellow and you edit it again the color you pick will be correct. No big deal That might be related to the bug that ignored the very first note added to the database. I'll investigate. It or may not be easy to fix. First suggestion would to be able to generate weather for more than one day at a time or for the whole month. Since you can edit or remove the ones you don't like/want this would be such a time saver.  That should be possible, but I'd be loathe to have it generate too many days, since the data is only intended to be of use if players are present, and otherwise bloats the database. Still, being able to generate a short stretch sounds useful. Second is more of a question than a suggestion, I'm using this with your table format and it will only work for one of the pages. Whatever page you were on when you format is the only one that works, and if you had say the timeline formatted and then try to format the calendar then it will remove the format from the timeline. So would it be possible to have it work on all the pages or because it's different "pages" in one handout it's not something that really feasible?  Table Formatter will be of no help here. The Chronicle handout is completely re-drawn every time it changes, even slightly. Basically, to make a handout display something, you replace the html contents. It's an all or nothing process. So whatever change you make with another script is overwritten whenever any change is made, no matter how minor.
Humble requests for future versions (if you want...) 1) when you rethink the days shown in the chat, may I resubmit the request/proposal to highlight the "today", if present in the range, and show also an icon that can be interpreted as "here be notes"? Andrea L. said: send to chat of a calendar: what about featured day in the center and days from -3 to +3? maybe highlighting if one of them is "today". also i'd love to have a mark, an icon, that tells that in one of the other days there are notes using it I do see that it is mostly a DM thing so I'm removing player access but in my campaign they narrate what's happened in an handout that I bring into chronicle and  I'd like the players to be able to have more usage as their chronicle too so... 2) I would love a player command "what happened" in which they can select a date (limited to 10-20 days in the past not to overflow) and receive the send to chat (player info only).  3) i second the multiple days of weather but today plus 5-7 would be enough that the number of click if necessary reduces a lot and we do not do unuseful  periods 4) timeline send to chat could be tag and number of past entries? so everything from a (choose) tag in the (choose) days before featured? thanks again I love adding the chronicle layer to the campaign Andrea
keithcurtis said: Master Azroth said: Second is more of a question than a suggestion, I'm using this with your table format and it will only work for one of the pages. Whatever page you were on when you format is the only one that works, and if you had say the timeline formatted and then try to format the calendar then it will remove the format from the timeline. So would it be possible to have it work on all the pages or because it's different "pages" in one handout it's not something that really feasible?  Table Formatter will be of no help here. The Chronicle handout is completely re-drawn every time it changes, even slightly. Basically, to make a handout display something, you replace the html contents. It's an all or nothing process. So whatever change you make with another script is overwritten whenever any change is made, no matter how minor. That sucks, dark mode is the only one that can be read fully when roll20 is in dark mode.
1781900874

Edited 1782046386
Ok I did some serious damage to my chronicle. tried to organize tags by adding a prefix and I chose ":" as separator t: c:  .... but I discovered tags become unmodifiable (clicking on it does not work). I interpreted as a bad behavior of the ":" so I thought I could modify the few instances in the archived handout. BUT before that I did a copy to be on the safe side Tried modifying and re-archiving. chronicle is now empty!!!!!!! OK no panic unarchive and rename as broken rename copy of as original and archive. still empty!!! @Keith when back from your trip can you give a look? campaign is the one you still have access thanks update: did a rollback and started again tagging with "_"   leaving the message as maybe you want to remember investigating the : issue in the tags  
1781913946
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks al! I will look at bugs and rate and prioritize features when I get back. Based on ease of implementation, top of the list is likely: Send to Chat for TImeline View Fixing modes (I probably have pure white and pure black in the CSS, which gets caught by the VTT Dark/Light mode) Then: Revised day span display in grid Send to Chat Repeating events other stuff.
another strange behavior now on save or selecting a tag the calendar parts becomes empty until I click back on a date then repopulates. i have done a small video but I cannot see a way to share it. @keithcurtis if you need is the usual adventure. thanks Andrea
1782077404
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Andrea L. said: another strange behavior now on save or selecting a tag the calendar parts becomes empty until I click back on a date then repopulates. i have done a small video but I cannot see a way to share it. @keithcurtis if you need is the usual adventure. thanks Andrea I can look into this upon my return near the last days of June.
I can look into this upon my return near the last days of June waiting without problem and playing more with this amazing mod
1782768867
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Updates coming in next merge I have fixed some formatting where it conflicts with Roll20 light/dark mode. (getting rid of pure white/black). Send to Chat in Timeline Mode is now fully implemented. When in Timeline Mode, if you press send to chat, the chat output lists the currently filtered events as closely as possible to the handout mode, as seen when the handout mode is in Show Details:OFF mode. If it were to show all the tags and buttons for each event, it would become unreadable in the narrow chat window. Interval listings format like they do in the handout, but they do crowd the item text a bit. This is unavoidable if they are to display at all. In chat display, the buttons are unclickable. This is by design, to keep active controls confined to the handout. Active filter tags are displayed at the bottom of the chat output. If there are more than 10 active tags, it displays the first 10, followed by an ellipsis. GM-tagged items display in handout, but do not display in chat, following the convention of Calendar View in Chat. More is coming, but will wait for a subsequent merge.
1A) Send to chat from timelines is so cool!!! small nitpick on alignment on first element as maybe it is aligned given the full date but seems misaligned from a day point of view (Firefox is the browser) 1B) what do you mean by interval listing? the date range? 1C) the gm tag is in the tag list at the bottom of the chat and probably should not be (notes tagged gm do not show as expected) 2) links are clickable in calendar mode and in chat but not in timeline mode 3) the disappear/reappear issue of my note above is still there even with this release. 4) while you are probably touching the weather in the future, I add another point: I find myself in need of change quite a bit as the weather jumps a lot from one day to another. I would love either a copy from yesterday button or your system to give a greater probability to small variation from the previous day 5) on the above commands may I suggest calendar-timeline-send to chat | day-night-sepia| help-design.....design is used once so could be less prominent... many thanks again Andrea
1782914070
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
1A) It is following the rules set by the handout timeline (mostly to conserve vertical space): First Item of the year gets the year First Item of the month gets the month Subsequent times in those ranges get only the weekday and date. 1B) Interval listing is the gray tag on the right that lists the interval between it and the Reference Date (which is different from the Featured Date). Reference Date is used only in Timeline Mode. 1C) Agreed 2) I'll review that behavior for consistency. 3) I have not been able to duplicate that behavior. Can you give me step by step reproduction instructions? 4) Interesting. I thought I had logic in there to that effect, but I'll review it. The simplest solution might be that clicking "Generate Weather" has a percentage chance of just duplicating yesterday's weather. 5) Agreed that the order needs to be revisited. I use design all the time since I need to in order to develop. It makes sense that it would be a rare visit for an end user. The most likely need would be for a campaign where the party is traveling to a new biome, like a jungle or desert expedition.
keithcurtis said: 3) I have not been able to duplicate that behavior. Can you give me step by step reproduction instructions? 4) Interesting. I thought I had logic in there to that effect, but I'll review it. The simplest solution might be that clicking "Generate Weather" has a percentage chance of just duplicating yesterday's weather. 5) Agreed that the order needs to be revisited. I use design all the time since I need to in order to develop. It makes sense that it would be a rare visit for an end user. The most likely need would be for a campaign where the party is traveling to a new biome, like a jungle or desert expedition. on 3) may I ask you to see it in the players of 2026 game you still have access to? (same issue with both safari and Firefox) create a note save it saves with empty calendar on calendar select everything reappears  same in the timeline view thanks for everything else Andrea
1784644402
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I have just submitted a Pull Request for version 1.0.5 to the repo Changes: Header Navigation has been re-structured into a better logical order: Send to Chat has been altered. Instead of a hard-coded 7 day week, it sends a 7 day span with the Featured date at center. Thus, you get "Today", bracketed by the three days before and after. The hardest part was getting intercalary and interannual days to display correctly, but here are a couple of examples:
1784648303
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Andrea, I have looked at your game, and I can reproduce the issue. I can't reproduce it anywhere else, though. I have a suspicion that some unusual character lurks in your event data, but it eludes me so far. If the newest upgrade (when it drops) doesn't resolve the issue, let me know and I will take another look. 
ok thanks
Kind of a bug: I enter an event or note. I then add a tag clicking on "+tag". After that, I can't add a new tag. If I click on "tag" for the entry, I get a dropdown menu where I can select from all the tags already used, but I can't add/create a new one. The only way I've found to do it is to add a new entry, add the new tag to that entry, and then I can add that tag to an old entry. That seems like unnecessary work. There also doesn't seem to be a way to remove a tag.
1785464879
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Click on any tag attached to an item. When the dialog comes up to edit it, leave the entry blank. That will remove that tag from that time. You should be able to create/add a tag to any time in the Calendar view by pressing the plus tag. It is not possible in the Timeline view. Can you attach a screen shot of where you are clicking/looking?
Looking at the Calendar view, I see: TBH, I can barely  see the tags, and the icons next to them are practically useless because they are too small to see. When you said there was a way to add a tag in that view, I tried clicking the two icons there, and found the add tag menu... but it was by luck rather than by knowingly clicking something.   And I seem to have a shadow "Macro Options" that's appearing there for some reason. I don't know why. BTW, as a player (not the GM), if I type "!chr" in chat, I get the message to open the chronicle interface. If I click that, nothing happens. Is there a way to allow players to view but not edit? 
1785553204
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks for the screen shot Saul! I will investigate after Con weekend and see what I can find out. As for the tag buttons, my intent was to make them low contrast so as not to distract from the general item readability, but I may have gone too far. I will look into that as well.
keithcurtis said: Thanks for the screen shot Saul! I will investigate after Con weekend and see what I can find out. As for the tag buttons, my intent was to make them low contrast so as not to distract from the general item readability, but I may have gone too far. I will look into that as well. No rush Keith. I figured out how to do what I needed to do so I'm good. Just some QOL tweaks needed.  So, enjoy the con.
1785697670

Edited 1785697758
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I had some time at the airport to investigate this. I have fixed the tags so that in dark mode, they have a slight border, to help them stand out. I think they have enough contrast in the other modes. I have tweaked a few cases where I was using HTML headers (<h2>, <h4>) which were causing some dark/light mode issues, but more importantly were causing map pin buttons to manifest. Changes will be in the next code push. As for that odd "Macro Options" text you are seeing, I am clueless. Those words don't appear anywhere in the code.  Is it possible you use them in a calendar item, and are including some kind of formatting? Or do you have a handout called "Macro Options" that you are formatting in a note? The only other option I can think of is interaction with another script.
keithcurtis said: I had some time at the airport to investigate this. I have fixed the tags so that in dark mode, they have a slight border, to help them stand out. I think they have enough contrast in the other modes. I have tweaked a few cases where I was using HTML headers (<h2>, <h4>) which were causing some dark/light mode issues, but more importantly were causing map pin buttons to manifest. Changes will be in the next code push. As for that odd "Macro Options" text you are seeing, I am clueless. Those words don't appear anywhere in the code.  Is it possible you use them in a calendar item, and are including some kind of formatting? Or do you have a handout called "Macro Options" that you are formatting in a note? The only other option I can think of is interaction with another script. The "Macro Options" is clearly coming from the script, or at least a library called by the script. They appear in some of the modal screens that open such as: The words seem to hang around afterword... sometimes. I'm not sure that's a problem with the script, or something from the way Roll20 is handling graphics, or Chrome, or something else. As for the rest, the next code push hasn't happened yet (maybe tomorrow) so I can't say yet if changes you made are better or not.
1785811095
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I haven't pushed the code yet. This was a code fix written in an airport. I have a few more tests to run before submitting a PR. And yeah, "Macro Options" is produced by the system. If it's hanging around afterward, that's a Roll20 display glitch, and not something I can reproduce or do anything about. :(
I was skimming and noticed there were some tag and send to chat questions; Andrea for "1C" caught my eye and sounded like there was an unintended tag selection for Send to chat. Here is what I have done with Macros for my players as a "Pin Command" via linking to a macro call. Hopefully this is helpful for folks. START.TIMELINE.AG1 !chr --tl-deselectall !chr --tl-toggletag agnostic.start !chr --chat timeline PLAYER.TIMELINE.AG1 !chr --tl-deselectall !chr --tl-toggletag agnostic.pc !chr --chat timeline First line default clears the tags so it doesn't flip on/off per toggle and just is told "No Tags Selected". (This is silent to the chat) Second line selects the tags. in my case the Start Time of the group and a timelin for Player Known events respectably to the  macro. (This is silent to the chat) The third line sends the selected tags to chat.
keithcurtis said: I haven't pushed the code yet. This was a code fix written in an airport. I have a few more tests to run before submitting a PR. And yeah, "Macro Options" is produced by the system. If it's hanging around afterward, that's a Roll20 display glitch, and not something I can reproduce or do anything about. :( I kind of suspected as much. Thanks, Keith.
1785854471
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
D G. said: ...Here is what I have done with Macros for my players as a "Pin Command" via linking to a macro call. Hopefully this is helpful for folks... Thanks for sharing, D G!
1788832861

Edited 1788833271
I'm still not seeing tags on my display.  I just installed this today, and set up a test note, and it's not giving me any tagging option.  Using Firefox (155.0.1) or Chrome ( 152.0.7977.83  ).  Sandbox is 1.5 (Latest), but no change when using Legacy.
1788835883
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Jason! You are looking at the compact view. Click "Show Details" (first button on the line that displays the date in your screenshot), and the tags will show. It's mentioned in the help doc ("Tags appear as clickable buttons in the timeline detailed view."), but that's not very clearly stated. I'll update the help doc in the next update.
Keith, I just installed this mod, it would be great for my campaign, but when I run the !chr command, nothing happens and in the API log, I see,  {"who":"error","type":"error","content":"Unable to find a player or character with name: Steve"} I was wondering if it has something to do with the fact that I have brackets in my name in game? So, I changed my name, removed the (GM) and it is now working. Not sure if there is something you should do, but thought you should know.
1788978825
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Steverhud! That probably falls under the "Don't do that" category. :D My general advice when naming anything in Roll20 is to avoid "control characters" in the name. Anything that could confuse a macro or a script: !@#$%^&()[]{}?
Makes sense. I am a developer but not with Java and so wasn't sure how easy it might be to code for that if others might do that too. I know my players change their names to there character name and then the name they go by in brackets. Others might too. No worries, I've changed my name and it works great. Thanks for this fantastic piece of work.