Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
ob1knorrb
Member
 
Join Date: Oct 2013
Posts: 30

Old February 5th, 2014, 08:33 PM
Ok, I think I now have "Increase Basic Skill" working, and I did some revamping on Character Generation, although I now need to go back and retest Character Generation to make sure I didn't break anything with the changes I made getting advancement working.
I'm going to attempt to add an Import file here, hopefully I created it correctly.
Attached Files
File Type: zip BrentStarwars.zip (366.4 KB, 11 views)
ob1knorrb is offline   #91 Reply With Quote
ob1knorrb
Member
 
Join Date: Oct 2013
Posts: 30

Old February 6th, 2014, 11:52 AM
It looks like doing Advances on Attributes could be challenging. Increasing an attribute by 1 pip will increase all the associated skills by a pip as well, I'll just have to make sure that doing that doesn't cause existing Advancements on skills to change their costs, but Advancements on skills done after the Advancement on the associated Attribute will need to use the new value. Timing will be everything
ob1knorrb is offline   #92 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 6th, 2014, 12:20 PM
As I mentioned in that post, in Shadowrun, the script that calculates advCost and the script that adds to the trtBonus of the thing being advanced needed to be the same script. Because the Advancements are added in a particular order, and that script is tied to that particular order, each one only sees the advancements that were added before it.
Mathias is offline   #93 Reply With Quote
ob1knorrb
Member
 
Join Date: Oct 2013
Posts: 30

Old February 6th, 2014, 02:48 PM
Yeah, right now things are pretty convoluted and spread out.
In advancement.core in the "CanAdvance" component I store the current trait bonus of the Skill into the Advance in a field called "advTrtBns"

Code:
      <!-- If this is an increase, add one to the trait, and subtract one for a decrease -->
    <eval index="4" phase="Effects" priority="1000"><![CDATA[
      ~we only worry about this on actual advances - not traits added at creation
      doneif (tagis[Advance.Gizmo] = 0)
 			endif
				
      ~apply any appropriate increase or decrease for the linked trait
      ~Note: This pick is a child of the gizmo and our parent pick is the actual "Advance"
      ~       pick that contains the appopriate "Advance" tag, so be sure to check there.
      ~Note: Since the advancement is displaced to the hero, it's "parent" is *not* the
      ~       gizmo, so we must explicitly reference through the "origin" container.
      if (origin.parent.tagis[Advance.Increase] > 0) then
        linkage[basis].field[trtBonus].value += 1
		origin.parent.field[advTrtBns].value = linkage[basis].field[trtBonus].value
      elseif (origin.parent.tagis[Advance.Decrease] > 0) then
        linkage[basis].field[trtBonus].value -= 1
        endif
      ]]></eval>
In traits.str I added an "ATTRoll" field to the Skill where I store the combined total of the values from the Attribute that contribute to the Net Skill so I can use them as a number that doesn't include other Skill Advances later


Code:
   <!-- Total value of the linked attribute -->
    <field
      id="ATTRoll"
      name="ATT Skill Roll"
      type="derived">
      <calculate phase="Traits" priority="4000" name="Calc ATTRoll">
          <![CDATA[
        ~only access the linkage if the skill is directly on the hero; if not, it is
        ~likely within an advancement gizmo and no linkage will exist there
        if (container.ishero <> 0) then
          @value = linkage[attribute].field[trtFinal].value + linkage[attribute].field[trtRacial].value + field[trtUser].value - field[trtUser].delta
		  debug "ATTRoll: " & @value & "  " & linkage[attribute].field[trtAbbrev].text & "  " & field[trtAbbrev].text
		  endif
        ]]></calculate>
      </field>
Then in the "sklRoll" (Net Skill Roll) field if we are in a skill the Net Skill Roll value is set, if we are in an Advance then I set the "advCost" based on the "ATTRoll" and "advTrtBns" values set earlier

