• 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 Ability Duplicate Help

Why does it move the Normally secondary Archetype Trainings to be tertiary? Do you use the secondary abilities table for something else? Do you get the archetype abilities at a different rate if they are cross training rather than from an archetype?
 
I moved it there because the scripted would over write the other secondary abilities. So I put it in a slot where there was nothing to overwrite.
 
Which script? I still don't think I'm working off the same set of files you are. There aren't any eval scripts on Cross Training: Engineer in my copy.
 
So if I am understanding correctly what the aim is, you have this "Modern Hero" class, which gets primary abilities of a general sort called "Talents", and then can add secondary abilities called "Archetype Trainings" which depend on what archetype you've applied to the class. However some Talents function as Archetypes as far as opening up the choices you have for your Archetype Trainings. That about the long and the short of it?

As I see it, there are 2 ways to approach this, but neither entails using a third table.

You could:
A - Have all abilities show in the Secondary table, but give them pre-reqs that check for either the archetype or the Talent (pretty much what you have already).

B - Modify the candidate expression on the Class Helper so it only shows the ones you qualify for, and remove the pre-reqs checking for the archetype or the talent (I think this is what you're shooting for).

Is B the one you're aiming for? Because if so, I can guide you through setting the candidate expression correctly.
 
So something like this:

perform hero.childfound[cHelpMdH].assign[sClass.arMHEngine]

Well, that didn't seem to work. IDK - I think the candidate expression is the way to go if you can help.
 
Last edited:
Alright, I'm assuming you know how to set up debugging, if not, tell me and I'll go into that.

So, first, add a level of your modern hero but nothing else. Now go to "Show Selection Fields" and choose the Modern Hero Class Helper. There should be field called "cCst2Expr". This stores the Candidate Expression which determines what secondary abilities are displayed for you to pick from.

For just the class, I am showing it as "(SpecSource.cHelpMdH) & Helper.Secondary". This means "Display any Secondary Ability with the SpecSource.cHelpMdH tag". And since all your secondary class abilities have the SpecSource.cHelpMdH tag, all are displayed.

Archetypes have their own, automated method of changing the candidate expression. Once you add an archetype (for example the Medical Examiner archetype) it changes to "(SpecSource.arMHInvest | SpecSource.arMPSGGMdE | SpecSource.cHelpMdH) & Helper.Secondary". This means "Display any Secondary Ability with the SpecSource.cHelpMdH tag, or the SpecSource.arMPSGGMdE tag, or the SpecSource.arMHInvest tag"

So looking at the secondary custom abilities in these files, it looks like many of them are marked with the SpecSource.cHelpMdH tag (this is marked in the "Available to Class(es)" button, which is the second thing in the editor for Custom Abilities). The first thing I'd do is replace that tag with the one specific to their particular archetype. For example, the Defensive Position custom ability needs to be switched.

Sidenote, is the Medical Examiner archetype supposed to have 2 SpecSource tags, or is that a bug?

Now half the work is done, Yay!

So how do we get talents to do the same thing as archetypes? Well, that does take scripting. At the same phase and priority you're currently setting the tertiary candidate expression, you can set the secondary like this:

Code:
        ~ we'll overwrite the secondary abilities' expression, since we need
        ~ to allow it to choose the abilities of our associated archetype

        ~ First set up a variable to hold and modify the expression
        var newexpr as string

        ~ It starts the same as the original
        newexpr = linkage[table].field[cCstS2Expr].text

        ~ Then we replace the end with our own, which appends an additional SpecSource tag as an option
        newexpr = replace(newexpr,") & Helper.Secondary"," | SpecSource.arBLARG) & Helper.Secondary",0)

        ~ Now replace the old expresson with our modified one
        linkage[table].field[cCstS2Expr].text = newexpr

"arBlarg" should be replaced with the unique ID of the archetype this cross training talent mimics.

Once that's done, make sure you test it, and verify everything works, including the interaction between archetypes and cross training Talents.
 
Back
Top