From eebedd9adbc9c124cb9cfea5cb7cbcad8155a7df Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Wed, 23 Mar 2016 00:16:39 -0400 Subject: [PATCH] Update RELEASE_NOTES and changelog --- RELEASE_NOTES | 16 ++++++++++++++++ changelog | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 386978082ce7..f934edbdf3de 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -42,6 +42,22 @@ The Wesnoth formula language used by $(...) substitution, the formula= key in st The "fai" and "faiend" keywords are deprecated in favour of "wfl" and "wflend" respectively. This is part of a move to more clearly distinguish [wiki]Wesnoth Formula Language[/wiki], the language itself, from [wiki]FormulaAI[/wiki], which is just one use of the language in Wesnoth. [/rasection] +[rasection="Changes to AI"] +The format for configuring AI parameters has been simplified for easier configuring - see the changelog or wiki for full details. It has also been extended in several ways, for example allowing Lua facets. The [modify_ai] tag has been extended to allow editing the internal jobs of the recruitment_instructions aspect. +[/rasection] + +[rawarn="AI compatibility breaks"] +Several old, deprecated AI components were removed - the aspects number_of_possible_recruits_to_force_recruit, recruitment_ignore_bad_combat, recruitment_ignore_bad_movement, recruitment, the recruitment stage, the old (and by default no longer used) recruitment candidate action, and the protect_my_unit goal. The mentioned aspects no longer did anything anyway, and the recruitment aspect is automatically translated to a recruitment_instructions aspect - which means that it now does something where previously it was ignored. + + +The changes to how Lua candidate actions work are likely to break some AIs. Fortunately, the fixes will be simple in most cases. +[list=1] +[*]If you used old-style Lua candidate actions (with execute and evaluate keys) together with an explicit [engine]name=lua tag, they will no longer work as written. In many cases, the fix will be simple - the code within [engine] frequently begins with a line similar to [c]local ai = ...[/c]. Simply removing this line will be sufficient to fix most such cases. +[*]If you used old-style Lua candidate actions without an explicit engine tag, you may need to remove a line similar to [c]local ai = ...[/c] from some of your code. In general, anything of the form [c]ai = [/c] needs to be changed. +[*]If you used new-style (external) Lua candidate actions (with a location key), they will still work for the time being (provided that they use exec_parms and/or eval_parms), but they should be updated nevertheless. The exec_parms and eval_parms keys should be combined into an [args] tag, and the argument list of your execution and evaluation functions should be changed from [c](ai, cfg, self)[/c] to [c](data, cfg)[/c]. The data parameter is the same as self.data was before; however, provided you do not have an explicit [engine] tag, self.data will continue to work. +[/list] +[/rawarn] + ========== KNOWN BUGS ========== diff --git a/changelog b/changelog index b948e1947e97..f68f6879ef0c 100644 --- a/changelog +++ b/changelog @@ -58,7 +58,7 @@ Version 1.13.4+dev: illumination abilities) changes at any location on the map. Thus, it occurs on average less often than invalidate_on_turn_start and may be best combined with an explicit invalidate_on_turn_start=no. - * A minor shorthand has been introduced in the recruitment_instructions + * Minor shorthands have been introduced in the recruitment_instructions aspect: * [pattern] tag is like [recruit] with pattern=yes * [total] tag is like [recruit] with total=yes @@ -120,6 +120,8 @@ Version 1.13.4+dev: engine, including several that previously did not have corresponding ai.get_*() functions. You access them as ai.aspects.avoid, for example. The table is read-only and raises an error if you attempt to write to it. + * The way to create Lua candidate actions has changed a little. Old code + will require minor changes. * Wesnoth formula engine: * Formulas in unit filters can now access nearly all unit attributes * New syntax features: