Commit graph

43 commits

Author SHA1 Message Date
mattsc
450e3d1a48 Experimental AI: do not use village hunt CA
The algorithm used in this CA is too simple to work reliably in a general setting, it tends to send whole groups of units toward small numbers of villages, or even individual ones. In its current version, it should not be used at all, not even in the Experimental AI. The recommended way to emphasize village hunting is to set the village_value aspect to a larger-than-default value and let the move-to-targets CA take care of it.

An updated version of this CA's code is, however, left in place for potential future work as an external CA in Wesnoth 1.15.
2020-01-01 19:22:11 -08:00
mattsc
b0a79e6e9f Experimental AI: add ids for candidate actions
Also change the names of two CAs to match the function names (and the ids).
2019-12-17 06:33:40 -08:00
Severin Glöckner
cfd7a0038d Core Macro Reference: Fix hint
[ci skip]
2018-09-10 00:36:12 +02:00
mattsc
d781e6263a High XP attacks: adapt other AIs to existence of new CA
This means:
1. Adding the new CA to AI configs
2. Removing it whenever the combat CA is removed
3. Preventing conflicts for AIs that previously used overlapping scores
2016-09-03 20:00:12 -07:00
mattsc
f161a3cc1c Fix AI_FORMULA_AI_EXPERIMENTAL_RECRUITMENT macro
This also deletes the AI_SIMPLE_FORMULA_AI_EXPERIMENTAL_RECRUITMENT
macro. There is no point in keeping both of them.
2016-03-26 15:34:39 -07:00
mattsc
ae8df114f6 Fix indenting 2016-03-24 05:27:45 -07:00
Celtic Minstrel
1d7c1c74f6 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
2016-03-22 07:22:22 -07:00
Celtic Minstrel
9c2027a8d8 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].
2016-03-22 07:22:22 -07:00
mattsc
1f93899652 New macros AI_SAVE_GOLD and AI_SAVE_GOLD_DEFAULT
… to make enabling gold saving for the AI simpler in a scenario now
that it is not the default any more.
2014-01-25 20:29:15 -08:00
Groggy Dice
6e47a1818d ai.cfg: fix "#ifdef MEDIUM" to NORMAL in attack_depth
Though this may be in vain, as I read on the wiki that attack_depth is not
working with the RCA ai and is deprecated. While this bug might break
attack_depth on one difficulty level, it shouldn't have broken it entirely,
so this is probably not the reason it doesn't seem to be working.
2014-01-03 11:09:00 -05:00
mattsc
d5e27a2e3f Correct the example given for MODIFY_AI_ADD_ASPECT
The [facet] tag is needed, but was not shown.
2013-12-27 10:20:24 -08:00
mattsc
12c73569ca AI macros: update comments for display on wiki reference page
This is for the auto-generated page at
http://www.wesnoth.org/macro-reference.html
2013-12-26 20:00:45 -08:00
mattsc
c214c12611 ExpAI: add retreating and village hunting CAs 2013-11-01 09:36:26 -07:00
mattsc
d9aa43ef44 ExpAI: fix the name= value of Place Healers CA
It doesn't really matter for anything in practice, but should be done
right.
2013-11-01 09:35:43 -07:00
mattsc
76e22a3d6a Experimental AI: add a simple move to enemy CA
Set up to run if nothing else is available.
In a separate file for use as a stand-alone CA in an AI
2013-10-31 21:19:44 -07:00
mattsc
0ef41090c0 Move AI_CONTROLLER_ALLOW_LEADER_CONTROL macro
... from data/core/macros/ai.cfg to data/core/macros/ai_controller.cfg
2013-10-04 08:08:29 -07:00
flix
545c9b2057 Hang in new recruitment CA.
- Alter macro {AI_CA_RECRUITMENT} to point to the new CA
- Create a new AI cfg file for a stronger AI
- Create a new AI cfg (dev) file for choosing the old recruitment CA in debug mode.
- Alter macro {AI_NO_RECRUITMENT}
2013-09-25 15:32:20 +02:00
mattsc
7e0a05ed6e Experimental AI: consistently use underscores in AI ids and file names
This is the last step of making everything use consistent syntax.
2013-07-10 20:37:30 -07:00
mattsc
d11edb6ec7 Make Experimental AI available in MP and SP
This is done through a new macro EXPERIMENTAL_AI.  Previously, it was
only available as a multiplayer AI.
2013-06-14 20:35:31 -07:00
Ignacio R. Morelle
fbd8f6ae59 Ran wmlindent 2012-01-11 21:49:32 +00:00
Iurii Chernyi
1f667d3bf8 Fix bug #18122:
AI leaders set to defensive will now follow human-set leader goals
anyway, even to the death.
2011-08-11 21:36:17 +00:00
Steven Panek
4a7ec6b8c3 Made it so that AI_CONTROLLER_ALLOW_LEADER_CONTROL's menu item...
...only appears if the leader it's supposed to control is alive.
2011-07-26 20:19:32 +00:00
Eric S. Raymond
e7d337a676 Reindent mainline. 2010-09-23 13:04:56 +00:00
Iurii Chernyi
5fc4765bb5 fix bug #15390:
...add a try_delete action to modify_ai which has 'delete if exists,
don't complain if not exists' semantics
2010-03-09 19:39:15 +00:00
Eric S. Raymond
c62c55e1a2 More macro argument typechecking. No mismatches in mainline. 2010-02-12 00:25:20 +00:00
Eric S. Raymond
75f2727548 More nacro argument type checking. No mismatches in mainline. 2010-02-11 22:45:04 +00:00
Iurii Chernyi
6117d5b021 fixed a segfault in fai_candidate_action serialization code,
...removed some old stubs, used better and simpler AI syntax in LoW::1,
LoW::2, LoW::3 , split candidate action WML snippets to their own file
2009-12-25 01:25:34 +00:00
Eric S. Raymond
0aa99781cf Reindent mainline. 2009-11-23 14:39:03 +00:00
Iurii Chernyi
22c6537c93 rework of ai macros comments,
...added a macro to limit attack_depth depending on difficulty level
2009-11-12 11:02:15 +00:00
Iurii Chernyi
ac44576f15 additional changes to AI macros 2009-11-11 21:16:55 +00:00
Iurii Chernyi
be779c5d73 LoW: fix bug # 14404:
...made special right-click leader control actions disappear on
victory
2009-09-30 20:57:50 +00:00
Iurii Chernyi
9563cfd035 modified AI_CONTROLLER_ALLOW_LEADER_CONTROL macro...
...to show a better menu item description and to allow I18N of menu
item description
2009-09-24 00:06:28 +00:00
Iurii Chernyi
62e66e9110 a useful AI macro: a menu item to ask allied leaders to move to target hex 2009-09-23 00:29:41 +00:00
Iurii Chernyi
eb77fed2dc added empty stage, used experimental fai recruitment for LoW::2,
...disabled extra debug output in formula ai recruitment, disabled
recruitment of Ulfserkers and Berserkers in LoW::2
2009-09-22 23:45:23 +00:00
Nils Kneuper
64abf3e200 add a default textdomain declaration...
...(using "./utils/change-textdomain -t data/")
2009-09-20 13:53:46 +00:00
Iurii Chernyi
7d2d62cb33 added macros to use new formula_ai recruitment (experimental!).
The simplest way is to include
{AI_SIMPLE_FORMULA_AI_EXPERIMENTAL_RECRUITMENT} in [side][ai]
2009-09-05 22:10:09 +00:00
Iurii Chernyi
afcb29c338 reworked AI macros, added support for moving leader to goal...
...as a candidate action, fixed some bugs, changed modify_ai syntax to
make it more resilient to bugs and to allow reuse of subtags
2009-09-03 23:23:37 +00:00
Iurii Chernyi
90dcb12256 fixed usage of an outdated AI macro 2009-09-01 10:08:05 +00:00
Iurii Chernyi
63ec22c53d LoW::2: slightly changed ai macros.
LoW::3: added orc strategy selection
2009-09-01 07:15:11 +00:00
Iurii Chernyi
6ad043b95a uncommented a macro 2009-08-30 18:06:27 +00:00
Iurii Chernyi
6732361e55 LoW::2: WIP, added second wave of attackers...
...and made orcs withhold gold until fog lifts
2009-08-27 23:12:53 +00:00
Iurii Chernyi
befcfb5440 {AI_NO_SCOUTS} macro 2009-08-24 00:24:52 +00:00
Iurii Chernyi
7672a9d7ff ai macros and aliases 2009-08-23 22:04:06 +00:00