[Commits] [wesnoth/wesnoth] 040066: Generalize simplified aspect syntax

GitHub noreply at github.com
Tue Mar 22 14:22:32 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 04006615330ea303f5087ee4fbefdd266d9f4303
      https://github.com/wesnoth/wesnoth/commit/04006615330ea303f5087ee4fbefdd266d9f4303
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp
    M src/ai/configuration.hpp

  Log Message:
  -----------
  Generalize simplified aspect syntax

- Recruitment can now be specified as a simple attribute
- Attacks can now be specified with an [attacks] tag
- Allows unknown aspects to be added using simplified syntax
- [leader_goal] now sets facet ID directly
- Aspects added using simplified syntax use [ai]engine= as their engine, if present
  (Maybe this will allow adding Lua aspects with simplified syntax?)
- All of the above is only if version=11302 for all [ai] tags


  Commit: 9c2027a8d8b2d3fd2dbf0ba9d5a6ca42ade929cc
      https://github.com/wesnoth/wesnoth/commit/9c2027a8d8b2d3fd2dbf0ba9d5a6ca42ade929cc
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/ai/ais/ai_default_rca.cfg
    M data/ai/ais/ai_default_rca_strong.cfg
    M data/ai/dev/ai_old_recruitment.cfg
    M data/ai/dev/ai_sf_with_rca.cfg
    M data/ai/dev/akihara_recruitment.cfg
    M data/ai/dev/formula_ai.cfg
    M data/ai/dev/formula_ai_poisoning.cfg
    M data/ai/dev/idle_ai.cfg
    M data/ai/dev/testing_recruiting.cfg
    M data/ai/micro_ais/scenarios/lurkers.cfg
    M data/ai/micro_ais/scenarios/patrols.cfg
    M data/ai/micro_ais/scenarios/protect_unit.cfg
    M data/ai/scenarios/scenario-lua-ai.cfg
    M data/ai/scenarios/scenario-no_engine.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter4/16_The_Chief_Must_Die.cfg
    M data/core/macros/ai.cfg
    M data/scenario-formula.cfg
    M data/schema.cfg
    M src/ai/configuration.cpp
    M src/ai/configuration.hpp
    M src/ai/manager.cpp
    M src/ai/manager.hpp

  Log Message:
  -----------
  Remove version key from AI configs

This has a lot of cascade effects and may remove support for some old syntaxes, such as [protect_unit].


  Commit: e3679ff5475aa09f1dbc2c2e063eb9899cc00d5b
      https://github.com/wesnoth/wesnoth/commit/e3679ff5475aa09f1dbc2c2e063eb9899cc00d5b
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Remove list of known aspects.

This is no longer needed, since the new generalized simplified aspects syntax assumes any unknown tag or key is intended to be an aspect.


  Commit: fbb770ef3f076783c6e4e57a986ad56b6af68626
      https://github.com/wesnoth/wesnoth/commit/fbb770ef3f076783c6e4e57a986ad56b6af68626
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Suppress an erroneous error message


  Commit: a9a22c9721439ee90be4079f85adceed3a242e49
      https://github.com/wesnoth/wesnoth/commit/a9a22c9721439ee90be4079f85adceed3a242e49
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Allow old goal syntax and [modify_ai] in AI definitions


  Commit: e2ea9cd69978e79d0c68385e59e112fd6f6b4230
      https://github.com/wesnoth/wesnoth/commit/e2ea9cd69978e79d0c68385e59e112fd6f6b4230
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/lua/core.cpp

  Log Message:
  -----------
  Lua AI: Add string version of status to AI action result table


  Commit: b0b02d61c6594fdd710f2f8e3a9a4c400a6d84b9
      https://github.com/wesnoth/wesnoth/commit/b0b02d61c6594fdd710f2f8e3a9a4c400a6d84b9
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  In [leader_goal], never set facet ID to * or a number


  Commit: 28937124f3f8cafd79085968c15afc1e01922149
      https://github.com/wesnoth/wesnoth/commit/28937124f3f8cafd79085968c15afc1e01922149
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/core/macros/ai_controller.cfg
    M src/ai/registry.cpp

  Log Message:
  -----------
  Remove [goal]name=protect and add [goal]name=target_unit

- name=protect was a synonym for protect_location, which I consider confusing when name=target refers to a unit
- name=target_unit is of course a synonym for target, added for greater consistency of syntax


  Commit: ad075afd51d3a32468c1feabe2c3a63e9ca0358f
      https://github.com/wesnoth/wesnoth/commit/ad075afd51d3a32468c1feabe2c3a63e9ca0358f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Don't interpret description or id attributes as simple aspects.


  Commit: a5d131cc1f3c3db4aa219d05aa49906624b54239
      https://github.com/wesnoth/wesnoth/commit/a5d131cc1f3c3db4aa219d05aa49906624b54239
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/lua/core.cpp

  Log Message:
  -----------
  Fix potential crash when using an [engine]name=lua


  Commit: 852a25593ee65d29c47fa8ab610069cc98e83c03
      https://github.com/wesnoth/wesnoth/commit/852a25593ee65d29c47fa8ab610069cc98e83c03
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/gui/dialogs/gamestate_inspector.cpp

  Log Message:
  -----------
  Split gamestate inspector AI config up by component type


  Commit: 08b11139a107bea6f651c22d8944dae0085e5773
      https://github.com/wesnoth/wesnoth/commit/08b11139a107bea6f651c22d8944dae0085e5773
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/engine_default.cpp
    M src/ai/composite/engine_lua.cpp
    M src/ai/composite/goal.cpp
    M src/ai/composite/goal.hpp

  Log Message:
  -----------
  Log useful error messages (and don't crash) when creating a goal with the wrong engine


  Commit: f57343d6f116c42107245c7ac001f7323bf251f2
      https://github.com/wesnoth/wesnoth/commit/f57343d6f116c42107245c7ac001f7323bf251f2
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Minor simplification of AI config parsing


  Commit: b04cca2b3058195fd4dedf8b208a8c427b1abf6e
      https://github.com/wesnoth/wesnoth/commit/b04cca2b3058195fd4dedf8b208a8c427b1abf6e
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Special handling for [recruitment] tag in AI config


  Commit: 4f710ea805f84581bef3be7d350885e7625bc53e
      https://github.com/wesnoth/wesnoth/commit/4f710ea805f84581bef3be7d350885e7625bc53e
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/goal.cpp
    M src/ai/default/contexts.cpp
    M src/ai/default/contexts.hpp
    M src/ai/lua/core.cpp
    M src/ai/lua/lua_object.hpp
    M src/ai/testing/ca_testing_move_to_targets.cpp

  Log Message:
  -----------
  Allow Lua goals to set target types as descriptive strings instead of opaque integer values


  Commit: bcbba6dde3fe6ea2188e749bc6b67c74e461e321
      https://github.com/wesnoth/wesnoth/commit/bcbba6dde3fe6ea2188e749bc6b67c74e461e321
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/ai/dev/idle_ai.cfg
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Change ID of Idle AI


  Commit: f545fbcbe866dc8689916b81c20a82b4d7753139
      https://github.com/wesnoth/wesnoth/commit/f545fbcbe866dc8689916b81c20a82b4d7753139
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/goal.cpp
    M src/ai/composite/goal.hpp
    M src/ai/registry.cpp

  Log Message:
  -----------
  Remove deprecated [goal]name=protect_my_unit


  Commit: 56a99175dad6ff0c17a94d7b0054602a4ede05fd
      https://github.com/wesnoth/wesnoth/commit/56a99175dad6ff0c17a94d7b0054602a4ede05fd
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/game_initialization/connect_engine.cpp

  Log Message:
  -----------
  Fix main_loop stage being duplicated in MP


  Commit: f8f5557eb0b984445f399760d41089e18c6aad37
      https://github.com/wesnoth/wesnoth/commit/f8f5557eb0b984445f399760d41089e18c6aad37
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/ai/lua/dummy_engine_lua.lua
    M src/ai/composite/aspect.cpp
    M src/ai/composite/aspect.hpp
    M src/ai/composite/engine_lua.cpp
    M src/ai/composite/goal.cpp
    M src/ai/lua/core.cpp
    M src/ai/lua/core.hpp
    M src/ai/lua/lua_object.hpp

  Log Message:
  -----------
  Huge refactor of Lua AI engine

This commit potentially breaks any Lua AI customization, except for external Lua candidate actions.
In practice, though, Lua aspects and goals will probably continue to work for the most part.

- The ai table now has a read_only attribute.
  If true, functions that change the game state will be missing from the table.
  The read_only attribute is false in CA execution and in stages.
  It is true everywhere else.
- Every Lua AI component now supports a [args] subtag.
  The contents of this tag are passed as parameters to the component code.
  This data is immutable; components cannot alter its contents.
  (External Lua candidate actions do not receive this data.)
- Accessing the persistent engine data is now supported in all Lua components.

When calling a Lua component, the Lua engine now passes two parameters:
1. The contents of the [args] tag in the specific component.
2. The contents of the [data] tag in the Lua [engine].

The return value of the [engine] code, if any, is stored for later used.
It will be passed as the third parameter to any other Lua component.
This data can be changed, but will not be saved.
The default engine does not return any such data.


  Commit: 6972d5170fbad35425e3672842b0e7ea4a5ac09a
      https://github.com/wesnoth/wesnoth/commit/6972d5170fbad35425e3672842b0e7ea4a5ac09a
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/lua/core.cpp

  Log Message:
  -----------
  Add ai.aspects table which provides access to all aspects

The advantage of this over the get_* functions is that it will automatically
update whenever new aspects are added.

It doesn't support the deprecated recruitement aspect.


  Commit: ca8cb3bd6a45d4fd2da9de79d484d9ad16f6951d
      https://github.com/wesnoth/wesnoth/commit/ca8cb3bd6a45d4fd2da9de79d484d9ad16f6951d
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/ai/utils/default_config.cfg
    M src/ai/composite/stage.cpp
    M src/ai/composite/stage.hpp
    M src/ai/composite/value_translator.hpp
    M src/ai/contexts.cpp
    M src/ai/contexts.hpp
    M src/ai/default/ai.cpp
    M src/ai/default/ai.hpp
    M src/ai/formula/ai.cpp
    M src/ai/game_info.hpp
    M src/ai/registry.cpp
    M src/ai/testing/ca.cpp
    M src/ai/testing/ca.hpp

  Log Message:
  -----------
  Remove the deprecated recruitment stage, candidate action, and aspect


  Commit: 7c9e24aa2968a1b59e05bd87998114ac2956678f
      https://github.com/wesnoth/wesnoth/commit/7c9e24aa2968a1b59e05bd87998114ac2956678f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/ai/micro_ais/scenarios/The_Elves_Besieged.cfg
    M data/ai/utils/default_config.cfg
    M data/campaigns/An_Orcish_Incursion/scenarios/02_Assassins.cfg
    M data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg
    M data/campaigns/Delfadors_Memoirs/scenarios/13_The_Return_of_Trouble.cfg
    M data/campaigns/Descent_Into_Darkness/scenarios/10_Alone_at_Last.cfg
    M data/campaigns/Eastern_Invasion/scenarios/04c_Mal-Ravanals_Capital.cfg
    M data/campaigns/Eastern_Invasion/scenarios/11_Captured.cfg
    M data/campaigns/Eastern_Invasion/scenarios/12_Evacuation.cfg
    M data/campaigns/Heir_To_The_Throne/scenarios/01_The_Elves_Besieged.cfg
    M data/campaigns/Heir_To_The_Throne/scenarios/09_The_Valley_of_Death.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter1/01_The_Uprooting.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter2/04_The_Elvish_Treasury.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter2/05_The_Saurian_Treasury.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter2/06_Acquaintance_in_Need.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter2/07_Elves_Last_Stand.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter3/10_Cliffs_of_Thoria.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter4/14_Human_Alliance.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter4/16_The_Chief_Must_Die.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter4/17_Breaking_the_Siege.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter5/19_Costly_Revenge.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter5/21_Elvish_Assassins.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter5/22_Northern_Battle.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter5/23_End_of_War.cfg
    M data/campaigns/Northern_Rebirth/scenarios/07a_Settling_Disputes.cfg
    M data/campaigns/Northern_Rebirth/scenarios/08b_Ray_of_Hope.cfg
    M data/campaigns/Northern_Rebirth/scenarios/10a_Stolen_Gold.cfg
    M data/campaigns/Northern_Rebirth/scenarios/11a_The_Eastern_Flank.cfg
    M data/campaigns/Northern_Rebirth/scenarios/13a_Showdown.cfg
    M data/campaigns/Sceptre_of_Fire/scenarios/5_Hills_of_the_Shorbear_Clan.cfg
    M data/campaigns/Sceptre_of_Fire/scenarios/8_The_Dragon.cfg
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/03_Strange_Allies.cfg
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/04_Troll_Bridge.cfg
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/05_Invaders.cfg
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/08_Fear.cfg
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/09_Forbidden_Forest.cfg
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/10_The_Siege_of_Kal_Kartha.cfg
    M data/campaigns/The_Hammer_of_Thursagan/scenarios/12_The_Underlevels.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/02_The_Fall.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/03_A_Harrowing_Escape.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/04a_The_Swamp_of_Esten.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/04b_The_Midlands.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/05_The_Oldwood.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/08_Clearwater_Port.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/09_Fallen_Lich_Point.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/10_Sewer_of_Southbay.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/12_A_Final_Spring.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/13_Peoples_in_Decline.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/14_Rough_Landing.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/17a_The_Dragon.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/17b_Lizard_Beach.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/17c_Troll_Hole.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/17d_Cursed_Isle.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/19_The_Vanguard.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/20_Return_of_the_Fleet.cfg
    M data/campaigns/The_Rise_Of_Wesnoth/scenarios/22_The_Rise_of_Wesnoth.cfg
    M data/campaigns/The_South_Guard/scenarios/07a_Into_the_Depths.cfg
    M data/campaigns/Two_Brothers/scenarios/01_Rooting_Out_a_Mage.cfg
    M data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg
    M data/campaigns/Under_the_Burning_Suns/scenarios/03_Stirring_in_the_Night.cfg
    M data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg
    M data/campaigns/Under_the_Burning_Suns/scenarios/06b_In_the_Domain_of_Dwarves.cfg
    M src/ai/contexts.cpp
    M src/ai/contexts.hpp
    M src/ai/formula/ai.cpp
    M src/ai/lua/core.cpp
    M src/ai/manager.cpp
    M src/ai/registry.cpp

  Log Message:
  -----------
  Remove several deprecated recruitment-related aspects
- number_of_possible_recruits_to_force_recruit
- recruitment_ignore_bad_combat
- recruitment_ignore_bad_movement


  Commit: d0e3bc6a7086186a501718ecf8c659e35010ac30
      https://github.com/wesnoth/wesnoth/commit/d0e3bc6a7086186a501718ecf8c659e35010ac30
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/ai.cpp
    M src/ai/composite/ai.hpp
    M src/ai/default/ai.cpp
    M src/ai/default/ai.hpp
    M src/ai/interface.hpp
    M src/ai/testing/stage_fallback.cpp

  Log Message:
  -----------
  Change syntax of fallback stage
I've done this avoid giving the illusion that it merely loads another composite AI definition by its ID.
It can, of course, still be used to do so, if that's really what you want, but normally it should not be needed.


  Commit: e2cbe507815caae89ae19abfa3f60262975aa995
      https://github.com/wesnoth/wesnoth/commit/e2cbe507815caae89ae19abfa3f60262975aa995
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/engine_lua.cpp

  Log Message:
  -----------
  Allow external Lua CAs to use [params] instead of {exec,eval}_parms


  Commit: 1d7c1c74f64b3830099e69fe2e714abf28794234
      https://github.com/wesnoth/wesnoth/commit/1d7c1c74f64b3830099e69fe2e714abf28794234
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/ai/lua/dummy_engine_lua.lua
    M data/core/macros/ai.cfg
    M src/ai/composite/engine_lua.cpp
    M src/ai/lua/core.cpp

  Log Message:
  -----------
  Improve backwards compatibility for Lua AI

This changes the following:
- Fixes the experimental AI, without changing any of its code except for that in the [engine] tag
- Returns a dummy self from the dummy Lua engine, so that external CAs are more easily switched to using [params]
- Changes the order in which parameters are passed to AI component code. The order is now:
  state/self,    params,    data


  Commit: c49fc8a72b506972b18b3affc117f749d08b6de6
      https://github.com/wesnoth/wesnoth/commit/c49fc8a72b506972b18b3affc117f749d08b6de6
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/engine_lua.cpp
    M src/ai/lua/core.cpp
    M src/ai/lua/core.hpp

  Log Message:
  -----------
  Fix wesnoth.debug_ai()
(Also change some internal variable names)


  Commit: 597ab40a2c463266d62a11a4baafecf4b054ba25
      https://github.com/wesnoth/wesnoth/commit/597ab40a2c463266d62a11a4baafecf4b054ba25
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/lua/core.cpp

  Log Message:
  -----------
  Fix  Lua AI component return values being lost


  Commit: b4720562fa498d072d899c72cd1b23a32915a464
      https://github.com/wesnoth/wesnoth/commit/b4720562fa498d072d899c72cd1b23a32915a464
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/ai.cpp
    M src/ai/composite/ai.hpp
    M src/ai/composite/aspect.cpp
    M src/ai/composite/aspect.hpp
    M src/ai/composite/property_handler.hpp
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Generalize/fix some aspect stuff

- Facets no longer have to be standard aspects - they can be lua aspects or even a nested composite aspect
- Ensure aspect tags from simplified aspect contain name=composite_aspect (normally not a problem, but could be in some unusual cases)
- Merge default aspect tags instead of simply taking the first one
- Fix crash that occurred if a composite aspect somehow lacked a default (an unusual case, but not impossible)
- Fix Lua aspects
- Fix simple Lua aspects (with value= instead of code=) quoting numeric values
- Ensure Lua aspects always have name=lua_aspect and standard aspects always have name=standard_aspect
- A few additional [modify_ai] cases:
    - aspect[id].facet[*] matches the default facet; this facet can be changed but not deleted, and if it's composite, subfacets can be referenced
    - action=change works on aspects (with path=aspect[id]); requires the new aspect to have matching id= key
    - aspect[id].facet[id].facet[id] etc works in the case of more deeply nested aspects (or even aspect[id].facet[*].facet[id])


  Commit: c86b4ee5a93732177bee9e37ab82f6d30d26bf7f
      https://github.com/wesnoth/wesnoth/commit/c86b4ee5a93732177bee9e37ab82f6d30d26bf7f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/aspect.cpp
    M src/ai/manager.cpp
    M src/ai/manager.hpp
    M src/tod_manager.cpp
    M src/tod_manager.hpp

  Log Message:
  -----------
  Implement invalidate_on_tod_change for aspects


  Commit: 155d7007c9fee106ec217283354513e7f02283cd
      https://github.com/wesnoth/wesnoth/commit/155d7007c9fee106ec217283354513e7f02283cd
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/lua/core.cpp

  Log Message:
  -----------
  Produce error message when attempting to write to ai.aspects


  Commit: 5954e3f2f4b8d5813cf3ecc10bc52559b652550f
      https://github.com/wesnoth/wesnoth/commit/5954e3f2f4b8d5813cf3ecc10bc52559b652550f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/property_handler.hpp

  Log Message:
  -----------
  [modify_ai]action=change now automatically inserts an id= key if not present
Also when changing an aspect, name= is inserted if not present.


  Commit: 3939d2a4f29c5cec92fb76ab8ab016bc1096f7ff
      https://github.com/wesnoth/wesnoth/commit/3939d2a4f29c5cec92fb76ab8ab016bc1096f7ff
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/aspect.hpp

  Log Message:
  -----------
  Check for code= before value= in Lua aspects


  Commit: aa791cec196ddf2acbddd155f64c4b5aecdc9e9d
      https://github.com/wesnoth/wesnoth/commit/aa791cec196ddf2acbddd155f64c4b5aecdc9e9d
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/lua/core.cpp
    M src/ai/lua/core.hpp

  Log Message:
  -----------
  Fix nested calls to AI action handlers clobbering the ai table
(For example, if a Lua candidate action queries a Lua aspect.)


  Commit: ef880c80c6380bb19d13c14bfedfd8ed85168791
      https://github.com/wesnoth/wesnoth/commit/ef880c80c6380bb19d13c14bfedfd8ed85168791
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/recruitment/recruitment.cpp
    M src/ai/recruitment/recruitment.hpp
    M src/ai/registry.cpp

  Log Message:
  -----------
  Allow adding and removing recruitment jobs (and limits) with [modify_ai]
Also some minor syntax simplifications:
- If no [recruit] tag is provided, a default is added (as if with importance=0 and no other attributes)
- [pattern] and [total] tags expand to [recruit] with the attribute of the same name set to yes


  Commit: cde7041b5f660910c2b2d9bed5a36c66fab3ccf1
      https://github.com/wesnoth/wesnoth/commit/cde7041b5f660910c2b2d9bed5a36c66fab3ccf1
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/aspect.hpp
    M src/ai/composite/property_handler.hpp

  Log Message:
  -----------
  Make all default components always have id "default_facet".
This is mainly so that they are easily identified in the AI components overview in the gamestate inspector,
but it can also be used with [modify_ai]. (It replaces the previous use of * for this.)


  Commit: e97026b407f4e72045646f804b1885bfa17007db
      https://github.com/wesnoth/wesnoth/commit/e97026b407f4e72045646f804b1885bfa17007db
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp
    M src/ai/registry.cpp

  Log Message:
  -----------
  Double-register the recruitment_instructions aspect under the name recruitment.
This is now possible because the [value] tag in recruitment_instructions has become optional.
Thus, any valid old recruitment aspect is also a valid new recruitment_instructions aspect.


  Commit: d00cc800768d872d12e5bec5db2b194ad80e0d66
      https://github.com/wesnoth/wesnoth/commit/d00cc800768d872d12e5bec5db2b194ad80e0d66
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/composite/aspect.cpp
    M src/ai/composite/aspect.hpp
    M src/ai/composite/engine.cpp
    M src/ai/composite/engine.hpp
    M src/ai/composite/goal.cpp
    M src/ai/composite/goal.hpp
    M src/ai/composite/rca.cpp
    M src/ai/composite/rca.hpp
    M src/ai/composite/stage.cpp
    M src/ai/composite/stage.hpp
    M src/ai/interface.cpp
    M src/ai/interface.hpp

  Log Message:
  -----------
  Safeguard against accidentally registering an AI component twice


  Commit: cb0fad078acdf79591ca073b214a60d64cf068db
      https://github.com/wesnoth/wesnoth/commit/cb0fad078acdf79591ca073b214a60d64cf068db
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    A data/test/scenarios/ai/_main.cfg
    A data/test/scenarios/ai/config/simple_aspect.cfg
    A data/test/scenarios/ai/modify/aspects.cfg
    M wml_test_schedule

  Log Message:
  -----------
  WML unit tests for simple aspects


  Commit: 895a326a70b0abee09fcb92f4977070348ac5d3a
      https://github.com/wesnoth/wesnoth/commit/895a326a70b0abee09fcb92f4977070348ac5d3a
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/configuration.cpp

  Log Message:
  -----------
  Fix merging of default facets with composite values
Now the last [value] tag wins.


  Commit: b789391bfbfa0091e4f45a41e46ce8e7696543fc
      https://github.com/wesnoth/wesnoth/commit/b789391bfbfa0091e4f45a41e46ce8e7696543fc
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M src/ai/lua/lua_object.hpp

  Log Message:
  -----------
  Fix crash if a Lua avoid aspect returns an invalid value


  Commit: 2ed5e7815f8f45981c923a18c5644120b9c17007
      https://github.com/wesnoth/wesnoth/commit/2ed5e7815f8f45981c923a18c5644120b9c17007
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-03-22 (Tue, 22 Mar 2016)

  Changed paths:
    M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
    M data/ai/micro_ais/cas/ca_hang_out.lua

  Log Message:
  -----------
  MicroAIs: Fix those that honour the avoid aspect improperly
This affects the Hang Out and Fast MAIs.


Compare: https://github.com/wesnoth/wesnoth/compare/8d948765f90f...2ed5e7815f8f


More information about the Commits mailing list