Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from Phenrei/NonCharacterSupport
Browse files Browse the repository at this point in the history
6.2 support: API7 and .net6; New UI with WIP in-game editor, many new features and improvements.
  • Loading branch information
Phenrei authored Aug 25, 2022
2 parents 9a7fd34 + da84fd0 commit 077ecb7
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 292 deletions.
18 changes: 17 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dotnet_diagnostic.IDE0011.severity = none
dotnet_diagnostic.IDE0022.severity = none
dotnet_diagnostic.IDE0023.severity = none
dotnet_diagnostic.IDE1006.severity = warning
dotnet_diagnostic.IDE0044.severity = warning
dotnet_diagnostic.IDE0044.severity = suggestion
dotnet_diagnostic.IDE0058.severity = none
dotnet_diagnostic.IDE0073.severity = warning
dotnet_diagnostic.IDE0025.severity = none
Expand Down Expand Up @@ -78,6 +78,10 @@ csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion

# SA1101: Prefix local calls with this
dotnet_diagnostic.SA1101.severity = silent

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
Expand Down Expand Up @@ -145,3 +149,15 @@ dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.SpacingRules'
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpacingRules.severity = silent

# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.ReadabilityRules'
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.ReadabilityRules.severity = silent

# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.LayoutRules'
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.LayoutRules.severity = silent

# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.OrderingRules'
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.OrderingRules.severity = silent
23 changes: 18 additions & 5 deletions CustomizePlus/BodyScale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ public class BodyScale
public HkVector4 RootScale { get; set; } = HkVector4.Zero;

