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

Unable to add/modify LewdCrestX data on KKS #11

Open
CoffeeBreak34 opened this issue Sep 27, 2023 · 2 comments
Open

Unable to add/modify LewdCrestX data on KKS #11

CoffeeBreak34 opened this issue Sep 27, 2023 · 2 comments

Comments

@CoffeeBreak34
Copy link

Hello!

I believe I've found a bug related to the mod, LewdCrestX in KKS.

When attempting to add LewdCrestX data to a card, or modify existing LewdCrestX data on a card, changes do not show up in the in-game character creator.

from kkloader import KoikatuCharaData

my_card = KoikatuCharaData.load(my_card_dir)
my_card['KKEx']['LewdCrestX'] = [1, {'CurrentCrest': 29}]
my_card.save(my_card_dir)

I am confident that I am inserting the correct data, [1, {'CurrentCrest': 29}], because if you take a card with LewdCrestX data, that is what the following line outputs:

other_card['KKEx']['LewdCrestX']

I've tried this on multiple cards and multiple crests, and all display this behavior.

Are you familiar with this at all? Thanks!

@great-majority
Copy link
Owner

Thank you for reporting the issue!

I tried LewdCrestX(1.4.0) in the same way as you did and confirmed that a same bug occurs.
The values are actually being changed correctly, but for some reason it seems the mod is unable to read them.
I've attached the relevant part of the output_log.txt below.

[Error  :LewdCrestX] System.InvalidCastException: Specified cast is not valid.
  at KK_LewdCrestX.Extensions.ReadFromData[T] (System.Object settingContainer, ExtensibleSaveFormat.PluginData data, System.String propName, T defaultValue) [0x00035] in <8ae120a8d7b745c6be5605acd5184441>:0 
[Error  :Modding API] System.InvalidCastException: Specified cast is not valid.
  at AdvIKPlugin.Algos.IKResizeAdjustment.LoadConfig (ExtensibleSaveFormat.PluginData data) [0x00014] in <943e93b56d6942cd914c2df249019717>:0 
  at AdvIKPlugin.AdvIKCharaController.OnReload (KKAPI.GameMode currentGameMode, System.Boolean maintainState) [0x00257] in <943e93b56d6942cd914c2df249019717>:0 
  at KKAPI.Chara.CharaCustomFunctionController.OnReloadInternal (KKAPI.GameMode currentGameMode) [0x00038] in <553e7659af42417fb789ce11975b2c52>:0 

This is likely due to some issue when casting values with messagepack, causing them to become unreadable values.
I'd like to investigate this further, so I'd appreciate some more time.

Thank you.

@CoffeeBreak34
Copy link
Author

Hey @great-majority, any luck with fixing this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants