JohN100x1 / IsekaiMod

An unbalanced gameplay mod for Pathfinder: Wrath of the Righteous
MIT License
20 stars 10 forks source link

Game won't launch after patch #199

Open AlistairKion opened 3 months ago

AlistairKion commented 3 months ago

Describe the bug After the new 2.3.0bb patch the game no longer launches with this mod, instead resulting in a permanent hang on the loading screen.

To Reproduce Steps to reproduce the behavior:

  1. Have only this mod and "TabletopTweaks-Core" installed.
  2. Launch the game
  3. Get stuck on loading screen

Expected behavior The game launches and you reach the main menu.

Additional context [14.7056 - Unity]: TypeLoadException: VTable setup of type IsekaiMod.Components.ExtraSummonCount failed System.RuntimeType.GetConstructors_internal () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.RuntimeType.GetConstructorCandidates () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.RuntimeType.GetConstructors () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.RuntimeType.GetDefaultConstructor () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.RuntimeType.CreateInstanceMono () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.RuntimeType.CreateInstanceSlow () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.RuntimeType.CreateInstanceDefaultCtor () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Activator.CreateInstance[T] () (at <695d1cc93cca45069c528c15c9fdd749>:0) TabletopTweaks.Core.Utilities.Helpers.Create[T] () (at :0) TabletopTweaks.Core.Utilities.BlueprintExtentions.AddComponent[T] () (at :0) IsekaiMod.Content.Features.IsekaiProtagonist.OverpoweredAbility.MasterSummoner+<>c.b__0_0 () (at <0374bcdeeee14121895e17de9dc2bd50>:0) IsekaiMod.Utilities.TTCoreExtensions.CreateToggleBuffFeature () (at <0374bcdeeee14121895e17de9dc2bd50>:0) IsekaiMod.Utilities.TTCoreExtensions.CreateToggleBuffFeature () (at <0374bcdeeee14121895e17de9dc2bd50>:0) IsekaiMod.Content.Features.IsekaiProtagonist.OverpoweredAbility.MasterSummoner.Add () (at <0374bcdeeee14121895e17de9dc2bd50>:0) IsekaiMod.Content.ContentAdder+BlueprintsCache_Init_Patch.AddIsekaiProtagonistClass () (at <0374bcdeeee14121895e17de9dc2bd50>:0) IsekaiMod.Content.ContentAdder+BlueprintsCache_Init_Patch.CreateNewBlueprints () (at <0374bcdeeee14121895e17de9dc2bd50>:0) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Kingmaker.Blueprints.JsonSystem.BlueprintsCache.Init_Patch6(Kingmaker.Blueprints.JsonSystem.BlueprintsCache) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Kingmaker.Blueprints.JsonSystem.StartGameLoader.LoadPackTOC_Patch2(Kingmaker.Blueprints.JsonSystem.StartGameLoader) Kingmaker.GameStarter+d__28.MoveNext () (at <95842a8b72b4464786c5ce2630f0c9e5>:0) UnityEngine.SetupCoroutine.InvokeMoveNext () (at <4fae2288737c4dfda349689bbefabfcc>:0)

progregret commented 3 months ago

