Skip to content

Commit 13f080a

Browse files
authored
Merge pull request #192 from Syriiin/renovate/osu-rulesets
Update osu-rulesets to 2025.227.0
2 parents cf9c15b + 7c1ff14 commit 13f080a

File tree

13 files changed

+136
-40
lines changed

13 files changed

+136
-40
lines changed

Difficalcy.Catch.Tests/CatchCalculatorServiceTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ protected override CalculatorService<
2121
);
2222

2323
[Theory]
24-
[InlineData(4.0505463516206195d, 164.5770866821372d, "diffcalc-test", new string[] { })]
25-
[InlineData(5.1696411260785498d, 291.43480971713944d, "diffcalc-test", new string[] { "DT" })]
24+
[InlineData(4.050546351620621, 164.57708668213735, "diffcalc-test", new string[] { })]
25+
[InlineData(5.169641126078549, 291.4348097171394, "diffcalc-test", new string[] { "DT" })]
2626
public void Test(
2727
double expectedDifficultyTotal,
2828
double expectedPerformanceTotal,
@@ -59,6 +59,6 @@ public void TestAllParameters()
5959
LargeDroplets = 18,
6060
SmallDroplets = 200,
6161
};
62-
TestGetCalculationReturnsCorrectValues(6.9017468199992278, 375.74458599075302, score);
62+
TestGetCalculationReturnsCorrectValues(6.61877502983358, 345.54834710808564, score);
6363
}
6464
}

Difficalcy.Catch/Difficalcy.Catch.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ppy.osu.Game.Rulesets.Catch" Version="2025.225.0" />
9-
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.225.0" /> <!-- required for convert support -->
8+
<PackageReference Include="ppy.osu.Game.Rulesets.Catch" Version="2025.227.0" />
9+
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.227.0" /> <!-- required for convert support -->
1010
</ItemGroup>
1111

1212
<ItemGroup>

Difficalcy.Catch/Services/CatchCalculatorService.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,7 @@ Mod[] mods
6565
return (
6666
difficultyAttributes,
6767
JsonSerializer.Serialize(
68-
new
69-
{
70-
difficultyAttributes.StarRating,
71-
difficultyAttributes.MaxCombo,
72-
difficultyAttributes.ApproachRate,
73-
}
68+
new { difficultyAttributes.StarRating, difficultyAttributes.MaxCombo }
7469
)
7570
);
7671
}

Difficalcy.Mania.Tests/ManiaCalculatorServiceTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ protected override CalculatorService<
2121
);
2222

2323
[Theory]
24-
[InlineData(2.3493769750220914d, 45.76140071089439d, "diffcalc-test", new string[] { })]
25-
[InlineData(2.797245912537965d, 68.79984443279172d, "diffcalc-test", new string[] { "DT" })]
24+
[InlineData(2.3493769750220914, 45.76140071089439, "diffcalc-test", new string[] { })]
25+
[InlineData(2.797245912537965, 68.79984443279172, "diffcalc-test", new string[] { "DT" })]
2626
public void Test(
2727
double expectedDifficultyTotal,
2828
double expectedPerformanceTotal,
@@ -59,6 +59,6 @@ public void TestAllParameters()
5959
Goods = 2,
6060
Greats = 1,
6161
};
62-
TestGetCalculationReturnsCorrectValues(3.3252153148972425, 64.408516282383957, score);
62+
TestGetCalculationReturnsCorrectValues(3.3252153148972425, 64.40851628238396, score);
6363
}
6464
}

Difficalcy.Mania/Difficalcy.Mania.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ppy.osu.Game.Rulesets.Mania" Version="2025.225.0" />
9-
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.225.0" /> <!-- required for convert support -->
8+
<PackageReference Include="ppy.osu.Game.Rulesets.Mania" Version="2025.227.0" />
9+
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.227.0" /> <!-- required for convert support -->
1010
</ItemGroup>
1111

1212
<ItemGroup>

Difficalcy.Mania/Services/ManiaCalculatorService.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,7 @@ Mod[] mods
6565
return (
6666
difficultyAttributes,
6767
JsonSerializer.Serialize(
68-
new
69-
{
70-
difficultyAttributes.StarRating,
71-
difficultyAttributes.MaxCombo,
72-
difficultyAttributes.GreatHitWindow,
73-
}
68+
new { difficultyAttributes.StarRating, difficultyAttributes.MaxCombo }
7469
)
7570
);
7671
}

Difficalcy.Osu.Tests/OsuCalculatorServiceTest.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ protected override CalculatorService<
2121
);
2222

