• 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

Custom Menu with Known spells

Lord Magus

Well-known member
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!
 
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.
 
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?
 
Removing !Helper.MagBoot and !Helper.WitBoot does not preclude double listings; adding !Helper.SorcBoot does not seem to change the listing...
 
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.
 
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!
 

Attachments

Last edited:
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.
 
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.
 
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:
I think I caught what the issue is: the extra instances of the listed spells are there because those are either spells that the character has prepared/memorized, or spells given to him through a magic item (bootstrapped spells).

Delving deeper in the program, I identified the feat "Spell Perfection" as having a selector that would probably work well with this.
 
Last edited:
Back
Top