Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [Patch] Watchtower v3
Home

[Freeciv-Dev] Re: [Patch] Watchtower v3

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Daniel L Speyer <dspeyer@xxxxxxxxxxx>, Sebastian Bauer <sebauer@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Watchtower v3
From: Paul Zastoupil <paulz@xxxxxxxxxxxx>
Date: Fri, 31 Aug 2001 10:39:18 -0700

On Fri, Aug 31, 2001 at 06:35:38PM +0200, Raimar Falke wrote:
> On Fri, Aug 31, 2001 at 12:13:13PM -0400, Daniel L Speyer wrote:
> > On Fri, 31 Aug 2001, Raimar Falke wrote:
> > 
> > > On Fri, Aug 31, 2001 at 11:46:31AM -0400, Daniel L Speyer wrote:
> > > > 
> > > > On Fri, 31 Aug 2001, Raimar Falke wrote:
> > > > 
> > > > > On Fri, Aug 31, 2001 at 10:40:26AM -0400, Daniel L Speyer wrote:
> > > > > > On Fri, 31 Aug 2001, Raimar Falke wrote:
> > > > > > 
> > > > > > [snip lots of stuff]
> > > > > > 
> > > > > > > My opinion on the other discussion: In the long term I would also 
> > > > > > > like
> > > > > > > to see rulesets just as a preset server variables. Each ruleset
> > > > > > > variable/server variable/property is protected by a certain 
> > > > > > > cmdlevel.
> > > > > > > 
> > > > > > > To get structure I would propose a java properties like syntax:
> > > > > > > 
> > > > > > > units.unit_worm_riders.name="Worm Riders"
> > > > > > > units.unit_worm_riders.obsolete_by="unit_armorname"
> > > > > > > units.unit_worm_riders.attack=6
> > > > > > > units.unit_worm_riders.defend=2
> > > > > > > units.unit_worm_riders.move=3
> > > > > > > 
> > > > > > > Note: the string "unit_worm_riders" doesn't matter. It can also be
> > > > > > > "unit56".
> > > > > > > 
> > > > > > > It is easy to understand and parse. It allows arbitrary complex 
> > > > > > > nested
> > > > > > > structures.
> > > > > > > 
> > > > > > 
> > > > > > This is awfully bulky, especially to be typed in at command line
> > > > > > (especially to be typed in at the command line, especially for 
> > > > > > players
> > > > > > without readline).  What about a varient using the javascript 
> > > > > > (maybe java
> > > > > > too) syntax like this?
> > > > > > 
> > > > > > with units.worm_riders{
> > > > > >     name="Worm Riders"
> > > > > >     obsolete_by=armor
> > > > > >     attack=6
> > > > > >     defend=2
> > > > > >     move=3
> > > > > > }
> > > > > 
> > > > > Can this really be typed easier? The java property syntax is perfect
> > > > > for just changing some settings. An in addition to this we can add a
> > > > > -r command line option to the client.
> > > > 
> > > > I'd still allow changing a few settings with java syntax, but if you 
> > > > just
> > > > want to introduce a new unit, retyping it's name for all its properties
> > > > would become a major nuscience, enough to discourage most players 
> > > > (enough
> > > > to discourage *me*, at least).  Remember that an actual unit has 23
> > > > fields.  I think a full definition of worm_riders would use 17 
> > > > non-default
> > > > settings (using my guesses about defaults and the unit's
> > > > properties.)  That's an awful lot to type.
> > > 
> > > What about a "copy units.settlers units.super_settlers"?
> > > 
> > 
> > This is fine for super_settlers, but for a really new unit it doesn't help
> > that much.  For example, a full version of worm_riders using the copy/java
> > syntax would be:
> > 
> > copy units.armor units.worm_riders #it's the closest match I can find
> > units.worm_riders.name="Worm Riders"
> > units.worm_riders.tech_req=techs.worm_riding
> > units.worm_riders.obsolete_by=units.armor
> > units.worm_riders.graphic="u.work_riders"
> > units.worm_riders.build_cost=50
> > units.worm_riders.attack=6
> > units.worm_riders.defense=2
> > units.worm_riders.hitpoints=20
> > units.worm_riders.uk_happy=0
> > 
> > That's an awful lot, and it could easily be worse.
> 
> With a script which a user can feed to the server I see no problem. We
> agree in the overall idea. The syntax is secondary and should stop you
> from starting.

Very good point.  Besides, how many people would be creating many units in
online in a running server?  Most would want to save the settings anyway
so they would probably work offline and cut-n-paste, readline or no.

-- 
Paul Zastoupil


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