Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Ok for #3 I see, it adds the name to a field and appends the field to the skill, shouldn't be too tough to figure out, but I'm still having trouble with #2. I've used the needtag and if I'm reading correctly I tell it to use the Skill.? tag on the skill and the SkillList.? tag on pick and it should only show the intersection of the two, but it still shows everything.
This is my form portal Code:
<portal id="expExpert" style="tblNormal"> <table_dynamic component="Expertise" showtemplate="expPick" choosetemplate="SimpleItem" headerpick="SkillHelp" addpick="SkillHelp" showfixedlast="yes"> <candidate>!Hide.Expertise</candidate> <needtag container="Skill" thing="SkillList"> </needtag> <titlebar><![CDATA[ @text = "Add an Area of Expertise" ]]></titlebar> <description/> <headertitle><![CDATA[ @text = "Areas of Expertise" ]]></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 Areas of Expertise Via Advances Tab" done endif ~set the color based on whether the proper number of slots are allocated @text &= "Add New Area of Expertise" ]]></additem> </table_dynamic> </portal> |
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,214
|
Remember that container="" of the needtag refers to the gizmo - the container that's attached to each skill - not to the skill itself.
So, that container has no tags in it by default. Here's how Shadowrun puts the appropriate tags there: Code:
<eval index="10" phase="Initialize" priority="10000"><![CDATA[ ~copy our SkillList tags to the gizmo so they can be used for the needtag if (isgizmo <> 0) then perform gizmo.pushtags[SkillList.?] ~tags added to the gizmo are then automatically added to the parent of ~that gizmo - but that's where those tags were just pushed from, meaning ~that what happens is to duplicate them all. So, delete the ones on ~ourself, then pull the tags from the gizmo. perform delete[SkillList.?] perform gizmo.pulltags[SkillList.?] endif ]]></eval> |
#12 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Ah, I see, I thought the skill pick became the gizmo when you added the child entity to it, I'll try this out when I have free time (hopefully tonight) but right now, its Pathfinder work for Aaron.
Thanks for all your help, I really do appreciate it. |
#13 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
I got it to work thank you for explaining that, is there a built in style the does the auto-resizing/carrying over to 2nd line like the Shadowrun skills do?
|
#14 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,214
|
I think this is the most relevant part of the position script that sets up the multi-row
Code:
~otherwise, the name gets more space else portal[domain].visible = 0 portal[menu1].visible = 0 portal[name].width = minimum(portal[name].width,lastright - portal[name].left - 5) perform portal[name].sizetofit[30] portal[name].width = minimum(portal[name].width,lastright - portal[name].left - 5) endif ~a few skills, like exotic weapons, will end up needing two lines in ~order to fit when they're skillsofts. The sizetofit[30] brings the font ~height small enough that it will fit, so here, we only use autoheight, ~not autosize or autowidth perform portal[name].autoheight perform portal[name].centervert Code:
<portal id="name" style="lblLeft" showinvalid="yes"> <label ismultiline="yes"> <labeltext><![CDATA[ if (tagis[Reference1.?] <> 0) then @text = field[name].text elseif (hero.tagis[Hero.Minion] <> 0) then @text = field[baseuiname].text elseif (state.isadvance <> 0) then @text = field[name].text else @text = field[baseuiname].text endif ]]></labeltext> </label> <mouseinfo mousepos="middle+above"><![CDATA[ if (tagis[Helper.Disable] <> 0) then @text = "{b}This ability is currently disabled and may not be used{/b}" else @text = "" endif ]]></mouseinfo> </portal> |
#15 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Excellent, much thanks
|
#16 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Ok, back to here as I'm working on advanements now, I looked at how Shadowrun does specialties and it has a chooser for the skills on the character and then based on the skill chosen limits the list of specialties available (if nothing is selected it shows them all).
So getting the list of Areas of Expertise itself was easy as I just set the candidate field to component.Expertise, but I'm not sure about getting the chooser. I figured I'd use a menu_things as that seemed like the best way to get a dynamically available list of skills (the requirement being skills with 3 or more ranks in them which is identified by the field Helper.CanExpert). So I added a field to the Advance component to contain the menu choice and I created a portal that I was going to set to show only if the tag Advance.NeedsSkill is on it. I was in the template for new additions and I created this portal: Code:
<portal id="advSkill" style="menuNormal" width="275"> <menu_things field="advSkill" component="Skill" usepicks="hero"> <candidate><![CDATA[ component.Skill & Helper.CanExpert ]]></candidate> </menu_things> </portal> Code:
Hero Lab was forced to stop compilation after the following errors were detected: Portal 'advSkill' - Reference to incompatible field type/style/behavior based on portal type One or more timing errors were identified. Please review the timing report and correct the errors. You can access the report under the 'Develop' menu or by clicking this link. Code:
<field id="advSkill" name="Chosen Skill" type="derived" style="menu"> </field> |
#17 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Also, I'm trying to figure out how to stop picks from Advances from subtracting from skill points, Traits use (isuser + origin.ishero >= 2) but that doesn't work because the origin is a gizmo and not a hero, which means by default its not even subtracting them, I removed the ishero check, but that didn't work, I tried origin.isgizmo, but that threw an error, so I'm not really sure what to do to get this to not happen.
|
#18 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,214
|
Quote:
|
|
#19 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,214
|
style="menu" must always be combined with type="user", not type="derived" or type="static", because the user has to be able to control the menu's selection.
|
#20 |
|
|