Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
As you may remember I'm trying to use HeroLab for the Fudge system. One of the main things about this system is that everything is optional. By default and in my preferred setting, there is no link between the Attributes and the Skills. I'm unsure of where to start on seperating the two - how do I do so safely so that skills don't need me to specify a linked attribute?
I'll be creating the system skeleton data files again as I seem to have destroyed key parts of the derived attribute file copy with my earlier experiments as hit points are skill based in the setting I will be using - I'll probably have a more specific question on this later. |
#1 |
Junior Member
Join Date: Jun 2008
Posts: 11
|
I have only been working with the authoring kit for the last month or so, so there are things I am still learning about it. However, I have been looking at skills quite a bit the last couple of weeks.
If you are using the skeleton files, skills are defined in traits.str and things_skills.dat. traits.str has the "Skill" Component with a header of: Code:
<component id="Skill" name="Skill" autocompset="no"> Code:
<!-- Net final roll that includes the value of the linked attribute --> <field id="sklRoll" name="Net Skill Roll" type="derived"> <calculate phase="Final" priority="5000"> <after name="Calc trtFinal"/><![CDATA[ ~only access the linkage if the skill is directly on the hero; if not, it is ~likely within an advancement gizmo and no linkage will exist there if (container.ishero <> 0) then @value = field[trtFinal].value + linkage[attribute].field[trtFinal].value endif ]]></calculate> </field> <!-- Each skill is associated with a specific attribute that must be identified --> <linkage linkage="attribute" optional="no"/> Hope this helps. Bill Whitmore |
#2 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
It depends exactly how you want skills and attributes to work. I'm going to assume for this answer that some players will want attribute values included with skills, and some won't.
First, you would need to create a source - http://hlkitwiki.wolflair.com/index....ent_%28Data%29 to let someone enable attributes adding to skills. Let's say that you choose the unique id "SklPlsAttr" for your source id. Then, simply change the Calculate script that dragon linked above to something like the following: Code:
if (container.ishero <> 0) then @value = field[trtFinal].value if (hero.tagis[source.SklPlsAttr] <> 0) then @value += linkage[attribute].field[trtFinal].value endif endif Does this answer your question? |
#3 |
Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
Sorry for the delay in getting back on this one, been a bit busy with real life, the answers given look fine, but haven't actually had chance to change the script yet - however as nothing's been changed that should affect this, they should still work.
|
#4 |
Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
Adding the script for the SklPlsAttr is causing timing errors, I think this is probably due to where I'm adding it (immediatly above the component block for id="Skill"). Here's the code I'm using:
Code:
<source id="SklPlsAttr" name="Skills Plus Attribute"> </source> |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Sources go in the control.1st file. By putting a source above the skills, you've put it between two different component definitions. The various definitions in Hero Lab need to be in order, or the compiler won't know what to do with them.
Here's the order: http://hlkitwiki.wolflair.com/index....File_Reference |
#6 |
Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
Finally got it working - it's really important to copy codes correctly because I was getting an error message due to putting the "then" before the "@valid" instead of at the end of the "if" line. Next project: making the example attributes show only if an appropriate source is present (d20mimic) - I don't think I need help with this yet but will come back if I have problems.
|
#7 |
|
|