forum

Jump Detector [AiMod]

posted
Total Posts
12
Topic Starter
Dest Matter
Hello to anyone reading this! You must be interested or at least curious if you're here. I've written up a little plugin that, as the title says, detects for jumps in a beatmap. Notice the word plugin: this is a plugin for AiMod using the osu!sdk. It doesn't seem like anyone is using the SDK (or they're keeping it secret), so I guess I'll be the first! Is this useful at all? I have no clue, I was playing around with C# and decided that the osu!sdk would be a suitable candidate for my experiments since I might make something (remotely) useful at the same time. Maybe it'll be useful to someone, who knows?

Jumps are detected based on sudden increases in average speed between two objects. If a number of consistent jumps occur after the first jump (i.e. 3 notes, 1-2-3, are properly placed and distanced but with massive distance snap), those subsequent jump will not be detected, only the first jump will be detected. The detection is no where near perfect, but it should detect obvious ones for sure.

The plugin is loaded only when AiMod is opened and is unloaded when AiMod is closed. Therefore, it affects no other areas of osu! and cannot do so since the osu!sdk doesn't have these capabilities anyway.

A general note of advice: as with any dll file, please exercise caution when downloading such files and ensure that you trust the creator of the dll. I feel obligated to mention this since I am the first (or first in a long time) to be providing such a file.

Anyway, here's a screenshot and download:

Download: https://db.tt/szmqOTme v1.0.2.0
Source: Available here

How to use:
In your osu! folder, make a new folder named "Plugins", and inside of there make a new folder named "AiMod". Place the dll in there and you're ready to go.
The path should look like this: osu!\Plugins\AiMod\AiModJumpDetector.dll

How to remove:
Just move the file somewhere else after you've closed AiMod if you want to stop using it temporarily. Delete it if you want to get rid of it.

How to change jump detection sensitivity:
Once you've ran the plugin at least once, you need to navigate to the following file:
C:\Users\<username>\AppData\Local\ppy\AiModJumpDetector_Url_XXXXXXXXXXXXX\1.3.3.7\user.config
where XXXXXXXXXX is some really long bunch of random numbers and letters. Change the number in between the value tag to what you want and save.

Known problems:
If you leave AiMod inactive for too long, osu! will eventually crash. This seems to be related to how plugins are unloaded by osu!, therefore I cannot fix this. We'll have to bug peppy for that. From testing, it seems that the plugin unloads after about 4 minutes of inactivity, resulting in osu! crashing if AiMod is still open. In order to avoid any problems, please close AiMod before 4 minutes have past to avoid losing any work.

Changelog
v1.0.2.0
- Jump detector resets on breaks so notes immediately after a break won't be wrongly detected.
v1.0.1.0
- Jump output now shows the change in speed
- Customizable jump detection sensitivity - regrettably it is very lousy to change and now the download is a zip since it includes a default config file as well
v1.0.0.0 - Initial release

As a complete side, the plugin also warns when a spinner is shorter than 1000ms, it was something I did early on to test the SDK.
Ephemeral
You may be the first person to actually release something using the osu!sdk.

Are you willing to provide the source for this at all?
peppy
Yay! Please file that as a bug in tech support
Topic Starter
Dest Matter

Ephemeral wrote:

You may be the first person to actually release something using the osu!sdk.

Are you willing to provide the source for this at all?
Of course, of course! Open source is the way to go! It may also help as a more practical example to encourage more development.
Source here

peppy wrote:

Yay! Please file that as a bug in tech support
Done, /t/161493
Ephemeral
You are a scholar and a gentleman. Hopefully your work will encourage more people to use the sdk!
Topic Starter
Dest Matter
Yes, hopefully so, we need more SDK users! Until then, I think I have another idea that's floated into my mind for implementing. :D
Ephemeral
I may actually appropriate a portion of your code to use in a difficulty calculator I am working on, if you don't mind.
Topic Starter
Dest Matter
It's no problem at all! This is the purpose and goal of open source code isn't it? :D
Limyc
Cool. I've been meaning to use the SDK for a while now, but I have yet to come up with any useful ideas. It's great that someone is taking the first step that could lead to some awesome plugins in the future.
[Luanny]
Just a suggestion: it could reset after breaks because measuring notes 10 seconds far from each other and using it to measure the spacing for the next note is kinda senseless and gives giant values like this

It is not even a jump but comes right after a break.
Topic Starter
Dest Matter
Hmmm.... I probably should have tested using a map with breaks. Since the SDK doesn't detect for breaks, I had to do it manually. I'm pretty sure that any time gap longer than 1.5 seconds would probably be a break, so that's what I've set it at right now.
TheVileOne
When I figure how everything works, I wouldn't mind adding some things to AiMod. My main priority is to make the editor more tolerable. The SDK likely will not aide me in this regard.
Please sign in to reply.

New reply