|
|
Thread Tools | Display Modes |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Thank you. I think that does... although the last time I tried, it didn't work for me. Admittedly, that might have been because I was putting things in the wrong place.
|
#11 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Hmm... and my problem might be one of indirection. My Fireteam thing has an eval function that takes the chosen menu values and pulls tags off of them like so:
Code:
<eval index="2" phase="PreTraits" priority="4900"> <before name="Calc trtFinal"/><![CDATA[ field[skillCh1].chosen.pushtags[FTSkill.ftPhysical] field[ftPhysical].value = field[skillCh1].chosen.tagcount[FTSkill.ftPhysical] + field[skillCh2].chosen.tagcount[FTSkill.ftPhysical] field[ftSocial].value = field[skillCh1].chosen.tagcount[FTSkill.ftSocial] + field[skillCh2].chosen.tagcount[FTSkill.ftSocial] field[ftMental].value = field[skillCh1].chosen.tagcount[FTSkill.ftMental] + field[skillCh2].chosen.tagcount[FTSkill.ftMental] field[ftCombat].value = field[skillCh1].chosen.tagcount[FTSkill.ftCombat] + field[skillCh2].chosen.tagcount[FTSkill.ftCombat] field[ftDamage].value = field[skillCh1].chosen.tagcount[FTSkill.ftDamage] + field[skillCh2].chosen.tagcount[FTSkill.ftDamage] ]]> </eval> |
#12 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Is this what you're looking for?
Code:
perform field[skillCh1].pulltags[FtSkill.?] perform field[skillCh2].pulltags[FtSkill?] field[ftPhysical].value = tagcount[FtSkill.ftPhysical] etc. |
#13 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Hmm... that would be a more elegant solution than what I'm doing now, although that wasn't what I was intending to ask. ^_^ But that will work.
|
#14 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Back to the effects of one menu dictating the others, currently I have the Role MenuThing setting what the valid choices are for the other two MenuThings with the following bit of code:
Code:
<eval index="1" phase="PreTraits" priority="4500"> <before name="Calc trtFinal"/><![CDATA[ var skChoices1 as string var skChoices2 as string skChoices1 = field[FTRole].chosen.tagids[FTSkChc1.?, " | "] skChoices2 = field[FTRole].chosen.tagids[FTSkChc2.?, " | "] field[availSk1].text = skChoices1 field[availSk2].text = skChoices2 ]]> </eval> It feels like I should be able to code it kind of like this: Code:
if (field[FTRole].chosen.tagcount[FTSkChc1.?] = 1) then foreach thing in FTSkill where field[FTRole].chosen.tagids[FTSkChc1.?, " & "] ~ Should only be the one field[skillCh1].chosen = eachthing nexteach endif |
#15 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Why not set up your scripts so that they can detect that circumstance, and generate the correct results without bothering to look at the menu field if that's the case, and then hide the selectors from the user's view - instead, show a label field displaying that one allowed option? (and cancel any error messages about needing to select something if you can figure out that there's only one selection).
|
#16 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
That is indeed a possible option. Extending it out to the case of where a given role allows a range of skills that does not encompass the entire set, is there a way to set the menu options? To use two slightly artificial example:
Infantry - Skill 1: [Combat or Physical] Skill 2: [Combat or Damage] Specialist - Skill 1: [Social or Mental] Skill 2: [Combat] If I have someone who's chosen Infantry, Combat, Combat and then changes their role to Specialist, it would be nice to change Skill 1 to be undecided (or the first valid option) and leave Skill 2 as it is. Alternately, is there a good way to clear choices just so that I avoid having an invalid setting? And I know that the answer might be "No, you can't do that", but I figure it's worth asking. |
#17 |
Thread Tools | |
Display Modes | |
|
|