Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old August 8th, 2009, 01:35 PM
Quote:
Originally Posted by TCArknight View Post
What am I missing? Is my sizing and positioning off? I set the visibility always to 0, so I thought it would always show up even if there wasn't anything in the usrCandid1 field.
When a boolean state is being used (e.g. show/hide, enable/disable), a value of zero always means "no" and non-zero value means "yes". Therefore, setting the visibility to zero means to *not* show it. If you want to force something to be always visible, you need to use a non-zero value (generally one). In the case of portals, they are always visible unless you specify otherwise, so you can simply comment out the entire if/then block to ensure the portal is always visible. As it stands, you are explicitly hiding the portal all the time. :-(
rob is offline   #21 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old August 8th, 2009, 01:38 PM
Quote:
Originally Posted by TCArknight View Post
Also:
Code:
      field[reaFinal].value = field[reaBonus].value + field[reaInPlay].value
Code:
      total = hero.child[reStamina].field[reaBonus].value
      total += 2
      hero.child[reStamina].field[reaBonus].value = total
Doesn't seem to be working. It's the last Eval in the Traits phase and after the Stamina is calculated initially. What am I missing?
In the first script, you are calculating the "reaFinal" field. In the second script, you are adding the "reaBonus" field - not the "reaFinal" field. Could that be the problem?
rob is offline   #22 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old August 8th, 2009, 02:02 PM
Quote:
Originally Posted by rob View Post
The first issue is that you'll never have anything show up in the menu to select from with this tagexpr. You have assigned the tag "RAbil.Adaptable", but you will only be showing picks that possess the "thingid.Adaptable" tag. You need to change the tagexpr to match the tag you've assigned.
Oh, ok.. that does explain it. I was going by the example in the walkthrough and it ad the thingid. thing.. thought that was necessary.. my bad.
TCArknight is offline   #23 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old August 8th, 2009, 02:39 PM
Quote:
Originally Posted by rob View Post
In the first script, you are calculating the "reaFinal" field. In the second script, you are adding the "reaBonus" field - not the "reaFinal" field. Could that be the problem?
Yep, that did it.

It's a racial bonus, and I thought that should be adding to the Bonus field instead of the Final value. It works, and displays properly, but I'm not sure how it'll impact things down the road..

Thanks. I really appreciate the help. P)
TCArknight is offline   #24 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old August 9th, 2009, 04:15 PM
I'm getting frustrated.

Everything I see says that the below code should show the menu on the Adaptable Edge. It doesn't however and I don't know what I'm missing...

Code:
<thing
      id="reQuick"
      name="Quickness"
      compset="Reaction"
      isunique="yes"
      description="Description goes here">
      <fieldval field="reaAbbrev" value="Qui"/>
      <tag group="explicit" tag="1"/>
      <tag group="DashTacCon" tag="Combat"/>
      <tag group="RAbil" tag="Adaptable"/>
      <eval index="1" phase="Traits" priority="6000">
        <![CDATA[
        ~Quickness uses the better of the character's Perception or Agility

        var mod1 as number
        var mod2 as number

        mod1 = hero.child[attrPer].field[trtMod].value
        mod2 = hero.child[attrAgi].field[trtMod].value

        field[reaBonus].value = maximum(mod1,mod2)

        ~field[reaBonus].value = maximum(#traitbonus[attrPer],#traitbonus[attrAgi])
        ]]></eval>
      </thing>

<thing
  id="abAdapt"
  name="Adaptable"
  compset="RaceAbil"
  isunique="yes"
  description="Description goes here">
  <fieldval field="usrCandid1" value="RAbil.Adaptable"/>
  <tag group="Hide" tag="Ability"/>
  <tag group="Hide" tag="RaceAbil"/>
  <tag group="ChooseSrc1" tag="Hero"/>

    <!-- Bootstrap Choose either Sta, Qui, Wil for a +2 bonus -->
  </thing>

<template
    id="raPick"
    name="Racial Ability Pick"
    compset="RaceAbil"
    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)

      ~determine whether our menus are visible
      ~Note: Remember that a non-empty tagexpr field indicates menu selection is used.
      ~if (field[usrCandid1].isempty <> 0) then
        portal[menu1].visible = 1
      ~  endif

      ~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,10]

      ~position the menus to the left of the info in the available space
      perform portal[menu1].alignrel[rtol,info,10]
      portal[menu1].width = (portal[info].left - portal[menu1].left - 20) / 2

      ~position the name on the left and use availble space, with a gap for menus
      portal[name].left = 0
      portal[name].width = minimum(portal[name].width,portal[menu1].left - portal[name].left)
      portal[name].width = 50

      ~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>
