View Single Post
Tengu1958
Junior Member
 
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27

Old August 13th, 2016, 04:31 PM
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.
Tengu1958 is offline   #1 Reply With Quote