This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: plan_transport
- From: Hans Ronne <hronne at comhem dot se>
- To: Peter Garrone <pgarrone at acay dot com dot au>
- Cc: xconq7 at sources dot redhat dot com
- Date: Sun, 7 Dec 2003 03:02:06 +0100
- Subject: Re: plan_transport
> I thought I would review the current problems and proposed fixes.
> I originally planned on sending this only to some people, but I think
> others probably could provide some valuable feedback.
>
>The problems are:
To that I would add that AI-controlled occupants do not disembark when they
should. This was a problem also with the old code, but it seems worse now.
>Proposed solution.
> A solution to these problems (attribution to Hans here) would be as follows.
> - implement a PLAN_TRANSPORT for ferries, so they are permanently
> assigned to transportation duties, though of course offensive units
> will be transported by them.
> - implement a TRANSPORT_TASK as well, so that human players can asign a
> unit to ferrying, and units will move across islands and seas without
> all that bookkeeping. So a PLAN_TRANSPORT will activate a
> TRANSPORT_TASK.
A player-settable TRANSPORT_TASK might be a good idea. But it would work
only for one ferry round. It would be even better to be able to set a
PLAN_TRANSPORT and let ferries run on automatic. However, this would
require a semi-automatic mode where it is possible to set (and keep) plans
also for player-controlled units. I experimented with this two years ago,
and I think it was discussed on the list. It would also make it possible to
assign PLAN_OFFENSIVE or PLAN_DEFENSIVE to units and then have the AI run
them according to a set plan (right now, the AI will replan as soon as you
turn over a unit to it, so setting plans has no effect even if it can be
done). Something to consider post-7.5, I think.
> - Something needs to be added to the ai code so that it can distinguish
> a simple ferry from something offensive, like an aircraft carrier or
> bireme/trireme. This is asking a lot but perhaps some simple
> heuristic could fix this. So a bireme would not go onto
> PLAN_TRANSPORT, but instead grab an archer to help it in sea-battles.
This one is easy. We would just need to define a precomputed u_ferry_worth
that measures ferry capacity and weighs it into mplayer_decide_plan.
Similarly for the build code. There is already basic_transport_worth but it
is rather crude. I would like something better.
> - The pathfinding would need to be somewhat extended here. It need so
> consider going from A to B using ferry type C, extending the state
> space it explores for possible solutions from simple x,y position.
> - consideration could be given to implementing refueling behavior,
> a boring detail for the human player,
> while extending the pathfinding state space.
>
> This is my "wishlist". I will attempt to implement it in stages, so
> that a partial implementation may suffice for a 7.5 release, comments
> invited,
I agree with the other points on your list.
Hans