Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Quote:
Thanks for the help! The problem I was having is that even though it had the !Hide.Attribute <live> tag on the pick template, that wasn't having any effect. It wasn't never showing up, it was always visible no matter what.... I'll try changing some timings around and see what happens. HL rocks and even though it's a tough learning curve, the flexibility it offers is bar-none. |
|
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Quote:
By putting the Live tagexpr on the *template*, you are not going to get the behavior you want at all. The Live tagexpr on the template performs the test against the tags on the *hero*. It also only applies to templates that are *not* used within tables. If a template is used for table, the live state of the table *portal* dictates whether the table appears or not. If I understand correctly, you want all attributes to appear in the table, except for the Psionics attribute. That one attribute should be controlled via the presence of a tag. To accomplish this, you need to control what appears *within* the table - not the visibility of the table itself. You control the contents of a table via the Live tagexpr within the table *portal* - not the template. Using the standard table portal used within the Skeleton files as a starting point, the revised table portal would look like below with the added restriction of only showing attributes that are lacking the tag. Code:
<portal id="baAttrib" style="tblInvis"> <table_fixed component="Attribute" showtemplate="baAttrPick" showsortset="explicit" scrollable="no"> <live>!Hide.Attribute</live> <headertitle><![CDATA[ @text = "Attributes" ]]></headertitle> </table_fixed> </portal> |
|
#12 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Rob,
Thanks, but no luck. When I have it the exact way you do, I get "Encountered Unknown element tag 'live' " Code:
<portal id="baAttrib" style="tblInvis"> <table_fixed component="Attribute" showtemplate="baAttrPick" showsortset="explicit" scrollable="no"> <live>!Hide.Attribute</live> <headertitle><![CDATA[ @text = "Attributes" ]]></headertitle> </table_fixed> </portal> |
#13 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Doh! That should be "list" instead of "live". Sorry, I'm just too frazzled and sleep-deprived with the big crunch leading into GenCon in a few days. My brain knew it was "list", but my fingers just typed "live" because that's what I had been looking at in your post. Sorry!
|
#14 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
LOL 's ok.
I just wish I was able to get to GenCOn, meet you all and attend some seminars. I completely understand how rough it must be. Just enjoy the Con and keep cranking out the good stuff! LOL Edit: Oh, one other related thing. I'm trying to use: perform assign[Edge.IsPsionic] when the Psionic edge is added. I get an error that Edge.IsPsionic not defined. I've got this in tags.1st: <group id="Edge" dynamic="yes"> <value id="Edge"/> </group> What am I missing? Last edited by TCArknight; August 7th, 2009 at 07:38 PM. Reason: added question... |
#15 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,215
|
Even if your tag group is dynamic, you should add any tags you intend to use before using them in a script.
Currently, your only Edge tag is Edge.Edge Also, for testing purposes, don't you want to use: perform hero.assign[Edge.IsPsionic], so that the tag is on the hero, and not wherever your script is? |
#16 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Thanks!
That did it! Making much greater progress now! |
#17 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Howdy!
Ran into another snag... I'm trying to allow the choice of one of the 4 reactionsto gain a bonus. From looking at the walkthrough, I should probably use the following portal: Code:
<portal id="menu1" style="menuSmall"> <menu_things field="usrChosen1" component="none" maxvisible="10" usepicksfield="usrSource1" candidatefield="usrCandid1"> </menu_things> </portal> However, although I get Adaptable: -choose- in red for the racial ability the menu to choose never shows up. My template and the Racial ability: Code:
<thing id="abAdapt" name="Adaptable" compset="RaceAbil" isunique="yes" description="Description goes here"> <fieldval field="usrCandid1" value="thingid.Adaptable"/> <tag group="Hide" tag="Ability"/> <tag group="Hide" tag="RaceAbil"/> <tag group="ChooseSrc1" tag="Hero"/> <!-- Bootstrap Choose either Sta, Qui, Wil for a +2 bonus --> </thing> <template id="raPick" name="Racial Ability Pick" compset="RaceAbil" marginhorz="3" marginvert="2"> <portal id="name" style="lblNormal" showinvalid="yes"> <label field="name"> </label> </portal> <portal id="menu1" style="menuSmall"> <menu_things field="usrChosen1" component="none" maxvisible="10" usepicksfield="usrSource1" candidatefield="usrCandid1"> </menu_things> </portal> <portal id="info" style="actInfo"> <action action="info"> </action> <mouseinfo/> </portal> <portal id="delete" style="actDelete" tiptext="Click to delete this item"> <action action="delete"> </action> </portal> <position><![CDATA[ ~set up our height based on our tallest portal height = portal[info].height ~if this is a "sizing" calculation, we're done doneif (issizing <> 0) ~determine whether our menus are visible ~Note: Remember that a non-empty tagexpr field indicates menu selection is used. ~if (field[usrCandid1].isempty <> 0) then portal[menu1].visible = 0 ~ endif ~position our tallest portal at the top portal[info].top = 0 ~center the other portals vertically perform portal[name].centervert perform portal[delete].centervert perform portal[menu1].centervert ~position the delete portal on the far right perform portal[delete].alignedge[right,0] ~position the info portal to the left of the delete button perform portal[info].alignrel[rtol,delete,10] ~position the menus to the left of the info in the available space perform portal[menu1].alignrel[rtol,info,10] portal[menu1].width = (portal[info].left - portal[menu1].left - 20) / 2 ~position the name on the left and use availble space, with a gap for menus portal[name].left = 0 ~portal[name].width = minimum(portal[name].width,portal[menu1].left - portal[name].left) portal[name].width = 50 ~if the ability is auto-added, change its font to indicate that fact if (candelete = 0) then perform portal[name].setstyle[lblAuto] endif ]]></position> </template> Suggestion? Thanks! Thomas |
#18 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Also:
Code:
<component id="DeReac" name="Derived Reaction" autocompset="no"> <!-- Derived traits are based on other traits. The "calculate" script on the "trtFinal" field value will work great for most traits, but NOT for derived traits. Consequently, derived traits need to re-calculate the field value AFTER the traits derived from are properly calculated. So the individual calculation scripts for each derived trait must occur AFTER the initial "trtFinal" calculation and BEFORE this derived calculation. We can also omit any "user" value from the calculation since derived traits have no user-defined facet. --> <eval index="1" phase="Traits" priority="6000" name="Derived reaFinal"><![CDATA[ field[reaFinal].value = field[reaBonus].value + field[reaInPlay].value ]]></eval> </component> <thing id="abBraklul" name="Brak'lul" compset="RaceAbil" isunique="yes" description="Description goes here"> <tag group="Hide" tag="Ability"/> <tag group="Hide" tag="RaceAbil"/> <eval value="1" phase="Traits" priority="10000"> <![CDATA[ var total as number total = hero.child[reStamina].field[reaBonus].value total += 2 hero.child[reStamina].field[reaBonus].value = total ]]></eval> </thing> |
#19 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
The first issue is that you'll never have anything show up in the menu to select from with this tagexpr. You have assigned the tag "RAbil.Adaptable", but you will only be showing picks that possess the "thingid.Adaptable" tag. You need to change the tagexpr to match the tag you've assigned.
|
#20 |
|
|