Skip to content

Commit 79cd9c8

Browse files
author
Aytackydln
committed
add Black Ops 6 (iCUE) profile
1 parent 14ea1b6 commit 79cd9c8

7 files changed

Lines changed: 412 additions & 1 deletion

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using System;
2+
using System.Threading;
3+
using System.Threading.Tasks;
4+
using AuroraRgb.Modules;
5+
6+
namespace AuroraRgb.Profiles.BlackOps6;
7+
8+
public sealed class Bo6Application() : Application(new LightEventConfig
9+
{
10+
Name = "Black Ops 6",
11+
ID = "blackops6",
12+
ProcessNames = [], // will be set dynamically when iCUE game is "BlackOps6"
13+
ProfileType = typeof(Bo6Profile),
14+
OverviewControlType = typeof(ControlBo6),
15+
IconURI = "Resources/bo6.png",
16+
EnableByDefault = true,
17+
})
18+
{
19+
public override async Task<bool> Initialize(CancellationToken cancellationToken)
20+
{
21+
var baseInit = await base.Initialize(cancellationToken);
22+
23+
IcueModule.AuroraIcueServer.Gsi.GameChanged += IcueSdkGameChanged;
24+
SetProfileApplication();
25+
26+
return baseInit;
27+
}
28+
29+
private void IcueSdkGameChanged(object? sender, EventArgs e)
30+
{
31+
SetProfileApplication();
32+
}
33+
34+
private void SetProfileApplication()
35+
{
36+
var sdkGameProcess = IcueModule.AuroraIcueServer.Gsi.GameName;
37+
if (sdkGameProcess != "BlackOps6")
38+
{
39+
Config.ProcessNames = [];
40+
return;
41+
}
42+
43+
Config.ProcessNames = ["cod.exe"];
44+
}
45+
46+
public override void Dispose()
47+
{
48+
base.Dispose();
49+
50+
IcueModule.AuroraIcueServer.Gsi.GameChanged -= IcueSdkGameChanged;
51+
}
52+
}
Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
using System.Collections.Generic;
2+
using System.Drawing;
3+
using System.Linq;
4+
using System.Runtime.Serialization;
5+
using AuroraRgb.EffectsEngine;
6+
using AuroraRgb.Settings;
7+
using AuroraRgb.Settings.Layers;
8+
using AuroraRgb.Settings.Overrides.Logic;
9+
using AuroraRgb.Settings.Overrides.Logic.Boolean;
10+
using AuroraRgb.Utils;
11+
using Common.Devices;
12+
using Common.Utils;
13+
using Newtonsoft.Json;
14+
using Color = System.Drawing.Color;
15+
16+
namespace AuroraRgb.Profiles.BlackOps6;
17+
18+
[JsonObject(ItemTypeNameHandling = TypeNameHandling.None)]
19+
public class Bo6Profile : ApplicationProfile
20+
{
21+
[OnDeserialized]
22+
void OnDeserialized(StreamingContext context)
23+
{
24+
if (Layers.Any(lyr => lyr.Handler is IcueSdkLayerHandler)) return;
25+
Layers.Add(new Layer("iCUE Lighting", new IcueSdkLayerHandler()));
26+
}
27+
28+
public override void Reset()
29+
{
30+
base.Reset();
31+
OverlayLayers =
32+
[
33+
new Layer("Loading Animation", new RadialLayerHandler
34+
{
35+
Properties = new RadialLayerProperties
36+
{
37+
Brush = new SegmentedRadialBrushFactory(new ColorStopCollection
38+
{
39+
{ 0.0f, Color.Red },
40+
{ 0.10797343f, Color.Orange },
41+
{ 0.2690457f, Color.FromArgb(0, 121, 212, 0) },
42+
{ 0.42602244f, Color.FromArgb(93, 222, 0) },
43+
{ 0.5946844f, Color.Aqua },
44+
{ 0.7819433f, Color.FromArgb(0, 68, 187, 187) },
45+
{ 1.0f, Color.Red }
46+
})
47+
},
48+
}, new OverrideLogicBuilder()
49+
.SetDynamicBoolean("_Enabled", new BooleanIcueState("SDKL_SmokeBlackout"))
50+
),
51+
new Layer("Endgame", new BreathingLayerHandler
52+
{
53+
Properties = new BreathingLayerHandlerProperties
54+
{
55+
_PrimaryColor = CommonColorUtils.FastColor(35, 5, 215),
56+
SecondaryColor = CommonColorUtils.FastColor(255, 0, 29),
57+
CurveFunction = CurveFunction.SineSquared,
58+
EffectSpeed = 15,
59+
Sequence = new KeySequence
60+
{
61+
Keys = [DeviceKeys.ARROW_LEFT, DeviceKeys.ARROW_DOWN, DeviceKeys.ARROW_RIGHT, DeviceKeys.ARROW_UP],
62+
},
63+
}
64+
}, new OverrideLogicBuilder()
65+
.SetDynamicBoolean("_Enabled", new BooleanOr(
66+
[
67+
new BooleanIcueState("BO6_Victory"),
68+
new BooleanIcueState("BO6_Defeat")
69+
]
70+
)
71+
)
72+
),
73+
];
74+
Layers =
75+
[
76+
new Layer("Death", new SolidColorLayerHandler
77+
{
78+
Properties = new LayerHandlerProperties
79+
{
80+
_PrimaryColor = Color.Red,
81+
_Sequence = new KeySequence
82+
{
83+
Keys =
84+
[
85+
DeviceKeys.ESC,
86+
DeviceKeys.TILDE,
87+
DeviceKeys.TAB,
88+
DeviceKeys.CAPS_LOCK,
89+
DeviceKeys.LEFT_SHIFT,
90+
DeviceKeys.LEFT_CONTROL,
91+
DeviceKeys.LEFT_WINDOWS,
92+
DeviceKeys.LEFT_ALT,
93+
DeviceKeys.SPACE,
94+
DeviceKeys.RIGHT_ALT,
95+
DeviceKeys.FN_Key,
96+
DeviceKeys.APPLICATION_SELECT,
97+
DeviceKeys.RIGHT_CONTROL,
98+
DeviceKeys.RIGHT_SHIFT,
99+
DeviceKeys.ENTER,
100+
DeviceKeys.BACKSPACE,
101+
DeviceKeys.F12,
102+
DeviceKeys.F11,
103+
DeviceKeys.F10,
104+
DeviceKeys.F9,
105+
DeviceKeys.F8,
106+
DeviceKeys.F7,
107+
DeviceKeys.F6,
108+
DeviceKeys.F5,
109+
DeviceKeys.F4,
110+
DeviceKeys.F3,
111+
DeviceKeys.F2,
112+
DeviceKeys.F1,
113+
],
114+
Type = KeySequenceType.Sequence,
115+
}
116+
},
117+
},
118+
new OverrideLogicBuilder()
119+
.SetDynamicBoolean("_Enabled", new BooleanIcueState("BO6_Death"))
120+
),
121+
new Layer("Near Death", new BlinkingLayerHandler
122+
{
123+
Properties = new BlinkingLayerHandlerProperties
124+
{
125+
_PrimaryColor = Color.Red,
126+
SecondaryColor = CommonColorUtils.FastColor(238, 104, 62),
127+
_Sequence = new KeySequence
128+
{
129+
Keys =
130+
[
131+
DeviceKeys.ESC,
132+
DeviceKeys.TILDE,
133+
DeviceKeys.TAB,
134+
DeviceKeys.CAPS_LOCK,
135+
DeviceKeys.LEFT_SHIFT,
136+
DeviceKeys.LEFT_CONTROL,
137+
DeviceKeys.LEFT_WINDOWS,
138+
DeviceKeys.LEFT_ALT,
139+
DeviceKeys.SPACE,
140+
DeviceKeys.RIGHT_ALT,
141+
DeviceKeys.FN_Key,
142+
DeviceKeys.APPLICATION_SELECT,
143+
DeviceKeys.RIGHT_CONTROL,
144+
DeviceKeys.RIGHT_SHIFT,
145+
DeviceKeys.ENTER,
146+
DeviceKeys.BACKSPACE,
147+
DeviceKeys.F12,
148+
DeviceKeys.F11,
149+
DeviceKeys.F10,
150+
DeviceKeys.F9,
151+
DeviceKeys.F8,
152+
DeviceKeys.F7,
153+
DeviceKeys.F6,
154+
DeviceKeys.F5,
155+
DeviceKeys.F4,
156+
DeviceKeys.F3,
157+
DeviceKeys.F2,
158+
DeviceKeys.F1,
159+
],
160+
Type = KeySequenceType.Sequence,
161+
},
162+
EffectSpeed = 10,
163+
}
164+
},
165+
new OverrideLogicBuilder()
166+
.SetDynamicBoolean("_Enabled", new BooleanIcueState("BO6_NearDeath"))
167+
),
168+
new Layer("On Kill", new SimpleParticleLayerHandler
169+
{
170+
Properties = new SimpleParticleLayerProperties
171+
{
172+
_Sequence = new KeySequence(Effects.Canvas.WholeFreeForm),
173+
MinSpawnTime = 0.1f,
174+
MaxSpawnTime = 0.1f,
175+
MinSpawnAmount = 1,
176+
MaxSpawnAmount = 1,
177+
MinInitialVelocityX = 0.0f,
178+
MaxInitialVelocityX = 0.0f,
179+
MinInitialVelocityY = -1.0f,
180+
MaxInitialVelocityY = -1.0f,
181+
MinLifetime = 0.0f,
182+
MaxLifetime = 3.0f,
183+
AccelerationX = 0.0f,
184+
AccelerationY = 0.3f,
185+
DragX = 0.0f,
186+
DragY = 0.80147064f,
187+
MinSize = 30.0f,
188+
MaxSize = 35.0f,
189+
DeltaSize = 7.0f,
190+
SpawnLocation = ParticleSpawnLocations.BottomEdge,
191+
ParticleColorStops = new ColorStopCollection
192+
{
193+
{ 0f, Color.FromArgb(250, 104, 0) },
194+
{ 1f, Color.FromArgb(0, 250, 103, 0) }
195+
},
196+
SpawningEnabled = false,
197+
PrimaryColor = Color.FromArgb(41, 126, 81),
198+
}
199+
},
200+
new OverrideLogicBuilder()
201+
.SetDynamicBoolean("SpawningEnabled", new BooleanIcueEventTriggered("SDKL_FlashOrange", 1.5))
202+
),
203+
new Layer("Main Gradient", new GradientLayerHandler
204+
{
205+
Properties = new GradientLayerHandlerProperties
206+
{
207+
GradientConfig = new LayerEffectConfig
208+
{
209+
Primary = Color.FromArgb(117, 226, 176),
210+
Secondary = Color.FromArgb(211, 112, 172),
211+
Speed = 2.5f,
212+
Angle = 0.0f,
213+
GradientSize = 28.0f,
214+
AnimationType = AnimationType.TranslateXy,
215+
Brush = new EffectBrush(EffectBrush.BrushType.Linear, EffectBrush.BrushWrap.Repeat)
216+
{
217+
Start = new PointF(0, -0.5f),
218+
Center = new PointF(0, 0),
219+
End = new PointF(1, 1),
220+
ColorGradients = new SortedDictionary<double, Color>
221+
{
222+
{ 0, Color.FromArgb(0, 0, 0, 0) },
223+
{ 0.2709030100334449, Color.FromArgb(250, 104, 0) },
224+
{ 0.5000000000000002, Color.FromArgb(0, 0, 0, 0) },
225+
{ 0.7722169135212613, Color.FromArgb(250, 104, 0) },
226+
{ 1, Color.FromArgb(0, 0, 0, 0) }
227+
},
228+
},
229+
},
230+
SecondaryColor = Color.FromArgb(213, 204, 113),
231+
_PrimaryColor = Color.FromArgb(82, 165, 152),
232+
_Sequence = new KeySequence(Effects.Canvas.WholeFreeForm),
233+
},
234+
},
235+
new OverrideLogicBuilder()
236+
.SetDynamicBoolean("_Enabled", new BooleanIcueState("BO6_ThemeMain"))
237+
),
238+
new Layer("Main Radial", new RadialLayerHandler
239+
{
240+
Properties = new RadialLayerProperties
241+
{
242+
Brush = new SegmentedRadialBrushFactory(new ColorStopCollection
243+
{
244+
{ 0.058139537f, Color.FromArgb(0, 0, 0, 0) },
245+
{ 0.18936878f, Color.FromArgb(255, 179, 0) },
246+
{ 0.3122924f, Color.FromArgb(0, 0, 0, 0) },
247+
{ 0.45910186f, Color.FromArgb(0, 0, 0, 0) },
248+
{ 0.5714286f, Color.Orange },
249+
{ 0.679402f, Color.FromArgb(0, 0, 0, 0) },
250+
{ 0.7669741f, Color.FromArgb(0, 0, 0, 0) },
251+
{ 0.85714287f, Color.Orange },
252+
{ 0.9593023f, Color.FromArgb(0, 0, 0, 0) },
253+
}),
254+
_Sequence = new KeySequence(Effects.Canvas.WholeFreeForm),
255+
AnimationSpeed = 60,
256+
},
257+
},
258+
new OverrideLogicBuilder()
259+
.SetDynamicBoolean("_Enabled", new BooleanIcueState("BO6_ThemeMain"))
260+
),
261+
new Layer("Background", new SolidColorLayerHandler
262+
{
263+
Properties = new LayerHandlerProperties
264+
{
265+
_PrimaryColor = Color.FromArgb(250, 104, 0),
266+
_Sequence = new KeySequence(Effects.Canvas.WholeFreeForm),
267+
},
268+
},
269+
new OverrideLogicBuilder()
270+
.SetLookupTable(
271+
"_LayerOpacity",
272+
new OverrideLookupTableBuilder<double>()
273+
.AddEntry(0.75, new BooleanIcueState("BO6_ThemeMain"))
274+
.AddEntry(0.15, new BooleanConstant(true))
275+
)
276+
),
277+
];
278+
}
279+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<UserControl x:Class="AuroraRgb.Profiles.BlackOps6.ControlBo6"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
mc:Ignorable="d"
7+
d:DesignHeight="300" d:DesignWidth="600">
8+
<Grid>
9+
<Grid.RowDefinitions>
10+
<RowDefinition Height="Auto"></RowDefinition>
11+
<RowDefinition></RowDefinition>
12+
</Grid.RowDefinitions>
13+
<TextBlock>
14+
Integration is made trough iCUE
15+
<LineBreak/>
16+
If you want to change the animations, here are known state and event names:
17+
</TextBlock>
18+
<Grid Margin="5 5 5 5" Grid.Row="1">
19+
<Grid.RowDefinitions>
20+
<RowDefinition Height="Auto"></RowDefinition>
21+
<RowDefinition></RowDefinition>
22+
</Grid.RowDefinitions>
23+
<Grid.ColumnDefinitions>
24+
<ColumnDefinition></ColumnDefinition>
25+
<ColumnDefinition></ColumnDefinition>
26+
</Grid.ColumnDefinitions>
27+
<TextBlock>
28+
States:
29+
</TextBlock>
30+
<TextBlock Grid.Row="0" Grid.Column="1">
31+
Events:
32+
</TextBlock>
33+
34+
<StackPanel Grid.Row="1" Grid.Column="0">
35+
<TextBlock>BO6_ThemeMain</TextBlock>
36+
<TextBlock>SDKL_SmokeBlackout (During loading)</TextBlock>
37+
<TextBlock>BO6_ThemeGame</TextBlock>
38+
<TextBlock>BO6_Victory</TextBlock>
39+
<TextBlock>BO6_Defeat</TextBlock>
40+
<TextBlock>BO6_Draw</TextBlock>
41+
42+
<TextBlock>BO6_Death</TextBlock>
43+
<TextBlock>BO6_NearDeath</TextBlock>
44+
<TextBlock>BO6_Revived</TextBlock>
45+
<TextBlock>BO6_Reviving</TextBlock>
46+
<TextBlock>BO6_Downed</TextBlock>
47+
48+
<TextBlock>BO6_CircleAlert</TextBlock>
49+
<TextBlock>BO6_CircleDamage</TextBlock>
50+
<TextBlock>BO6_ThemeGlitch</TextBlock>
51+
<TextBlock>BO6_Cinematic</TextBlock>
52+
</StackPanel>
53+
54+
<StackPanel Grid.Row="1" Grid.Column="1">
55+
<TextBlock>SDKL_FlashOrange</TextBlock>
56+
</StackPanel>
57+
</Grid>
58+
</Grid>
59+
</UserControl>

0 commit comments

Comments
 (0)