2323
[Theory]
24-
[InlineData(6.7171144000821119d, 291.6916492167043, "diffcalc-test", new string[] { })]
25-
[InlineData(8.9825709931204205d, 718.5552449511403, "diffcalc-test", new string[] { "DT" })]
24+
[InlineData(6.733134719196091, 293.62857973470625, "diffcalc-test", new string[] { })]
25+
[InlineData(9.677974635300163, 884.3332110176514, "diffcalc-test", new string[] { "DT" })]
2626
public void Test(
2727
double expectedDifficultyTotal,
2828
double expectedPerformanceTotal,
@@ -63,7 +63,7 @@ public void TestAllParameters()
6363
SliderTails = 2,
6464
SliderTicks = 1,
6565
};
66-
TestGetCalculationReturnsCorrectValues(12.418442356371395, 1208.1384749524739, score);
66+
TestGetCalculationReturnsCorrectValues(13.89060549007635, 1718.493680115238, score);
6767
}
6868

6969
[Fact]
@@ -91,6 +91,6 @@ public void TestAllParametersClassicMod()
9191
SliderTails = 2,
9292
SliderTicks = 1,
9393
};
94-
TestGetCalculationReturnsCorrectValues(12.418442356371395, 1405.0910286547635, score);
94+
TestGetCalculationReturnsCorrectValues(13.89060549007635, 2012.0980668102025, score);
9595
}
9696
}

Difficalcy.Osu/Difficalcy.Osu.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.225.0" />
8+
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.227.0" />
99
</ItemGroup>
1010

1111
<ItemGroup>

Difficalcy.Osu/Services/OsuCalculatorService.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ Mod[] mods
7373
difficultyAttributes.SpeedNoteCount,
7474
difficultyAttributes.FlashlightDifficulty,
7575
difficultyAttributes.SliderFactor,
76+
difficultyAttributes.AimDifficultSliderCount,
7677
difficultyAttributes.AimDifficultStrainCount,
7778
difficultyAttributes.SpeedDifficultStrainCount,
78-
difficultyAttributes.ApproachRate,
79-
difficultyAttributes.OverallDifficulty,
8079
difficultyAttributes.DrainRate,
8180
difficultyAttributes.HitCircleCount,
8281
difficultyAttributes.SliderCount,

Difficalcy.Taiko.Tests/TaikoCalculatorServiceTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ protected override CalculatorService<
2121
);
2222

2323
[Theory]
24-
[InlineData(3.092021259435121d, 135.79672372953866, "diffcalc-test", new string[] { })]
25-
[InlineData(4.0789820318081444d, 248.7184459889834, "diffcalc-test", new string[] { "DT" })]
24+
[InlineData(3.3055544732491895, 135.44034861603984, "diffcalc-test", new string[] { })]
25+
[InlineData(4.447257361895736, 272.94981653131504, "diffcalc-test", new string[] { "DT" })]
2626
public void Test(
2727
double expectedDifficultyTotal,
2828
double expectedPerformanceTotal,
@@ -58,6 +58,6 @@ public void TestAllParameters()
5858
Misses = 5,
5959
Oks = 3,
6060
};
61-
TestGetCalculationReturnsCorrectValues(4.922364692298034, 359.9526882598762d, score);
61+
TestGetCalculationReturnsCorrectValues(6.216091072305756, 451.45173560370836, score);
6262
}
6363
}

Difficalcy.Taiko/Difficalcy.Taiko.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ppy.osu.Game.Rulesets.Taiko" Version="2025.225.0" />
9-
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.225.0" /> <!-- required for convert support -->
8+
<PackageReference Include="ppy.osu.Game.Rulesets.Taiko" Version="2025.227.0" />
9+
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2025.227.0" /> <!-- required for convert support -->
1010
</ItemGroup>
1111

1212
<ItemGroup>

Difficalcy.Taiko/Services/TaikoCalculatorService.cs

-6
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,7 @@ Mod[] mods
6969
{
7070
difficultyAttributes.StarRating,
7171
difficultyAttributes.MaxCombo,
72-
difficultyAttributes.StaminaDifficulty,
7372
difficultyAttributes.MonoStaminaFactor,
74-
difficultyAttributes.RhythmDifficulty,
75-
difficultyAttributes.ColourDifficulty,
76-
difficultyAttributes.PeakDifficulty,
77-
difficultyAttributes.GreatHitWindow,
78-
difficultyAttributes.OkHitWindow,
7973
}
8074
)
8175
);

