• 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

Menu choices on Knowledge skills

zarlor

Well-known member
I have a situation where I want to add a bonus to one of a set of selected skills and I know how to do that basically:

Menu #1 Source: All Picks on Hero (this will make sure you don't get an error for trying to modify a skill that doesn't exist on the character)
Menu #1 Tag Expression: thingid.skBoating | thingid.skDriving | thingid.skPiloting | thingid.skKnow
Eval Scripts: Pre-Traits/5000 - Before: Calc trtFinal

Code:
~apply the +1 modifier to selected skill
if (field[usrChosen1].ischosen <> 0) then
   perform field[usrChosen1].chosen.field[trtRoll].modify[+,1,"My Edge"]
endif

Notice in the above, however, that one of the selections is for thingid.skKnow. That will show me all Knowledge skills the character has. But let's say I want to really only show a Knowledge skill if it has a domDomain of "Battle" and no other Knowledge skills. Anyone have some idea how I might do that?
 
There isn't a proper solution available for this, because there isn't an option to check text fields in the tag expression.

The next best thing, in my opinion, is to use an evalrule to test the skill that was selected. If it's knowledge, then test if it has the correct text filled in, and complain if that's not the case. That way, even if you didn't offer them a restricted list at the beginning, at least the user knows they picked an invalid skill for this edge.
 
Good idea. I may do that although I just realized that for the specific case I actually needed to do a selection to bootstrap a skill, not add a modifier to it, and since I have no way to do that and it's only 4 possibilities I'll just create 4 versions of the Edge instead. I do have another one, though, where I'd really love to be able to bootstrap from a selection list but I don't think i can do that. Or I haven't figure out how, anyway.

Thanks for the help!
 
I usually prefer to make separate picks, each with fixed bootstraps, when I have to bootstrap based on a selection. But in the cases where separate picks isn't an option for some reason, the way to go is create a script that runs very early, and from the selection, assign a different tag in each case. Then, add all of the potential bootstraps, each with a bootstrap condition looking for a different one of those tags.
 
I'm looking at a selection list of 99 items so creating separate entries for each would be way too unwieldy for the user. Then again I can't make a Tag Expression list that long anyway (at least not in the Editor.) But I'm not sure I understand what you're talking about here anyway. I've never been able to bootstrap something from within a script, only by using the Bootstrap box. Anything else is a conditional bootstrap and we've talked about that here on the forum for a long time and never figured out a way to do it. Am I missing something?
 
Okay, if there are 99 different things to select from, you need to back up step on this entire thing, and figure out a different way to approach all of this.

Give me the game rules for this thing you're trying to implement.
 
It's something for the new Legend system in Weird Wars Rome. One of the possibilities, at character creation, is to be given a free Novice or Seasoned Edge that ignores all pre-requisites except for Edges that rely on lower versions of that Edge (so the requirement for Dodge would still exist before getting Improved Dodge but any other requirements can be ignored.) Not too worried about handling that last bit, at least not for now.

It's also possible to have this happen multiple times. (So you'd get 2 free Edges, etc.)

So in order to implement the Legendary rewards, if you will, I set them up as Edges, but with the caveat that they offset their own cost. In essence they are free. So I'm trying to work out a way to incorporate that ignore pre-requisite into the Edge.

I know of a few ways, one in a mechanic (I can point out the thread if you like) to ignore the Rank requirements but the timing for that method isn't really usable in an Edge so I'd have to figure out how to account for the Edge within the mechanic, I guess. A few things I tried for that didn't really work, though. And I think I'd still need to working in adding the tag for ignore prereqs (I forget the tag at the moment, but I can look it up if you need it.)

If you have some ideas, though, I'd love to hear them. I've been turning over methods in my head and I keep hitting brick walls with them. :)
 
The proper way to handle this is to go in and modify EVERY edge that can be selected this way.

On each of its prereqs, modify it to add the following test:

Code:
if (@ispick <> 0) then
  validif (altpick.tagis[XXXXX.YYYYY] <> 0)
  endif

(That'll also require turning all the exprreqs into prereqs).

Then, you have something else select the edge that is the legendary edge from a drop-down menu. When it selects that edge, it assigns a tag that tells it it's the legendary edge, and it zeroes out the cost of that edge.

The altpick test will then test for that "we're legendary" tag, and make that prereq valid if it is.

This only works once the edge is selected - the user has to ignore any failed prereqs and add the edge anyway, then turn off the failed prereqs by selecting it as the legendary edge.

The other alternative is to make lots of helper picks, each of which bootstraps a different edge, adding the thing.skipprereqs tag to its bootstrap. The helper pick enforces any prereqs like dodge/improved dodge, so that the edge itself doesn't have to.

Unfortunately, when a game throws you this wide a curveball, where they've fundamentally altered the way edges function, it's a lot of work to handle in Hero Lab.
 
So THAT'S how to use that code snippet! Thanks! That's going to be a lot of work since I now have to pull all of those Edges in from the base versions and then preclude them... but I was kind of expecting I might have to do that anyway. I think i feel a case of Carpal Tunnel Syndrome coming on. ;)
 
Last edited:
Actually, I've been thinking about this some more, and I'd go the helper pick route, rather than the replacement route.
 
I was kind of wondering about that, but I'm not exactly sure what you mean by that or quite how to do it. If you wouldn't mind a little enlightening help or a pointer to an example that would be awesome.
 
Create a helper object - something that the user can add to the character, which bootstraps the appropriate edge.

On the bootstrap, add the thing.skipprereq tag.

If there's a prereq you do want to keep, like Dodge/Improved Dodge, then put that prereq on the helper.
 
I think that might look too messy in the interface to deal with. I'd say better to stick to the first method you mentioned. I think that one will be nicer on the person making the portfolio, even if it makes it a bit tougher on me. ;) Thanks again for all the help!
 
Thinking it over some more I think I probably shouldn't deal with this at all except as a note on the "Edge". The reason is that if I create separate Edges to handle this it would not just be messy, but those Edges would all look like they are acceptable Edges, even when the one chosen for this Legacy effect has already been taken. Whereas adding code to handle making existing edges valid if this legacy "Edge" exists would still, also, make all of those look always look valid even when they are only valid once per this version of the Legacy Edge that has been taken. So I'm not sure there really is a good way to handle this at all. Remember that this Legacy effect is not unique, it can be taken multiple times, so I'm not sure there is a good way to definitively trap for it.

I think the best way is to simply note that even "invalid" Edges may acceptable to take with this effect and that they will just need to ignore the validation error on their own.
 
If I were implementing this, I'd create an entirely new table for these edges, so that they're separate from the regular edges, but that's not really an option for you.
 
Back
Top