Hi, I'm trying to decipher how individual spells are stored in the database because I would like to be able to add/remove specific spells on a character. If you understand how it works can you give me an overview?
Thanks!
Editing spells column in chars table
-
- Developer
- Posts: 707
- Joined: Sun Jul 22, 2012 12:11 am
Re: Editing spells column in chars table
I would suggest making use of the LUA functions to do something like that. You could pretty easily make a GM command to add a spell to another player by looking at the existing GM command scripts. There is already a command for a GM to add a spell to their own character. If you have a specific reason to need to edit the database directly, it is doable but by no means a simple procedure.
Re: Editing spells column in chars table
I'm actually interested in doing it directly (for a windows application I'm working on).
Re: Editing spells column in chars table
I try and try not to ask too many questions. It takes all the fun out of it.
If I were you, I'd start my search either in a magic scroll script (to learn a spell) or the @addspell command.
If I were you, I'd start my search either in a magic scroll script (to learn a spell) or the @addspell command.
-
- Developer
- Posts: 707
- Joined: Sun Jul 22, 2012 12:11 am
Re: Editing spells column in chars table
Just about everything in the database stored as a blob is a bitmask. Do some research to help understand how bitmasks work and then you can use the values in the headers or here to help determine the "position" of the bit you are looking for (you may or may not have to subtract one). Depending on your application language you may be able to cannibalize some of our functions to do what you need (but your license will have to be compatible with ours if you do that).
Re: Editing spells column in chars table
Thanks guys, that should be enough to get me rolling!