• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Need help with script Spells per Day

KataH

Active member
I am creating a Ring for Sorcerers that will increase the number of Spells per Day by 1 for 1st, 2nd, and 3rd levels spells.
I am onyl guessing at this as I am not a script writer.

Looking at other items, I came up with this (that does not work)/;

Phase: Final Phase Priority: 10000 Index: 1

~ if we're equipped, apply additional spells per day at levels 1, 2 and 3.
if (field[gIsEquip].value <> 0) then
hero.child[cHelpWiz].field[cCastMax].arrayvalue[1] += 1
hero.child[cHelpWiz].field[cCastMax].arrayvalue[2] += 1
hero.child[cHelpWiz].field[cCastMax].arrayvalue[3] += 1
endif

I am not sure of the correct Thing field to use.

Thanks for your time
 
First I would recommend reading the Glossary of Terms for the Editor. Then check out FAQ#2 for all the places to learn about the editor including YouTube videos. Welcome to the wonderful world of using the HL editor which will be the most frustrating and rewarding thing you can do with Hero Lab. :)

Then looking quickly at your script your going after hero.child[cHelpWiz] which is the "Class Helper Wizard" Pick. But you said you wanted to affect Sorcerer so that is your first issue. I assume when running this script you are getting errors? If not then I assume you have yet to turn on Debugging which makes things easier. See FAQ#9 for how to turn on Debugging and how to find fields.

Armed with the above knowledge you can add a 1 level of Sorcerer and go to "Develop->Floating Info Windows->Show Selection Fields" and look for Sorcerer with a thing id starting with cHelp. Then you can look at all the fields that make up the Sorcerer class helper Pick. You should know be able to correctly write the script and even make sure the values are changing as expected...
 
ShadowChemosh, thank you so very much for all the useful information you have provided. I look forward to reading all this information and discovering this oh so wonderful world of the Editor.

Thanks again!
 
Took me a little while but I got it.
Logically is was hero.child[cHelpSor] but I followed your steps just to be sure and it now works.
Thanks!
 
Back
Top