Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 29th, 2012, 08:10 AM
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.
Mathias is offline   #31 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old October 29th, 2012, 11:35 AM
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>
under my template abPick to display the Professions special abilities on the tab_X form.

When I try and compile I get the following error:

Quote:
Hero Lab was forced to stop compilation after the following errors were detected:

Template 'abPick' - Reference to portal 'menu1' using a field for a different component set
So, that's the error I'm getting when I put that code from visual.dat into mine.

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
evildmguy is offline   #32 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 29th, 2012, 12:14 PM
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.
Mathias is offline   #33 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old October 30th, 2012, 01:38 PM
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
evildmguy is offline   #34 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 30th, 2012, 02:06 PM
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.
Mathias is offline   #35 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old October 31st, 2012, 09:34 AM
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>
So, that's my 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>
But there is only the generic -select- in red with nothing to choose on my tab when I compile the code. Not sure what I'm doing wrong.

Again, thanks!

edg
evildmguy is offline   #36 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 31st, 2012, 10:32 AM
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.
Mathias is offline   #37 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old October 31st, 2012, 03:11 PM
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.
evildmguy is offline   #38 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 31st, 2012, 03:18 PM
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.
Mathias is offline   #39 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old November 1st, 2012, 07:08 AM
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"/>
But I need the ability to go further. Can I do component.Skill.Profession.CombatSpec? Or some intersection again? Basically, I need to pick from component Skills with particular tags on them. A fieldval of some kind?

Thanks!

edg
evildmguy is offline   #40 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:30 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.