Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - User Projects

Notices

Reply
 
Thread Tools Display Modes
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old February 13th, 2011, 05:15 PM
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:
Lawful_g is offline   #181 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old February 13th, 2011, 05:17 PM
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
Lawful_g is offline   #182 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old February 13th, 2011, 05:36 PM
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
Lawful_g is offline   #183 Reply With Quote
Snowpaw
Member
 
Join Date: Jan 2011
Posts: 34

Old February 14th, 2011, 05:55 PM
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?
Snowpaw is offline   #184 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old February 14th, 2011, 06:00 PM
Quote:
Originally Posted by Snowpaw View Post
How can I erase a Unique ID?
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.
risner is offline   #185 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 18th, 2011, 12:21 PM
(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)
Mathias is offline   #186 Reply With Quote
Thegraham
Junior Member
 
Join Date: Feb 2011
Posts: 2

Old March 2nd, 2011, 09:40 AM
Quote:
Originally Posted by Lawful_g View Post
Thegraham: Hit the Expr-req button on the Class Level of your prestige class and enter your pre requisites there. You can New (Copy) other prestige class levels for examples to draw from.
Another question. How do you tell it to require a certain number of levels in a class. I tried to copy another but I Keep getting an error that says not defined.

Thanks,
Thegraham is offline   #187 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old March 2nd, 2011, 05:25 PM
Look at the Weapon Specialization feat to see an example of this.
Lawful_g is offline   #188 Reply With Quote
Snowpaw
Member
 
Join Date: Jan 2011
Posts: 34

Old April 20th, 2011, 06:42 PM
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.
Snowpaw is offline   #189 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old April 20th, 2011, 06:51 PM
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.
Lawful_g is offline   #190 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:47 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.