GithubHelp home page GithubHelp logo

fantasycalendar / fantasy-calendar Goto Github PK

View Code? Open in Web Editor NEW
88.0 88.0 7.0 20.33 MB

Build a calendar that fits your world! Whether you're a GM just here to track your Forgotten Realms campaign with a preset calendar, or a fanciful world-builder with 12 moons (Like Eberron's) and zany timekeeping systems to match, we've got you covered.

Home Page: https://app.fantasy-calendar.com

PHP 75.39% Dockerfile 0.13% Vue 0.02% Shell 0.10% Blade 24.18% Makefile 0.18%
calendar dungeons-and-dragons fantasy laravel rpg storytelling

fantasy-calendar's People

Contributors

dependabot[bot] avatar haxxer avatar v13axel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fantasy-calendar's Issues

"Create seasonal events" button creates events for every season

Currently we're just looping through all seasons and creating seasonal events for all of them.

if(willCreate) {
for(var i = 0; i < static_data.seasons.data.length; i++){
var solstice_equinox = create_season_events(i, static_data.seasons.data[i].name);
for(index in solstice_equinox){
static_data.event_data.events.push(solstice_equinox[index])
add_event_to_sortable(events_sortable, static_data.event_data.events.length-1, static_data.event_data.events[static_data.event_data.events.length-1]);
}
}
do_error_check();
}

Equinoxes and solstices are based on longest/shortest days of the year, so a world with 50 seasons would still only have two of either.

Would be neato, methinks, to actually calculate those days and somehow create the events based on that.

Error on line 3745 & 3746

Posted to Discord

Getting this error when loading the calendars. According to Wasp, its just grabbing the name of the child calendar connected to that calendar. I only have one calendar, and do not believe I had ever linked this calendar to another.

Now I am getting the same error message, but coming from line 3476 with different ID number

Username is Sans

3745
3746

New calendar checklist

When you start creating a new calendar, a checklist of the things you need to do to get a working calendar will be displayed where the calendar normally is. When you complete one of the steps, it ticks off that item in the checklist.

Bonus: Arrows that point towards those menu options to prompt the user to open them and interact with the menus.

Starting era setting

Add the ability to mark an era as the starting era - it will act as the current era regardless of its date until another era has been passed.

Target-based events not crossing year boundaries

An event set to occur "x days after" or "x days before" a targeted event will not show up if that event takes place in a different year. The event testing will show the dates they should be on, but those dates are empty when looking in the calendar.

Multi-offset LCM calculations needs to be figured out

Link to function in question

The problem is that multiple leap days that remove days with different offsets could collide on certain years, effectively making that month have negative days, because I have no simple way to calculate how often that collision happens

Say you have a month with a length of 1, and you have two leap days that remove a day from that month:

  • One leap day has an interval of 5 and an offset of 1, it would remove a day from that month every 5th year starting year 1, then 6, 11, 16, 21, 26, 31 etc
  • The other leap day has an interval of 8 and an offset of 0, meaning it removes a day from that month on year 8, 16, 32, 40, 48, etc

Detecting these collisions with NO offsets is easy, as you would do LCM, least common multiple, eg, how often does 5 and 8 collide? Every 40 years, because simple numbers, but in the case with offsets, LCM breaks down.

This is used in epoch calculation, which is used to determine the year's starting week day, the weather, the moon cycles, some event calculations, etc, so it is very important to get right.

If we can solve this, we could also solve having multiple offsets for one leap day. For example, a leap day that happens every 5th (1 offset) and 3rd year (2 offset)

  • First interval would be 1, 6, 11, 16, 21, 26, 31, 36
  • Second interval would be 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35

These collisions need to be able to be detected on leap day level, too

Rich link preview (For Slack/Discord)

Currently, if you post a link to a calendar in Discord or Slack, it looks like this:
image

Would be cool to make that nicer - An image, and perhaps have the actual name of the calendar represented alongside some information about the calendar itself. Date/Year maybe?

Migration to Laravel

  • Install laravel
  • Hook it up to the database
  • Calendar model
  • User model
  • Take over the homepage
  • User controller
  • Take over login
  • Calendar controller
  • Take over calendar endpoints
  • Migrate frontend code into Blade templates
  • Replace any other legacy code

