[crossfire] The future of Crossfire

Nicolas Weeger nicolas.weeger at laposte.net
Mon Jun 4 12:27:14 CDT 2007


>   But I also think that more varied rewards for quests would be nice - it
> would be nice to have some other things that could be given, like
> experience points, learning new skills, increasing reputation (an idea
> talked about before but never added), etc.

Been working on that :)
My quest reward for Lursendis is, hopefully, quite fun :)
And I got other items, working on the corresponding quests.
(credit where credit is due: Yann helped for the ideas :))

>   And while a lot of this could be done with scripts, I'll state this:  For
> any point that comes up where it could be done with a script, there should
> then be an example script set up that does that, with it clearly documented
> (ideally at the top of the script) with the values to change.
>
>   It doesn't do me any good to say 'it can be done with a script' if it now
> takes me 2 hours to write/test that script or figure out if there is a
> suitable one elsewhere I can modify.  In the case above, there should be a
> sample script that looks for an item in the player, and then gives the
> player some skill exp (or that skill if they don't have it).  In that
> sample, at the top of the script would be the skill I want to grant/add exp
> to, the amount of exp to add, and the item it is looking for.  It shouldn't
> be a need for me to look through the entier script to figure out what needs
> to be changed.

Moot point, as Yann said. Yes, we'll document scripts, but at some point 
they'll need to be customized.
Granted, some generic scripts could be made when they're needed, and their 
parameter sent in the event object itself (eg: what skill to add to).
Check 
http://wiki.metalforge.net/doku.php/cfpython#scripts_part_of_crossfire_default_maps 
for existing scripts - comments welcomed if not clear enough.

Look at the scripts I committed yesterday for Lursendis 
(maps/python/monsters/[farnass|lursendis].py). Those are quite specific 
things. Some can be reused (moving on the same tile from the chicken script), 
but most is just custom code for this quest.

Note that you can also do a plugin in C, if you prefer, check 
http://wiki.metalforge.net/doku.php/server_plugin#creating_a_plugin for 
details :) Of course feel free to ask if help is needed with the plugin API - 
the Python part is pretty well documented I think, the "raw" probably isn't.


But again we're doing it wrong: first let's think of the kind of items we 
want, then let's make the scripts we need - not the other way around, "it 
would be great to be able to..." and never use that.
I even volunteer to do scripts if people ask me, when they need something for 
a quest :)
You mention a skill/exp giving script, want me to do it? Would it help you 
write/finish a quest? Would people actually use it? (see at the end of the 
mail)

>   But here's the thing - if I have a quest to escort an NPC from scorn to
> navar city, what would that script look like?  Right now, I envision it
> being pretty complicated - I think it'd probably be good to have some
> amount of C code backend to simplify it.
>
>   for example, within the script, you'd probably really just want to be
> able to set waypoints (go to x,y, apply exit, got to x1,y1, etc).  but let
> the C/monster code deal with it moving between those waypoints - in that
> way, it also can take care of if there are enemy monsters about, what to do
> in that case, path is blocked, etc.  I know all this could be done in
> python, but it would seem to be become a pretty complicated python script
> at some point.

Then, again, do a C plugin if you prefer. Heck, if people ask nicely enough, 
I'd even write a C++ basic plugin so people can code plugins in C++ - as long 
as people do write content!
And we'll naturally refactor what we can when time comes.

But again, that's backward thinking, code before contents - whereas it should 
be the other way, first think what you want, do code for it, refactor when 
needed. Ideally of course the code would be totally customizable, reusable, 
already refactored, but better to code then refactor that code and never use.
Just look at the many things never used: quest system, multiplayer spells, new 
material code - that should give some hints, I guess :)

Nicolas
-- 
http://nicolas.weeger.free.fr [Petit site d'images, de textes, de code, bref 
de l'aléatoire !]



More information about the crossfire mailing list