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

Vicky 3 dates parsed wrong #15

Closed
Groogy opened this issue Nov 23, 2022 · 3 comments · Fixed by #16
Closed

Vicky 3 dates parsed wrong #15

Groogy opened this issue Nov 23, 2022 · 3 comments · Fixed by #16

Comments

@Groogy
Copy link

Groogy commented Nov 23, 2022

When trying to parse a vicky 3 save it will fail to parse the dates. It turns the date string into an int causing the save to be loaded wrong. For an example melt a vicky 3 file and check admirals/generals cooldown_repair_date value.

@nickbabcock
Copy link
Contributor

Ah, the heuristic if a date is present fails on 1.1.1 (which is encoded as 43808760), as the heuristic says "hey, we're playing vic3, anything that decodes to a pre-1700 date must not be a date".

Thanks for the report, I'll push out a fix in a couple hours.

@nickbabcock
Copy link
Contributor

I cut v0.4.6, which should have this fix in there (needs a few more mins to show up in github releases).

Let me know how it goes 😄

I don't think it's perfect yet, as there are some game state models that have a slightly different fixed / floating point encoding than others (like the _strength fields), but I haven't quite nailed down the pattern (it may literally just be anything that ends in _strength uses this alternative encoding). So in your travels if you come across, additional inconsistencies, let me know the pattern and I can adapt it.

EU4 spoiled me with consistent 32bit and 64bit fixed / floating point encoding

@Groogy
Copy link
Author

Groogy commented Nov 24, 2022

Awesome thank you, will let you know when I do the next edit round for our mp game.

To go by what is fixed/floating point, you can use as a rule of thumb that if it is something that needs to be synced over the network it will be fixed point (i.e anything that affects gameplay), if it is cached values for the interface etc it will be a floating point

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

Successfully merging a pull request may close this issue.

2 participants