Support for one-off leap-days

Year 2,050 in my calendar has a leap day because the planet was physically moved out of the way of a comet and they wanted to re-sync.

Should probably support weird edge-cases like this.

"Happens Once" Events not displaying

One-time Events aren't displaying properly for me.
Steps to reproduce:

  • Create a new Event
  • Add "Happens Once" Condition Preset
  • Event will not display, but is present in Event List
  • can change "Year is Exactly" dropdown to "Year is or later than," enter same year, OR can remove Year condition entirely; in either case the Event will then display on calendar

Calendar: https://beta.fantasy-calendar.com/calendars/5f34d5c6b1cdd25e3f9fb46a6c90b4cb/
Event: "Hjolrig's Forge Completed" (currently not Displaying, set to 'Happens Once')

Event condition testing

After creating conditions on an event, the UI will show 4 different buttons that will allow you to simulate the event and spit out how many times it has occurred in that timeframe.

Buttons ranging from 1 year, 10 years, 100 years, 1000 years.

May limit how many years to simulate depending on cost - but if we spin up a new async web-worker and show a loading screen (with a cancel button if it takes too long), it might be a safer feature.

"Embed this calendar" option

A user mentioned embedding their calendar via an iframe on another site. Would be cool if we could officially support that somehow, make it more user-friendly. Perhaps generating Wiki markdown and other formats?

Just a thought.

Create Seasonal Events Lock-up

Chrome Version 78.0.3904.70 (Official Build) (64-bit)

Error screen + Console

Steps to reproduce:
1.) 192 day calendar
2.) 3 seasons (set to 64 day duration, 0 peak duration)
3.) Select Create Seasonal Events

Error in top right displays..

Cannot read property 'data' of undefined
at Object.evaluate_calendar_data (worker_calendar.js?v=1572736700340:765)
at onmessage (worker_calendar.js?v=1572736700340:1419)

Link to calendar: http://beta.fantasy-calendar.com/calendars/b167395322ed706415b3bf8ab77b60ee

Eras crashing when choosing Event Category

When an era is set to "show as event" and an event category chosen, a "category undefined" error is thrown and the loading screen softlocks.

This only happens on calendars where the Event Category has been saved. If the Event Category is new and has not yet been saved to the calendar, everything will seem fine until the calendar is saved and reloaded. The Era will no longer have a category assigned, and attempting to reassign it again will throw the same error.

The error reads:
TypeError: category is undefined in file https://beta.fantasy-calendar.com/js/calendar/calendar_layout_builder.js?id=abcfc2d511162b18558c on line 31

categorybroken

Year jumping to base after making changes

If the preview/visible year is different from the calendar's base year, then the calendar window will jump back to the base date any time that a change in the sidebar reloads the calendar window.

After this happens, the "< Year" and "Year >" buttons will send you to the next or previous year based on where the calendar was before the change, making navigation a bit confusing.

Example: If my base year is 2019, but I move the preview to 2021 and create a new event, the calendar will jump back to 2019. Then, pressing "< Year" will show me year 2020 (from 2019) and pressing "Year >" will show me 2022 (from 2019).

The buttons in the "current date and time" panel are mostly unaffected by this bug, other than the "preview date" button being effectively disabled until the preview year is changed. The preview date will display where the window was before the jump.

Events not hidden

I'm seeing events are supposed to be hidden, when I view the calendar and am not logged in. Tested this in incognito mode in Chrome and in also tried in Edge where I have never logged into the site.

Cycle Labels being treated as Cycle Length

When setting up a Cycle system, the Cycle treats the "Number of Names" value as the length. The actual length and offset fields do nothing, and throw the error below.

error-screenshot

Additionally, pressing the "Delete" button on a cycle only minimizes it, and does not delete it.

Random calendar generation

This was a dumb idea I had just a second ago. Thought I'd immortalize it in Github.

