Shapeshifter wrote: > > -> The snippets page has a nice help for creating spells :-) > > -> Indi > > Would anyone be able to mail me this help file? I dont have > access to the Web, and probably wont be able to get to it for a few > weeks. It would help me a lot if a kind soul out there might be able > to cut and copy it into a mail item ffor me to read. Thanks... Here it is :-) From: goamkows@kirk.geog.scarolina.edu Subject: Adding Spells to add a spell: in spells.h, add a #define for the spell (where all the others are), giving it a unique number less than MAX_SPELLS (defined at the bottom of the spell list, before the skill list). if it is a manual spell, search for ASPELL and add one for the new spell you are putting in. furthermore, for manual spells, put the code itself for the spell at the bottom of spells.c. if it is not a manual spell, in magic.c, if it is a spell that does damage, search for man_damage and put in a case for your spell. if it affects a character in any way (e.g. strength, armor, blindness, etc.), put in a case in mag_affects. etc. for the other spell types. read the comments for each type - they are there for a reason :) when all this is done, go over to spell_parser.c. put the spell into char *spells[] in a slot marked UNUSED (it should have an index number equal to the value you defined the spell to be in spells.h, so if SPELL_KILL_BARNEY is defined as 101 in spells.h, it better be in slot 101 in spells[] - the slots are marked every 5 for convenience. if the spell is a manual spell, in the call_magic function, add a case for it where the other manual spells are. finally, add a spello - there are detailed notes on what each value should be, so it should not be difficult. if necessary, just copy another spell of the same type and modify it to suit your needs. finally, in constants.c, search for spell_wear_off_msg[] and add a message at the end that will be displayed when the spell wears off. even if that doesn't make sense (spells with instantaneous effect), you need to put in the spell name (e.g. "!Kill Barney!",) anyway, so the index number in the array correspond with the correct spell. i think that's everything. +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | | Or send 'info circle' to majordomo@cspo.queensu.ca | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST