Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
In Fudge the behaviour of this skill varies depending on which sources apply. If one source is on then the linked attribute is Strength, another it's Dexterity, a third makes it an Attribute whilst the one I'm currently working on splits it in to three derived skills.
Two obvious questions arise 1. What's the correct way to say if source FudgeFu is on change linked attribute from Strength to Body 2. How do I link a skill instead of an attribute? Do I need to define derived skills in the traits.str file which only exsist if source FudgeFu is present? |
#1 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
It seems to me the simplest way is to define the same skill three times and each one with a different source.
However, if Source 1, Source 2 or Source 3 could any and all be active at the same time, then I'm not sure..... |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
I'd ditch the linkage mechanism for skills entirely.
Then, you can use tags to determine which attribute a skill should pick from. Add a new identity tag to the attributes: <identity group="SkillAttr"/> Then, replace the <linkage> element in each skill with a tag assignment: <tag group="SkillAttr" tag="attrBod"/> Also, find the editor entry that has the skill linkage and replace that with a tag assignment one. Then, in the skills, find the code that uses a link to add the bonus from the attribute, and replace that with a script that uses tags to find the attribute: 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 if (tagis[SkillAttr.?] <> 0) then perform hero.findchild[Attribute,tagids[SkillAttr.?,"|"] if (state.isfocus <> 0) then @value += focus.field[trtFinal].value endif endif endif ]]></calculate> </field> |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
The case where one skill is replaced with three skills is best handled by TCArknight's suggestion of adding sources to them.
You can create the reverse of a source by using a containerreq: Code:
<containerreq phase="Initialize" priority="0"><![CDATA[ !hero#source.FudgeFu ]]></containerreq> |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Actually, cancel all that about replacing llinkages with skills. Here's how to change a linkage:
Code:
<eval index="1" phase="Setup" priority="10000"> <before name="Calc trtFinal"/><![CDATA[ if (hero.tagis[source.KarateBod] <> 0) then if (islinkage[skillattr] <> 0) then perform setlinkage[attribute,Attribute,"thingid.attrBod"] endif endif ]]></eval> |
#5 |
Member
Join Date: Jun 2007
Location: United Kingdom
Posts: 80
|
If sources A, B and C which each define it differently are all active or indeed any two conflicting sources then it becomes GM choice and I need to insert a dropdown to accomodate anyway because that's also the case when none are and the default. But if source D is also present which defines it as an attribute that overrides anything saying it's a skill.
In Fudge Fu all Martial Arts and some Weapon skills have three components, for every skill point spent you can increase the three associated child skills Skill, Technique and Speed by a combined total of three points with a default of one each per skill point. For example if I spend 2 points on Karate then I get 6 points to divide among the skills Karate Skill, Karate Technique and Karate Speed and unless I tell HeroLab otherwise 2 points should be spent on each. My initial thought was it would be best to define a new type of trait to cover this second scenario that only exsisted if a relevant source was present and use a new optional tab to display them. I also can't seem to get the code from Mathias' last post to work but haven't tried the other suggestions. |
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
If the rules are unclear on how to handle the martial arts if more than one of these options are active, I'd recommend having the user choose in the sources which option they want to use. That way, they make the decision once per character, and they can save that option as one of their defaults in the sources.
|
#7 |
|
|