forum

[completed] AIBAT now checks for duplicate green lines

posted
Total Posts
9
Topic Starter
xxdeathx
Sounds like a pain in the ass to have to manually go through every difficulty's timing sections looking for two at the same time, especially when it's like Akasha


Thanks to jonathanlfj for fixing up AIBat!

Please download the modified AIBat here: AIBat v3.1


invalid
If there isn't already one, I'd like to make a program to do this. It should look at all the lines between [TimingPoints] and the next [ character. An example of the timing sections in the .osu file is as follows:
[TimingPoints]
3270,759.493670886076,4,2,69,50,1,0
3459,-100,4,2,69,40,0,0
6497,-100,4,2,69,40,0,0
6687,-100,4,2,69,50,0,0
9535,-100,4,2,69,40,0,0
9725,-100,4,2,69,50,0,0
12573,-100,4,2,69,40,0,0
12763,-100,4,2,69,50,0,0
15421,-117.647058823529,4,2,70,40,0,0
27573,-100,4,2,70,50,0,0
39725,-117.647058823529,4,2,71,30,0,0
62320,-117.647058823529,4,2,71,40,0,0
63270,-117.647058823529,4,2,1,50,0,0
64029,-90.9090909090909,4,2,69,60,0,1
88143,-100,4,2,69,20,0,0
The first number in each line is the time at which a line is placed. All the program would do is check every two lines that are next to each other for identical first numbers and report those if any are found.

I don't know a foolproof way to distinguish red lines from green lines though, since it's common and okay for one red and one green line to be at the same time. I'm guessing it has something to do with the second number, which may be related to slider velocity for the green sections, but the red one seems more complicated.

Also, I'll be writing the basic logic in Java. It will be very bare bones, "hard code the name of the .osu file and then run program" to start out, since I know very little about interfaces and stuff. If I manage to get the logic working, then I may need help from someone to create a more convenient (easily scan all .osu files in a song folder), executable program from it.
jonathanlfj
t/55305 I would just import the whole AIBat project, and change up the function in OsuFileChecker.java

The function (rip formatting)
private void checkGreenPointsSnap() {
String result = "";
for (TimingPoint green : t.getGreenPoints()) {
int time = green.getTime();

//put some code here that compares time stamps with next green line

if (!t.isAlmostSnapped(time, 1))
result += Util.formatTime(time) + " - snap to "
+ Util.formatTime(t.snap(time, ofp.getBeatDivisor()))
+ "\n";
}
if (result.length() > 0)
snapCheck += "\nUnsnapped inherited (green) sections at:\n"
+ result;
}
Topic Starter
xxdeathx
Ah thanks, I'll have a look there.

Uh how would I compile everything to test it? I have no idea what to do with the src folder >.<
jonathanlfj
did a little fiddling around with Java and added the function to AIBat v3.1
if you are interested you can download it here: http://puu.sh/exEBt.jar
Kibbleru
marry me jonathann <3
Mao
Useful program, cool
Koiyuki
cool
tochiii
How do i make it run? D:
Bara-
I also never got it to run
I believe in AutoMod
Please sign in to reply.

New reply