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

Schema validation #40

Open
ProditorMagnus opened this issue Jul 13, 2023 · 5 comments
Open

Schema validation #40

ProditorMagnus opened this issue Jul 13, 2023 · 5 comments

Comments

@ProditorMagnus
Copy link
Owner

ProditorMagnus commented Jul 13, 2023

https://github.com/wesnoth/wesnoth/blob/master/data/schema/units/types.cfg
Some need to be fixed, should rerun with master.
wesnoth --validate-addon Ageless_Era

error validation: Extra tag [filter]; there may only be 1 [filter] in [event]
error validation: Extra tag [filter_second]; there may only be 1 [filter_second] in [event]
error validation: Extra tag [specials]; there may only be 1 [specials] in [attack]
error validation: Invalid key 'active_on=' in tag [*]
error validation: Invalid key 'acuracy=' in tag [attack]
error validation: Invalid key 'affect=' in tag [damage]
error validation: Invalid key 'affect_self=' in tag [chance_to_hit]
error validation: Invalid key 'affect_self=' in tag [damage]
error validation: Invalid key 'apply_to=' in tag [*]
error validation: Invalid key 'attack_sound_frame=' in tag [attack_anim]
error validation: Invalid key 'attack_sound_start_time=' in tag [frame]
error validation: Invalid key 'attack_sound_time=' in tag [attack_anim]
error validation: Invalid key 'bduration=' in tag [*_frame]
error validation: Invalid key 'circle_time=' in tag [resistance_anim]
error validation: Invalid key 'color=' in tag [heals]
error validation: Invalid key 'cycles=' in tag [standing_anim]
error validation: Invalid key 'direction=' in tag [filter_attack]
error validation: Invalid key 'female_name=' in tag [*]
error validation: Invalid key 'female_name=' in tag [damage]
error validation: Invalid key 'female_name_inactive=' in tag [chance_to_hit]
error validation: Invalid key 'find_vacant=' in tag [unit]
error validation: Invalid key 'full_heal=' in tag [effect]
error validation: Invalid key 'halo=' in tag [remove_item]
error validation: Invalid key 'hit=' in tag [else]
error validation: Invalid key 'id=' in tag [set_specials]
error validation: Invalid key 'id=' in tag [variation]
error validation: Invalid key 'ignore_global_traits=' in tag [unit_type]
error validation: Invalid key 'ignore_passability=' in tag [teleport]
error validation: Invalid key 'immediate=' in tag [get_global_variable]
error validation: Invalid key 'is_enemy=' in tag [affect_adjacent]
error validation: Invalid key 'is_enemy=' in tag [filter]
error validation: Invalid key 'mage_diagonal=' in tag [*_frame]
error validation: Invalid key 'mode=' in tag [store_locations]
error validation: Invalid key 'movement_type=' in tag [filter]
error validation: Invalid key 'name=' in tag [advancement]
error validation: Invalid key 'path=' in tag [textdomain]
error validation: Invalid key 'range=' in tag [defend]
error validation: Invalid key 'side=' in tag [store_unit]
error validation: Invalid key 'sounds=' in tag [frame]
error validation: Invalid key 'start=' in tag [*_frame]
error validation: Invalid key 'start=' in tag [attack_anim]
error validation: Invalid key 'start_anim=' in tag [leading_anim]
error validation: Invalid key 'start_frame=' in tag [defend]
error validation: Invalid key 'start_missile_frame=' in tag [attack_anim]
error validation: Invalid key 'team_name=' in tag [attack]
error validation: Invalid key 'terrain=' in tag [attack_anim]
error validation: Invalid key 'terrain=' in tag [death]
error validation: Invalid key 'terrain=' in tag [defend]
error validation: Invalid key 'terrain=' in tag [movement_anim]
error validation: Invalid key 'time=' in tag [effect]
error validation: Invalid key 'upkeep=' in tag [unit_type]
error validation: Invalid key 'value=' in tag [*]
error validation: Invalid key 'variation_name=' in tag [unit_type]
error validation: Invalid value ' ' in key 'description=' in tag [race]
error validation: Invalid value '$drone.attack[0].damage' in key 'damage=' in tag [effect]
error validation: Invalid value '$drone.attack[0].number' in key 'number=' in tag [effect]
error validation: Invalid value '$second_unit.alignment' in key 'alignment=' in tag [harm_unit]
error validation: Invalid value '$second_unit.facing' in key 'adjacent=' in tag [filter_adjacent_location]
error validation: Invalid value '$unit.alignment' in key 'alignment=' in tag [harm_unit]
error validation: Invalid value '' in key 'deep_water=' in tag [movement_costs]
error validation: Invalid value '' in key 'usage=' in tag [unit_type]
error validation: Invalid value '-$knockback_direction' in key 'adjacent=' in tag [filter_adjacent_location]
error validation: Invalid value '-$pierce_direction' in key 'adjacent=' in tag [filter_adjacent_location]
error validation: Invalid value '-$unit.facing' in key 'adjacent=' in tag [filter_adjacent_location]
error validation: Invalid value 'Better Guards' in key 'description=' in tag [advancement]
error validation: Invalid value 'Darker Magic' in key 'description=' in tag [advancement]
error validation: Invalid value 'Fighter' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'Frost' in key 'name=' in tag [attack]
error validation: Invalid value 'Hide in the Forest' in key 'description=' in tag [advancement]
error validation: Invalid value 'Hunting Spear' in key 'name=' in tag [attack]
error validation: Invalid value 'Inspire others' in key 'description=' in tag [advancement]
error validation: Invalid value 'Kusari' in key 'name=' in tag [attack]
error validation: Invalid value 'Laela the Snow Dragon' in key 'name=' in tag [filter]
error validation: Invalid value 'Laela' in key 'name=' in tag [filter]
error validation: Invalid value 'Laela' in key 'name=' in tag [or]
error validation: Invalid value 'Life draining sword' in key 'description=' in tag [advancement]
error validation: Invalid value 'Ravana the Night Dragon' in key 'name=' in tag [filter]
error validation: Invalid value 'Ravana' in key 'name=' in tag [filter]
error validation: Invalid value 'Ravens steal life' in key 'description=' in tag [advancement]
error validation: Invalid value 'Staff' in key 'name=' in tag [attack]
error validation: Invalid value 'Stronger Spells' in key 'description=' in tag [advancement]
error validation: Invalid value 'Stronger bow' in key 'description=' in tag [advancement]
error validation: Invalid value 'Summon Burning Lich (29 Gold)' in key 'description=' in tag [set_menu_item]
error validation: Invalid value 'Summon burning Lich' in key 'name=' in tag [*]
error validation: Invalid value 'Sword' in key 'name=' in tag [attack]
error validation: Invalid value 'Teleport between villages' in key 'description=' in tag [advancement]
error validation: Invalid value 'Trapped!' in key 'alert=' in tag [hides]
error validation: Invalid value '_ram' in key 'description=' in tag [attack]
error validation: Invalid value 'a stronger mage' in key 'description=' in tag [advancement]
error validation: Invalid value 'alternate' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'aspect of the hunter' in key 'name=' in tag [*]
error validation: Invalid value 'aura of darkness' in key 'name=' in tag [illuminates]
error validation: Invalid value 'better bow' in key 'description=' in tag [advancement]
error validation: Invalid value 'better swordsman' in key 'description=' in tag [advancement]
error validation: Invalid value 'bug 3827 workaround' in key 'name=' in tag [unit_type]
error validation: Invalid value 'ceiling' in key 'round=' in tag [set_variable]
error validation: Invalid value 'darkarcher' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'defender' in key 'animate=' in tag [harm_unit]
error validation: Invalid value 'dragonstaff' in key 'description=' in tag [attack]
error validation: Invalid value 'fish' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'halo' in key 'name=' in tag [leadership]
error validation: Invalid value 'harder bite' in key 'description=' in tag [advancement]
error validation: Invalid value 'heavier club' in key 'description=' in tag [advancement]
error validation: Invalid value 'hire a shipmechanic' in key 'description=' in tag [advancement]
error validation: Invalid value 'hit more often' in key 'description=' in tag [advancement]
error validation: Invalid value 'hit,miss,!,kill' in key 'hits=' in tag [attack_anim]
error validation: Invalid value 'hooded' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'hotter oil' in key 'description=' in tag [advancement]
error validation: Invalid value 'hungrier' in key 'description=' in tag [advancement]
error validation: Invalid value 'is_guard' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'larger crew' in key 'description=' in tag [advancement]
error validation: Invalid value 'lead ammunition' in key 'description=' in tag [advancement]
error validation: Invalid value 'light aura' in key 'name=' in tag [illuminates]
error validation: Invalid value 'mage' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'magical fireballs' in key 'description=' in tag [advancement]
error validation: Invalid value 'marksman' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'mixed Fighter' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'mixed warrior' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'mixed-fighter' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'mixed_fighter' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'more ballistas' in key 'description=' in tag [advancement]
error validation: Invalid value 'more bolas' in key 'description=' in tag [advancement]
error validation: Invalid value 'more darts' in key 'description=' in tag [advancement]
error validation: Invalid value 'more knives' in key 'description=' in tag [advancement]
error validation: Invalid value 'more powerful voice' in key 'description=' in tag [advancement]
error validation: Invalid value 'more umph' in key 'description=' in tag [advancement]
error validation: Invalid value 'mount/dismount' in key 'name=' in tag [*]
error validation: Invalid value 'pathfinder' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'range' in key 'name=' in tag [*]
error validation: Invalid value 'red' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'regenerates +10' in key 'name=' in tag [regenerate]
error validation: Invalid value 'regenerates +12' in key 'name=' in tag [regenerate]
error validation: Invalid value 'regenerates +2' in key 'name=' in tag [regenerate]
error validation: Invalid value 'regenerates +4' in key 'name=' in tag [regenerate]
error validation: Invalid value 'regenerates +5' in key 'name=' in tag [regenerate]
error validation: Invalid value 'regenerates +6' in key 'name=' in tag [regenerate]
error validation: Invalid value 'regenerates +8' in key 'name=' in tag [regenerate]
error validation: Invalid value 'regenerates +9' in key 'name=' in tag [regenerate]
error validation: Invalid value 'self repair' in key 'name=' in tag [*]
error validation: Invalid value 'sell the trophies' in key 'description=' in tag [advancement]
error validation: Invalid value 'shadow aura' in key 'name=' in tag [illuminates]
error validation: Invalid value 'sharper bones' in key 'description=' in tag [advancement]
error validation: Invalid value 'sharper claws' in key 'description=' in tag [advancement]
error validation: Invalid value 'shifter_bear' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'shifter_beaver' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'shifter_goat' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'shifter_human' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'shifter_warthog' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'shifter_wolf' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'ship' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'special' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'stealthier' in key 'description=' in tag [advancement]
error validation: Invalid value 'strike faster' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger Ballista' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger ballista' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger bow' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger catapult' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger crew' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger magic' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger ram' in key 'description=' in tag [advancement]
error validation: Invalid value 'stronger tail' in key 'description=' in tag [advancement]
error validation: Invalid value 'surface' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'tank' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'unhooded' in key 'variation_name=' in tag [variation]
error validation: Invalid value 'unpoison self' in key 'description=' in tag [advancement]
error validation: Invalid value 'upgraded blades' in key 'description=' in tag [advancement]
error validation: Invalid value 'warrior' in key 'usage=' in tag [unit_type]
error validation: Invalid value 'wild rabbit' in key 'description=' in tag [advancement]
error validation: Invalid value 'zombie-serpent' in key 'usage=' in tag [unit_type]
error validation: Missing key 'apply_to=' in tag [animation]
error validation: Tag [and] may not be used in [affect_adjacent]
error validation: Tag [chance_to_hit] may not be used in [attack]
error validation: Tag [else] may not be used in [frame]
error validation: Tag [event] may not be used in [effect]
error validation: Tag [filter] may not be used in [remove_object]
error validation: Tag [filter_attack] may not be used in [attack]
error validation: Tag [filter_location] may not be used in [idle_anim]
error validation: Tag [filter_location] may not be used in [regenerate]
error validation: Tag [filter_weapon] may not be used in [chance_to_hit]
error validation: Tag [frame] may not be used in [defense]
error validation: Tag [frame] may not be used in [frame]
error validation: Tag [if] may not be used in [frame]
error validation: Tag [levelin_anim] may not be used in [unit_type]
error validation: Tag [levelin_anim] may not be used in [variation]
error validation: Tag [levelout_anim] may not be used in [unit_type]
error validation: Tag [levelout_anim] may not be used in [variation]
error validation: Tag [missile_frame] may not be used in [defense]
error validation: Tag [movement] may not be used in [unit_type]
error validation: Tag [movetype] may not be used in [unit_type]
error validation: Tag [not] may not be used in [affect_adjacent]
error validation: Tag [not] may not be used in [movement_anim]
error validation: Tag [not] may not be used in [standing_anim]
error validation: Tag [portrait] may not be used in [female]
error validation: Tag [portrait] may not be used in [unit_type]
error validation: Tag [resistance] may not be used in [race]
error validation: Tag [rune_frame] may not be used in [defense]
error validation: Tag [second_unit] may not be used in [kill]
error validation: Tag [sound] may not be used in [attack_anim]
error validation: Tag [special] may not be used in [attack]
error validation: Tag [special_note] may not be used in [race]
error validation: Tag [specials] may not be used in [unit_type]
error validation: Tag [teleport_anim] may not be used in [unit_type]
ProditorMagnus added a commit that referenced this issue Jul 13, 2023
@ProditorMagnus
Copy link
Owner Author

