Skip to content

Commit

Permalink
1.2.3: Hopefully fixed the graphics for the last time
Browse files Browse the repository at this point in the history
  • Loading branch information
pheonix99 committed Feb 11, 2023
1 parent 588dbbb commit 9142271
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 25 deletions.
22 changes: 21 additions & 1 deletion ToggleableThrowingWeapons/Component/EnableThrownMode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Kingmaker.Blueprints;
using Kingmaker.PubSubSystem;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Buffs.Blueprints;
using System;
using System.Collections.Generic;
Expand All @@ -9,7 +11,25 @@
namespace ToggleableThrowingWeapons.Component
{
[AllowedOn(typeof(BlueprintBuff))]
class EnableThrownMode : BlueprintComponent
class EnableThrownMode : UnitFactComponentDelegate
{
/*
public override void OnActivate()
{
base.OnActivate();
EventBus.RaiseEvent<IUnitActiveEquipmentSetHandler>(delegate (IUnitActiveEquipmentSetHandler h)
{
h.HandleUnitChangeActiveEquipmentSet(this.Owner);
}, true);
}
public override void OnDeactivate()
{
base.OnDeactivate();
EventBus.RaiseEvent<IUnitActiveEquipmentSetHandler>(delegate (IUnitActiveEquipmentSetHandler h)
{
h.HandleUnitChangeActiveEquipmentSet(this.Owner);
}, true);
}
*/
}
}
39 changes: 22 additions & 17 deletions ToggleableThrowingWeapons/Content/BaseWeapons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public static void MakeBaseWeapons()
x.Multiplier = 1;
}).Configure();

