Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add melody refinements #59

Merged
merged 2 commits into from
Jun 22, 2024
Merged

Conversation

CoastalRedwood
Copy link

  • Improved error messages (clarity, fewer silent failures)
  • /stopsong no longer required to switch to a new melody
    • /melody with an active melody transitions at end of current song
  • Additional defensive programming to stop corner cases
    • Paranoid checking of all pointers
    • Additional constraints checking on start
    • Tighter control that songs and current_index are always kept valid (or disabled)
    • Retry (missed note) logic improvements:
    • correct wraparound for 0 index retry
    • retry_count tracking to constrain log spam in error cases
    • auto-advances to next song if a song fails 8 times, terminates melody if 15 retries w/out success
  • Melodies now end when sitting (and thus camping, eliminates some corner cases and surprises)

- Improved error messages (clarity, fewer silent failures)
- /stopsong no longer required to switch to a new melody
  - /melody with an active melody transitions at end of current song
- Additional defensive programming to stop corner cases
  - Paranoid checking of all pointers
  - Additional constraints checking on start
  - Tighter control that songs and current_index are always kept valid (or disabled)
  - Retry (missed note) logic improvements:
   - correct wraparound for 0 index retry
   - retry_count tracking to constrain log spam in error cases
   - auto-advances to next song if a song fails 8 times, terminates melody if 15 retries w/out success
 - Melodies now end when sitting (and thus camping, eliminates some corner cases and surprises)
@CoastalRedwood
Copy link
Author

CoastalRedwood commented Jun 15, 2024

Please take a look when you have time. I went a little OCD and touched a lot of it to make it as solid as possible (we bards use it a lot), there are just a few rare corner cases that I wanted to improve with some light refactoring of some patches.

The primary intentional changes are above. I think the majority of bards will appreciate the retry limits (8 is sufficiently generous in my experience). The melody terminating when sitting could annoy someone, but I couldn't think of a use case where a bard would sit and need to auto-resume melody (versus looting which is common).

The testing I did (on Icestorm's server) is described in the .cpp.

If the changes are just too much, I could try again with smaller patches.

@CoastalRedwood
Copy link
Author

Thanks for approving! Just let me know if you want any (now or future) changes, I'm happy to help out with maintaining melody when useful.

I just pushed a trivial second commit to add /mel as an alias. I'm fine with reverting or modifying it.

Thanks! Sherra (on DIscord)

@iamclint
Copy link
Owner

Np i'll merge it in when I bring the dev branch in to main

@iamclint iamclint merged commit 1c7f3f7 into iamclint:master Jun 22, 2024
@CoastalRedwood CoastalRedwood deleted the melody_refinements branch August 28, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants