• 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

Starting Power Points, by coding amount

Gumbytie

Well-known member
Okay, traditionally in editor you put in a number for Number of Powers and another into Starting Power Points. Both are fields under the Arcane background tab.

So in Beasts & Barbarians (and a few other settings) there are little 'micro' arcane backgrounds (my term).

EDGE: One example would be the Edge edgBBPoisoner. (under the Edge tab)
He can use the poison Power with Smarts as arcane skill, and has a number of Power Points equal to half his Smarts die plus 1/Rank. So, a Seasoned hero with Smarts d8 has 4+2=6 Power Points, which can only be used for the poison Power.

Now I do have a little script on the Edge to reflect the correct starting power points in the display:

Traits 3100
Code:
var powbonus as number 
powbonus = (hero.childfound[attrSma].field[trtFinal].value)
  debug powbonus
var ppoint as number
ppoint = ((herofield[acRank].value + 1) + (powbonus))
  debug ppoint
field[livename].text = field[thingname].text & " (PP: " & ppoint & ")"

So I can figure out what the value should be.

ARCANE BACKGROUND: So I made an arcane background arcBBPoisoner. (under Arcane background tab) But cannot fill in the field Starting Power Points. They are based on an Attribute and Rank. So how does one write a script to calculate and fill in the appropriate field?

So the trick is how to take the script above and values and turn into something that would work on the arcane background and assign those starting power point.

Whew, this was a long question and I hope I made it clear enough. And yes, I did look at code for Power Points Edge but couldn't see how to apply it in my situation off the top of my head.
 
I'm going to point you to how Permanent Adjustments does this. This is for Power Points. It's complicated by the new availability of multiple Arcane Backgrounds. Each Arcane Background has it's own tracker for that now. And you can set up all the extra Arcane Backgrounds you want.
The first line is the standard "Is this currently active?" be it checking this tag, or Equipped.Equipped, or looking at field[abilActive].value <> 0.
Then the older Deluxe version where the Arcane tag doesn't matter.
Now the tricky part - This compares the Arcane tags between this one and the Arcane Backgrounds on the hero to match it up. To check it, add an Arcane Power to the Arcane Background and then check the tags on the Power and it'll show you the Arcane tag (it'll usually be Arcane.arcMagicSWADE if you're assigning the standard Magic AB) and use it for the adjusttag in the code below. It's usually the AB you choose in the Adjustment.

Now, if you're setting up an Arcane Background specifically for this, you can just set field[trkMax].value directly since it'll be part of it. This code is only needed with you have to associate something with a specific Arcane Background that's not already attached to it, like Edges and Hindrances.

Setup/8000
Code:
      if (tagis[Helper.Activated] <> 0) then
        if (hero.tagis[source.AdventureEd] = 0) then 
          #trkmax[trkPower] += field[adjUser].value
        else
          foreach pick in hero where "component.Arcane"
            var arcanetag as string
            var adjusttag as string
       	    arcanetag = left(eachpick.tagnames[Arcane.?],pos(eachpick.tagnames[Arcane.?],","))
       	    adjusttag = left(field[adjChosen].chosen.tagnames[Arcane.?],pos(field[adjChosen].chosen.tagnames[Arcane.?],","))
            if (compare(adjusttag,arcanetag) = 0) then
              eachpick.field[trkMax].value += field[adjUser].value
              endif
            nexteach
          endif
        endif
 
Last edited:
Okay, so another questions regarding adding power points. This would be concerning Creatures. I am working on a file for Counterblast right now. I own a lot of SW books.

Let's see if I can explain well enough with all terms that perhaps could be plugged into an example to get me started. So the setting has the following Arcane Background:

In the Hero Lab Editor:

Arcane Background (tab)
The Deep
Unique Id: arcCBDeep
Starting Power Points 10
Tags - Group Id: Arcane Tag Id: arcCBDeep

Edge (tab)
Arcane Background: The Deep
Unique Id: edgArcCBTheDeep
Tags - Group Id: Arcane Tag Id: arcCBDeep
Bootstrap - arcCBDeep

Creatures
Racial Ability (tab)
Deep Pool (Primelings have 25 Power Points.)
Unique Id: abCBDeepPool25

There are versions of the above Racial Ability that give 10 PP, 15PP, etc.

So any character or creature can potentially select the Arcane Background: The Deep. A type of enemy alien creatures also use this Arcane Background, some have a Racial Ability that increases the starting Power Points.

I looked over examples in Racial Ability/Property and the only examples with code are for Deluxe. The newer versions don't have any code to auto-add the additional starting Power Points. I assume the GM just manually adds these additional Power Points manually. I am just trying to automate as much as possible.

Thank you ahead of time if there is a possible answer.
 
Since the Racial Ability is not connected to the Arcane Background object, you have to go through the nexteach to find the right component, but you can hard code a couple of things. The += 10 can be adjusted for whichever version this ability is.

Code:
      if (tagis[Helper.Activated] <> 0) then
        foreach pick in hero where "component.Arcane"
          var arcanetag as string
          var adjusttag as string
          arcanetag = left(eachpick.tagnames[Arcane.?],pos(eachpick.tagnames[Arcane.?],","))
          adjusttag = "arcCBDeep"
          if (compare(adjusttag,arcanetag) = 0) then
            eachpick.field[trkMax].value += 10
            endif
          nexteach
        endif
 
Back
Top