ProditorMagnus commented Jul 13, 2023

RE - all reported in forum, considering solved

I tried schema validation. These cases seemed more important and should be tested if they work.

20230713 19:24:11 error validation: Extra tag [filter]; there may only be 1 [filter] in [event]
at ~add-ons/Ageless_Era/data/RE_data/condition_blur.cfg:57
20230713 19:24:11 error validation: Extra tag [filter_second]; there may only be 1 [filter_second] in [event]
at ~add-ons/Ageless_Era/data/RE_data/condition_blur.cfg:21

20230713 19:24:11 error validation: Invalid key 'movement_type=' in tag [filter]
at ~add-ons/Ageless_Era/data/RE_data/abilities-leadership.cfg:60
20230713 19:25:15 error validation: Invalid key 'side=' in tag [store_unit]
at ~add-ons/Ageless_Era/data/RE_data/abilities_mount.cfg:20
20230713 19:24:10 error validation: Invalid key 'time=' in tag [effect]
at ~add-ons/Ageless_Era/data/RE_data/traits.cfg:334
20230713 19:25:15 error validation: Tag [chance_to_hit] may not be used in [attack]
at ~add-ons/Ageless_Era/data/RE_data/specials-accuracy.cfg:23
included from ~add-ons/Ageless_Era/_main.cfg:67
included from ~add-ons/Ageless_Era/data/_main.cfg:21
included from ~add-ons/Ageless_Era/_main.cfg:91
included from ~add-ons/Ageless_Era/units/RE_units/human-luz/Angel_archer.cfg:39

