Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2464) patch: restrict techs by nation
Home

[Freeciv-Dev] Re: (PR#2464) patch: restrict techs by nation

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2464) patch: restrict techs by nation
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 2 Dec 2002 00:03:22 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, Dec 01, 2002 at 11:06:41AM -0800, Per I. Mathisen via RT wrote:
> 
> On Sun, 1 Dec 2002, Raimar Falke via RT wrote:
> > > A general comment only: whether or not a nation can use a tech
> > > to me seems a property of the nation, not the tech.
> >
> > I agree. We already have per nation init_techs.
> 
> > However assembling a
> > long of "allowed_techs" per nation may be not want people want.
> 
> Exactly. Keep techs to the tech ruleset file. Easier to see what you are
> doing and what you've forgotten.
> 
> > I general I think that all this is solvable by disjoint tech trees via
> > init_techs. That the current code removes these "loose" tech trees is
> > a bug.
> 
> Are you sure?

Yes.

> Looks like a design decision to me. I am not at all sure what will happen
> if you allow such unreachable techs to be "existent" in the tech tree.
> 
> > And maybe a strict_tech option is also needed which forbids the
> > transfer of such techs from player to player.
> 
> Not "maybe". You _must_ have such an option if you want to keep the trees
> disjointed, which is a must for most modpacks.

Yes and no. The value of strict_tech has to be TRUE but you don't need
the option.

> But note how my patch is much more flexible: You can have forked tech
> trees with a common base, where you can conquer/steal/give common techs
> while special techs remain unavailable. No need for really anal options
> like strict_tech.

My proposal:
 - add a tech flag Root
 - a tech with this flag is called root(-tech)
 - don't discard roots is they don't have any real requirements
 - a root of a tech T is the tech which is a root and directly or
 indirectly T depends on
 - all (except A_NONE) have exactly one root (checked at ruleparsing)
 - if no root techs are given in the tech ruleset A_NONE is given the Root flag
 - all players have at the start of the game exactly one root tech
 (A_NONE or initial tech). This is called the root of the player.
 - a player can only get a tech by any way (huts, advance, diplomat,
 diplomacy, ...) if the root of the tech is the same as the root of
 the player.

The strict_tech is now always TRUE. But don't matter if all player
have the same root tech (A_NONE).

Now only someone has to code this.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  One nuclear bomb can ruin your whole day.



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