Summary: Script-defined achievements
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat Jan  4 21:33:10 2014
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



Another one from the half-bakery.

The new achievements we have on trunk come from a small set hardcoded in the
server (Map_Known, Spaceship, Multicultural).

However, it strikes me that you really want to be able to define
ruleset-specific conditions that we (developers) wouldn't have thought of,
which looks like a fine application for Lua scripting.

How would this work?
* Could use achievement type of "None" or "Script" which is never true in the
core achievements code.
* To signal achievement, should script call into server, or vice versa (or
** If scripted achievements are to follow the existing tie-break resolution
arrangements, that suggests server sends a signal to script saying "has this
player achieved this achievement" in the achievement checking phase. (Script
probably shouldn't change game state here.)
* How to handle achievement messages? Currently they're hardcoded in the
** Even without scripting, there's an argument these should be
ruleset-defined; for example, if the alien ruleset had achievements, it would
say "You're the first one to launch spaceship towards Alpha Centauri!" which
seems unlikely to be the obvious destination starting at Deneb. The existing
messages use format strings but this would be unnecessary, as they only have
values substituted that are also ruleset-defined.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to