Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for WOTR 2.3, Reduce manual steps for build #200

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ obj/
bin/
screenshots/
.vs/
Portraits/
lib/
releases/
23 changes: 16 additions & 7 deletions IsekaiMod.sln
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32802.440
# Visual Studio Version 17
VisualStudioVersion = 17.10.35004.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IsekaiMod", "IsekaiMod\IsekaiMod.csproj", "{35B9CA4A-4DC0-47A0-8E88-6AF6E89B859C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IsekaiMod", "IsekaiMod\IsekaiMod.csproj", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F3C6CA98-73B2-4EF2-8E12-59202482DE75}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
CHANGELOG.md = CHANGELOG.md
LICENSE = LICENSE
README.md = README.md
Repository.json = Repository.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{35B9CA4A-4DC0-47A0-8E88-6AF6E89B859C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35B9CA4A-4DC0-47A0-8E88-6AF6E89B859C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35B9CA4A-4DC0-47A0-8E88-6AF6E89B859C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35B9CA4A-4DC0-47A0-8E88-6AF6E89B859C}.Release|Any CPU.Build.0 = Release|Any CPU
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion IsekaiMod/Components/AnyWeaponStatReplacementFixed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public class AnyWeaponDamageStatReplacementFixed : UnitFactComponentDelegate, II

// Fix: apply the 1.5x two-handed bonus on non-strength, non-dexterity damage stat
if (Stat == StatType.Strength || Stat == StatType.Dexterity) return;
if (evt.Weapon.HoldInTwoHands || (evt.SlotToInsert != null && evt.Weapon.ShouldHoldInTwoHands(evt.SlotToInsert))) {

if (evt.Weapon.HoldInTwoHands
|| (evt.SlotToInsert != null
&& evt.Weapon.CanTakeTwoHands()
&& (evt.SlotToInsert.HandsEquipmentSet.GripType == Kingmaker.Items.GripType.TwoHanded
|| !evt.Weapon.CanTakeOneHand()))) {
evt.OverrideDamageBonusStatMultiplier(1.5f);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal class ContextCalculateAbilityParamsBasedOnClasses : ContextAbilityParam
base.ApplyValidation(context, parentIndex);
if (!StatType.IsAttribute() && StatType != StatType.BaseAttackBonus) {
string text = string.Join(", ", from s in StatTypeHelper.Attributes select s.ToString());
context.AddError("StatType must be Base Attack Bonus or an attribute: {0}", text, Array.Empty<object>());
context.AddError(ErrorLevel.Unprioritized, "StatType must be Base Attack Bonus or an attribute: {0}", text, Array.Empty<object>());
}
}

Expand Down
5 changes: 3 additions & 2 deletions IsekaiMod/Components/ExtraSummonCount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Kingmaker.PubSubSystem;
using Kingmaker.RuleSystem;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Mechanics;
using Kingmaker.Utility;
using System;

Expand All @@ -12,8 +13,8 @@ namespace IsekaiMod.Components {
[TypeId("d104b3fcf9094fae838ad3793767348c")]
public class ExtraSummonCount : UnitFactComponentDelegate, ISubscriber, IGlobalSubscriber, ICalculateSummonUnitsCount {
public int Count;
public void HandleCalculateSummonUnitsCount(UnitEntityData unit, DiceType diceType, int diceCount, int diceBonus, ref int count) {
if (unit != Owner) {
public void HandleCalculateSummonUnitsCount(MechanicsContext mechanicsContext, ContextDiceValue contextDiceValue, ref int count) {
if (mechanicsContext.MaybeCaster != Owner) {
return;
}
count += GetMaxStat();
Expand Down
184 changes: 183 additions & 1 deletion IsekaiMod/IsekaiMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IsekaiMod</RootNamespace>
<AssemblyName>IsekaiMod</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<LangVersion>9</LangVersion>
<Deterministic>true</Deterministic>
Expand Down Expand Up @@ -311,6 +311,188 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="Assets\Deities\ICON_ADMIN_D.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Deities\ICON_AQUA.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Deities\ICON_RISTARTE.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Deities\ICON_TRUCK.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_BARRIER_GOLD.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_BARRIER_VOID.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_CORRUPT.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_DARK.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_DIVINE.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_FRIENDLY.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_MAJESTIC.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AURA_SIPHONING.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_AUTO_MAGIC.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_CHARM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_CHUUNIBYOU.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_DEUS_EX_MACHINA.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_DUPE_GOLD.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_ENERGY_DARK.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_ENERGY_LIGHT.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_EXCALIBUR.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_EXCEPTIONAL_FEAT.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_EXCEPTIONAL_SUMMONING.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_FEROCIOUS_SUMMONING.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_FORBIDDEN_SUMMONING.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_GIFTED.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_GODHOOD.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_HAX.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_INFINITE_SPACE.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_MASTERPLAN.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_MIND_CONTROL.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_MIND_CONTROL_IMMUNE.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_OP_AURA_CHAOTIC_FRENZY.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_OP_AURA_MALEVOLENT_RAGE.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_OP_AURA_RIGHTEOUS_WRATH.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_REALM_CELESTIAL.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_REALM_SHADOW.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_REGENERATION.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_SECOND_FORM.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_SECOND_FORM_INACTIVE.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_SECOND_REINCARNATION.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_SECRET_POWER.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_START_BLUNT.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_START_RANGED.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_START_SWORD.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_SUPER_BUFF.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_SUPER_BUFF_DISMISS.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_UNJUST_PATH.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Features\ICON_UNLIMITED_POWER.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Heritages\ICON_ANGEL.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Heritages\ICON_DARK_ELF.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Heritages\ICON_FURRY.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Heritages\ICON_SPRIGGAN.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Heritages\ICON_SUCCUBUS.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Heritages\ICON_VAMPIRE.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Heritages\ICON_WOOD_ELF.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Portraits\Deathsnatcher\FullLength.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Portraits\Deathsnatcher\Medium.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Portraits\Deathsnatcher\PetEye.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\Portraits\Deathsnatcher\Small.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="UserSettings\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" AfterTargets="BeforeClean">
<PropertyGroup>
Expand Down
20 changes: 14 additions & 6 deletions IsekaiMod/Main.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using HarmonyLib;
using IsekaiMod.ModLogic;
using System;
using TabletopTweaks.Core.Utilities;
using UnityModManagerNet;

Expand All @@ -10,16 +11,23 @@ internal static class Main {
public static ModContextTTTBase IsekaiContext;

public static bool Load(UnityModManager.ModEntry modEntry) {
var harmony = new Harmony(modEntry.Info.Id);
IsekaiContext = new ModContextTTTBase(modEntry);
IsekaiContext.ModEntry.OnSaveGUI = OnSaveGUI;
IsekaiContext.ModEntry.OnGUI = UMMSettingsUI.OnGUI;
harmony.PatchAll();
PostPatchInitializer.Initialize(IsekaiContext);
return true;
try {
var harmony = new Harmony(modEntry.Info.Id);
IsekaiContext.ModEntry.OnSaveGUI = OnSaveGUI;
IsekaiContext.ModEntry.OnGUI = UMMSettingsUI.OnGUI;
harmony.PatchAll();
PostPatchInitializer.Initialize(IsekaiContext);
return true;
}
catch (Exception e) {
Log(e.ToString());
throw e;
}
}

public static void Log(string msg) {

IsekaiContext.Logger.Log(msg);
}

Expand Down
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,6 @@ This is a content mod for `Pathfinder: Wrath of the Righteous` that adds an `Ise
### Setup
- Add `WrathPath` as an environment variable with the value `C:\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure` or wherever your game directory is.
- Open Visual Studio and [publicize your assemblies](https://github.com/WittleWolfie/OwlcatModdingWiki/wiki/Publicize-Assemblies).
### Testing
- Create a folder called `IsekaiMod` in `C:\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Mods`.
- After building your solution in Visual Studio, go to your project directory -> `bin` -> `Release` or `Debug` -> `IsekaiMod` -> `net472`.
- Copy the files and folders from the diagram below and place them in the `IsekaiMod` folder you created.
- You'll need to create the `UserSettings` folder. Copy the `AddedContent.json` and the `Blueprints.json` files from the project and place them inside.
```
C:\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Mods\IsekaiMod

IsekaiMod/
├── Assets/
│ └── ...
├── Localization/
│ └── LocalizationPack.json
├── UserSettings/
│ ├── AddedContent.json
│ └── Blueprints.json
├── Info.json
├── IsekaiMod.dll
└── ModKit.dll
```
- For the Assets make sure you have the Portraits. Copy them from a [Release](https://github.com/JohN100x1/WOTR_IsekaiMod/releases).
- Now you can start your game and test.

On subsequent tests you'll only need to copy the `IsekaiMod.dll`.
- If you edited the blueprint names, copy `Blueprints.json` as well.
- If you added new assets, copy those as well.
## Mod Information
### Requirements
- [Unity Mod Manager](https://www.nexusmods.com/site/mods/21).
Expand Down