Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2002:
[Freeciv-Dev] Re: new unit flags, 13th version of the patch (PR#1324)
Home

[Freeciv-Dev] Re: new unit flags, 13th version of the patch (PR#1324)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: new unit flags, 13th version of the patch (PR#1324)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 21 Aug 2002 13:41:04 -0700 (PDT)

On Wed, 21 Aug 2002 rf13@xxxxxxxxxxxxxxxxxxxxxx wrote:
> I don't see the difference. At the time you resolve the triggers you
> can also really kill the player.

That is what is done.

The reason for the triggers code is that I am sure things like this will
pop up again and again in the future, and instead of adding more hacks
like "zombie players" or add funky stuff like

(server/unittools.c:1825:)

        if (iter && ((struct unit*)ITERATOR_PTR((*iter))) == pcargo) {
          freelog(LOG_DEBUG, "iterating over %s in wipe_unit_safe",
                  unit_name(pcargo->type));
          ITERATOR_NEXT((*iter));
        }

to the code, it can be resolved in a clean way.

> About the generalisation: server-side scripting is bad.

I am uncertain about the merits of server-side scripting, but I am not
willing to dismiss it out of hand without any arguments.

> Can you describe (not in code) what you want to achieve with ruleset
> events?

Have you ever looked at more complex civ2 scenarios/modpacks? Civ2 has an
events ruleset, which is one of the reasons very good scenarios/modpacks
can be built for it.

There is a lot that can be achieved with an events ruleset:
 - move huts in there (so that they can be changed by modpacks)
 - a tutorial can be written in it (see civ2's "tutorial.txt")
 - events can be done there (again, modpacks), like
   - when you start the game, you get a popup box telling you the story
     behind your nation
   - in year 50, the nasty aliens begin their invasion and arrive on the
     planet
   - new victory conditions (capture the flag/capital)
   - floods, earthquakes, ... all the civ1 stuff
   - if the Gandalf Gray unit dies, create Gandalf White unit in Moria
   - if you manage to move the One Ring unit into the Dark Tower, you win
etc etc

What form the events ruleset should take, I don't know yet. I tried to
drawn up one after doing the triggers code, but I wasn't really satisfied
with it, or I would already have a patch for you *g*

I think embedding python to do this might be an idea worth considering.
Since events rulesets would be optional, so would python.

Yours
Per




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