var throwingStar = Helpers.CreateCopy<BlueprintWeaponType>(BlueprintTool.Get<BlueprintWeaponType>("Starknife"), x =>

var ogstarknife = BlueprintTool.Get<BlueprintWeaponType>("Starknife");
var throwingStar = Helpers.CreateCopy<BlueprintWeaponType>(ogstarknife, x =>
{
x.AssetGuid = ThrownStarknifeGuid;
x.name = "ThrownStarknife";
Expand All @@ -58,10 +60,11 @@ public static void MakeBaseWeapons()
{
m_Projectiles = Dart.VisualParameters.Projectiles,
m_WeaponAnimationStyle = Kingmaker.View.Animation.WeaponAnimationStyle.ThrownStraight,
m_WeaponModel = new Kingmaker.ResourceLinks.PrefabLink() { AssetId = "6edd1e90-2239-3ef4-98f1ccb0e606a6a6" },
m_WeaponBeltModelOverride = new Kingmaker.ResourceLinks.PrefabLink(),
m_WeaponSheathModelOverride = new Kingmaker.ResourceLinks.PrefabLink(),
m_WeaponModel = ogstarknife.m_VisualParameters.m_WeaponModel,
m_WeaponBeltModelOverride = ogstarknife.m_VisualParameters.m_WeaponBeltModelOverride,
m_WeaponSheathModelOverride = ogstarknife.m_VisualParameters.m_WeaponSheathModelOverride,
//m_WeaponBeltModelOverride = new Kingmaker.ResourceLinks.PrefabLink(),
// m_WeaponSheathModelOverride = new Kingmaker.ResourceLinks.PrefabLink(),
m_OverrideAttachSlots = true,
m_PossibleAttachSlots = new Kingmaker.View.Equipment.UnitEquipmentVisualSlotType[]
{
Expand Down Expand Up @@ -101,10 +104,10 @@ public static void MakeBaseWeapons()
}
Main.TTWContext.Logger.Log($"About To Add Strength (thrown) to starknife");


WeaponTypeConfigurator.For("5a939137fc039084580725b2b0845c3f").AddToEnchantments("c4d213911e9616949937e1520c80aaf3").Configure();



if (Main.TTWContext.Settings.Hotswapping.IsEnabled("EnableHotswapping"))
{
Expand All @@ -114,15 +117,15 @@ public static void MakeBaseWeapons()
x.m_OtherForm = BlueprintTool.GetRef<BlueprintWeaponTypeReference>("ThrownStarknife");
});


}

Main.TTWContext.Blueprints.GetDerivedMaster("ThrownStarknifeMasterId");
Main.TTWContext.Logger.LogPatch(thrownStarknifeConfig);



var thrownDaggers = Helpers.CreateCopy<BlueprintWeaponType>(BlueprintTool.Get<BlueprintWeaponType>("Dagger"), x =>
var ogdagger = BlueprintTool.Get<BlueprintWeaponType>("Dagger");
var thrownDaggers = Helpers.CreateCopy<BlueprintWeaponType>(ogdagger, x =>
{
x.name = "TTWThrownDagger";
x.AssetGuid = ThrownDaggerGuid;
Expand All @@ -132,8 +135,9 @@ public static void MakeBaseWeapons()
{
m_Projectiles = Dart.VisualParameters.Projectiles,
m_WeaponAnimationStyle = Kingmaker.View.Animation.WeaponAnimationStyle.ThrownStraight,
m_WeaponModel = new PrefabLink() { AssetId = "8a068458-1898-ee64-2aa771427d77f9ab" },
m_WeaponSheathModelOverride = new PrefabLink() { AssetId = "544192df-823e-cd74-6a0fae1c1af7de16" },
m_WeaponModel =ogdagger.m_VisualParameters.m_WeaponModel,
m_WeaponSheathModelOverride = ogdagger.m_VisualParameters.m_WeaponSheathModelOverride,
m_WeaponBeltModelOverride = ogdagger.m_VisualParameters.m_WeaponBeltModelOverride,
m_SoundSize = Kingmaker.Visual.Sound.WeaponSoundSizeType.Small,
m_SoundType = Kingmaker.Visual.Sound.WeaponSoundType.PierceMetal,
m_WhooshSound = "KnifeWoosh",
Expand Down Expand Up @@ -171,8 +175,8 @@ public static void MakeBaseWeapons()

Main.TTWContext.Blueprints.GetDerivedMaster("DaggerMasterId");
Main.TTWContext.Blueprints.GetDerivedMaster("ThrownDaggerMasterId");

var thrownDLC2Daggers = Helpers.CreateCopy<BlueprintWeaponType>(BlueprintTool.Get<BlueprintWeaponType>("DLC2Dagger"), x =>
var ogDLC2 = BlueprintTool.Get<BlueprintWeaponType>("DLC2Dagger");
var thrownDLC2Daggers = Helpers.CreateCopy<BlueprintWeaponType>( ogDLC2, x =>
{
x.name = "TTWThrownDLC2Dagger";
Expand All @@ -183,8 +187,9 @@ public static void MakeBaseWeapons()
{
m_Projectiles = Dart.VisualParameters.Projectiles,
m_WeaponAnimationStyle = Kingmaker.View.Animation.WeaponAnimationStyle.ThrownStraight,
m_WeaponModel = new PrefabLink() { AssetId = "c859a560-b553-8854-f8913486e29efc07" },
m_WeaponSheathModelOverride = new PrefabLink() { AssetId = "3c601278-3bba-9b54-592eb941bd30702e" },
m_WeaponModel = ogDLC2.m_VisualParameters.m_WeaponModel,
m_WeaponSheathModelOverride = ogDLC2.m_VisualParameters.m_WeaponSheathModelOverride,
m_WeaponBeltModelOverride = ogDLC2.m_VisualParameters.m_WeaponBeltModelOverride,
m_SoundSize = Kingmaker.Visual.Sound.WeaponSoundSizeType.Small,
m_SoundType = Kingmaker.Visual.Sound.WeaponSoundType.PierceMetal,
m_WhooshSound = "KnifeWoosh",
Expand Down
2 changes: 1 addition & 1 deletion ToggleableThrowingWeapons/Content/ModeSwitching.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void CreateModeSwitchAbilities()

var buffDesc = LocalizationTool.CreateString("ThrowWeaponsBuff.Desc", "Use Daggers And Starknives As Ranged Weapons");
var buffconfig = BuffConfigurator.For(buffBP).SetDisplayName(LocalizationTool.CreateString("ThrowWeaponsBuff.Name", "Throw Weapons")).SetDescription(buffDesc).SetDescriptionShort(buffDesc);

buffconfig.AddComponent<EnableThrownMode>();

buffconfig.SetIcon(BlueprintTool.Get<BlueprintWeaponType>("Dagger").Icon);
Expand Down
2 changes: 1 addition & 1 deletion ToggleableThrowingWeapons/Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Id": "ToggleableThrowingWeapons",
"DisplayName": "Toggleable Throwing Weapons",
"Author": "pheonix99",
"Version": "1.2.2",
"Version": "1.2.3",
"ManagerVersion": "0.21.3",
"AssemblyName": "ToggleableThrowingWeapons.dll",
"EntryMethod": "ToggleableThrowingWeapons.Main.Load",
Expand Down
12 changes: 7 additions & 5 deletions ToggleableThrowingWeapons/ToggleableThrowingWeapons.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owlcat.Runtime.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\Managed\Owlcat.Runtime.Core.dll</HintPath>
</Reference>
<Reference Include="Owlcat.Runtime.Validation">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\Managed\Owlcat.Runtime.Validation.dll</HintPath>
</Reference>
Expand All @@ -111,18 +115,16 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\TabletopTweaks-Core\TabletopTweaks-Core\bin\Debug\TabletopTweaks-Core.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule_public">
<HintPath>..\lib\UnityEngine.CoreModule_public.dll</HintPath>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine_public">
<HintPath>..\lib\UnityEngine_public.dll</HintPath>
</Reference>
<Reference Include="UnityModManager">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\Managed\UnityModManager\UnityModManager.dll</HintPath>
</Reference>
Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Thanks to Truinto for the AddFactOnlyParty code.

#Changelog


1.2.3: Hopefully fixed graphical jank for the last time

1.2.2: Fixed Rogue Finesse training working with thrown weapons. Turned out to be incredibly imba


Expand Down

0 comments on commit 9142271

Please sign in to comment.