On Fri, 18 Aug 2000, Treker wrote: >This method could still be modified--by creating a vector full of skills, >their effects, how long they last, etc in each position of the vector >(each position=new skill). Since vectors are dynamic, the eof() member >function could be used to detect how many spells are currently in use and >dynamically assign the spells during interpretation. I tried doing something similar once, putting all of the spells into a 'struct' instead of the 'switch' blocks but ultimately gave up as there are too many differences, special cases, and tests to take care of to make it practical. >While the spells/commands/skills adding system may be near optimal right >now, I think that it should become so easy that eventually spells will be >stored in a file and loaded, so that they can be edited by an external >program (ie: circedit 2001 [hypothetically]) Manual spells you probably could using libdl and dynamic loading. You'd probably want to extend that to have commands and just about everything else later. >Commands added by an admin (imo) should be separated from most of the >Circle code--in their own source file, for example, thus preventing the >need to manually upgrade the code later to a higher patch level because >the DIFF program doesn't recognize the code. But that's just my opinion, >I could be wrong. You have the code, do what you want. :) We already have class.c and spells.c for that sort of thing. Feel free to make up your own source code files if you want to add things and not conflict. -- George Greer greerga@circlemud.org +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/11/01 PDT