This is the mail archive of the xconq7@sourceware.cygnus.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]

Re: GDL Questions


Hi,

I've now had a look at your code. You are really trying out some new (and
interesting) ideas so it is perhaps not surprising that some of them do not
work as expected.

First the bad news. The change-type action is present in the kernel, but
not supported anywhere else. So the reason you can't get your units to
change type is simply that there is no way to execute this action either
for a human or the AI. This is also the reason why it is not used in any
existing game (if a feature is not used anywhere, it is unlikely to be
fully supported yet). Clearly something to put on the TODO list.

As for the production of guns, it is not sufficient just to make them. You
must also provide your gunfighter with a license to carry a gun:

(table unit-storage-x
	(man cocked-weapon 1)
)

Otherwise, he will produce guns but then throw them away.

With this added, you can play the game on manual. First you give the
command 1p to produce a gun, then f to fire at the opponent. Eventually,
you will hit him even if your hit chance is just 10%.

Unfortunately, there is no AI code yet for material production, so the
mplayer cannot figure out that it should start by producing a gun. To
circumvent this problem, you can give each man one gun to start with:

(table unit-initial-supply
	(man cocked-weapon 1)
)

The game will now run as expected also under AI control.

In some cases you will find that your units fall asleep instead of
fighting. The tendency for units to fall asleep when they should not do so
is a kernel bug that affects all games. I have handled it in my own games
by using a kernel hack and custom variable that disables the sleep option
altogether:

(set units-may-go-to-sleep false)

You may want to add this to your game as well. Disabling the sleep option
does not have any negative consequences, as far as I can tell.

The above hacks do not exactly produce the results you were trying to
achieve, but at least the game works, so you can take it from there.

Hans

P.S. The table acp-to-attack which you have at the end of your file makes
attacks without a gun possible, i.e. fist fights. But perhaps this was your
intention? In that case, you should be aware of the fact that the AI combat
code prevents units that also can fire from moving too close to their
target (to avoid being hit themselves). That is why the units in your game
just stand and watch each other a few hexes apart instead of moving in for
man-to-man combat. They are trying to fire at each other, but cannot do so
since they have no guns.

Hans Ronne

hronne@pp.sbbs.se



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