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

random next track #37

Open
jef-pearlman opened this issue Oct 16, 2024 · 5 comments
Open

random next track #37

jef-pearlman opened this issue Oct 16, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@jef-pearlman
Copy link

I'd love it if there was an option to make the next track be random (from the list of eligible tracks) rather than the first. I don't necessarily care about completing things in order as long as I'm making progress, and especially with things like TOTD it can be nice to jump around to different places.

(I actually implemented the random selection locally, but I haven't implemented the configuration yet and I'm not really familiar enough with addon development to build it into a PR. And of course mine isn't signed so I can't really use it.)

Thanks for a great addon!

p.s. Not sure if this is the best place to submit ideas/feature requests; I have a few more so I'll see what happens with this one first.

@jef-pearlman
Copy link
Author

jef-pearlman commented Oct 16, 2024

In case it's handy, here's the git diff. Super-basic:

diff --git a/src/Main.as b/src/Main.as
index 8d54776..925fc83 100644
--- a/src/Main.as
+++ b/src/Main.as
@@ -678,6 +678,13 @@ void SetNextMap() {
             @nextMap = map;
     }

+    // Test random map selection.
+    if (mapsRemaining.Length > 0) {
+       uint randomMap = Math::Rand(0, mapsRemaining.Length - 1);
+       trace("maps remaining: " + mapsRemaining.Length + ", random choice: " + randomMap);
+       @nextMap = mapsRemaining[randomMap];
+    }
+
     if (metTargetTotal == maps.Length)
         allTarget = true;
     else {

@ezio416
Copy link
Owner

ezio416 commented Oct 16, 2024

Thanks for the suggestion, and this is indeed the best place to put one! There are some other issues with the plugin I need to resolve including one which prevents this feature, but it can be done

@jef-pearlman
Copy link
Author

Great; thanks! I'll post my other ideas in separate issues, and you can use them or not as you like. Also curious what else needs tweaking—I was wondering if #10 was going to cause problems since I never traced the medal detection code, but in testing it did detect me medaling on the random, non-first map. (I still think #10 would be great, though.)

@jef-pearlman
Copy link
Author

Also, there are some side things to implement, like the toggle to enable this and making the "next track" button randomness-aware so you can pick a different random track.

@ezio416
Copy link
Owner

ezio416 commented Oct 16, 2024

Yes #10 is the major stopping block there, but also a game update broke some pb detection stuff that needs to be addressed before much else, I will get around to it somewhat soon

@ezio416 ezio416 added the enhancement New feature or request label Oct 16, 2024
@ezio416 ezio416 changed the title Enhancement: next track random random next track Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants