-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
World Conquest doesn't properly pass WML schema validation #6059
Comments
The [generator] also contains the line nplayers={PLAYERS} twice |
The double attribute is wrong but would not be the cause of a schema validation failure – the first instance of the attribute will be overwritten by the second before validation runs, I believe. I think basically what is required is a schema entry for the WC map generator? |
Here you said something different though: |
The two things are not related. WML doesn't support having two attributes with the same name. If it happens anyway, one of them will be ignored at parse time. (I guess ideally that would be an error but I don't think it is.) The linked commit notes that the order of attributes can make a difference to the schema validator. If attribute A is only valid when attribute B is present, then it will fail to validate if attribute A appears before attribute B but pass if attribute B appears before attribute A. (I guess this should be considered a bug in the schema validator, but I'm not really sure how to fix it.) Making WC validate just means we need to add an if or switch to the schema definition of |
And this issue is about only the schema validator, or am i missing something ? |
I think this issue would be about the schema, rather than the schema validator? |
Currently the EDITOR scenario created for WC is hidden from WML schema checks behind and #ifndef:
wesnoth/data/campaigns/World_Conquest/scenarios/WC_II_scenario.cfg
Lines 242 to 244 in 545e5ff
however the WML schema should be properly updated so that this isn't needed. The issue is that when running the EDITOR validation, it errors saying that
nplayers
isn't a valid attribute to be present. I assume most likely this is caused by the editor using [multiplayer] rather than [scenario]. This editor specific WC scenario was added in 8daad7d.The text was updated successfully, but these errors were encountered: