Complete.Org: Mailing Lists: Archives: freeciv-dev: September 1999:
[Freeciv-Dev] Re: Barbarians (was: Dumb AI in mid & late game)
Home

[Freeciv-Dev] Re: Barbarians (was: Dumb AI in mid & late game)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Barbarians (was: Dumb AI in mid & late game)
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 30 Sep 1999 01:41:39 +0200

Jerzy Klek <qpkjeek@xxxxxxxxxxxxxxx> writes:

> Thanks for the info! I started working on barbarians a couple
> of days ago and have some code working, but I didn't really
> know their exact behaviour. Those coming from huts, I think
> I have them right, but now I added those from nowhere and I get
> segfaults :-(, time to do some debugging...

I had started implementing barbarians some time ago, too. Perhaps I
can help you a bit.

> I don't think I will be able to implement their exact behaviour,
> because it requires fiddling with the AI code. I'm creating simply
> new players without settlers, and player.ai.expand set to 0, so even
> if they have capture cities, they will value new cities as 0 and
> hopefully not expand. This is the easiest way and thus viable for
> me.

In my version, barbarians were always building the best attack unit in 
their cities. This is like PayCiv does it, IIRC.

> What about barbarian units? I use Horsemen and Archers at the
> beginning, and after technologies are available, they start
> using Musketeers, Cannons, Knights and Partisans. Random
> number of units (3-6) are created. Is it OK?

I had it all configurable via roles. I added the following possible
glags for units:

 L_BARBARIAN_HUT,        /* barbarians coming out of huts */
 L_BARBARIAN_HUT_TECH,
 L_BARBARIAN_UPRISING,   /* barbarians from uprisings */
 L_BARBARIAN_UPRISING_TECH,
 L_BARBARIAN_CREW,       /* barbarian units on ships */
 L_BARBARIAN_CREW_TECH,
 L_BARBARIAN_SHIP,       /* barbarian ship */
 L_BARBARIAN_SHIP_TECH,
 L_BARBARIAN_BUILD,      /* barbarians build this in conquered cities*/
 L_BARBARIAN_BUILD_TECH,

the tech version requires somebody has the prerequisites, analog to
L_HUT_TECH.

This is probably a bit overkill, but might be nice for scenarios etc.

I can send you a patch against freeciv from May 10. Definitely won't
apply, but might give you some ideas.

        Falk

[Prev in Thread] Current Thread [Next in Thread]