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}
This commit is contained in:
flix 2013-09-25 15:04:42 +02:00
parent d03195686c
commit 545c9b2057
5 changed files with 76 additions and 4 deletions

View file

@ -20,6 +20,10 @@ Version 1.11.6+dev:
* Messenger MAI now works with units (both messenger and escort) without
weapons and when path to next waypoint is entirely blocked
* Fixed bug that prevented removal of sticky MAIs
* Recruitment CA:
* New Recruitment CA located in src/ai/recruitment is now default CA
* Created new AI cfg "Strong AI (RCA)" with stronger recruitment
* Created new AI cfg "Old Recruitment CA" in ai/dev/ to use the old CA
* Campaigns:
* Legend of Wesmere:
* Removed now redundant MP code.

View file

@ -0,0 +1,29 @@
#textdomain wesnoth-ai
{core/macros}
[ai]
id=ai_default_rca_strong
description=_"Multiplayer_AI^Strong AI (RCA)" # RCA := Register Candidate Action; more info at http://forums.wesnoth.org/viewtopic.php?p=419625#p419625
version=10710
[stage]
id=main_loop
name=ai_default_rca::candidate_action_evaluation_loop
{AI_CA_GOTO}
{AI_CA_RECRUITMENT}
{AI_CA_MOVE_LEADER_TO_GOALS}
{AI_CA_MOVE_LEADER_TO_KEEP}
{AI_CA_COMBAT}
{AI_CA_HEALING}
{AI_CA_VILLAGES}
{AI_CA_RETREAT}
{AI_CA_MOVE_TO_TARGETS}
{AI_CA_LEADER_SHARES_KEEP}
[/stage]
### Aspects for a strong AI ###
{AI_SIMPLE_ALWAYS_ASPECT recruitment_diversity 0}
{AI_SIMPLE_ALWAYS_ASPECT recruitment_randomness 0}
{AI_SIMPLE_ALWAYS_ASPECT villages_per_scout 0}
{AI_ASPECT recruitment_save_gold {AI_DEACTIVATE_SAVE_GOLD} }
[/ai]

View file

@ -0,0 +1,27 @@
#textdomain wesnoth-ai
[ai]
id=ai_old_recruitment
description=_"Multiplayer_AI^Old Recruitment CA" # RCA := Register Candidate Action; more info at http://forums.wesnoth.org/viewtopic.php?p=419625#p419625
version=10710
[stage]
id=main_loop
name=ai_default_rca::candidate_action_evaluation_loop
{AI_CA_GOTO}
[candidate_action]
id=recruitment
engine=cpp
name=ai_default_rca::aspect_recruitment_phase
max_score=180000
score=180000
[/candidate_action]
{AI_CA_MOVE_LEADER_TO_GOALS}
{AI_CA_MOVE_LEADER_TO_KEEP}
{AI_CA_COMBAT}
{AI_CA_HEALING}
{AI_CA_VILLAGES}
{AI_CA_RETREAT}
{AI_CA_MOVE_TO_TARGETS}
{AI_CA_LEADER_SHARES_KEEP}
[/stage]
[/ai]

View file

@ -391,16 +391,28 @@
#enddef
############################################################
# NO RECRUITMENT
# RECRUITMENT ASPECTS
############################################################
#define AI_DEACTIVATE_SAVE_GOLD
# disable aspect recruitment_save_gold
[facet]
id="always"
[value]
active=0
[/value]
[/facet]
#enddef
#define AI_NO_RECRUITMENT
# disable recruitment
[facet]
id="always"
[value]
engine=cpp
name=empty
[recruit]
importance=1
number=0
[/recruit]
[/value]
[/facet]
#enddef

View file

@ -63,7 +63,7 @@
[candidate_action]
id=recruitment
engine=cpp
name=ai_default_rca::aspect_recruitment_phase
name=default_recruitment::recruitment
max_score={AI_CA_RECRUITMENT_SCORE}
score={AI_CA_RECRUITMENT_SCORE}
[/candidate_action]