Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
I do agree that the wiki and other docs are very hard to grasp, I learned how to use the editor by copying existing things and asking for help on the forums.
Calling values starts at the hero and works its way down, each . is like an arrow to the next thing. Dex mod is: hero.child[aDEX].field[aModBonus].value Start at hero -> go to hero's child Dexterity -> Go to Dexterity's field named aModBonus -> get the numeric value of that field A - Is this for a class ability for your Mage Blade class, or a general adjustment? B - You'll need to make 2 different adjustments. Looking at the already existing "Spells Cast Per Day" adjustment is where we will start. Open the editor and make a copy of that on the adjustment tab. It has an eval scrip, click on the button that says "Eval Script" on the upper right. Script looks like this: ~ If we're not enabled, get out now doneif (field[pIsOn].value = 0) ~ If nothing chosen, get out now doneif (field[pChosen].ischosen = 0) ~ Add "the value of our pAdjust field" extra slots to our chosen class' memorize/casting max field at "spelllevel" level, where spelllevel is the value of another field var spelllevel as number spelllevel = field[pSpellLvl].value field[pChosen].chosen.field[cMemMax].arrayvalue[spelllevel] += field[pAdjust].value field[pChosen].chosen.field[cCastMax].arrayvalue[spelllevel] += field[pAdjust].value Something you'll notice is that these do not start with hero.child[Whatever], they start directly using the values on their fields. When there is no "hero.child" the script starts looking on the thing that contains it. So anyway, the above adds, and we can change it to subtract merely by switching the "+=" to "-=" but we need to set up some new variables as well. We need to define a value 1 below spelllevel, and we need 3 times the "pAdjust" value. The below might work: ~ create a variable named spellminus that is a number var spellminus as number ~ spellminus is 1 less than spelllevel spellminus = spelllevel - 1 ~ ditto var minusslot as number ~ minusslot is 3x the value of our pAdjust field minusslot = field[pAdjust].value * 3 Now I told you it was easy to make the switch to subtraction, and now we have our variables to plug in as below: field[pChosen].chosen.field[cMemMax].arrayvalue[spellminus] -= minusslot field[pChosen].chosen.field[cCastMax].arrayvalue[spellminus] -= minusslot So combining the whole script together looks like: |
#181 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Phase: Final Priority: 10000
~ If we're not enabled, get out now doneif (field[pIsOn].value = 0) ~ If nothing chosen, get out now doneif (field[pChosen].ischosen = 0) ~ Add "the value of our pAdjust field" extra slots to our chosen class' memorize/casting max field at "spelllevel" level, where spelllevel is the value of another field var spelllevel as number spelllevel = field[pSpellLvl].value field[pChosen].chosen.field[cMemMax].arrayvalue[spelllevel] += field[pAdjust].value field[pChosen].chosen.field[cCastMax].arrayvalue[spelllevel] += field[pAdjust].value ~ create a variable named spellminus that is a number var spellminus as number ~ spellminus is 1 less than spelllevel spellminus = spelllevel - 1 ~ ditto var minusslot as number ~ minusslot is 3x the value of our pAdjust field minusslot = field[pAdjust].value * 3 field[pChosen].chosen.field[cMemMax].arrayvalue[spellminus] -= minusslot field[pChosen].chosen.field[cCastMax].arrayvalue[spellminus] -= minusslot |
#182 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Now just rename like "Spell Weaving" your copied thing and give it a unique ID like "pSplWeave" and Bob's your Uncle.
C - See below Phase: UserPreLv Priority: 10000 ~ Go through and find all athames that are equipped in the main or off hand, if one is then add one to our variable named "begin" var begin as number foreach pick in hero from BaseWep where "IsWeapon.wAthame & Hero.MainHand|Hero.OffHand" begin += 1 nexteach ~ If our begin value is not 0, then we have equipped an athame and should apply the tags to our Mage Blade class helper. I assume the unique id for this class helper is "cHelpMaB" if (begin <> 0) then perform hero.childfound[cHelpMaB].assign[CastArmor.Light] perform hero.childfound[cHelpMaB].assign[CastArmor.Medium] perform hero.childfound[cHelpMaB].assign[CastArmor.Heavy] perform hero.childfound[cHelpMaB].assign[CastArmor.Shield] endif |
#183 |
Member
Join Date: Jan 2011
Posts: 34
|
Wow, that all actually made sense! Thanks so much. The only problem I'm having now is I can't assign a unique ID that is already in use by something else...See I used MaB as the abreviation, and a similar thing for the Unique ID of the class, but then I deleted the class later. when I went to remake it, I found out that it didn't remove those IDs even though I deleted the things that they were linked to! How can I erase a Unique ID?
|
#184 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Classes have a lot of low level edits.
You will need to delete everything on the Class page and the Class Level page. If that doesn't do it, you have two options: 1) Go into the data directory, find the file, hand edit the XML to remove the reverence. 2) Delete HL, the C:/herolab directory (make a copy), reinstall, install .user files from your copy of files you want to keep. |
#185 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
(I've moved a few posts on a different topic to their own thread in the Authoring Kit forum: http://forums.wolflair.com/showthread.php?t=12461)
|
#186 |
Junior Member
Join Date: Feb 2011
Posts: 2
|
Quote:
Thanks, |
|
#187 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Look at the Weapon Specialization feat to see an example of this.
|
#188 |
Member
Join Date: Jan 2011
Posts: 34
|
Could someone please tell me where the Half-Dragon template is? What file is it in? I need to look at it in the editor to add stuff from Races of the Dragon but there is no file simply named "MM Templates" or "MM - Half Dragon Template". I've been looking for an hour and I can't find it.
|
#189 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
You don't have to find it in the file, you can do a New (Copy) via the template tab in the editor, that will let you look at the eval scripts and bootstraps and whatnot for the Half Dragon Template.
|
#190 |
|
|