yeah, same seems like last patch completely broke my favorite class( sadly, as I now, JohN100x1 is no longer support mod

Jawich-N commented 3 months ago

for now Ive been able to run the game as long as you open the project in C++ and remove the master summoner OP ability and then recompile the DLL

evandixon commented 3 months ago

I tried my hand at updating the mod for 2.3. My testing was limited to "get the game to run and load a save that used the latest release version of this mod".

Here's a link to a custom build of it: https://github.com/user-attachments/files/15847904/IsekaiMod.zip [Updated 2024-06-15]

I'd appreciate it if anyone could leave comments on the PR if you find any issues related to the upgrade. Please pay special attention to the summon count increase and the archetype that uses CHA for weapon damage, especially for two-handed weapons.

Now to go actually play the game and see for myself what happens with the latest DLC

BTW, thanks to AlistairKion for providing the stack trace in the issue! Idk if I would have even opened the project without seeing what I was getting myself into first.

gdofmnstrs commented 3 months ago

Unfortunately, I can't even get the game to freeze on the load screen. A white box shows up saying something about Pathfinder with a status bar barely started in red and then closes again. I can't read the exact text in the box as it flashes off the screen too fast. I guess I'll have to disable every mod and see what I can turn off before it crashes again. I wish games would bring back the option to not update games again.

evandixon commented 3 months ago

Unfortunately, I can't even get the game to freeze on the load screen. A white box shows up saying something about Pathfinder with a status bar barely started in red and then closes again. I can't read the exact text in the box as it flashes off the screen too fast. I guess I'll have to disable every mod and see what I can turn off before it crashes again. I wish games would bring back the option to not update games again.

This issue is for the Isekai mod specifically. If you're not sure if this mod is the issue or not, try looking in Player.log in the AppData/LocalLow/Owlcat for any exceptions and try to see which mod(s) they come from. Though it's possible the crash you're seeing may be too early in the process for that, idk.

My previous reply has a custom build that fixes the Isekai mod, but you'll also need updated TabletopTweaks. I only use a few other mods, and Toybox needed an update too.

darinclark commented 3 months ago

Can confirm that the modified code builds against the current version. Cannot confirm that the two-handed damage fix operates correctly; I suspect that the HandSlot was used to provide different damage calculations depending on whether the weapon would be equipped as a two-handed weapon or one-handed, and that using a function without access to that will return incorrect results. Even if it does, that's not exactly the worst result for an intentionally-overpowered mod, but...

Have poked around to see if perhaps the functionality was simply refactored to a more correct location, but do not know Visual Studio Community well enough to see if there's a good way to up and search for all places HandSlot and/or ItemEntityWeapon are used. It's also possible it's been redone to operate in a different way - but without access to the code to dig, I'm not sure I'm able to say.

darinclark commented 3 months ago

@evandixon Addendum: I think I see why the function was removed. I got a tutorial popup (quite the surprise given the hundreds of hours I've put in) about a new feature: the one-handed/two-handed thing is apparently not automatic, now, but a manual switch. As such, whether the item is used in a two-handed grip is no longer a "should" thing. I am guessing but not certain that this is what is/was going on:

The HandSlot might be used for determining whether the weapon is going to be wielded two-handed for an inventory equip stat comparison. In that event, the 'should' might now need to be: There is a HandSlot provided (as before), the weapon can be two-handed (the function you added), and the HandSlot's HandsEquipmentSet has a GripType of TwoHanded.

There might be some utility function I'm not seeing that can do that, or I might be totally wrong on my guess, but that's my guess.

evandixon commented 3 months ago

What sort of weapon are you using and how are you testing? When I, an Isekai Hero that gets CHA to attack/damage, equip a glaive or a quarterstaff, it correctly shows +9 CHA damage with my +6 CHA. I'm just looking in the Martial tab and haven't tried in actual combat, and I haven't seen any popups telling me how to switch to one-handed. Unless that's specific to only some weapons?

jedi7000nathan commented 3 months ago

Here is one bug that is still outstanding and was with the version beforehand: new archetypes with new mounts bug out the saddle up feat and you can't mount them; I'm not certain why but its with the skill potentially adding them to Isekai pet list and updating the saddle up feat to include the new entries could fix the issue

evandixon commented 3 months ago

@jedi7000nathan please create a new issue for bugs present in the old version. Helps devs keep track of things.

darinclark commented 3 months ago

aaaand workday is over. Grabbed a standard longsword - which can be wielded either one or two-handed - and created a new Hero. With the current code, either one-handed or two-handed, the damage for the sword was 1d8 + CHA x 1.5. (There's now a little toggle to the left of the hands to switch.) Went back in to the mod code and flipped it to: if (evt.Weapon.HoldInTwoHands || (evt.SlotToInsert != null && evt.SlotToInsert.HandsEquipmentSet.GripType == Kingmaker.Items.GripType.TwoHanded)) { and reloaded. With the sword set to two-handed, damage was again 1d8 + CHA x 1.5. Flipping to a one-handed grip, damage was back down to 1d8 + CHA. Hovering over another sword in the inventory gave matching results depending on one- or two-handed setting.

That is, looking at the griptype of the slot affected whether the damage bonus was one-handed or two-handed.

That...doesn't quite give correct results, though. Composite bows don't get a bonus at all (dunno if they should or not by the feat), one-handed-only items (dagger) get the bonus in the comparison popup (incorrectly; but correctly have one-handed damage when equipped), two-handed-only items get incorrect comparison information when comparing against a one-handed HandsEquipmentSet, and double weapons just aren't right at all. Still poking at this to see what the correct construction might be.

darinclark commented 3 months ago

This seems to work better. It doesn't cover bows or whatever's going on with double weapons (assuming I'm not just spawning them in broken), but seems to get correct results with one-handed, two-handed, and either-one-or-two-handed weapons. It feels like something that ought to be already working from the GracefulCombat.cs code, mind. if (evt.Weapon.HoldInTwoHands || (evt.SlotToInsert != null && evt.Weapon.CanTakeTwoHands() && (evt.SlotToInsert.HandsEquipmentSet.GripType == Kingmaker.Items.GripType.TwoHanded || !evt.Weapon.CanTakeOneHand()))) {

evandixon commented 3 months ago

Your fix does indeed fix a longsword held in two hands. I've updated the PR and uploaded a new build.

The hooked hammer is a bit odd. For now the damage is calculated as a two-handed weapon, but there's a pre-existing bug that I'd like to wait for a fix before trying to figure this out: https://old.reddit.com/r/Pathfinder_Kingmaker/comments/1dfly26/gnome_hooked_hammer_not_dual_wield_any_more/

It doesn't do anything for composite bows. By default they use dex to hit and strength to damage. The mod correctly fixes the attack roll, but not damage which is implemented on the weapon type as an enchantment: StrengthComposite, blueprint id c3209eb058d471548928a200d70765e0. TBH changing that should be a separate mythic ability.

casma164 commented 3 months ago

Has anyone ever had issues when getting their 1st mythic level at the end of the gray garrison? After picking the initial ability and mythic feat, it will not allow me to finish. If I back arrow, it actually levels up to 2nd rank. Unsure if this mod is causing the issue though.

Caiomls commented 3 months ago

I don't know if anyone else has the issue, but completing the gray garrison and saving at the camp with Irabeth lead to all my characters saves being unloadable, they return to menu after reaching 49%.

decourcy2 commented 3 months ago

I tried my hand at updating the mod for 2.3. My testing was limited to "get the game to run and load a save that used the latest release version of this mod".

Here's a link to a custom build of it: https://github.com/user-attachments/files/15847904/IsekaiMod.zip [Updated 2024-06-15]

I'd appreciate it if anyone could leave comments on the PR if you find any issues related to the upgrade. Please pay special attention to the summon count increase and the archetype that uses CHA for weapon damage, especially for two-handed weapons.

Now to go actually play the game and see for myself what happens with the latest DLC

BTW, thanks to AlistairKion for providing the stack trace in the issue! Idk if I would have even opened the project without seeing what I was getting myself into first.

Thanks for the fix, my bug is end of Grey Garrison giving first mythic ability to party. One side char took the +4 spells of lvls 1-3 ability and I gained no spells.

Mythalar commented 2 months ago

@evandixon

Hey, thanks for the update ! Perhaps time to have a somewhat proper fork just for update/bugfix without new features so no touching JohN100x1 work if he cannot/would not maintain the mod?