Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: A bunch of patches
Home

[Freeciv-Dev] Re: A bunch of patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: A bunch of patches
From: "andi payn" <paynfc@xxxxxxxxxxx>
Date: Sat, 05 Jan 2002 02:43:29 +0000

From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
On Fri, 4 Jan 2002, andi payn wrote:
[calendar]
I can't imagine a modpack writer would actually want to use
nation-specific calendars, or lunar calendars for that matter. (But I
might be wrong.) I think it would suffice to determine a starting
year and an array list of "months". The year has as many months as
found in this array, and each month is by default equal to one turn.

This would be pretty good; that way, you could actually make a quarterly or weekly calendar by specifying them as months. And it would be pretty easy to do, which is always nice....

Your game.ruleset could have something like this:

[calendar_20c]
name = _("20th Century")
first_year = 1900
turn_years = 1

[calendar_modern]
name = _("Modern Age")
first_year = 2000
turn_years = 0
months = _("Winter"), _("Spring"), _("Summer"), _("Autumn")

[calendar_future]
Name = _("The Future")
first_year = 2010
turn_years = 0
months = _("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), _("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")

Then after 1999 (20th Century, 1 year/turn), you'd go to Winter 2000 (Modern Age, 4 turns/yr), etc., until Autumn 2009 (Modern Age, 4 turns/yr), then Jan 2010 (The Future, 12 turns/yr), etc.

We could add a first_month value as well. So if The Future had first_month = 7, you'd go from Spring 2010 to Jul 2010 (but the code would have to realize that 7/12 is next after 2/4).

The only thing is, I think some people might want campaigns played on a daily basis. In fact, Jason Short just posted:

What a modpack writer would want, though, is some flexibility in
setting the number of intervals per year.  I would think 4, 12, and
365.24 would probably be enough.

... and then made reference to leap years.

Without leap years, we could just do something like this:

[calendar_way_future]
name = _("Way Future")
first_year = 2015
turn_years = 0
months = _("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), _("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")
month_days = 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
turn_days = 7

However, the simple 4 turns/year, 12 turns/year, etc. wouldn't work too well (who wants to see 52.143 turns/year?), so we'd probably need some way to make it say 1 season/turn, 1 month/turn, 7 days/turn, etc. I can't think of a good way to represent this in the ruleset, however.

I think you'd definitely want to be able to start an age in the middle of a year if you'd going daily (a normal age is 30-60 turns), but that's easy now--while a month wasn't a uniform measure, a day is.

So now we come to leapyear. I have a few different ideas (we could provide options for no leapyear, every 4 years, or Gregorian; or we could provide a set of variables to build up a formula; or we could provide arrays to explicitly specify everything), but I think the easiest solution is the best:

Do nothing in the code. Just specify a special age for the leapyear. An age is supposed to be in the neighborhood of 50 turns, so if you're playing at any pace where leapyears matter, you'll probably have a separate age for each year anyway.

I can probably get a new calendar patch together with the months, month_days, and first_day stuff in a day or so.

Why not just paradrop-attack? Unit has zero movement, infinite
paradrop & can attack on drop.

That's not a bad idea. In fact, I considered adding a flag for "can drop on occupied territory" for air freight or jetsetting spies, but this is a much better use for the same flag. And it's a really easy change.

Convinced. It would actually be neat with a unit flag that makes the >unit
unproducable. Eg "Dark Sorcery advance: Enables you to upgrade your
useless Wizard's Apprentice units to kick-ass Dark Sorceror units"

I never thought of that, but it could be pretty cool, and it would be trivial to code.

No, please don't wait for freeciv-ac. I don't follow that project but >I suppose that could take a while.

Well, the big patch I uploaded includes the obsoleted_by2 stuff; I'll rewrite it to use obsoleted_by and upgradable_to arrays, and add the "can't build" flag, and try to make a proper patch out of it; this one isn't too deeply entangled with everything else.

I added two new unit types, actually. But some types of satellites
might be better handled by not being units at all. For example,
the SMAC satellites may be more appropriately handled as
improvements.

They could populate space along with the spaceship...? Just an idea.

I was more worried about how they're handled in the code than how they're presented to the user. For that, the spaceship doesn't give us anything. I suppose the ultimate solution would be a CTP-style space layer, but that's not exactly trivial....

I was hoping to be able to use the existing unit and/or improvment code with minor changes to do everything I want without it being too much of a hack. If that's not possible, it's probably a big project, and probably belongs in freeciv-ac.


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com



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