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

Cosmetic Plando: Music Groups, Favorites, Excludes #1760

Merged
merged 7 commits into from
Nov 17, 2022

Conversation

Cuphat
Copy link
Member

@Cuphat Cuphat commented Nov 10, 2022

Adds bgm_groups to cosmetic logs containing the following:

favorites: A list of sequence names that will be prioritized and will always be included unless there are more favorite sequences than tracks to shuffle them to.

exclude: A list of sequences that will be excluded. When randomizing music during patch file generation, these could still be included unless the number of target tracks is reduced somehow (such as assigning one sequence to multiple tracks or disabling tracks).

groups: A dictionary containing a name and a list of sequences. Inside of bgm, you can now substitute the name of a group (preceeded by a #, i.e. #group_name) and a random sequence from the list will be chosen. Once a sequence is chosen, it is removed from the list and won't be chosen again. If all sequences on the list are exhausted, the list will be refilled and the process continues.

Groups are can also be created by the .meta files for custom sequences. These will be parsed from line 4 of the .meta file. Use a comma to separate multiple groups.

This is a draft with minimal testing, but I hope anyone interested will give it a whirl and let me know if it breaks.

@Cuphat Cuphat added Status: Needs Testing Probably should be tested Component: Misc A catch-all label labels Nov 10, 2022
@Cuphat Cuphat force-pushed the bgm_groups_plando branch 3 times, most recently from fca29c9 to 7ddca41 Compare November 10, 2022 03:06
@Cuphat Cuphat added Component: Cosmetics Affects the patching of cosmetics and removed Component: Misc A catch-all label labels Nov 10, 2022
@ETR-BTF
Copy link

ETR-BTF commented Nov 10, 2022

I love this! Thanks Cuphat!

Adds `bgm_groups` to cosmetic logs containing the following:

`favorites`: A list of sequence names that will be prioritized and will always be included unless there are more favorite sequences than tracks to shuffle them to.

`exclude`: A list of sequences that will be excluded. When randomizing music during patch file generation, these could still be included unless the number of target tracks is reduced somehow (such as assigning one sequence to multiple tracks or disabling tracks).

`groups`: A dictionary containing a name and a list of sequences. Inside of `bgm`, you can now substitute the name of a group (preceeded by a `#`, i.e. `#group_name`) and a random sequence from the list will be chosen. Once a sequence is chosen, it is removed from the list and won't be chosen again. If all sequences on the list are exhausted, the list will be refilled and the process continues.

Also allows direct list assignments in music plando.
With the removal of `shuffle_pointers_table`, old versions of rando need two small hacks to allow the current method of randomizing music to work.
@Cuphat Cuphat marked this pull request as ready for review November 12, 2022 14:29
Adds `rebuild_pointers_table` which is a cut-down version of the old `shuffle_pointers_table` that does the same ROM patching but on an already shuffled set of sequences instead of duplicating the actual shuffling part.
@cjohnson57 cjohnson57 merged commit b1e0181 into OoTRandomizer:Dev Nov 17, 2022
@Cuphat Cuphat deleted the bgm_groups_plando branch November 17, 2022 01:36
@fenhl fenhl added this to the 7.0 milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Cosmetics Affects the patching of cosmetics Status: Needs Testing Probably should be tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants