Addspell

Posted by Veshirak on Sat 21 Sep 2002 08:13 PM — 2 posts, 16,228 views.

USA #0
Okay, so addspell works great and all, but there's one aspect in the code that is giving me a hard time. An example of what I'm trying to do:
Create a shield that gives a character a level X shield spell affect when worn. Issue is when a character of less than level X wears the item, the affect doesn't take effect.
Now I've looked through the code and know that there is a bit that can be set with the affect to ignore the level of the wearer, I just don't know how to set that bit. The name of it is OBJSPELL_IGNORE_LEVEL. I believe I might have an idea of how to set it by adding an optional parameter to the addspell command, but would like to know if anyone else has confronted this or knows how to get around it.
Oh, and I know how to remove the check for the characters level, but see potential in leaving the check for the bit in.
United Kingdom #1

Currently there is no way to set this field within the olc editors... it must have been something I started working on but never finished.

I have done a quick extension to oedit_addspell() which allows you to set this flag within the olc editor. This will be included in the next dawn release, if you want it before then, feel free to email me (using the contact page on the dawnoftime.org website), and I will send you a copy of the replacement function.

- Kalahn
Developer of the Dawn of Time codebase.
http://www.dawnoftime.org/