• 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

Append to skill descriptions

shatterjack

Active member
I'm working on a feat (Discipline Mastery, from Path of War) that allows a character to take 10 on a number of skills.

I figure the best way to show that is to append a brief explanation to the skill description. But I'm having trouble doing that in a context where I don't know the skill's thingid beforehand, specifically in a "foreach pick" loop.

Relevant code snippet:

Code:
foreach pick in hero from BaseSkill where sTags
  ~ Make sure the skill has 8+ ranks
  if (eachpick.field[skRanks].value >= field[abValue].value) then
    ~Append a "you can always take 10 on this skill" explanation to the skill description
    ~what to do here...?
  endif
nexteach

#appenddesc isn't working for me since it requires the skill's thingid (and I've already tried grabbing it and passing it as a string). I tried appending to the 'descript' field, but then HL give me the error "Only derived fields can generally be modified by scripts".

I tried looking at a skill's tags and fields after using #appenddesc on it, thinking there might be some kind of "extra description text" field that I could use, but if there is I haven't found it.

So how do you guys do it? I'm sure I'm not the first person to have this problem.

EDIT: Okay, I don't know why it only just now occurred to me to look at the Skill Mastery ability since it does almost exactly the same thing. But I was surprised to find out that Skill Mastery has no scripts at all. Maybe this just isn't done?
 
Last edited:
So I would set this up as situational text actually instead of trying to change the description. This allows you to then use the #situational[] macro which is allot easier to work with.

In that case your code becomes:
Final/50000
Code:
foreach pick in hero from BaseSkill where sTags
  ~ Make sure the skill has 8+ ranks
  if (eachpick.field[skRanks].value >= field[abValue].value) then
   #situational[eachpick,"you can always take 10 on this skill",field[name].text]
  endif
nexteach
What is also nice about this approach is that you can do it very late so that all your ranks/values will be set. Plus this text will even easily remind a person "what" is giving them this ability.
 
Using #situational did occur to me, but offended my programmer sensibilities somewhat. Still, it works with "eachpick" unlike #appenddesc, so I agree that it seems to be the best option.

On a side note, Shadow, I've got a system in place for tracking skill association with martial disciplines, which I'll be including in my next submission.
 
The real catch with using something like #appenddesc[] on the skills to show that you can take 10 is visibility. Using a situational will but an * next to the skill name so you can see "Hey there's something special about this skill" and will easily make it visible to whoever is using it. Also Lone Wolf usually does situationals even later than final, usually around Render 10000
 
The real catch with using something like #appenddesc[] on the skills to show that you can take 10 is visibility. Using a situational will but an * next to the skill name so you can see "Hey there's something special about this skill" and will easily make it visible to whoever is using it. Also Lone Wolf usually does situational even later than final, usually around Render 10000
Yep good point. Plus I guess I sort of think of the #situational[] macro as "hey here is info that is useful to remember but does not directly affect the Plus/Bonus/Penalty of an ability". :)

Correct on the Render/10000 timing for LW. I started at Final/50000 and I guess have stuck to it as I have seen any reason yet to go later. But good to bring up for anyone doing LW work should really set it at Render/10000 instead.
 
Be careful about forcing the situationals that far back. The processing of situationals happens at Render/10050 and Render/11000, so that means by putting it at Render/10000, you're getting very close to the limit of when your scripts will work. I know I don't write situationals that late in my code.

One note about appenddesc on skills - a lot of the skills are already near the limit of the amount of text that can be shown, so adding too much extra text can mean it gets cut off by HL's limit on the number of characters that can be shown in a mouseover.
 
Render 10000 is where I put all my situationals, Mathias. That may be why folks thought that was the standard.

I put it there because I want to catch any changes to values used in creating the situationals. It's unlikely that someone will add to, for example, abValue between 10000 and 10050, so by placing my script that close I am almost sure to catch any outside scripts.
 
Last edited:
Back
Top