Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smart monsters



>From: quinet@montefiore.ulg.ac.be (Raphael Quinet)
>
>> From: Petri Heinil{ <Petri.Heinila@lut.fi>
>> 
>> >From: quinet@montefiore.ulg.ac.be (Raphael Quinet)
>> >Most people agree on the fact that the "@match" command isn't powerful
>> >enough, but is there someone with better ideas in mind (or in C) ?
>> >
>> 
>> Script-languge for programming monsters. Language would be placed into
>> archetypes. For performance reasons it would reduce the amount of 
>> monsters radically.
>
>Are you already working on it ?

No, just ideas. CrossEdit is enought for me, I want design maps again
in some time :) .

>What kind of commands would be allowed in the language ?  I think that only
>a few monsters need to be "smarter".  In fact, only the friendly ones.
>What I had in mind is some kind of replacement for the "@match" command :
>the NPC would do something (give an object, say something, cast a spell,...)
>according to a given set of possible "events" (something said by the player
>- like in the @match command, some object given by the player,...).  This
>would keep things simple and would not reduce the amount of monsters.

What I thinked was some kind of language like Postscript by object
oriented features. For example:

'StoneDragon 'Dragon {
  1000 hp
  500 sp
  'create { "The Stone Dragon" name } def
  'destroy { 'DragonSteak create DragonScale create } def
  ...
  'give { "Thank you" say } def 
  ...
} class

Here is StoneDragon inherited from Dragon class setted by initial
hit points and spell points and define constructor and destructor
for class and so on. More info can be found from book "PostScript
language  Reference Manual" ISBN 0-201-10174-2.  


////////////////////////////////////////////////////////////////////////
//   Petri Heinila   //   email: Petri.Heinila@lut.fi                 //
//                   //   mail:  Ainonkatu 2A                         //
//                   //          53100 Lappeenranta                   //
//                   //          Finland, Europe                      //
////////////////////////////////////////////////////////////////////////