mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Completely reimplemented Witcher 3 support, this resolves #6
This commit is contained in:
parent
abc2cdbe3b
commit
f02c7b6f2c
@ -360,7 +360,9 @@
|
|||||||
</None>
|
</None>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
<AppDesigner Include="Properties\" />
|
<AppDesigner Include="Properties\" />
|
||||||
<None Include="Resources\playerWitcher.ws" />
|
<None Include="Resources\playerWitcher.txt" />
|
||||||
|
<None Include="Resources\artemis.txt" />
|
||||||
|
<Content Include="Resources\playerWitcher.ws" />
|
||||||
<None Include="Settings\Offsets.settings">
|
<None Include="Settings\Offsets.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Offsets.Designer.cs</LastGenOutput>
|
<LastGenOutput>Offsets.Designer.cs</LastGenOutput>
|
||||||
@ -441,7 +443,7 @@
|
|||||||
<Content Include="LogitechLedEnginesWrapper.dll">
|
<Content Include="LogitechLedEnginesWrapper.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<None Include="Resources\artemis.xml" />
|
<Content Include="Resources\artemis.xml" />
|
||||||
<Content Include="RzChromaSDK64.dll">
|
<Content Include="RzChromaSDK64.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|||||||
@ -9,11 +9,13 @@
|
|||||||
<Grid Margin="15, 5, 15, 5">
|
<Grid Margin="15, 5, 15, 5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
|
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
|
||||||
<Label FontSize="20" HorizontalAlignment="Left">
|
<Label FontSize="20" HorizontalAlignment="Left">
|
||||||
@ -28,12 +30,19 @@
|
|||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}" />
|
Style="{DynamicResource MetroCircleToggleButtonStyle}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
|
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
|
||||||
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||||
Foreground="#535353" MaxWidth="510" TextAlignment="Justify">
|
Foreground="#535353" MaxWidth="510" TextAlignment="Justify">
|
||||||
Note: Requires patch x.x. When a new patch is released Artemis downloads new pointers for the latest version (unless disabled in settings).
|
Artemis requires the latest Witcher 3 version and mod to be installed in order to work. If you don't use any (conflicting) Witcher 3 mods, the mod can automatically be installed.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,8"
|
||||||
|
TextWrapping="Wrap" HorizontalAlignment="Left" FontFamily="Segoe UI Semibold"
|
||||||
|
Foreground="#535353" MaxWidth="510" TextAlignment="Justify">
|
||||||
|
If you do use conflicting mods, we'll let you know what to do.
|
||||||
|
</TextBlock>
|
||||||
|
<Button Grid.Row="3" Grid.Column="0" x:Name="AutoInstall" Content="Try automatic mod install" Width="160"
|
||||||
|
Style="{DynamicResource SquareButtonStyle}" HorizontalAlignment="Left" Margin="0,20,0,0" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -1,6 +1,9 @@
|
|||||||
using Artemis.Models;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Artemis.Models;
|
||||||
using Artemis.Modules.Games.RocketLeague;
|
using Artemis.Modules.Games.RocketLeague;
|
||||||
using Caliburn.Micro;
|
using Screen = Caliburn.Micro.Screen;
|
||||||
|
|
||||||
namespace Artemis.Modules.Games.Witcher3
|
namespace Artemis.Modules.Games.Witcher3
|
||||||
{
|
{
|
||||||
@ -52,5 +55,62 @@ namespace Artemis.Modules.Games.Witcher3
|
|||||||
|
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AutoInstall()
|
||||||
|
{
|
||||||
|
// Request The Witcher 3 folder
|
||||||
|
var dialog = new FolderBrowserDialog
|
||||||
|
{
|
||||||
|
Description = "Please select your Witcher 3 install path (root directory)."
|
||||||
|
};
|
||||||
|
var result = dialog.ShowDialog();
|
||||||
|
if (result != DialogResult.OK)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// If the subfolder doesn't contain witcher3.exe, it's the wrong folder.
|
||||||
|
if (!File.Exists(dialog.SelectedPath + @"\bin\x64\witcher3.exe"))
|
||||||
|
{
|
||||||
|
var error = MessageBox.Show("That's not a valid Witcher 3 directory\n\n" +
|
||||||
|
"Default directories:\n" +
|
||||||
|
"Steam: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Witcher 3\n" +
|
||||||
|
"GOG: C:\\GOG Games\\The Witcher 3 Wild Hunt", "Installation error",
|
||||||
|
MessageBoxButtons.RetryCancel);
|
||||||
|
if (error == DialogResult.Retry)
|
||||||
|
AutoInstall();
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Look for any conflicting mods
|
||||||
|
if (Directory.Exists(dialog.SelectedPath + @"\mods"))
|
||||||
|
{
|
||||||
|
var file =
|
||||||
|
Directory.GetFiles(dialog.SelectedPath + @"\mods", "playerWitcher.ws", SearchOption.AllDirectories)
|
||||||
|
.FirstOrDefault();
|
||||||
|
if (file != null)
|
||||||
|
{
|
||||||
|
// Don't trip over our own mod
|
||||||
|
if (!file.Contains("modArtemis"))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Oh no, you have a conflicting mod!\n\n" +
|
||||||
|
"Conflicting file: " + file.Remove(0, dialog.SelectedPath.Length) +
|
||||||
|
"\n\nOnce you press OK you will be taken to an instructions page.", "Conflicting mod found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the directory structure
|
||||||
|
if (!Directory.Exists(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player"))
|
||||||
|
Directory.CreateDirectory(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player");
|
||||||
|
if (!Directory.Exists(dialog.SelectedPath + @"\bin\config\r4game\user_config_matrix\pc"))
|
||||||
|
Directory.CreateDirectory(dialog.SelectedPath + @"\bin\config\r4game\user_config_matrix\pc");
|
||||||
|
|
||||||
|
// Install the mod files
|
||||||
|
File.WriteAllText(dialog.SelectedPath + @"\bin\config\r4game\user_config_matrix\pc\artemis.xml", Properties.Resources.artemis);
|
||||||
|
File.WriteAllText(dialog.SelectedPath + @"\mods\modArtemis\content\scripts\game\player\playerWitcher.ws", Properties.Resources.playerWitcher);
|
||||||
|
|
||||||
|
MessageBox.Show("The mod was successfully installed!", "Success");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
22
Artemis/Artemis/Properties/Resources.Designer.cs
generated
22
Artemis/Artemis/Properties/Resources.Designer.cs
generated
@ -104,12 +104,26 @@ namespace Artemis.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Byte[].
|
/// Looks up a localized string similar to /***********************************************************************/
|
||||||
|
////** © 2015 CD PROJEKT S.A. All rights reserved.
|
||||||
|
////** THE WITCHER® is a trademark of CD PROJEKT S. A.
|
||||||
|
////** The Witcher game is based on the prose of Andrzej Sapkowski.
|
||||||
|
////***********************************************************************/
|
||||||
|
///
|
||||||
|
///
|
||||||
|
///
|
||||||
|
///
|
||||||
|
///statemachine class W3PlayerWitcher extends CR4Player
|
||||||
|
///{
|
||||||
|
///
|
||||||
|
/// private saved var craftingSchematics : array<name>;
|
||||||
|
///
|
||||||
|
///
|
||||||
|
/// private saved var alchemyRecipes : array<name>; [rest of string was truncated]";.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static byte[] playerWitcher {
|
internal static string playerWitcher {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("playerWitcher", resourceCulture);
|
return ResourceManager.GetString("playerWitcher", resourceCulture);
|
||||||
return ((byte[])(obj));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,12 +119,12 @@
|
|||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="artemis" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="artemis" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\artemis.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
<value>..\Resources\artemis.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="gamestateConfigFileCsGo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="gamestateConfigFileCsGo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\gamestateConfigFileCsGo.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
<value>..\Resources\gamestateConfigFileCsGo.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="playerWitcher" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="playerWitcher" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\playerWitcher.ws;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>..\Resources\playerWitcher.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
9
Artemis/Artemis/Resources/artemis.txt
Normal file
9
Artemis/Artemis/Resources/artemis.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-16"?>
|
||||||
|
<!-- Used by Artemis to get the active Sign -->
|
||||||
|
<UserConfig>
|
||||||
|
<Group id="Artemis" displayName="Artemis">
|
||||||
|
<VisibleVars>
|
||||||
|
<Var id="ActiveSign" displayName="ActiveSign" displayType="SLIDER:0:1:1000000"/>
|
||||||
|
</VisibleVars>
|
||||||
|
</Group>
|
||||||
|
</UserConfig>
|
||||||
BIN
Artemis/Artemis/Resources/playerWitcher.txt
Normal file
BIN
Artemis/Artemis/Resources/playerWitcher.txt
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user