Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
2 Questions:
1) I have an ability thing called Skilled which has two usrChosen selections with ChooseSrc1 and ChooseSrc2. Code:
<thing id="abSkilled" name="Skilled" compset="RaceAbil" isunique="yes" description="Description goes here"> <fieldval field="usrCandid1" value="component.Skill"/> <fieldval field="usrCandid2" value="component.Skill"/> <tag group="Hide" tag="Ability"/> <tag group="Hide" tag="RaceAbil"/> <tag group="ChooseSrc1" tag="Hero"/> <tag group="ChooseSrc2" tag="Hero"/> <eval value="1" phase="Final" priority="4000"> <![CDATA[ if (field[usrChosen1].ischosen <> 0) then field[usrChosen1].chosen.field[trtFinal].value += 1 endif if (field[usrChosen2].ischosen <> 0) then field[usrChosen2].chosen.field[trtFinal].value += 1 endif ]]></eval> </thing> Skilled: ChooseSrc1, ChooseSrc2 If the same choice is made for both, then it displays Skilled: MyChoice, MyChoice Is there a way to get that to display just Skilled: MyChoice (+2) ? 2) I want to let a Skill have an indicator that displays if there is a specialty selected for a skill. The skill should have a way to select additional specialties, the number of which are limited only by points remaining to spend on skills. Or possibly adds a new line under the skill with a chooser of appropriate specialties. How do I set something like that up? Last edited by TCArknight; October 22nd, 2009 at 06:13 PM. |
#31 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
Go to the components.core file, to the UserSelect component, and look at eval script #1. That's the script that appends the names of choices 1 & 2 to the name.
So, you have a couple of options; if this ability is unique, and there's nothing else that works like this, copy that script onto your skilled thing, and change the timing to Render/501 (just after the regular version), then re-write the script to suit the way you want to display things. It will run, and replace what the previous script wrote. If this is something that pops up in many things in the same component, you can put the copied script on that component, and set everything up so that the script only runs if some tag is present, or just run it only if chosen1 and chosen2 are the same thing (field[usrChosen1].chosen.uniqindex = field[usrChosen2].chosen.uniqindex) Last edited by Mathias; October 22nd, 2009 at 06:10 PM. Reason: forgot to identify the component to look in |
#32 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
Yep, that worked, thanks!
Now I just have to figure out the linkage for the specialty to the Skill. |
#33 |
|
|