• 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 scripting for a custom feat.

sorakiba

Member
Hello, I need some help - I'm trying to create a feat that will allow a spellcaster (who relies on spontaneous casting, such as a sorcerer, bard, or oracle, ect...) to be able to gain 1 new spell (from his class’s spell list) to add to his list of spells known per level This is in addition to the number of spells normally gained at each new level in his class.

(I also want it to be able to be taken multiple times)

I found a feat called "Expanded Arcana" which does about 75% of what I want my feat to do... It gives you a new spell when you take it, but it is only a "one shot" feat, meaning that you only get the new spell when you take the feat, not at each new level you gain... (it also has another ability where a player can take two spells, if they are of a lower level than the character's max spell level - I don't want this part)

With the advice of others, I figured out how to remove the "two spells" ability from it, so that it only has the option to add 1 new spell... but I still need help with how to make it give me a new spell at each new level, instead of just when I take it...

These are the remaining scripts: Eval Script:
Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      ~if we haven't chosen anything yet, just get out now
      doneif (field[usrChosen1].ischosen = 0)

      field[actUserMin].value += maximum(field[usrChosen1].chosen.field[cSplMinLvl].value - field[usrIsCheck].value, 0)

      field[actUserMax].value += maximum(field[usrChosen1].chosen.field[cSplMaxLvl].value - field[usrIsCheck].value, 0)

Eval Rule:
Code:
      ~ If we're disabled, do nothing
      validif (tagis[Helper.FtDisable] <> 0)

      ~if we haven't chosen anything yet, just get out now
      validif (field[usrChosen1].ischosen = 0)

      var spelllevel as number
      spelllevel = maximum(field[usrChosen1].chosen.field[cMaxSpLev].value - field[usrIsCheck].value, 0)

      if (spelllevel >= field[actUser].value) then
        @valid = 1
        endif

      spelllevel = minimum(spelllevel, field[actUser].value)

      field[usrChosen1].chosen.field[cKnowMax].arrayvalue[spelllevel] += 1

I'd like to add that I am a complete noob, and have no experience at editing, coding, or scripting, so please keep that in mind when attempting to assist me
 
There are fields both for total character level and for levels in each class. I wonder if you could find those fields and set your script to multiply the bonus spell granted by the feat times the number of levels in the class that grants the spells.
 
There are fields both for total character level and for levels in each class. I wonder if you could find those fields and set your script to multiply the bonus spell granted by the feat times the number of levels in the class that grants the spells.

I hadn't considered that - if possible, my preference would be to have the feat work based on overall character level, rather than the specific class level - for example, if one of my players selects a sorcerer with this feat for their first few levels, then multiclass into fighter for their next several levels, I'd still like for them to continue to gain the bonus spells for this, since it's a feat that is giving it to them...

However, again, I know nothing about scripting or coding, so I'd definitely need someone to tell me what to type?

And I would be very grateful to anyone could figure this out for me.
 
You might be able to do this with a combination of a selector on the feat to choose which class benefits from the extra spells, and then a configurable to add X number of spells (the configurable would have to have an eval script to modify the spells added to it such that they count as spells of the chosen class).

This is probably not the best thing to tackle as your first rodeo with the editor.
 
You might be able to do this with a combination of a selector on the feat to choose which class benefits from the extra spells, and then a configurable to add X number of spells (the configurable would have to have an eval script to modify the spells added to it such that they count as spells of the chosen class).

This is probably not the best thing to tackle as your first rodeo with the editor.

I'm not entirely sure what this means... but if I caught the basic gist of it, then I think that part of this is already a part of the feat - What I mean is that when you select the Expanded Arcana feat, it's red at first, and you have to select the class that you want it to apply to (which is what I think you were saying about a "selector"), then you have to go to the "In Play" tab in HeroLab, and select the level of the spell that you want to add to your character...

This feat also has an ability "Thing" bootstraped to it called "Expanded Arcane 2nd Spell" - I assume this is the script that allows the feat to add two lower level spells, rather than a single spell equal to your highest spell level.

However, I have no idea how to do a "Configurable", nor how to write an "Eval script" - so I'm stuck here still.
 
A configurable is something which adds a new tab to the hero with tables to add various types of things. For example, the Amateur Gunslinger feat adds a configurable which lets you add a gunslinger deed.

It sounds like the Intro to the editor seminar from last gencon might benefit you. It tells you a bit of basic terminology and runs you through a couple examples.

You can check it out here:

https://www.youtube.com/watch?v=fOHWRXtxlhk
 
I'm not sure if this would help someone in assisting me with this, but I have discovered a class "favored class option" called: "fcSorHuman" specifically for human sorcerers that by selecting sorcerer as their favored class, they can then select +1 known spells instead of gaining a skill point or hit point - this is almost exactly what I'd like the feat to do (of course, I'd still like for my players to be able to select either a skill point, or hit point)...

The only Eval Script for it is:

Code:
      perform hero.childfound[cHelpSor].setfocus

      call FavSpellBn

Would this be enough for someone to help me?
 
Last edited:
I am trying to make helpful suggestions, but I don't want to do the whole thing for you. What about my suggestions do you need clarification on?
 
I watched both the intro seminar, and the advanced seminar, but they didn't help me figure out how to do what I want...

I know what a selector is, and what a configurable is now, and I know that I can create a configurable that adds +1 known spells - but I still don't know what to type to put them together, and give them to me at each level, and make them work - I still don't know the language...

:(

When John (one of my players) told me that I could easily just add my own custom stuff to HeroLab, that sold me on it, so I bought it, and it's good for building a character within the core rules - but if adding 1 single feat is this much trouble - having already spent over 6+ hours watching instructional videos, and reading guides, and having to beg forum users for help several times - maybe I really should just give up, and go back to pencil and paper... I had no idea how deep of a rabbit hole I was diving into - that it would be this much trouble just to get 1 feat working - at this point, pencil and paper would just be much faster for my game's needs, rather than continuing to use HeroLab.

Thank you to everyone who tried to help me - game well, everyone. :)
 
I'm sorry that you feel that way, but I hope you do realize that the feat you chose to start off with is a doozy to implement. Many things are pretty simple to enter into HL using the editor, but something like this is certainly a challenge.

If you don't feel comfortable using the editor, then let me suggest you create a feat which is text only and when adding it to a character leave a note in the description to choose a number of "Spells Known" adjustments on the adjust tab sufficient to add however many spells you desire to a chosen class. Then you can at least have a workaround.
 
Back
Top