[crossfire] Plugin system extension

Nicolas Weeger (Laposte) nicolas.weeger at laposte.net
Sat Sep 2 11:04:58 CDT 2006


Hello.

I'd like to extend the plugin system to add new skills, and/or override the 
skill use.

It would imo enable to do fun things, and make the server more flexible.

I see that system working like that:
* the items giving that skill are created, "inert" (with a type of 0 for 
instance)
* plugin asks to register its own skill, and gets a unique skill subtype
* plugin can alternatively declare handling one skill subtype (only "core" 
ones)
* plugin parses archetypes and alters skill-giving items to use that subtype 
(and set the SKILL type)

Except for "skill overriding", this can only be done at server init time 
(can't easily alter archetypes once objects have this very archetype, would 
cause a mess for loading/saving).

Of course, the archetypes themselves are required to be part of the server 
anyway, for loading/saving purposes.


For instance, the building system I made some time ago could be reimplemented 
using a real building skill (use_skill building, use_skill cooking, and 
such ;p), requiring tools to work, and so on.
As it is not part of the core imo (even if it's fun ;p), a plugin would be the 
best way to do that.


Nicolas



More information about the crossfire mailing list