• 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

"Lifepath" style creation - Thoughts?

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
 
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?
 
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?
 
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).
 
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.
 
For the second of these, check out the "orderfield" attribute on components: http://hlkitwiki.wolflair.com/index.php5?title=Component_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.
 
For the second of these, check out the "orderfield" attribute on components: http://hlkitwiki.wolflair.com/index.php5?title=Component_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>
 

Attachments

  • HL - Missing checkbox.JPG
    HL - Missing checkbox.JPG
    40.8 KB · Views: 1
Back
Top