Magic Questions
Magic Questions
Hey guys, I'm ripping into magic for the first time. I've been back and forth through the package and thought I "understood" most of what's going on.
My problem is this - what fires before the spells do?
In game, I try to cast Magic Arrow. The spell appears in spells.cfg with the correct spell ID, and I have a magic arrow spell listed in my package.
When I try to cast in game, the power words appear over my head, reagents are spent and I get the smoke puff, but the actual magic arrow program does not run. I know because I stuck a print statement in the first line.
I would have expected the program would run and perform all the appropriate skill checks, but obviously I'm mistaken. Anyone help?
Thanks.
My problem is this - what fires before the spells do?
In game, I try to cast Magic Arrow. The spell appears in spells.cfg with the correct spell ID, and I have a magic arrow spell listed in my package.
When I try to cast in game, the power words appear over my head, reagents are spent and I get the smoke puff, but the actual magic arrow program does not run. I know because I stuck a print statement in the first line.
I would have expected the program would run and perform all the appropriate skill checks, but obviously I'm mistaken. Anyone help?
Thanks.
POL095
I changed CheckSkill radically. I confirmed the spells.cfg was okay because I changed the words of power from In Por Ylem to In Your Face and it worked.
If I put a print statement as the first line of the spell and it doesn't print, but I still go through the animation, say the words of power, and fizzle....then I can only assume that something DOES indeed run before the spell script is actually run.
I just can't seem to find it.
I changed CheckSkill radically. I confirmed the spells.cfg was okay because I changed the words of power from In Por Ylem to In Your Face and it worked.
If I put a print statement as the first line of the spell and it doesn't print, but I still go through the animation, say the words of power, and fizzle....then I can only assume that something DOES indeed run before the spell script is actually run.
I just can't seem to find it.
In POL095 a lot of stuff happens BEFORE your script is run.
Hmm..... maybe check out the 096 core-changes txt file. I think it has a list of all the things you have to do manually now.... by implication, the list of things is what the core does in 095.
Note: even if you set the skill to 0 in the cfg file you can still fail the core skillchecks if your skill is below 19. (I had this problem when I tried to make half the spellbook use a different skill attributeid.
Hmm..... maybe check out the 096 core-changes txt file. I think it has a list of all the things you have to do manually now.... by implication, the list of things is what the core does in 095.
Note: even if you set the skill to 0 in the cfg file you can still fail the core skillchecks if your skill is below 19. (I had this problem when I tried to make half the spellbook use a different skill attributeid.
No-one messes with it? Had to laugh when I read that.
One sure way to mess with magic more than you ever really wanted, is to get 096 to behave exactly the same way as 095.
Every time I read someone having problems with the 096 spellbook showing 64 copies of the same spell I just know they are on a path to magic understanding
Things that appear in the core-changes suddenly make sense AFTER you have the problems. At least that's the way I seem to function.
As for 095 magic, your script won't even run if you fizzle and no amount of checking the path and sript in the cfg file will change that. You can script a few things by zeroing out the skillcheck, reagents and delays etc from the cfg files, but in the end you will want 096 because of things like the pre-casting delay as opposed to the delay after saying the magic words etc.
One sure way to mess with magic more than you ever really wanted, is to get 096 to behave exactly the same way as 095.
Every time I read someone having problems with the 096 spellbook showing 64 copies of the same spell I just know they are on a path to magic understanding
As for 095 magic, your script won't even run if you fizzle and no amount of checking the path and sript in the cfg file will change that. You can script a few things by zeroing out the skillcheck, reagents and delays etc from the cfg files, but in the end you will want 096 because of things like the pre-casting delay as opposed to the delay after saying the magic words etc.
I've heard that to craft in 096, you're required to define the realm for the crafter, the item, the material, etc etc....I don't want to switch to a system to requires you to use a "feature" that I don't want to use. If I'm wrong, that'd be great, otherwise, I've got so many custom craftables and materials I don't want the headache.
Also, I don't understand packet hooking. I'm not sure I CAN understand it.
I have a script in hand for a staff that listens for Words of Power. I'm going to use that and do away with the spell book. Players will have to macro the Words of Power. I've considered making all spells dot commands anyway, and allowing players to macro in their own words of power or choose to cast silently.
I've done a couple interfaces in VB, and I've even thought of distributing a windows "spell book" for those who want to play mages. I put together a English-to-Drow translator that sends the translations to the client with a carriage return (i suppose how HOD works).
I'm not even going to try to mess with this if something between the client and the core can cause so much havoc, but thanks for all the help. Again, I haven't seen anyone with as much knowledge in this area as you.
*bows to the wisdom of OldnGrey*
Also, I don't understand packet hooking. I'm not sure I CAN understand it.
I have a script in hand for a staff that listens for Words of Power. I'm going to use that and do away with the spell book. Players will have to macro the Words of Power. I've considered making all spells dot commands anyway, and allowing players to macro in their own words of power or choose to cast silently.
I've done a couple interfaces in VB, and I've even thought of distributing a windows "spell book" for those who want to play mages. I put together a English-to-Drow translator that sends the translations to the client with a carriage return (i suppose how HOD works).
I'm not even going to try to mess with this if something between the client and the core can cause so much havoc, but thanks for all the help. Again, I haven't seen anyone with as much knowledge in this area as you.
*bows to the wisdom of OldnGrey*
You are wrong Exar Kun. If you dont want to use more than one map then you dont have to define realms at all. But the instant you want to use more maps, a huge conversion of your scripts would be required to support the other maps. As long as you stick to 1 map and in UO.EM, the constant DEFAULT_REALM is set to your map name you're using in the Realms folder, you'll be fine never putting in the realm parameter.
Packethooks are a bit difficult because you can crash the client if you write them wrong but they are nice with a little learning.
If you actually still decide to use spellbooks, you can fix the 64 of the same spell part by changing the itemdesc.cfg entry of the spellbook from Container to Spellbook.
Packethooks are a bit difficult because you can crash the client if you write them wrong but they are nice with a little learning.
If you actually still decide to use spellbooks, you can fix the 64 of the same spell part by changing the itemdesc.cfg entry of the spellbook from Container to Spellbook.
You won't have any realm problems if you decide to stay in Britannia.
Take a look at all the functions that take realms as a paramter. As OWO says, all you need to do it make sure the default realm is where you want to live and off you go.
Of course there are lots of little issues to deal with, but you can even make britannia_alt your default realm so that v4 clients behave the same way as v2 clients for pushthrough.
Sorry, we were talking about magic...... I too have long thought of the advantages of using a different spell book. The only thing that stops me is the player convenience of those draggable gumps / icons for quickcasting the spells.
A control script that runs on a mage staff is a nice way to monitor for a player speaking the power words though.
Take a look at all the functions that take realms as a paramter. As OWO says, all you need to do it make sure the default realm is where you want to live and off you go.
Of course there are lots of little issues to deal with, but you can even make britannia_alt your default realm so that v4 clients behave the same way as v2 clients for pushthrough.
Sorry, we were talking about magic...... I too have long thought of the advantages of using a different spell book. The only thing that stops me is the player convenience of those draggable gumps / icons for quickcasting the spells.
A control script that runs on a mage staff is a nice way to monitor for a player speaking the power words though.