This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: occupant combat in standard game


>> The theater reassignment code you ask for does exist (review_theaters and
>> mplayer_review_units). It is run at the start of each turn, which should be
>> sufficient. The code cares more about area control than about attacking
>> specific units, though. This is the way the mplayer works, however, for
>> better or for worse.
>
>Well, I haven't actually traced through these functions yet (since
>I haven't switched focus to AI strategy), but it seems that
>mplayer_review_units would not mess with PLAN_OFFENSIVE units
>which don't have goals. It does some rebalancing in the case of
>exploratory and defensive plans, but apparently not offensive
>ones. If this is the case, then plan_offense is going to be
>re-executed and call the tactical function, ai_go_after_victim,
>quite a bit. (And this seems to be what I actually see when I
>watch mplayers....)

All units with PLAN_OFFENSIVE will have a goal of type GOAL_VICINITY_HELD
if they are run by the mplayer. Therefore, when this goal is true (no enemy
units left in the theater) the unit will replan. This does eventually
happen, though stray enemy units can delay further offensives
unnecessarily. We discussed this on the list last year:

http://sources.redhat.com/ml/xconq7/2003/msg00047.html

I think it might be a good idea to loosen up the requirement for
GOAL_VICINITY_HELD being true so that an overwhelming superiority is enough.

Now, if the unit is run by the iplayer, there is no strategy code at all
and hence no theaters, and assign_to_offense will therefore set a plan
without a goal. This may cause a unit to get trapped in PLAN_OFFENSIVE, as
you pointed out. The best fix for this is probably to modify
assign_to_offense so that a GOAL_VICINITY_HELD is created also in that
case, using the vicinity of the unit itself. You do not really need
theaters to define such a goal.

Hans



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]