January 7, 2004
NWN: Magic Electrifier
Posted by Larry Karnowski at January 7, 2004 3:51 PMOkay, all the regular readers of Hickory Wind can just move right along. This article is for all the Neverwinter Nights geeks out there. I was having trouble figuring out how a particular magic item added in the Shadows of Undrentide expansion pack worked, so I went in and read the code. Now I figure I'll help those other NWN geeks out by sharing what I learned, and hacking it up to be better.
The Magic Electrifier lets you destroy a magic item (or really any item, I think) in order to power up another magic item. For example, say you've got a bunch of spare potions lying around that you've outgrown. You just don't need 'em anymore, but you'd sure love to add some charges back to your trusty Wand of Fireballs that's almost empty. You can "charge" the Electrifier by having it destroy the potions, and then you can put those charges into your wand.
The hard part is knowing how many charges worth of destroyed items you currently have stored in the Electrifier. It's not very user friendly. It doesn't tell you if you have enough to put even a single charge into a wand or other charged-item. And it doesn't tell you in any way shape or form what the algorithm is for how many charges a destroyed object might give. And since you're destroying things, you wanna be careful.
Here's how it works. For each item you destroy, the code finds the real gold piece value of the item. Note this is not what you paid the old man in the magic shoppe for it, nor what he'll give to you if you sell it. Remember, the merchants always buy for less than the real gold piece value, and they always sell at a higher rate. So you'll have to guesstimate. (If you really have to know exactly, go into the NWN editor and look the item up. It'll tell you the real value there.)
Anyway, it adds the real gold piece values of all the items you destroy, and for each 1,000gp worth of stuff destroyed, you can add one charge to an item. Be careful not to go too much over the 1,000gp mark because it rounds down. You might have 1,999gp worth of destroyed items, but it will still only give you one charge. (If however, you had 2,001gp, then it would give two charges. That is of course, if the item you're charging is missing two charges. If it's only missing one, then you're just wasting a charge.)
This item would be so much better if it told you how many gp worth of stuff it had charged, but it doesn't. So I rewired it! I submitted my fix up on NWVault. You can download it, unzip it, throw the *.ncs file into your NWN/override directory, and voila, better magic stuff. Now it'll tell you how many charges are in the Electrifier and how close you are to adding another charge. Much better.
Goddamn, I'm a geek. (sorry for the language, Mom, but it's true!)
Damn Larry, where were you when I was playing Diablo II?
Posted by: G at January 7, 2004 4:53 PMOh great, now you're finally going to push my geek hubby (that'd be "G") over the edge -- he's been hankering for NWN for quite some time now. And now he'll get it and mess with it and I'll be like "Hey baby you wanna take me to a picture show or something?" and he'll turn to me with his dried-out eyeballs (from too much computering, see) and hiss "Nooooooo!" because he's playing NWN instead.
This is how it will be.
I blame you.
Posted by: Stacy at January 7, 2004 6:13 PMGeoffrey, I'd stay away for at least a few more months. I mean, hell, you're still an uber-newlywed. There's no sense in showing Stacy how completely dumb we geeks can get with a truly addictive game. And believe me, NWN is that game -- addictive. I've been battling it for a year and a half, and I'm still hooked. ;-)
And Stacy, I claim no responsibility over the actions of your hubby. You'd better just roll with the punches, girlie! :-P You get what you paid for, and you've already gotten hitched! No lookin' back now -- you already knew he was a geek! Take it from the divorced guy -- me! :-P
Posted by: larry at January 7, 2004 10:33 PMOh and Geoffrey, when you DO get NWN (because I know you will... it's siren song can only be delayed, not ignored), let me know. I've got a group that plays together online every other Tuesday night. You'd be welcome to play with us.
Posted by: larry at January 8, 2004 8:47 AMThanks man, for the advice and the offer of the group. I'll take both, but for now I gotta take my lady to a picture show. That is, if she's not too busy playing Knights of the Old Republic. Yesss... she may not admit it, but she's about as much of a geek as we are.
Posted by: G at January 8, 2004 11:39 AMDang! Busted.
Posted by: Stacy at January 8, 2004 3:38 PMOH Renso, I have heard you say much worse that Goddamn. As a matter of fact, you've heard me say worse. And I know what a geek you are, hell I helped make you that way. And I'm proud of it. You and your brother are both coming along nicely!! Love you,
Posted by: Mom at January 9, 2004 12:32 AM