Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
You do what you have to, personal life comes first - That's my gaming groups motto. I will look forward to it - even if it's a year or so away LOL - Take your time.
|
#31 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
It could take a year honestly, just depends on how things go.
I have a lot on my plate at this time and just can't devote a lot of time to this. Once I figure out the portals and compsets needed to finish up the chapter tab things should go much more smoothly. Its a lot to learn, but I am doing fairly well with it. |
#32 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
I think I have the basics of portals down now. Just having a hard time manipulating them into doing what I need them to do for output.
The screenshot shows what I mean about manipulating them correctly. I'll post the code for that tab here in case someone can help me figure this out. Code:
<portal id="spHelp" style="lblDisable"> <label ismultiline="yes" text="Once you've chosen a specialty, you can view specialty features and choose a special ability."> </label> </portal> <!-- Specialty title label, chooser and info button --> <portal id="spTitle" style="lblNormal"> <label text="Choose Character Specialty:"> </label> </portal> <portal id="spSpecialt" style="chsNormal"> <chooser_table component="Specialty" choosetemplate="SpecThing" showupdate="yes" descwidth="450"> <candidate></candidate> <chosen><![CDATA[ if (@ispick = 0) then @text = "{text ff0000}Select Specialty" else @text = field[name].text if (valid = 0) then @text = "{text ff0000}" & @text endif endif ]]></chosen> <titlebar><![CDATA[ @text = "Choose the specialty for your character" ]]></titlebar> </chooser_table> </portal> <portal id="spInfo" style="actInfo"> <action action="info"> </action> <mouseinfo><![CDATA[ ~Get our currently selected specialty perform hero.findchild[Specialty].setfocus if (state.isfocus = 0) then @text = "No specialty selected." done endif ~append specialty info @text = "{b}" & focus.field[name].text & "{/b}{br}{br}" @text = focus.field[descript].text ]]></mouseinfo> </portal> <!-- spFeatures portal Presents a fixed table where the user can inspect and configure specialty features. --> <portal id="spFeatures" style="tblInvis"> <table_fixed component="Specialty" showtemplate="spSpecInfo" columns="1" alwaysupdate="yes"> <list><![CDATA[ ConfSource.Specialty ]]></list> <headertitle><![CDATA[ @text = "Specialty Features" ]]></headertitle> </table_fixed> </portal> <portal id="spInfoTbl" style="tblInvis"> <table_fixed component="Specialty" showtemplate="spSpecInfo" alwaysupdate="yes"> <list><![CDATA[ ]]></list> </table_fixed> </portal> <!-- Special Ability label, chooser and info --> <portal id="abAbility" style="tblNormal"> <table_dynamic component="Ability" showtemplate="abPick" choosetemplate="SimpleItem" showfixedlast="yes" addpick="resAbility"> <candidate>!Hide.Ability</candidate> <titlebar><![CDATA[ @text = "Add a Special Ability - " & hero.child[resAbility].field[resSummary].text ]]></titlebar> <description/> <headertitle><![CDATA[ @text = "Special Ability: " & hero.child[resAbility].field[resSummary].text ]]></headertitle> <additem><![CDATA[ ~if we're in advancement mode, we've been frozen, so display accordingly if (state.iscreate = 0) then @text = "{text clrgrey}Add Special Abilities Via Advances Tab" done endif ~set the color based on whether the proper number of slots are allocated if (field[resLeft].value = 0) then @text = "{text clrgrey}" elseif (field[resLeft].value < 0) then @text = "{text clrwarning}" endif @text &= "Add New Special Ability" ]]></additem> </table_dynamic> </portal> <!-- spSpecInfo template Displays info for the current specialty in a large template area. --> <template id="spSpecInfo" name="Specialty Info" compset="Trait"> <portal id="details" style="lblNormal"> <label ismultiline="yes"> <labeltext><![CDATA[ var descript as string var nodescript as number nodescript = 1 call Descript @text = "{align left}" & descript ]]></labeltext> </label> </portal> <position><![CDATA[ ~set up our height based on our tallest portal portal[details].width = width height = portal[details].textheight ]]></position> </template> <!-- SpecThing template --> <template id="SpecThing" name="Specialty Thing" compset="Specialty" marginhorz="3" marginvert="5" width="200"> <portal id="name" style="lblXLarge" showinvalid="yes"> <label field="name"> </label> </portal> </template> <!-- abPick template Displays the name of the pick/thing and an info button with the basic description text. This is basically the "SimpleItem" template, with one key difference. Auto-added abilities such as those conferred by races are sorted and colored differently to distinguish their nature. --> <template id="abPick" name="Ability Pick" compset="Ability" marginhorz="3" marginvert="2"> <portal id="name" style="lblNormal" showinvalid="yes"> <label field="name"> </label> </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) ~position our tallest portal at the top portal[info].top = 0 ~center the other portals vertically perform portal[name].centervert perform portal[delete].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,-8] ~position the name on the left and let it use all available space portal[name].left = 0 portal[name].width = minimum(portal[name].width,portal[info].left - 5) ~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> |
#33 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Code:
<!-- specialty layout This layout orchestrates the display of the visual elements that comprise the specialty tab. This amounts to a tital at the top and display of specialty features --> <layout id="specialty"> <portalref portal="spTitle"/> <portalref portal="spSpecialt" taborder="10"/> <portalref portal="spHelp"/> <portalref portal="spInfo" taborder="20"/> <portalref portal="spFeatures" taborder="40"/> <portalref portal="spInfoTbl"/> <portalref portal="abAbility" taborder="90"/> <!-- This script sizes and positions the layout and its child visual elements --> <position><![CDATA[ ~freeze our table in advancement mode to disable adding new choices ~Note: All freezing must be done *before* any positioning is performed. if (state.iscreate = 0) then portal[abAbility].freeze = 1 endif portal[spSpecialt].width = 200 ~position the specialty selection portal at the top of the panel, ~horizontally centered. var space as number space = 10 var total as number total = portal[spTitle].width + space + portal[spSpecialt].width + space + portal[spInfo].width portal[spTitle].left = (width - total) / 2 portal[spSpecialt].left = portal[spTitle].right + space portal[spInfo].left = portal[spSpecialt].right + space ~center the controls veritically within the specialty chooser portal[spSpecialt].top = 3 perform portal[spTitle].centeron[vert,spSpecialt] perform portal[spInfo].centeron[vert,spSpecialt] ~if we don't have a specialty, hide all our tables and show the help label if (hero.tagis[Specialty.?] = 0) then portal[spFeatures].visible = 0 portal[spInfoTbl].visible = 0 portal[abAbility].visible = 0 else portal[spHelp].visible = 0 portal[abAbility].visible = 0 endif ~position our help label under the 'choose' chooser. portal[spHelp].width = width * 2 / 3 portal[spHelp].height = portal[spHelp].textheight perform portal[spHelp].centerhorz portal[spHelp].top = portal[spSpecialt].bottom + 50 ~position the specialty features table under the specialty chooser - always let ~it use all the space it needs, since if it uses up too much we'll just scroll ~scroll the tab portal[spFeatures].left = 0 portal[spFeatures].width = width portal[spFeatures].top = portal[spSpecialt].bottom + 20 portal[spFeatures].height = height ~position the specialty features under the header portal[spInfoTbl].left = 0 portal[spInfoTbl].width = width portal[spInfoTbl].top = portal[spFeatures].bottom + 20 portal[spInfoTbl].top = height - portal[spInfoTbl].top ~position and size the table to span the full layout; it will only use the ~vertical space that it actually needs portal[abAbility].left = 0 portal[abAbility].width = width portal[abAbility].top = portal[spInfoTbl].bottom + 20 portal[abAbility].top = height - portal[abAbility].top ]]></position> </layout> <!-- abilities panel This is the "Abilities" panel shown within Hero Lab. Since we want this panel to appear after Basics and within the traits grouping, we assign it an "order" of 120. The logic for this panel is similar to the logic for the Basics panel, so please refer to the Basics panel for more details. --> <panel id="abilities" name="Specialty" marginhorz="5" marginvert="5" order="105"> <live>!HideTab.specialty</live> <layoutref layout="specialty"/> <position><![CDATA[ ]]></position> </panel> |
#34 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Looks like you want to move most of the label and info portals inside a template, and then put that template on the layout. See the personal tab for an example of how to have a template and a couple of tables all on a tab, and note that the template uses the thing="" option - that's essential, because all those portals in the template look at that to know what thing they should be providing information about.
|
#35 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Alright, I'll check that out then.
I've dug most of what I learned out of the 4e data more than the savage worlds files. Hopefully I can figure this out and get this tab working right. |
#36 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Ok, I think I get what you're saying now. Templates can be placed in a layout with a templateref the same way portals use portalref and can be manipulated just like portals in the layout. I'll have to do some more tinkering but I think I see what you mean here.
Thanks Mathias. |
#37 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
If I read the documentation correctly, based on the hint you've given me, the Features portals should be moved in a template since they're displaying output for the user to inspect and look over. The chooser and special ability menu table have to be left outside the template because templates don't support those processes.
|
#38 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
So for the thing="" option, I noticed it said mscPerson on the personal tab, which I am assuming means miscellaneous personal information. How do I know what to put into the thing= option? Is it a compset item or a component?
|
#39 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
It has to be a specific pick, and it has to be something that's guaranteed to be on all characters.
If you want it to instead display whatever example the user selects from a category of things (such as from a chooser), you can't put the template there directly - your template will instead be a table entry in a table that has only one item. If that doesn't work, I'll have to spend a bit of time explaining how the agent linkage mechanisms work, so you can build something like the Pathfinder/d20 class tabs. |
#40 |
|
|