Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Have you done the following?
At the bottom of traits.str, add the UserSelect component to the compset you now need it in. Go to the visual.dat file, find the "UserSelect" template, and copy and paste that template into the tab_whatever file where you want it, then change its Id and name and edit exactly how it looks (and add any other behaviors that are specific to that compset). Remember, just saying "...no matter where I put it, I get an error." isn't very helpful in diagnosing your problem. You can right-click on error messages in Hero Lab, copy them, and then paste them here. |
#31 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
Okay, good points. I was not as clear as I could and should be.
I added the component UserSelect to my compset in traits.str. Then, I went into my tab_X and added the following code: Code:
<portal id="menu1" style="menuSmall"> <menu_things field="usrChosen1" component="none" maxvisible="10" usepicksfield="usrSource1" candidatefield="usrCandid1"> </menu_things> </portal> When I try and compile I get the following error: Quote:
When I look at the Savage worlds source folder for edges, there doesn't seem to be any place on the same form where usrChosen1, usrSource1 or usrCandid1 are defined as a field, yet it works there. How does all of this hook together? Again, sorry I wasn't clear. Hopefully this was better. Thanks! edg |
|
#32 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
On third or fourth line of your template, it will have the line:
compset="XXXXX" Look in traits.str for the compset that's assigned to this template - does it include UserSelect as a component? Or, if you're only going to be using this template in one place, simply change that to the compset you're using this for. |
#33 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
Mathias: Thanks for all your help with this.
I think I understand it better but unfortunately I don't think it will work the way I need it to. Basically, my page is using compset Abilities but I need to sort on compset Skills. And if I add Skills to Abilities, it messes everything up. I have some ideas but it will take me a bit to get them all sorted out. Thanks again! I'm sure I will have more questions on other topics! edg |
#34 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Why does it have to use the abilities compset?
Why does it have to sort on the skills sortset? If you've written a sortset for some abilities, why not rename it as something more relevant to what it will be used to sort? How does the sortset impact the compset you declare for the template? They're declared independantly of each other, and I don't know of any connection between them. |
#35 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
I should have just posted code a while ago. Not sure why I didn't.
Code:
<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="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) ~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,-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> Here is my thing: Code:
<thing id="abCSSkl" name="Combat Spec Situation Bonus" compset="Ability" isunique="yes" description="Situation bonus for Combat Spec characters."> <fieldval field="usrCandid1" value="component.Attribute"/> <tag group="ChooseSrc1" tag="Thing"/> </thing> Again, thanks! edg |
#36 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In your template's position script, I see a vertical position for the menu1 portal, but I don't see anything that's positioning it horizontally. Doesn't that end up placing the menu1 portal and the name portal in the same place at the left edge?
At times when I've accidently let a menu and a text portal overlap each other, I've had trouble selecting things from the menu. |
#37 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
And that's a good point. However, in my line, I can see the -Choose- in red and nothing happens when I click on it. I'm still playing around with it.
Edit: Nope, that was it. Playing with the height revealed it. Weird. Thanks! edg Last edited by evildmguy; October 31st, 2012 at 03:18 PM. |
#38 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
See if adding a horizontal position fixes that - the chooser might be behind the name, currently invisible, since the name was the last thing positioned in the script.
|
#39 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
I got it all sorted out. Thanks!
I'm looking for a way to select via tags on things. So, right now I have Code:
<fieldval field="usrCandid1" value="component.Skill"/> Thanks! edg |
#40 |
|
|