20230713 19:25:15 error validation: Tag [event] may not be used in [effect]
Event based abilities cant go to effect. I believe it is not ageless-specific bug. Stacktrace is misleading so did not include it, but look amla.cfg

20230713 19:25:16 error validation: Tag [filter] may not be used in [remove_object]
at ~add-ons/Ageless_Era/data/RE_data/condition_drugged.cfg:43

@ProditorMagnus
Copy link
Owner Author

ProditorMagnus commented Jul 13, 2023

Core bugs as of 1.16 schema

Invalid key 'upkeep=' in tag [unit_type]
Invalid key 'path=' in tag [textdomain]

20230713 19:23:49 error validation: Invalid value '$drone.attack[0].damage' in key 'damage=' in tag [effect]
(expected value of type int) at ~add-ons/Ageless_Era/data/EoMa_data/drone-upgrades.cfg:70
20230713 19:23:49 error validation: Invalid value '$second_unit.facing' in key 'adjacent=' in tag [filter_adjacent_location]
(expected value of type dir_list) at ~add-ons/Ageless_Era/data/EoMa_data/beam.cfg:101
20230713 19:23:49 error validation: Invalid value '$second_unit.alignment' in key 'alignment=' in tag [harm_unit]
(expected value of type alignment) at ~add-ons/Ageless_Era/data/EoMa_data/cleave.cfg:80
20230713 19:25:14 error validation: Invalid value '-$knockback_direction' in key 'adjacent=' in tag [filter_adjacent_location]
(expected value of type dir_list) at ~add-ons/Ageless_Era/data/SH_data/weapon_specials/knockback.cfg:133