devdocs/updating.md

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Updating guide
2+
3+
There are some common changes that need to be made when changes are made to the difficulty calculators
4+
5+
## Updating difficulty attributes
6+
7+
To ensure our caching functions correctly, we need to make sure we serialise the required difficulty attributes.
8+
9+
These can be checked by looking at the `FromDatabaseAttributes` method of the difficulty attribute classes.
10+
11+
## Updating test values
12+
13+
Often the test values need to be updated. The easiest way to check for updated values is to use [osu-tools](https://github.com/ppy/osu-tools) to run the diffcalc with settings matching our tests.
14+
15+
### osu
16+
17+
```sh
18+
$ dotnet run -- simulate osu ~/git/difficalcy/Difficalcy.Osu/Resources/Testing/Beatmaps/diffcalc-test.osu \
19+
--json
20+
21+
$ dotnet run -- simulate osu ~/git/difficalcy/Difficalcy.Osu/Resources/Testing/Beatmaps/diffcalc-test.osu \
22+
--json \
23+
--mod DT
24+
25+
$ dotnet run -- simulate osu ~/git/difficalcy/Difficalcy.Osu/Resources/Testing/Beatmaps/diffcalc-test.osu \
26+
--json \
27+
--mod HD \
28+
--mod HR \
29+
--mod FL \
30+
--mod DT \
31+
--mod-option DT_speed_change=2 \
32+
--misses 5 \
33+
--mehs 4 \
34+
--goods 3 \
35+
--large-tick-misses 81 \
36+
--slider-tail-misses 31 \
37+
--combo 200
38+
39+
$ dotnet run -- simulate osu ~/git/difficalcy/Difficalcy.Osu/Resources/Testing/Beatmaps/diffcalc-test.osu \
40+
--json \
41+
--mod CL \
42+
--mod HD \
43+
--mod HR \
44+
--mod FL \
45+
--mod DT \
46+
--mod-option DT_speed_change=2 \
47+
--misses 5 \
48+
--mehs 4 \
49+
--goods 3 \
50+
--large-tick-misses 81 \
51+
--slider-tail-misses 31 \
52+
--combo 200
53+
```
54+
55+
### taiko
56+
57+
```sh
58+
$ dotnet run -- simulate taiko ~/git/difficalcy/Difficalcy.Taiko/Resources/Testing/Beatmaps/diffcalc-test.osu \
59+
--json
60+
61+
$ dotnet run -- simulate taiko ~/git/difficalcy/Difficalcy.Taiko/Resources/Testing/Beatmaps/diffcalc-test.osu \
62+
--json \
63+
--mod DT
64+
65+
$ dotnet run -- simulate taiko ~/git/difficalcy/Difficalcy.Taiko/Resources/Testing/Beatmaps/diffcalc-test.osu \
66+
--json \
67+
--mod HR \
68+
--mod DT \
69+
--mod-option DT_speed_change=2 \
70+
--misses 5 \
71+
--goods 3 \
72+
--combo 150
73+
```
74+
75+
### catch
76+
77+
```sh
78+
$ dotnet run -- simulate catch ~/git/difficalcy/Difficalcy.Catch/Resources/Testing/Beatmaps/diffcalc-test.osu \
79+
--json
80+
$ dotnet run -- simulate catch ~/git/difficalcy/Difficalcy.Catch/Resources/Testing/Beatmaps/diffcalc-test.osu \
81+
--json \
82+
--mod DT
83+
$ dotnet run -- simulate catch ~/git/difficalcy/Difficalcy.Catch/Resources/Testing/Beatmaps/diffcalc-test.osu \
84+
--json \
85+
--mod HR \
86+
--mod DT \
87+
--mod-option DT_speed_change=2 \
88+
--misses 5 \
89+
--droplets 18 \
90+
--tiny-droplets 200 \
91+
--combo 100
92+
```
93+
94+
### mania
95+
96+
```sh
97+
$ dotnet run -- simulate mania ~/git/difficalcy/Difficalcy.Mania/Resources/Testing/Beatmaps/diffcalc-test.osu \
98+
--json \
99+
--greats 0
100+
$ dotnet run -- simulate mania ~/git/difficalcy/Difficalcy.Mania/Resources/Testing/Beatmaps/diffcalc-test.osu \
101+
--json \
102+
--mod DT \
103+
--greats 0
104+
$ dotnet run -- simulate mania ~/git/difficalcy/Difficalcy.Mania/Resources/Testing/Beatmaps/diffcalc-test.osu \
105+
--json \
106+
--mod DT \
107+
--mod-option DT_speed_change=2 \
108+
--misses 5 \
109+
--mehs 4 \
110+
--oks 3 \
111+
--goods 2 \
112+
--greats 1
113+
```

0 commit comments

Comments
 (0)