Help????? LOL
TCArknight is offline   #25 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old August 10th, 2009, 12:39 PM
Quote:
Originally Posted by TCArknight View Post
Everything I see says that the below code should show the menu on the Adaptable Edge. It doesn't however and I don't know what I'm missing...
The menu is probably appearing but it's extremely narrow and ends up essentially not being visible.

In your Position script, the following two lines control the positioning of the menu:
Code:
      perform portal[menu1].alignrel[rtol,info,10]
      portal[menu1].width = (portal[info].left - portal[menu1].left - 20) / 2
Since you don't initialize the menu portal's width before using "alignrel", this will result in the default width, which I think is 30 pixels. Then you set the width such that it will end up being about 15-20 pixels wide, based on the position set first. This isn't wide enough for the drop list arrow to be visible, let alone actual contents to choose from. So the menu portal may actually be getting automatically hidden due to being too small - I'd have to check with Colen on that detail.

Take things in *small* steps. First, get everything showing in crude fashion in your tables. Then start tweaking the sizing and positioning of individual portals. It will take a little bit longer this way, but you'll get the hang of things quickly and it will avoid frustrations like this situation. Once you start getting proficient, you can then begin cutting corners, but you'll be able to spot issues like this more readily when they occur, so it won't be frustrating. :-)
rob is offline   #26 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old August 10th, 2009, 07:28 PM
Thanks Rob!

You know... that helped.. and also me realizing that I had ~two~ templates in the tab and was using the wrong one...

That'll teach me.

On the plus side, I can now select the Reaction used by the ability and have it properly bonused.

I'm going to be entering the list of edges and flaws, but probably not going for any mechanics with them just yet. My biggest hurdle ahead is the skill selection process.

I'll get as far as I can before then though...

I really do appreciate all the help with this so far.
TCArknight is offline   #27 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old August 11th, 2009, 08:14 PM
I've made some progress, but ran into a glitch. I'm trying to change all the resAbility references to resEdge to account for the trait.

When I think I've got them all found and the code compiles and reloads, this pops up:
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'

The Abilities tab shows ???? on the selection area for Edges.

What am I missing?

Thanks!
TCArknight is offline   #28 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old August 13th, 2009, 06:22 PM
Well, it helps to use the right pick resource... had resAbility (which I'd deleted) instead of resEdge...

on another note, I'm trying to do a chooser to pull all skills with a value >= 2 into the list.

I tried: <fieldval field="usrCandid1" value="component.Skill & fieldval:trtFinal >= 2"/>

but I get the following error.

Any suggestions?
Attached Images
File Type: jpg hl_tag_error2.jpg (41.1 KB, 4 views)
TCArknight is offline   #29 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old August 19th, 2009, 07:28 PM
The '&' character has special meaning within XML, just like it does in HTML. When you use a "CDATA" block for a script, it tells XML to treat everything as raw text. However, within an attribute value, the character always has special meaning. That's why the error says that the character '&' is a problem.

You need to use the special code for the '&' character, which is "&amp;". The '&' is followed by the letters "amp" and then finished with a semi-colon. All five characters are required. This results in the following XML element:
Code:
<fieldval 
    field="usrCandid1" 
    value="component.Skill &amp; fieldval:trtFinal >= 2"/>
You can find more details about this within the documentation. Go to the page below and see the section entitled Reserved XML Characters.
http://hlkitwiki.wolflair.com/index.php5/XML_Files
rob is offline   #30 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 12:11 AM.


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