• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Authoring Example help

What <list> and <candidate> expressions did you put on each table?

Also, what component="" is set for those tables?

Candidate expressions control what you're allowed to select from, list expressions control what is shown in that table.

<candidate inheritlist="yes">

is common, so that you can automatically re-use your list expression for your candidate expression.

So, you need to write candidate and list expressions that will keep skills and psionics separate from each other.
 
Weird issue:

Code:
<list><![CDATA[component.WeapRange & component.Ammunition]]></list>

That code is accepted and compiles but does not show both. If I remove the second one, ranged weapons are properly shown in that pick list.

I have also tried it without the CDATA but that didn't work either.

Any thoughts?

Thanks!

edg
 
How do I access a linked item?

So, I have a skill defined with a link to attributes. Now I'm wanting to write in the portal the skill point total plus the attribute that the skill is linked to.

I have been looking for this but can't find it in the documentation.

Thanks!

edg
 
Okay, a few questions.

The base cost for rank one in a speciality skill is X. The cost for next rank is base cost plus current rank. This means that to get X+1 rank costs base cost + X. I have been playing with the formulas but can't figure out how to do this. Any thoughts?

Are compound if statements, indeed any flow control statements, allowed? For example, can I say If <this> and <that> and <those> or <these> then . . . ? (Okay, that's extreme but I might need that many in a few conditions.)

Thanks!

edg
 
Shadowrun uses the same method for some costs, so I had to figure out the formula. The total cost to get from 0 to rank X is:

(X^2 + X) / 2
 
Last edited:
Okay, I'm stumped.

I have read, re-read and played around with adding a custom menu choice on another item and I don't get how to do it. I know that to do this, I need to use the UserSelect item but I can't figure it out.

Here is my situation.

I have professions (which can be thought of as classes) on a hero. A few of the professions gets to pick from either a subset of the skills or abilities to gain a bonus. So, on my profession tab, I list the abilities of that profession and for some specific abilities, I want the user to be able to pick which skill gets a bonus from a specific subset of skills.

I try and add in the menu1 portal from the Specialized Edges example in the wiki (http://hlkitwiki.wolflair.com/index.php5/Specialized_Edges_(Savage)) but no matter where I put it, I get an error. Right now, I'm just trying to get the menu to appear and then would refine what it displays for choices. However, it doesn't like any id I pick for it, saying that it's not unique, even if it's random and not used by anything else.

Further, I'm not sure if the menu1 portal definition goes on its own or in a template? I'm just not sure where to start on this one.

Unfortunately, this is just going to be part one on how to get this working for me, I think. As I said, I have read this section in the documentation several times and it's just not clicking how this works. I don't know why. I even tried to go to the Pathfinder system, add in a copy of the Scholar feat and look at its XML but that didn't help.

Any thoughts on how to make this work? What else can I list that would be helpful to you to help me?

Thanks!

edg
 
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.
 
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:

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
 
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: 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
 
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.
 
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
 
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.
 
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:
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.
 
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
 
Back
Top