View Single Post
ShadowWalker
Senior Member
 
Join Date: Jun 2014
Posts: 243

Old August 22nd, 2019, 07:13 PM
Okay I got it sort of working.
I was missing the linkage[basis] in the first incarnation of the code.
This gets the proper values, sort of.
If I add another advancement for the same skill both advancements get the latest skill value and cost out at that new value.
So if I go from not having the skill to having it costs correctly at 1 point.
As soon as I add the second advancement it costs 4, 2 for each. instead of 3. 1 and 2 respectively.

Code:
perform gizmo.findchild[none,"Advance.Gizmo"].setfocus
doneif (state.isfocus = 0)
perform focus.linkage[basis].setfocus
if (focus.tagis[Skill.?] <> 0) then
  var value as number
  value = focus.field[trtBonus].value
  if (focus.tagis[User.Combat] = 0) then
    var resLeft as number
    resLeft = #resmax[resAdvNCSP] - #resspent[resAdvNCSP]
    if (resLeft >= value) then
      #resspent[resAdvNCSP] += value
    elseif (resLeft > 0) then
      #resspent[resAdvSP] += value - resLeft
      #resspent[resAdvNCSP] += resLeft
    else
      #resspent[resAdvSP] += value
      endif
  else
    #resspent[resAdvSP] += value
    endif
  endif

Shadowrun: Player and GM
Pathfinder: Player and GM

Shadowrun Adjustments: http://forums.wolflair.com/showthread.php?t=60633

Last edited by ShadowWalker; August 22nd, 2019 at 07:19 PM.
ShadowWalker is offline   #5 Reply With Quote