Junior Member
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27
|
Trying to create a matrix that is 4 columns by 5 rows that uses checkboxes. When a checkbox is selected the character receives a talent. The first pick has to come from the first row. As picks are made they may or may not open up the matrix so that second tow checkboxes can be selected. By making a pick in the second row it may open up other boxes on the second row or on the third row and it carries on like this all the way to the forth and fifth rows.
Would use a set of 20 things to hold the matric positions. Each thing would be associated with a box, for example, starting off with a box for Column One Row One. Each box would have the talent bootstrapped to it. I have set the portals up as: <!-- Rank 1 Column 1 Box of the Healer Tree heR1C1Box --> <portal id="heR1C1Box" style="tblInvis"> <table_fixed component="Talent" showtemplate="heR1C1Pick" showsortset="explicit" scrollable="no"> </table_fixed> </portal> <!-- Rank 1 Column 1 Pick of the Healer Tree heR1C1Pick --> <template id="heR1C1Pick" name="Rank 1 Column 1 Pick" compset="Talent" marginhorz="13" marginvert="9"> <portal id="name" style="lblNormal" showinvalid="yes"> <label field="name"> </label> </portal> <portal id="checkbox" style="chkNormal" tiptext="Check to select Talent"> <checkbox field="sTreeHeal" dynamicfield="sTrHealTxt"> </checkbox> </portal> <portal id="info" style="actInfo"> <action action="info"> </action> </portal> <position><![CDATA[ ~set up our height based on our name height = portal[name].height ~if this is a "sizing" calculation, we're done doneif (issizing <> 0) ~the title should span the full width portal[name].width = width ~position the name portal on the left portal[name].left = 15 ~position the checkbox portal next to the name portal perform portal[checkbox].alignrel[ltor,name,35] portal[name].width = 30 ~position the info portals next to the checkbox perform portal[info].alignrel[ltor,checkbox,6] ]]></position> </template> <!-- This is the layout of the Healer Tree. It is Four Columns that runs Five Rows deep. --> <layout id="healer"> <portalref portal="heR1C1Box" taborder="10"/> <!-- This script sizes and positions the layout and its child visual elements. --> <position><![CDATA[ ~size and position the R1C1Box table in the top left; we set the height to ~the full layout height, but the table will only use the space it needs portal[heR1C1Box].width = width / 2 - 5 portal[heR1C1Box].left = 0 portal[heR1C1Box].height = height ]]></position> </layout> The following fields are part of the Talent component: <!-- Field for the specialization healer tree --> <field id="sTreeHeal" name="Select Healer Tree?" type="user"> </field> <field id="sTrHealTxt" name="Healer Tree Text" type="derived" maxfinal="50"> <!-- Not sure what I need to put here. Been trying a lot of things but nothing has worked yet --> </field> This is the talent thing I would like to see in Row 1 Column 1: <!-- Surgeon Talent --> <thing id="talSurgeon" name="Surgeon" compset="Talent" isunique="yes" description="When making a Medicine check to help a character heal wounds, the target heals 1 additional wound per rank of Surgeon."> <fieldval field="talForce" value="0"/> <fieldval field="sTreeHeal" value="heR1C1Box"/> </thing> Appreciate any help that could get me back on track. Last edited by Tengu1958; August 13th, 2016 at 06:36 PM. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
I do not get what you're trying to accomplish. Are you trying to set up bootstraps that are turned on or off by checkboxes?
|
#2 |
Junior Member
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27
|
Yes. Trying to get the portal to work first. Then I worry about the bootstraps. Probably have flawed logic.
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Do you mean you want the user to check a box, and the ability gets added to their character?
That's definitely in the "not recommended practice" category. Even if it will make things look exactly like they do in the book, Hero Lab does not have good built in mechanisms to support that, and you will end up with a large block of messily hacked code in order to support that. If you want to offer ability selections to the user, I recommend using the normal tables. |
#4 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Tengu: Check this out..... maybe you can run with what I came up with....
|
#5 |
Junior Member
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27
|
Well I have been thinking my logic is flawed, Mathias.
Thanks TCArknight. Will definitely look at your files. |
#6 |
Junior Member
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27
|
What you did TCArknight is amazing. That is what I am trying to get to. This should give me some insights as to where I am going wrong.
|
#7 |
Thread Tools | |
Display Modes | |
|
|