Skip to content

Commit

Permalink
fixed gfx and dex dmg issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pheonix99 committed Jun 11, 2022
1 parent 9a23839 commit d01d32c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public void OnEventAboutToTrigger(RuleCalculateWeaponStats evt)
ModifiableValueAttributeStat modifiableValueAttributeStat = evt.Initiator.Descriptor.Stats.GetStat(this.Stat) as ModifiableValueAttributeStat;
if (evt.Weapon == base.Owner && modifiableValueAttributeStat != null && evt.Weapon.Blueprint.IsRanged)
{

evt.OverrideDamageBonusStat(this.Stat);
evt.OverrideDamageBonusStatMultiplier(this.Multiplier);
}
Expand Down
39 changes: 36 additions & 3 deletions ToggleableThrowingWeapons/Content/BaseWeapons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static void MakeBaseWeapons()
{
x.Stat = Kingmaker.EntitySystem.Stats.StatType.Strength;
x.Multiplier = 1;
});
}).Configure();

var throwingStar = Helpers.CreateCopy<BlueprintWeaponType>(BlueprintTool.Get<BlueprintWeaponType>("Starknife"), x =>
{
Expand Down Expand Up @@ -127,7 +127,23 @@ public static void MakeBaseWeapons()
x.AssetGuid = ThrownDaggerGuid;
x.m_AttackRange = new Kingmaker.Utility.Feet(20);
x.m_AttackType = Kingmaker.RuleSystem.AttackType.Ranged;
x.m_VisualParameters = Dart.VisualParameters;
x.m_VisualParameters = new WeaponVisualParameters
{
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_SoundSize = Kingmaker.Visual.Sound.WeaponSoundSizeType.Small,
m_SoundType = Kingmaker.Visual.Sound.WeaponSoundType.PierceMetal,
m_WhooshSound = "KnifeWoosh",
m_MissSoundType = Kingmaker.Visual.Sound.WeaponMissSoundType.MediumMetal,
m_EquipSound = "Weapons_1H_Slashing_Equip_Dagger",
m_UnequipSound = "Weapons_1H_Slashing_Remove_Dagger",
m_InventoryEquipSound = "SwordEquip",
m_InventoryPutSound = "DaggerPut",
m_InventoryTakeSound = "DaggerTake"
};
x.m_FighterGroupFlags = WeaponFighterGroupFlags.Thrown | WeaponFighterGroupFlags.BladesLight;
});
Expand Down Expand Up @@ -162,10 +178,27 @@ public static void MakeBaseWeapons()
x.AssetGuid = ThrownDLC2DaggerGuid;
x.m_AttackRange = new Kingmaker.Utility.Feet(20);
x.m_AttackType = Kingmaker.RuleSystem.AttackType.Ranged;
x.m_VisualParameters = Dart.VisualParameters;
x.m_VisualParameters = new WeaponVisualParameters
{
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_SoundSize = Kingmaker.Visual.Sound.WeaponSoundSizeType.Small,
m_SoundType = Kingmaker.Visual.Sound.WeaponSoundType.PierceMetal,
m_WhooshSound = "KnifeWoosh",
m_MissSoundType = Kingmaker.Visual.Sound.WeaponMissSoundType.MediumMetal,
m_EquipSound = "Weapons_1H_Slashing_Equip_Dagger",
m_UnequipSound = "Weapons_1H_Slashing_Remove_Dagger",
m_InventoryEquipSound = "SwordEquip",
m_InventoryPutSound = "DaggerPut",
m_InventoryTakeSound = "DaggerTake"
};
x.m_FighterGroupFlags = WeaponFighterGroupFlags.Thrown | WeaponFighterGroupFlags.BladesLight;
});

BlueprintTools.AddBlueprint(Main.TTWContext, thrownDLC2Daggers);
var thrownDLC2daggerConfig = WeaponTypeConfigurator.For(thrownDLC2Daggers).AddToEnchantments("c4d213911e9616949937e1520c80aaf3").SetDefaultNameText(LocalizationTool.CreateString("TTWThrownDLC2Dagger.Name", "Thrown Dagger"));
if (Main.TTWContext.Settings.Hotswapping.IsEnabled("EnableHotswapping"))
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.0.0",
"Version": "1.1.0",
"ManagerVersion": "0.21.3",
"AssemblyName": "ToggleableThrowingWeapons.dll",
"EntryMethod": "ToggleableThrowingWeapons.Main.Load",
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ The item names don't change by mode. I'll get to this later.


#Credits
Thanks to Truinto for the AddFactOnlyParty code.
Thanks to Truinto for the AddFactOnlyParty code.

#Changelog
1.1: Fixed dex to melee damage cutting out, fixed some graphical jank

0 comments on commit d01d32c

Please sign in to comment.