Invalid key 'active_on=' in tag [*] [dummy] weapon special
Invalid key 'apply_to=' in tag [*] probably should review all the common keys and tags allowed in all abilities or specials

error validation: Invalid key 'min=' in tag [set_variable]
Invalid key 'mode=' in tag [store_locations]

@ProditorMagnus
Copy link
Owner Author

Test if works, then decide whether to change or edit schema

error validation: Extra tag [filter]; there may only be 1 [filter] in [event]
example in steelhive knockback

@ProditorMagnus
Copy link
Owner Author

ProditorMagnus commented Jul 13, 2023

EoMa - events handled by creating unit that has them during prestart
solved

20230713 19:23:17 error validation: Tag [event] may not be used in [effect]
at ~add-ons/Ageless_Era/data/EoMa_data/abilities.cfg:1337
included from ~add-ons/Ageless_Era/_main.cfg:67
included from ~add-ons/Ageless_Era/data/_main.cfg:11
included from ~add-ons/Ageless_Era/_main.cfg:91
included from ~add-ons/Ageless_Era/units/EoMa_units/Dark_Blood_Alliance/Desert_Salamander.cfg:52
20230713 19:23:49 error validation: Tag [event] may not be used in [effect]
at ~add-ons/Ageless_Era/data/EoMa_data/abilities.cfg:44
included from ~add-ons/Ageless_Era/_main.cfg:67
included from ~add-ons/Ageless_Era/data/_main.cfg:11
included from ~add-ons/Ageless_Era/_main.cfg:91
included from ~add-ons/Ageless_Era/units/EoMa_units/Runemasters/Drone.cfg:53
20230713 19:23:50 error validation: Tag [event] may not be used in [effect]
at ~add-ons/Ageless_Era/data/EoMa_data/pain_absorption.cfg:218
included from ~add-ons/Ageless_Era/_main.cfg:67
included from ~add-ons/Ageless_Era/data/_main.cfg:11
included from ~add-ons/Ageless_Era/_main.cfg:91
included from ~add-ons/Ageless_Era/units/EoMa_units/Tharis/Chainlady.cfg:24
20230713 19:25:10 error validation: Tag [filter_weapon] may not be used in [chance_to_hit]
at ~add-ons/Ageless_Era/data/EoMa_data/chronoaura.cfg:27
20230713 19:23:50 error validation: Tag [movetype] may not be used in [unit_type]
at ~add-ons/Ageless_Era/units/EoMa_units/Tharis/Great_Warlock.cfg:78

@ProditorMagnus
Copy link
Owner Author

I'm pretty sure it's true that there can be only one filter of each type in an event. If you add an extra it will be ignored, I believe.

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

1 participant