// This works fine on generic GameObject if previously checked for correct types.
public unsafe void Apply(GameObject character)
public unsafe void Apply(GameObject character, bool applyRootScale)
{
RenderObject* obj = null;
obj = RenderObject.FromActor(character);

if (obj == null)
{
//PluginLog.Debug($"{character.Address} missing skeleton!");
return;
}
for (int i = 0; i < obj->Skeleton->Length; i++)
{
if (!this.poses.ContainsKey(i))
Expand All @@ -39,9 +43,18 @@ public unsafe void Apply(GameObject character)
if (this.RootScale.X != 0 && this.RootScale.Y != 0 && this.RootScale.Z != 0)
{
HkVector4 rootScale = obj->Scale;
rootScale.X = MathF.Max(this.RootScale.X, 0.01f);
rootScale.Y = MathF.Max(this.RootScale.Y, 0.01f);
rootScale.Z = MathF.Max(this.RootScale.Z, 0.01f);
if (applyRootScale)
{
rootScale.X = MathF.Max(this.RootScale.X, 0.01f);
rootScale.Y = MathF.Max(this.RootScale.Y, 0.01f);
rootScale.Z = MathF.Max(this.RootScale.Z, 0.01f);
}
else
{
rootScale.X = obj->Scale.X;
rootScale.Y = obj->Scale.Y;
rootScale.Z = obj->Scale.Z;
}
obj->Scale = rootScale;
}
}
Expand Down
5 changes: 5 additions & 0 deletions CustomizePlus/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ public class Configuration : IPluginConfiguration
public List<BodyScale> BodyScales { get; set; } = new();
public bool Enable { get; set; } = true;
public bool AutomaticEditMode { get; set; } = false;

public bool ApplyToNpcs { get; set; } = true;
// public bool ApplyToNpcsInBusyAreas { get; set; } = false;
public bool ApplyToNpcsInCutscenes { get; set; } = true;


// Upcoming feature
/*
Expand Down
242 changes: 13 additions & 229 deletions CustomizePlus/CustomizePlus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<PropertyGroup>
<Authors></Authors>
<Company></Company>
<Version>0.0.0.7</Version>
<Version>0.0.1.0</Version>
<Description>CustomizePlus</Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/XIV-Tools/CustomizePlus</PackageProjectUrl>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<Platforms>x64</Platforms>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand All @@ -34,58 +34,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.8" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<Reference Include="CheapLoc">
<HintPath>..\..\..\Dalamud\bin\Debug\CheapLoc.dll</HintPath>
</Reference>
<Reference Include="Costura">
<HintPath>..\..\..\Dalamud\bin\Debug\Costura.dll</HintPath>
</Reference>
<Reference Include="Dalamud.Injector">
<HintPath>..\..\..\Dalamud\bin\Debug\Dalamud.Injector.dll</HintPath>
</Reference>
<Reference Include="FFXIVClientStructs">
<HintPath>..\..\..\Dalamud\bin\Debug\FFXIVClientStructs.dll</HintPath>
</Reference>
<Reference Include="Iced">
<HintPath>..\..\..\Dalamud\bin\Debug\Iced.dll</HintPath>
</Reference>
<Reference Include="JetBrains.Annotations">
<HintPath>..\..\..\Dalamud\bin\Debug\JetBrains.Annotations.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.HashCode">
<HintPath>..\..\..\Dalamud\bin\Debug\Microsoft.Bcl.HashCode.dll</HintPath>
</Reference>
<Reference Include="Microsoft.DotNet.PlatformAbstractions">
<HintPath>..\..\..\Dalamud\bin\Debug\Microsoft.DotNet.PlatformAbstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyModel">
<HintPath>..\..\..\Dalamud\bin\Debug\Microsoft.Extensions.DependencyModel.dll</HintPath>
</Reference>
<Reference Include="MinSharp">
<HintPath>..\..\..\Dalamud\bin\Debug\MinSharp.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\..\Dalamud\bin\Debug\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>..\..\..\Dalamud\bin\Debug\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>..\..\..\Dalamud\bin\Debug\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>..\..\..\Dalamud\bin\Debug\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<Reference Include="MonoMod.RuntimeDetour">
<HintPath>..\..\..\Dalamud\bin\Debug\MonoMod.RuntimeDetour.dll</HintPath>
</Reference>
<Reference Include="MonoMod.Utils">
<HintPath>..\..\..\Dalamud\bin\Debug\MonoMod.Utils.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
<Private>false</Private>
Expand All @@ -110,186 +63,17 @@
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="PeNet">
<HintPath>..\..\..\Dalamud\bin\Debug\PeNet.dll</HintPath>
</Reference>
<Reference Include="PeNet.Asn1">
<HintPath>..\..\..\Dalamud\bin\Debug\PeNet.Asn1.dll</HintPath>
</Reference>
<Reference Include="Penumbra.GameData">
<HintPath>..\..\..\Penumbra\Penumbra.GameData\bin\Debug\net5.0-windows\Penumbra.GameData.dll</HintPath>
</Reference>
<Reference Include="PInvoke.AdvApi32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.AdvApi32.dll</HintPath>
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Penumbra">
<HintPath>..\..\Penumbra\Penumbra\bin\Debug\Penumbra.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Penumbra.GameData">
<HintPath>..\..\Penumbra\Penumbra\bin\Debug\Penumbra.GameData.dll</HintPath>
</Reference>
<Reference Include="PInvoke.BCrypt">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.BCrypt.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Cabinet">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Cabinet.dll</HintPath>
</Reference>
<Reference Include="PInvoke.CfgMgr32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.CfgMgr32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Crypt32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Crypt32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.DbgHelp">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.DbgHelp.dll</HintPath>
</Reference>
<Reference Include="PInvoke.DwmApi">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.DwmApi.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Gdi32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Gdi32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Hid">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Hid.dll</HintPath>
</Reference>
<Reference Include="PInvoke.ImageHlp">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.ImageHlp.dll</HintPath>
</Reference>
<Reference Include="PInvoke.IPHlpApi">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.IPHlpApi.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Kernel32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Kernel32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Magnification">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Magnification.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Msi">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Msi.dll</HintPath>
</Reference>
<Reference Include="PInvoke.NCrypt">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.NCrypt.dll</HintPath>
</Reference>
<Reference Include="PInvoke.NetApi32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.NetApi32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.NewDev">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.NewDev.dll</HintPath>
</Reference>
<Reference Include="PInvoke.NTDll">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.NTDll.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Ole32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Ole32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Psapi">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Psapi.dll</HintPath>
</Reference>
<Reference Include="PInvoke.SetupApi">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.SetupApi.dll</HintPath>
</Reference>
<Reference Include="PInvoke.SHCore">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.SHCore.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Shell32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Shell32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.User32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.User32.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Userenv">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Userenv.dll</HintPath>
</Reference>
<Reference Include="PInvoke.UxTheme">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.UxTheme.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Windows.Core">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Windows.Core.dll</HintPath>
</Reference>
<Reference Include="PInvoke.Windows.ShellScalingApi">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.Windows.ShellScalingApi.dll</HintPath>
</Reference>
<Reference Include="PInvoke.WinUsb">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.WinUsb.dll</HintPath>
</Reference>
<Reference Include="PInvoke.WtsApi32">
<HintPath>..\..\..\Dalamud\bin\Debug\PInvoke.WtsApi32.dll</HintPath>
</Reference>
<Reference Include="Reloaded.Assembler">
<HintPath>..\..\..\Dalamud\bin\Debug\Reloaded.Assembler.dll</HintPath>
</Reference>
<Reference Include="Reloaded.Hooks">
<HintPath>..\..\..\Dalamud\bin\Debug\Reloaded.Hooks.dll</HintPath>
</Reference>
<Reference Include="Reloaded.Hooks.Definitions">
<HintPath>..\..\..\Dalamud\bin\Debug\Reloaded.Hooks.Definitions.dll</HintPath>
</Reference>
<Reference Include="Reloaded.Memory">
<HintPath>..\..\..\Dalamud\bin\Debug\Reloaded.Memory.dll</HintPath>
</Reference>
<Reference Include="Reloaded.Memory.Buffers">
<HintPath>..\..\..\Dalamud\bin\Debug\Reloaded.Memory.Buffers.dll</HintPath>
</Reference>
<Reference Include="SDL2-CS">
<HintPath>..\..\..\Dalamud\bin\Debug\SDL2-CS.dll</HintPath>
</Reference>
<Reference Include="Serilog">
<HintPath>..\..\..\Dalamud\bin\Debug\Serilog.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.Async">
<HintPath>..\..\..\Dalamud\bin\Debug\Serilog.Sinks.Async.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.Console">
<HintPath>..\..\..\Dalamud\bin\Debug\Serilog.Sinks.Console.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.File">
<HintPath>..\..\..\Dalamud\bin\Debug\Serilog.Sinks.File.dll</HintPath>
</Reference>
<Reference Include="SharpDisasm">
<HintPath>..\..\..\Dalamud\bin\Debug\SharpDisasm.dll</HintPath>
</Reference>
<Reference Include="SharpDX">
<HintPath>..\..\..\Dalamud\bin\Debug\SharpDX.dll</HintPath>
</Reference>
<Reference Include="SharpDX.Direct3D11">
<HintPath>..\..\..\Dalamud\bin\Debug\SharpDX.Direct3D11.dll</HintPath>
</Reference>
<Reference Include="SharpDX.DXGI">
<HintPath>..\..\..\Dalamud\bin\Debug\SharpDX.DXGI.dll</HintPath>
</Reference>
<Reference Include="SharpDX.Mathematics">
<HintPath>..\..\..\Dalamud\bin\Debug\SharpDX.Mathematics.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.Core">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.Core.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.GLFW">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.GLFW.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.Maths">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.Maths.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.OpenGL">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.OpenGL.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.SDL">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.SDL.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.Windowing.Common">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.Windowing.Common.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.Windowing.Glfw">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.Windowing.Glfw.dll</HintPath>
</Reference>
<Reference Include="Silk.NET.Windowing.Sdl">
<HintPath>..\..\..\Dalamud\bin\Debug\Silk.NET.Windowing.Sdl.dll</HintPath>
</Reference>
<Reference Include="StbiSharp">
<HintPath>..\..\..\Dalamud\bin\Debug\StbiSharp.dll</HintPath>
</Reference>
<Reference Include="System.Reflection.MetadataLoadContext">
<HintPath>..\..\..\Dalamud\bin\Debug\System.Reflection.MetadataLoadContext.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Pkcs">
<HintPath>..\..\..\Dalamud\bin\Debug\System.Security.Cryptography.Pkcs.dll</HintPath>
</Reference>
<Reference Include="Validation">
<HintPath>..\..\..\Dalamud\bin\Debug\Validation.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions CustomizePlus/DalamudPackager.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Target Name="PackagePlugin" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<DalamudPackager
ProjectDir="$(ProjectDir)"
OutputPath="$(OutputPath)"
AssemblyName="$(AssemblyName)"
MakeZip="true"/>
</Target>
</Project>
Loading

0 comments on commit 077ecb7

Please sign in to comment.