• 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

how to add class special ability via a trait?

psych777

Well-known member
i'm trying to build a trait that gives a class special ability but seem to be banging my head against the wall trying to figure it out.
so how would i add an ability such as the Oracle's Curse when this trait is selected? if i don't have the oracle class it gives the curse ability (with oracle level as character level), if i do have the oracle class it gives a additional curse.
 
Manually bootstrap it via the bootstrap button, you'll have to add a ClSpecWhen tag to the bootstrapped copy though I think.
 
ouch, i'd hoped to avoid bootstraps for a very long time.

so i'm trying to do a bootstrap but no matter how many developer windows and tags/fields i look at, i can't figure out which Thing i need to put in the bootstrap. nothing about the oracle's curse shows up. i did find that each individual curse is in the Thing list, but when i picked one it automatically added it to the Special tab (after giving errors about not being able to calculate a script for 'xTotalLev' when selecting the trait).
 
You'll need to use a configurable for this - you need a new table for the user to add the specific curse they want.
 
i know it has been awhile but i had given up on this because i couldn't figure it out. now i'm back to look at it again and still having trouble.

i can't figure out where to create a table for them to select the curse. if i bootstrap a curse to the trait it just shows up in the Special tab already applied to the character. if i bootstrap the curse to a configurable, then bootstrap to the trait it does the same thing. if more than one curse is bootstrapped they all show up in the special tab. where am i able to make the table for them to choose just one?
 
Don't bootstrap the curse to anything, create a configurable and bootstrap that to your trait.

When making the configurable set "custom ability total" to 1, and below that enter this for the "primary candidate expression"

Code:
SpecSource.cHelpOra & Helper.Secondary

Then your configurable will have a table to add the curse to.

In order that it has the curse has the correct level, add an eval script to the configurable to set it's level:

First 495
Code:
field[cfgLevel].value += WHATEVER
 
Last edited:
thanks aaron.

so i deleted the curse bootstraps. set the custom ability total to 1 and added that code to the primary candidate. added the script for the level to equal char level.
then on the trait i bootstrapped the configurable to it.

when i select the trait on my char nothing happens though. do i need to set a condition of some kind on the bootstrap (that is on the trait)?
 
So you bootstrapped the configurable to your trait, but when you add the trait the tab for that configurable isn't showing?
 
So you bootstrapped the configurable to your trait, but when you add the trait the tab for that configurable isn't showing?

correct. no tab shows up. all i see is an entry on the Special tab but nothing selectable. see pic attached
 

Attachments

  • trait.jpg
    trait.jpg
    105 KB · Views: 3
If you send me a copy of the .user file, I will take a look at it after we get the monthly release finished.
 
Make sure the configurable is not source marked and do a reload of HL otherwise the configurable won't display. Test Now does not work well with configurables.
 
Make sure the configurable is not source marked and do a reload of HL otherwise the configurable won't display. Test Now does not work well with configurables.

ahhhhhhhh
that has made a difference. the tab shows up now and asks me to choose a primary ability. it then shows the primary ability but also shows the same thing as a secondary ability. gonna try taking the secondary part off the expression and see if that clears it....
 
hmmm. that wasn't it. taking out the " & Helper.Secondary" just made the list longer as things like the oracle revelations were then in the list. and still selecting a curse i got the primary and secondary showing (with secondary showing as overspent)....so looking again into what might fix it...

edit: added picture
 

Attachments

  • curse.jpg
    curse.jpg
    68.4 KB · Views: 3
Last edited:
That's annoying. I didn't think it mattered which table you used. Instead of the primary table, use the secondary table to add the ability. That means you'll have to alter the build of the configurable.
 
That's annoying. I didn't think it mattered which table you used. Instead of the primary table, use the secondary table to add the ability. That means you'll have to alter the build of the configurable.

sweet that seems to have done it. now to play with the curses and see if the level part is working...which having not used curses before could be an interesting experiment
 
okay so the level part isn't quite cooperating.
to get the cfg level to match the char level i had to change the timing of the script to post-levels 10000 (in case that is important)
i can see the cfgLevel is getting the correct number, however it isn't changing the curse ability like it should.
for instance, i'm using the Blackened curse for testing. it gives a -4 penalty to attack, but at 10th level reduces to only -2 penalty to attack.
how do i make the current char level count as an oracle level within the configurable?
 
It's almost certainly the timing. Post-Levels 10000 is too late for the configurable to pass that information along to anything which is inside it.

How are you counting the character level?
 
~set the configurable level to that of the char level
field[cfgLevel].value += hero.child[Totals].field[tTotLevel].value

if it is just timing that would be great, i just assumed the regular curses were going off the actual oracle class level.
i did look at the Blackened curse in editor to see what it was doing and it was using the abValue of cOraBlacke to affect the penalty. i added the below to the script of the configurable which seems to work:

if (field[cfgLevel].value >= 10) then
if (hero.childlives[cOraBlacke] <> 0) then
hero.child[cOraBlacke].field[abValue].value += 2
endif
endif

but if timing fixes it that will be much easier than writing out script for all the curses on my configurable :D

how do you guys get the code in those box things?
 
Try putting the timing to First 495 and instead of looking at that herofield, use the #totallevelcount[] macro instead. That counts tags on the hero, which are added fairly early.
 
Back
Top