In short, it could be fun to generate a randomized calendar (perhaps leveraging some of the stuff over at https://www.fantasynamegenerators.com/?).

Let the user specify some constraints (max number of months, max number of weeks in a month, days in the year, etc), and then randomize within those bounds.

"West Marches" copy mode

Basically, it would be neat to have a layered copy function with event inheritance.

Copy Calendar A, and call it Calendar B, selecting the west marches mode.

Then Calendar B loads all the events from Calendar A on startup alongside its usual events, as well as any sibling calendars.

Seems honestly like a pretty straightforward thing to add - Just a "Has Many Through" relationship really.

Clock Offset Hours offsetting strangely

When the clock is offset, the clock colors rotate counter-clockwise by the value of the offset, and the hour hand rotates clockwise by the value of the offset, while the hour numbers remain stationary.

Clock-Offset

Deleting Cycles doesn't delete the cycles

When pressing the red trash icon on a Cycle, it minimizes the Cycle and shrinks the box, but doesn't delete the cycle. This is more easily seen when more than two cycles are available.

Cycles
You can see the slightly thicker line where Cycle 3 is still hidden between 2 and 4. If you try to delete 2 or 4, 3 reappears. At this point, it is impossible to have less than four cycles showing in the list, and 5 are technically all there, with 1 hidden.

My current workaround is simply leaving the unwanted cycles out of the Cycle Format input, since that will ignore the unwanted cycles, but it would be nice to eventually delete them.

Clock: Time offset

When using a clock with an odd number of hours, it is impossible to put the 0 hour at the top center of the clock due to the requirement of needing a whole number.
clock

Single-day events doubling when used as target

When using an event set to a specific day as a target for another event, the first event is shown twice in the calendar.

In the example below, Chapters 2 and 4A are both set to occur "one day after" Chapters 1 and 3, respectively. Chapters 1 and 3 are set to the specific dates shown.

Originally, I had Chapter 1 set to "15 days before Ariston's Birthday" and that made Ariston's Birthday display as doubled.

If there is a chain of targeted events, only the root of the chain (the one with the set date) is shown as doubled.

DoubledEvents

Issue with Creating Events Based on Events with Duration

When creating an event based on and event with a duration, the new event will create an event based on each event that matches on the calendar.

Have an event that last 10 days, show only start and end. created new event that happens on the 3rd day of that event, you get the new event 3 days after the start AND 3 days after the ending.

If you have the 10 day event show for each day, it will show 10 of the new event, offset by 3 days

cal1
cal2

Dark mode

Currently, the entire site is a tad... Luminescent.

Would be nice to offer a dark mode at some point.

Cycle Year Offset off by 1

When a Cycle is defined, Year 1 is labeled with the second cycle name, and proceeds from there.
Negative years do not get a cycle label at all.

A negative offset can be typed in the text box to fix this (but can't be scrolled to, as scrolling is limited to 0+).

Intercalary timespans lacking day numbers

This appears in grid and wide layouts, while vertical has the number from the previous month's last day + 1. These should have numbered days just like any other month.

Moon cycle phase shading color

Can there be a way to adjust the color of the shading? It currently uses a blue color that visually is hard to see the phases of my purple moon. It would be nice to be able to customize that blue color to say a shade of dark grey or black on this particular calendar.

Disallow spaces in leap day inputs

It breaks things when there are spaces in leap day inputs.

The software should just be smart enough to trim those out or prevent them, I think.

Calendar Versioning

To future proof calendars being broken by changing systems, we should implement a patcher of sort that would update calendars as needed when loaded, and update the calendar's version.

Convert calendar events into timeline graphic

Adding a feature to convert calendar events into a timeline-style graphic (perhaps with interactivity of some sort) would make it easier to track in-world/in-game events chronologically. Since there are event categories, possibly allow timelines based on those categories (individual kingdoms, villians vs heroes, etc)

Webhooks for new user creation

This is just one of those neat things that would give us a bit of a viewport into how the app is doing.

Every time a new user signs up, we should have that hit our #dev-notifications webhook, so we can see how regularly folks are signing up.

Event comment interface spacing and appearance

This was practically untouched by the beatification branch, but the ways it was affected have broken it a bit. Things overlapping and not being where they ought to:

image

Probably an easy fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.