View Single Post
lazarus
Junior Member
 
Join Date: Dec 2007
Posts: 22

Old December 8th, 2007, 11:21 AM
Quote:
Originally Posted by huntercc
As for the charges, the only way I can see adding new ones is to edit the dat files by hand. If you take a look at srd_charges.dat you can see how the default ones are defined.
Charges are handled by field[hTotal]. Here's the script to one ability I wrote:

Code:
var result as number
var x as number

~ usable Wisdom bonus times per day
x = hero.child[aWIS].field[aModBonus].value
~ minimum 1
if (x <= 0) then
 x = 1
endif

~ set charges
field[hTotal].value = x

~ show in charges tab
result = assign[Helper.ShowCharge]
I presume, given this, that if you're mucking with the Charges of something that is not your current Thing, you can do it by finding the Thing, and then setting its field[hTotal].value.

[edit]And if I go and read what you're /actually/ trying to do ... here's how I'd handle it. I'd create Specials for each of the spells it can cast (if there's a separate pool), and link those in as bootstraps. Make sure that there's the (Blue Crystal Staff) as the source, and everything should be clear.[/edit]

Laz

Beware the JabberOrk
lazarus is offline   #28 Reply With Quote