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: Plans, again


>Just to note that the 'Plans' menu item *does* seem to have some effect
>in the native OSX version.  If I give a ship, for instance, an
>'Exploratory' plan in the standard game it will indeed go off by itself
>exploring territory without need for any further intervention.  Same
>with infantry etc.  This is a *very* useful feature, even if (as was
>implied) it's only really meant for the AI player to use.

It will go off by itself, but only if you turn on the AI for your side
(either in the player setup dialog or later in the Side menu). Moreover "AI
control" has to be checked for the unit. AI control is on by default, so
when you turn on the AI it will seize control of all units for which you
did not disable AI control.

Once the AI takes over a unit, it will scrap any previous plan and pick its
own. It may happen that the AI also thinks it is a good idea to explore, in
which case the unit may keep an exploratory plan. But this is pure
coincidence. What the plan type was set to before the AI took over does not
matter.

This is the relevant code from set_side_ai:

if (gameinited) {
    /* Replan everything, whether switching to ai or human control. */
    DMprintf("%s is replanning all units after ai switch.\n",
side_desig(side));
    for_all_side_units(side, unit) {
        if (is_active(unit)) {
            /* We do this locally on each computer to save time. */
            unit->aihook = NULL;
            force_replan(unit);
        }
    }
}

To avoid confusion I have disabled the plan type menu in the CVS sources. I
will put it back if/when I implement the semi-automatic mode for AI control.

Hans



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