Code:
    <!-- Net final roll that includes the value of the linked attribute -->
    <field
      id="sklRoll"
      name="Net Skill Roll"
      type="derived">
      <calculate phase="Traits" priority="5000" name="Calc sklRoll">
        <after name="Calc trtFinal"/><![CDATA[
        ~only access the linkage if the skill is directly on the hero; if not, it is
        ~likely within an advancement gizmo and no linkage will exist there
		if (compare(field[trtAbbrev].text,"Barg")=0) then
		debug "Calculate in sklRoll field " & field[trtAbbrev].text & @value
		endif
        if (container.ishero <> 0) then
          @value = field[trtFinal].value + linkage[attribute].field[trtFinal].value + linkage[attribute].field[trtRacial].value + field[trtRacial].value
		  else
		  debug "NOT IN HERO - sklRoll" 
		    if (tagis[Advance.Gizmo] <> 0) then
			  origin.parent.field[advCost].value = linkage[basis].field[ATTRoll].value + origin.parent.field[advTrtBns].value-1
			  origin.parent.field[advCost].value = round(origin.parent.field[advCost].value/3,0,-1)
			  if (tagis[Skill.Spec] <> 0) then
			    origin.parent.field[advCost].value = round(origin.parent.field[advCost].value/2,0,1)
			  endif
			endif
		  endif
 	  if (compare(field[trtAbbrev].text,"Barg")=0) then
		  debug "Calculate2 in sklRoll field " & field[trtAbbrev].text & @value
		  endif
        ]]></calculate>
      </field>
Then in thing_advances.dat I have the resspent

Code:
 <thing
    id="advBSkill"
    name="Increase Base Skill"
    compset="Advance"
    description="Select an base skill to increase by one.">
    <fieldval field="advAction" value="Increase Base Skill"/>
    <fieldval field="advDynamic" value="Skill.Base &amp; !Helper.Maximum &amp; !Hide.Attribute"/>
    <tag group="Advance" tag="Increase"/>
	   <!-- Each advancement consumes its cost in accrued advances -->
    <eval index="1" phase="Traits" priority="6000"><![CDATA[
	  perform gizmo.findchild[none,"Advance.Gizmo"].setfocus
	  doneif (state.isfocus = 0)
	  #resspent[resAdvance] += field[advCost].value
      ]]></eval>
    <!-- Attach the child entity for tracking the advance -->
    <child entity="Advance">
      <tag group="Advance" tag="MustChoose"/>
      </child>
    </thing>
It actually works okay for Skill Advances but falls apart when I throw in Attribute Advances.
I think you are correct that I will need to pull together a bunch of those pieces and put them in "CanAdvance". I'll have to spend some time looking at the Savage Worlds example and comparing to the base code and what I've got.
ob1knorrb is offline   #94 Reply With Quote
ob1knorrb
Member
 
Join Date: Oct 2013
Posts: 30

Old February 6th, 2014, 03:33 PM
Is the code for Shadowrun available anywhere to look at? Other than the snippets in the other thread?
ob1knorrb is offline   #95 Reply With Quote
thedarkelf007
Senior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 624
Send a message via MSN to thedarkelf007 Send a message via Yahoo to thedarkelf007

Old February 20th, 2014, 12:43 AM
How is the progress on this going?

Working on - SW RPG d6 or add this source Update Souce and SW RPG FFG and More FFG SW not working yet
Author of Realms Works Guides
Blog writer at thedarkelf007.home.blog/
thedarkelf007 is offline   #96 Reply With Quote
ob1knorrb
Member
 
Join Date: Oct 2013
Posts: 30

Old February 20th, 2014, 06:26 AM
Slow I had some vacation time and thought I might get some work done on it then but ended up spending most of my down time playing "Sins of a Solar Empire" which I purchased ages ago but had never gotten around to playing. I'm back home now and still have a couple vacation days left so I might take another crack at it, although I've got a few projects around the house to work on too. My fear is that I may have to rework a lot of what I've already done in order to get the Attribute advances working properly
ob1knorrb is offline   #97 Reply With Quote
thedarkelf007
Senior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 624
Send a message via MSN to thedarkelf007 Send a message via Yahoo to thedarkelf007

Old February 20th, 2014, 06:34 PM
I can host the updated files if you want to make them available to others to test

I might also be able to spend some time on it as well, though I have two jobs and 60+ hrs a week, so I might not be able to contribute much.

Working on - SW RPG d6 or add this source Update Souce and SW RPG FFG and More FFG SW not working yet
Author of Realms Works Guides
Blog writer at thedarkelf007.home.blog/
thedarkelf007 is offline   #98 Reply With Quote
ob1knorrb
Member
 
Join Date: Oct 2013
Posts: 30

Old February 23rd, 2014, 08:51 PM
That sounds good, I'll try and post them tomorrow.
ob1knorrb is offline   #99 Reply With Quote
ob1knorrb
Member
 
Join Date: Oct 2013
Posts: 30

Old March 4th, 2014, 05:09 PM
Ok, much later than promised, but here you go.
Attached Files
File Type: zip BrentStarwars.zip (366.4 KB, 67 views)
ob1knorrb is offline   #100 Reply With Quote
Reply


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 03:03 AM.


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