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

Work on Fairy Flute song randomization #150

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

juef17
Copy link

@juef17 juef17 commented Nov 7, 2023

This pull requests adds the possibility to randomize the Fairy Flute song that is played when using the flute in a battle or on the overworld. The new song is chosen at random from 67 possible songs (including the original). Since their lengths are variable, the mt randomization is used and the randomization is done prior to the checksum calculation, so that the song is tied to the seed number, not to give an advantage in a race situation. I have created two new files for this because while the songs do not require many bytes to be modified, I feel it would clutter dwr.c too much.

I did set the randomization to always be on because I don't feel comfortable adjusting the flags code without further input. Also, apologies if this is not a proper way to code or submit things here: I am only an amateur programmer and this is the first actual pull request I've ever done anywhere.

Also of note: the original code for the flute song speedup with the speed hacks flag manually changed the bytes in the flute song. Since it seemed unpractical to me to have to do this manually with every new flute song, I replaced the change with a call to a new function which sort of parses the flute song data and sets all note and rest lengths to the minimum. One fun thing about this is that it would be a trivial change to make said lengths a bit longer, or the song tempo slower, so that the songs are still much faster but actually recognizable.

Finally, I did this because I saw this as a feature request in the DWR Discord server. AsmadiGames had already done 3 songs a couple of years ago but did not move further as he felt a lack of interest for the feature. A quick poll in Discord showed only positive reactions to this, with a few concerns about the flute lengths. The songs added in this PR are all between 2.4 and 8.2 seconds long, averaging about 5 seconds, and the original song is about 5 seconds long. All songs have an audio preview and IPS patch in the #community-contributions channel on Discord (Flute Toots thread).

[Edit] Flag is implemented in this web app: here.

@juef17 juef17 deleted the branch mcgrew:master December 31, 2023 22:27
@juef17 juef17 closed this Dec 31, 2023
@juef17 juef17 deleted the master branch December 31, 2023 22:27
@juef17 juef17 restored the master branch January 1, 2024 20:12
@juef17
Copy link
Author

juef17 commented Jan 1, 2024

Apparently I can't rename a branch and keep associated pull requests alive. My bad!

@juef17 juef17 reopened this Jan 1, 2024
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.

1 participant