Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old November 7th, 2012, 04:15 AM
Hello everyone

Can somebody point me to a good example of, or explain to me, how to define a custom menu for a spell adjustment?

(I am trying to code the "Contingency" spell adjustment, and I want the user to select from a drop-down containing all of his known spells. This is not in the available menu options in the editor, so I have to define a new tag... and that's where I am stumped, as I can name a new tag but don't know how to "link" spells to it: hence the menu on the character adjustment tells me "nothing to select")

Thanks!
Lord Magus is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 8th, 2012, 08:23 AM
This is a little counter intuitive.

First, choose your tag you made, it won't actually affect the candidate expression, but the presence/abscence of it is what determines the existence of a selector.

Hit the field button, and assign a value of 1 to the "pUsePicks" field. pUsePicks determines if the selector looks at things that are on the hero (Picks), or all things including those not on the hero (Things).

Add this eval script at PreLevels 11000
field[pCandExpr].text = "component.BaseSpell & !Helper.MagBoot & !Helper.WizBoot & !Helper.WitBoot"

That will set it up to select among all spells, except the 0 level ones that are repeatedly bootstrapped automatically in Magus, Wizard, and Witch spellbooks.
Aaron is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 8th, 2012, 10:48 AM
Damn I didn't know this was possible. OMG that opens up allot fun stuff now!

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #3 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old November 9th, 2012, 02:30 AM
Works very well, thanks a lot!

3 more "little things" so it's "perfect": in the drop down list, many spells appears twice, even three times: is that because they are on the Magus list, the Witch list, and/or the Wizard List? If so, is there a way to limit the list to one listing of each spell?
(after all, contingency being strictly a wizard/sorcerer spell, I don't think a multiclass character could use it to set up a witch or magus spell to be contingent)
I would think I would have to delete the "!Helper.MagBoot" and "!Helper.WitBoot", while adding a "!Helper.SorcBoot" would include a Sorcerer's known spells, but they would be all listed twice?

Then, the spell being used by contingency must be of a spell level no higher than 1/3 the character's caster level, rounded down. Pointers on this?

Finally, I tried assigned the ShowSpec helper to the adjustment, so the Contingency shows in the Specials menu; it doesn't work, though at least the program doesn't throw an error for this. Is a workaround possible?

Thanks again for all your help?
Lord Magus is offline   #4 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old November 9th, 2012, 02:47 AM
Removing !Helper.MagBoot and !Helper.WitBoot does not preclude double listings; adding !Helper.SorcBoot does not seem to change the listing...
Lord Magus is offline   #5 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 9th, 2012, 12:52 PM
Could you send me what you've got in the user file? Or anything else odd about the character you are adding this to?

I did test the instructions I gave, and I didn't see the duplicates, so I am unsure where things went wrong here.

You could probably limit the level of the spell by adding an incrementer and looking at the value of that. If the chosen spell is higher than you'd allow, then have it throw an error.

As far as I know, it's not possible to show an Adjustment on the Specials Tab, but you could make an ability that is bootstrapped by the adjustment to show there.
Aaron is offline   #6 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old November 10th, 2012, 01:12 PM
Quote:
Originally Posted by Aaron View Post
Could you send me what you've got in the user file? Or anything else odd about the character you are adding this to?
Here is a character portfolio; I adjusted the sources to strip the Community Bestiary stuff. Also joined is my .user file.

In the supplied character portfolio, many spells are duplicated in the list; in a portfolio created from scratch, only the cantrips seem to be.

It's functional enough for my personal use, of course, but as I'd like to give this to the community I look for it to be "just right"

Thanks for your time!
Attached Files
File Type: email PFRPG_Adjustments_spells.user (6.3 KB, 1 views)
File Type: email Azaven trial.por (132.0 KB, 0 views)

Last edited by Lord Magus; November 10th, 2012 at 01:15 PM. Reason: Forgot the files
Lord Magus is offline   #7 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old November 10th, 2012, 01:21 PM
Tried it for a sorcerer: lists available spells levels 1 and up just fine, but lists all cantrips as available, even those the sorcerer does not know, and lists some of those multiple times.

I work on HeroLab for the Mac, up to date.
Lord Magus is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 10th, 2012, 01:33 PM
Your script says:

field[pCandExpr].text = "component.BaseSpell&!Helper.WizBoot"

That's not everything in Aaron's original suggestion. You need Helper.WitBoot and Helper.MagBoot, too.
Mathias is offline   #9 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old November 10th, 2012, 02:22 PM
Quote:
Originally Posted by Mathias View Post
Your script says:

field[pCandExpr].text = "component.BaseSpell&!Helper.WizBoot"

That's not everything in Aaron's original suggestion. You need Helper.WitBoot and Helper.MagBoot, too.
Strange... I had removed those earlier because their presence didn't change a thing in the Azaven portfolio I work with... Now, putting back the helpers in the script indeed takes care of the repeated cantrip issue, and in fact the script does work perfectly well for a new character (tested with a 12th level basic wizard created from scratch), but still throws me a bunch of duplicates with my Azaven portfolio from the Community files.

Hmm... now I get the point of those helpers. Thanks!

Last edited by Lord Magus; November 10th, 2012 at 02:25 PM.
Lord Magus is offline   #10 Reply With Quote
Reply


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 01:44 PM.


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