Osu!Elements is a free open-sourced .net library written in c#. The main functions of the framework are:
- Reading and writing beatmaps and storyboards
- Retrieving data from the API
- Reading replay data
The main goal is to help others create cool 3rd party stuff, so there's a lot of functionality.
The code is hosted over at github, feel free to drop issues, fork and all that good stuff.
Why did you make this?
While it's nice seeing people create applications each their own way, doing the same thing over and over is pointless. This started out as an improvement of smoogipooo's Beatmap API, but has evolved a lot since then. Every time i wanted to make an application for osu stuff, I added it to this library and that's why it's this big now (but probably far from finished).
What can I do with it?
- Read and write beatmaps (.osu), includes loading everything into objects (such as timingpoints, hitobjects, spritevents...)
- Read and write storyboards (.osb)
- Read and write skins (skin.ini)
- Read replays (.osr)
- Read and write collections (collection.db)
- Read scores (scores.db)
- Read the beatmap database (osu!.db)
Acces the osu!api:
see all the functions here
osu!Elements uses an external reference to Newtonsoft's Json.Net , so you'll need this to use these functions.
Also included are the URL functions (on the bottom of the osu!api page).
You can create storyboards in a way very similar to SGL, using the many benefits of a complete programming language + all the .NET functions.
- Open an existing storyboard/ beatmap or make a new Stoyboard() object
- Add Sprites/Animations, Add transformations to those, and even add Samples
- optional: use the Variables functionality by adding keys and values to the VariablesDictionary
- Save to a new or existing storyboard/beatmap
Make a custom replay viewer, or even a complete clone of osu, if you want that.
Make a collections editor, using beatmap search functionality (with osu.db) or by score achieved (scores.db) --might do this myself though :p
... use your imagination!
v1.0: initial release
v1.0.6: pp calculation for osu!standard (and for other gamemodes if you already have the strain values)
Wanna help? or need help?
you can also always add an issue on github for things that don't work, or send me a message on osu!
var beatmap = new Beatmap(@"1 Kenji Ninuma - DISCO PRINCE\Kenji Ninuma - DISCOüÜPRINCE (peppy) [Normal].osu");
beatmap.Version = "THIS MAP IS GREAT";
beatmap.Diff_Approach = 9.5f;
var hitcircle = new HitCircle(new Position(10, 20), 200);
beatmap.FileName = "Kenji Ninuma - DISCOüÜPRINCE (peppy) [Improved version].osu";
var bRep = new ApiBeatmapRepository();
var firstMap = await bRep.Get(1);
var someManiaMap = await bRep.Get("ds12dza68123sdq564", GameMode.Mania);
var mapsByMe = await bRep.GetCreator("ExCellRaD", limit: 5);
var scoresOnMap = bRep.GetScores(firstMap.Beatmap_Id);
var maps2016 = bRep.GetSince(new DateTime(2016, 1, 1));
var uRep = new ApiUserRepository();
var peppy = await uRep.Get("peppy");
var peppyscores = await uRep.GetBest(peppy.User_Id, GameMode.CatchTheBeat);
var recentscores = await uRep.GetRecent("Rafis");
var mRep = new ApiMultiplayerRepository();
var match = await mRep.Get(123456);
var games = match.Games;
Sample code on Github
More sample code and projects coming soon, I will also post a full guide to generating storyboards on the storyboarding forum section.
Any help and feedback is greatly appreciated.
want more stuff to be added? Just give me a shout!
Have a nice day developing