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

Date Validation and ?= does not work for Victoria 3 #86

Closed
kaiser-chris opened this issue Aug 22, 2024 · 11 comments
Closed

Date Validation and ?= does not work for Victoria 3 #86

kaiser-chris opened this issue Aug 22, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@kaiser-chris
Copy link

kaiser-chris commented Aug 22, 2024

Hi,

it seems like the dates of Victoria 3 can not be validated by the plugin.
Also the ?= operator can not be used, this seems to be the same for CK3 #52.
?= and = can and are used interchangably in Victoria 3 files.

CWT for the date issue:

alias[effect:create_character] = {
    ...
    birth_date = date_field
    ...
}

Unmodified base game file with both issues:
bad - baden.txt

?= Error:
image

After changing ?= to = the date error is still there:
image

Regards,

Chris

@DragonKnightOfBreeze
Copy link
Owner

What is ?= meaning?

@kaiser-chris
Copy link
Author

?= is the same as = as far as I can tell.
I can use either and the game will successfully parse the file.

@DragonKnightOfBreeze
Copy link
Owner

wtf

@kaiser-chris
Copy link
Author

Yep!
Official files sometimes use = and sometimes ?= in the same file for the same commands.
It is really strange.

@DragonKnightOfBreeze
Copy link
Owner

could ?= be used in other situations?

@DragonKnightOfBreeze DragonKnightOfBreeze added the bug Something isn't working label Aug 22, 2024
@kaiser-chris
Copy link
Author

I have searched the whole game files and found 5780 uses of ?=.

It seems like newer changes/content uses it more frequently.
Maybe Paradox switched it mid development or for later patches.

Below are some examples:
image
image
image
image

@DragonKnightOfBreeze
Copy link
Owner

Strange

@kaiser-chris
Copy link
Author

kaiser-chris commented Aug 22, 2024

Also tested it with the VSCode Plugin of @tboby for a sanity check and it works but has strange highlighting:
image
vs
image

Edit: Added second image

@DragonKnightOfBreeze
Copy link
Owner

What are the valid date formats of date fields?

@kaiser-chris
Copy link
Author

kaiser-chris commented Aug 23, 2024

I did some broad searches in the Victoria 3 game files and the only format I have found is this:
birth_date = 1887.10.23
game_date < 1845.1.1
earliest_usage_date = 1841.1.1

Format: <year>.<month>.<day>

If you want I could test other formats that work on other games like CK2/3 or VIC2 but VIC3 just uses the format above.

I also looked into the CWT documentation and found this in it:
https://github.com/cwtools/cwtools/wiki/.cwt-config-file-guidance#simple-rules
image

EDIT: Added link to the CWT documentation.

@DragonKnightOfBreeze
Copy link
Owner

OK according to all of these, the date format to validate in JVM should be yyyy.M.d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants