60 Commits

Author SHA1 Message Date
gfgtdf
4a7d008be5 add world_conquest tags to schema 2020-08-19 22:22:13 +02:00
gfgtdf
a5260d6e61 fix schema 2020-08-19 22:22:13 +02:00
gfgtdf
6fb3573978 fix modify_unit_type macros 2020-07-03 14:28:13 +02:00
Pentarctagon
8f9ab9d13f Fix schema validation for color attribute in [print] 2020-06-28 19:02:51 -05:00
Lukas Jox
6dd916283c add modify_unit tags added in 1.15.3 to schema validation 2020-05-20 14:16:58 +02:00
Pentarctagon
9a0b95f9a0 Separate unit test results from scenario victory/defeat.
This adds an additional `test_result` attribute to [endlevel], intended for use with the automated unit tests. This allows for the unit tests to differentiate a pass/fail result separately from scenario victory or defeat, which allows for more accurately determining the outcome of a test as well as addresses the potential, for example, for a scenario to be expect to pass because of the {SUCCEED} macro but instead passes because the scenario ended as a victory through some other method.

Additional unit tests which were the original motivation for this change are also added as part of this.  They test, as much as possible, that events are executed at all, and are then also executed in the expected order.
2020-04-07 16:45:34 -05:00
gfgtdf
0de2070461 schema updae for [modify_unit_type] 2020-03-12 19:15:17 +01:00
Celtic Minstrel
3303be6c91 Restore the dir+count test for move_unit and add the syntax to the schema 2019-12-14 11:28:37 -05:00
Steve Cotton
17940cb98f Replace the [tutorial] tag with [scenario]
The title screen's "tutorial" button will use the tag name from game_classification,
as would anything else that calls game_launcher::set_tutorial().
2019-11-04 17:09:10 +11:00
Celtic Minstrel
f8c7455928
Fix schema rejecting top-level color range/palette tags (#4487) 2019-10-18 22:18:17 -04:00
Severin Glöckner
b593e82cd2 schema: Use same definition as in actionwml 2019-10-02 05:59:58 +02:00
Severin Glöckner
664871bd14 add map_file to schema 2019-10-02 03:50:08 +02:00
Steve Cotton
06dd9a140c Add [find_path] option "nearest_by", and simple_find_path test
Adding this is issue 2 of #4177, changing the behavior when [find_path]
is given a SLF which matches multiple hexes.

The map and tests here should be easy enough for manually editing them. It
duplicates some of the functionality of the existing characterize_pathfinding
tests, however those tests need their expected values to be calculated and
can't be changed by hand.

'''nearest_by''': {DevFeature1.15|2} possible values "movement_cost"
(default), "steps", "hexes". If the [destination] SLF matches multiple hexes,
the one that would need the least movement points to reach may not be the one
that's closest as measured by '''hexes''', or closest as measured by steps,
from the starting point.

Behavior in 1.14 depended on which hex was checked first.
2019-09-11 11:17:56 +02:00
Wedge009
ff772b1be8 Add game_created sound key
See #4260 for details.

[ci skip]
2019-08-27 13:41:01 +10:00
sigurdfdragon
6e2fbc7b1a Schema: Fix travis error by allowing additional keys in two situations
1. Allow carryover_percentage & carryover_add with
victory_when_enemies_defeated=no. Code from newfrenchy83

2. Allow use of current_time in [time_area].
2019-07-02 23:19:38 -04:00
gfgtdf
daf054752a support item_name= in [store_items]
we use it in SotA16 to make the scenario more robust against
[modification]s that might add [item]s for decoration.
2019-03-20 20:27:33 +01:00
Celtic Minstrel
bfc997c91e Add various new features to the schema
Addresses #3730

This is everything I could find by perusing the commit log.
I may have missed something, however.
2019-03-03 11:56:34 -05:00
mattsc
f07897cba9 Schema validation: support Micro AI named location keys 2018-12-03 18:19:44 -08:00
Celtic Minstrel
ea9fddcd23 Support [disallow_end_turn]reason= and use it in the tutorial 2018-11-24 17:46:29 -05:00
pentarctagon
7034c8f97b Run WML schema validation in travis. Fixes #3709
This adds running the WML schema validation in travis.  It also updates the schema itself and fixes a few WML errors so that core and all campaigns under all difficulties pass the schema validation.
2018-11-24 10:35:22 -06:00
Celtic Minstrel
e7903874ec Add new schema keys for the game config 2018-11-18 00:45:44 -05:00
Celtic Minstrel
52c4dc0e3d Add a validator subclass specialized for validating WML schemas against the WML schema schema 2018-11-03 17:09:25 -04:00
Celtic Minstrel
4674e97eb6 Schema: Add a macro for links (and make use of it) 2018-10-23 22:49:53 -04:00
Celtic Minstrel
e47ace53a9 Schema: Fix a couple more missing details 2018-10-23 22:49:43 -04:00
Celtic Minstrel
68bb024efe Schema: Accept variable substitution in [do_command] 2018-10-23 22:49:42 -04:00
Celtic Minstrel
bf814914e1 Schema: Fix some bugs in the [micro_ai] definition 2018-10-23 22:49:38 -04:00
Celtic Minstrel
a50a3f399b Schema: Accept [set_menu_item]use_hotkey=only 2018-10-23 22:49:35 -04:00
Celtic Minstrel
bc2054ec10 Schema: Fix some tags being allowed only once instead of unlimited times 2018-10-23 22:49:27 -04:00
Celtic Minstrel
66ae7f3b13 Schema: Accept variable substitution in [set_variable] root= and round= 2018-10-23 22:49:26 -04:00
Celtic Minstrel
ebc6285683 Schema: Allow variable substitution in [label] 2018-10-23 22:49:25 -04:00
Celtic Minstrel
2a5e8c7b41 Schema: side=global is valid in [*_global_variable] 2018-10-23 22:49:23 -04:00
Celtic Minstrel
604a3ec941 Schema: It turns out that [endlevel]bonus= is actually a real number! 2018-10-23 22:49:20 -04:00
Celtic Minstrel
9fc1dde19c Schema: Apparently config_name IS valid in [generator] 2018-10-23 22:48:18 -04:00
Celtic Minstrel
ed137c1f85 Schema: Allow variable substitution for fake unit genders 2018-10-23 22:47:09 -04:00
Celtic Minstrel
d86ac67b60 Schema: Missed an allowed key in [label] 2018-10-23 22:45:54 -04:00
Celtic Minstrel
c7d9b6641e Schema: [micro_ai] AI-specific keys are only relevant if action is not delete 2018-10-23 22:45:51 -04:00
Celtic Minstrel
96c705c795 Schema: Make [event]name= optional 2018-10-23 22:45:50 -04:00
Celtic Minstrel
a8f767e887 Schema: Fix a few incorrect types 2018-10-23 22:45:01 -04:00
Celtic Minstrel
70ea5c9aae Schema: Another incorrect key type 2018-10-23 22:43:38 -04:00
Celtic Minstrel
eb041ca034 Schema: Add some undocumented child tags of ScenarioWML 2018-10-23 22:43:36 -04:00
Celtic Minstrel
e83371b40c Schema: Allow scenarios with no sides (is this expected?) 2018-10-23 22:41:56 -04:00
Celtic Minstrel
defea0679f Schema: Definition of the [generator] tag 2018-10-23 22:41:51 -04:00
Celtic Minstrel
6845b48697 Schema: Fix a few more instances of keys not accepting variable substitution 2018-10-23 22:41:39 -04:00
Celtic Minstrel
2473bbd237 Schema: Fix incorrect type 2018-10-23 22:40:09 -04:00
Celtic Minstrel
b9240e6f5d Schema: Remove the condition on [endlevel] 2018-10-23 22:40:07 -04:00
Celtic Minstrel
a71ce59a4e Schema: Accept x,y=recall,recall in [unstore_unit] 2018-10-23 22:39:56 -04:00
Celtic Minstrel
cfe4d120ee Schema: Some missing [unit] keys and promote some [multiplayer] keys to [scenario] 2018-10-23 22:39:45 -04:00
Celtic Minstrel
902a104268 Schema: Fix several more cases of keys failing to accept variable substitutions 2018-10-23 22:39:37 -04:00
Celtic Minstrel
e01567c434 Schema: Promote [object]duration= key to non-ActionWML objects
It's used by the object auto-expiry mechanism, so it's meaningful
even outside of ActionWML.
2018-10-23 22:39:36 -04:00
Celtic Minstrel
12e78df9f4 Schema: Support for turns=unlimited 2018-10-23 22:39:33 -04:00