kirilloid / valheim

wiki/utilities for valheim
10 stars 2 forks source link

Character editor don't work #4

Closed Trapaceiro closed 7 months ago

Trapaceiro commented 7 months ago

When saving and replacing the FCH file, the character returns without any modifications, just reset.

Game version: 0.217.38 (n-20) Reference: http://valheim.kirilloid.ru/player-edit

kirilloid commented 7 months ago

Please, contact me on Discord, so I can look at the bug and identify the problem.

Trapaceiro commented 7 months ago

I sent a friend request. Sorry for delay.

Taking advantage, I will send the character FCH file that was generated by my game client at the link below. https://file.io/PdipSiUopLzK

kirilloid commented 7 months ago

Hello. Sorry, I received no invitation on Discord. My name with tag here is kirilloid#8246.

What I tried in terms of bug search.

I have found several minor bugs, but none of them were like "character editor completely doesn't work". Specifically I have found (and fixed, but haven't updated code on my site yet):

confusing problems

There were 2 bugs, which might look like the problem you described, but actually are "overcomeable".

testing real-life scenario

I tried your file on my site and was able to change hair color and styles. Please, try again your scenario and write down what you're doing (e.g.: load file, switch to skills tab, change skill level, save). If the editor won't work, please reply with posting those steps here.

Trapaceiro commented 7 months ago

Hello, these are the steps I followed....

1 - I created a character in my game client with this appearance: Captura de tela 2024-04-03 015111

2 - Then I moved the file to local storage, selected it from the website already in player edit (http://valheim.kirilloid.ru/player-edit). And I made the following changes: Captura de tela 2024-04-03 020400

3 - Without modifying any other option, I clicked to save and download the file.

But by replacing the original file which I modified on the website. My character doesn't have the expected changes... See the screenshot when loading through the game client: Captura de tela 2024-04-03 015405

Note: If I upload the modified file to the website again, it tells me it is modified exactly as I made it. But in the game client, it isn't.

File used to modify: https://file.io/u8QKlXpH6QYG File returned by the website: https://file.io/jEQIlKLCOM9I

kirilloid commented 7 months ago

Oh, it looses its hair styles completely. Seems like saving is working wrong.

Trapaceiro commented 7 months ago

Oh, it looses its hair styles completely. Seems like saving is working wrong.

Yes, in other tests, I also changed just the skin tone and it didn't work.

kirilloid commented 7 months ago

Hello, I have fixed the bug and deployed new version.

The problem was with what I have found previously:

character creation date is saved incorrectly

resulting in the error while reading the file by the game: Player.log

03/18/2024 23:10:51: Exception while loading player profile:test , System.ArgumentOutOfRangeException: Valid values are between -62135596800 and 253402300799, inclusive. Parameter name: seconds

Also the tool now can identify and one-click fix previously incorrectly saved files image

The fix itself: https://github.com/kirilloid/valheim/commit/1d191e41287432f9b1ee04fbfa5c6bab0912ad59#diff-fc23856ed5214320cdae702b3eb399db91b45f288eb995f13f72cb825574ba76R206 Stupid mistake, but JavaScript uses milliseconds as the base for date-time measurements, unlike seconds in .net

Please, try the new version and consider closing the issue if it's fixed.

Trapaceiro commented 7 months ago

Hello, it seems to work perfectly now. Thank you very much for all the tools made available directly on the web.