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,207

Old December 13th, 2020, 10:51 AM
foreach bootstrap is thing-only. You want foreach pick in gizmo if you want to alter the picks once they're on the character.

Although, actually, why use a foreach to find exactly one thing?

container.childfound[resLPSpecialty].field[resMax].value += parent.field[lpNumSpec].value

Note - that's assuming the pick running this script is a different thing, also bootstrapped alongside resLPSpecialty, within the gizmo - if this is a script on the parent pick, then it would be:

gizmo.childfound[resLPSpecialty].field[resMax].value += field[lpNumSpec].value
Mathias is online now   #21 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old December 14th, 2020, 06:25 AM
That did it!

Each skill selected on the lifepath module forwards a LifepathSkill.xxx identity tag to the module itself.

In some cases, I need to make sure the same skill hasn't been taken twice in the same module. Is there an example somewhere of pulling all of a particular tag into a string/array and checking for duplicates?

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #22 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old December 14th, 2020, 08:27 AM
Why not use a denytag test, if you want to be certain that the user doesn't double up skills? Or is this something where you want to allow it, but warn the user if they do it?
Mathias is online now   #23 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old December 14th, 2020, 08:58 AM
I can actually see situations for both.

I like the idea of allowing, but warning if the same one is taken twice (since the Skills are nonunique).

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #24 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old December 14th, 2020, 09:14 AM
And a different question.

The Lifepath Module component has an Index field which looks at a field on the hero to set it's value.
Code:
    <field
      id="lpIndex"
      name="Index"
      type="derived"
	  defvalue="0">
	  <calculate phase="Initialize" priority="1000"><![CDATA[
	    if (tagis[LifepathCat.Tour] <> 0) then
		  herofield[acLPTours].value += 1
		  @value = herofield[acLPTours].value
		 endif
        ]]></calculate>
      </field>
The idea is that the first tour will have the lpIndex = 1, then the next one will have a 2, etc. However, what I'm seeing is that if, for example, module Liberal Arts is taken first, initially it will have an lpIndex = 1. But, if say the hero joins the military and takes Combat Arms next, suddenly Liberal Arts will have an lpIndex = 2, and Combat Arms will be lpIndex = 1.

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #25 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old December 14th, 2020, 09:18 AM
For the second of these, check out the "orderfield" attribute on components: http://hlkitwiki.wolflair.com/index...._Element_(Data)

(note that the auto link detection messes up on closing parentheses, and I don't have time to get that correct right now). I'll talk about how to build a prereq to count the existing copies of that skill another time - I'm afraid I need to get back to work right now, but I had a quick answer I could link to for how to build the index.
Mathias is online now   #26 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old December 15th, 2020, 08:38 AM
Quote:
Originally Posted by Mathias View Post
For the second of these, check out the "orderfield" attribute on components: http://hlkitwiki.wolflair.com/index...._Element_(Data)

(note that the auto link detection messes up on closing parentheses, and I don't have time to get that correct right now). I'll talk about how to build a prereq to count the existing copies of that skill another time - I'm afraid I need to get back to work right now, but I had a quick answer I could link to for how to build the index.
That worked, thanks.

Can you think of a reason that a checkbox wouldn't display on a gizmo form? This is my layout and template, which seems like it should work, but no luck...
Code:
  <template
    id="lpSpecialtyGain"
    name="Specialty Gained"
    compset="LifepathHelper"
    marginhorz="3"
    marginvert="2">

    <portal
      id="lblGained"
      style="lblNormal">
      <label>
        <labeltext><![CDATA[
          @text = "Specialty Gained?"
          ]]></labeltext>
        </label>
      </portal>

    <portal
      id="gained"
      style="chkNormal"
      tiptext="Click to indicate hero gains a Specialty for this tour.">
      <checkbox
        field="lpSpecGained">
        </checkbox>
      </portal>

    <position><![CDATA[
	  height = portal[gained].height + 5
	  
      ~position our tallest portal at the top
      portal[gained].top = 0

	  portal[gained].visible = 1
	  
      ~position the gained portal on the far right
      perform portal[gained].alignedge[right,0]
	  
	  ~position the aging portal to the left of the years button
	  portal[lblGained].left = 0
	  portal[lblGained].width = 150
	  
      perform portal[lblGained].alignrel[rtol,gained,-5]

      ]]></position>

    </template>	
  <!-- static layout
        This layout consists of the character's name, race, and status info, which
        are laid out in a ribbon across the top.
  -->
  <layout
    id="lifepathmodule">
    <portalref portal="lpSkill" taborder="10"/>
    <portalref portal="lpSpecialty" taborder="20"/>
	<templateref template="lpSpecialtyGain" dynamic="yes" taborder="15"/>

    <!-- This script sizes and positions the layout and its child visual elements. -->
    <position><![CDATA[
      ~width = 350
	  
      perform portal[lpSkill].autoplace
	  perform template[lpSpecialtyGain].autoplace[20]
	  perform portal[lpSpecialty].autoplace[10]
	  
	  height = portal[lpSpecialty].bottom
	  
      ]]></position>

    </layout>
Attached Images
File Type: jpg HL - Missing checkbox.JPG (40.8 KB, 1 views)

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #27 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old December 16th, 2020, 06:12 AM
I found the issue for the checkbox. I needed the field on the Lifepath component, rather than the helper.

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #28 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 01:02 AM.


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