Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
ashuramarsh
Member
 
Join Date: Jul 2011
Posts: 56

Old February 11th, 2017, 12:13 PM
Hi all,

I am trying to add a class special from the old Conan RPG, working on a dataset for a pathfinder game here, so converting it over more or less. The special ability is called Seductive Art. What it does is at level 2 it adds a +1 to several skills. It does this every 4 levels thereafter as well.

Now I seem to have the bonuses working fine, except that when it adds the bonus it is adding a +2 each time instead of just a +1. What am I doing wrong or not doing?

This is the code i am using:

Code:
var levels as number
levels = #levelcount[temptress]

if (levels >= 2) then
      hero.child[skDiplo].field[BonComp].value += 1
      hero.child[skIntim].field[BonComp].value += 1
      hero.child[AllPerform].field[BonComp].value += 1
      hero.child[skSenseMot].field[BonComp].value += 1
endif

if (levels >= 6) then
      hero.child[skDiplo].field[BonComp].value += 1
      hero.child[skIntim].field[BonComp].value += 1
      hero.child[AllPerform].field[BonComp].value += 1
      hero.child[skSenseMot].field[BonComp].value += 1
endif

if (levels >= 10) then
      hero.child[skDiplo].field[BonComp].value += 1
      hero.child[skIntim].field[BonComp].value += 1
      hero.child[AllPerform].field[BonComp].value += 1
      hero.child[skSenseMot].field[BonComp].value += 1
endif

if (levels >= 14) then
      hero.child[skDiplo].field[BonComp].value += 1
      hero.child[skIntim].field[BonComp].value += 1
      hero.child[AllPerform].field[BonComp].value += 1
      hero.child[skSenseMot].field[BonComp].value += 1
endif

if (levels >= 18) then
      hero.child[skDiplo].field[BonComp].value += 1
      hero.child[skIntim].field[BonComp].value += 1
      hero.child[AllPerform].field[BonComp].value += 1
      hero.child[skSenseMot].field[BonComp].value += 1
endif
ashuramarsh is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old February 11th, 2017, 12:23 PM
That script is sort of the "brunt" force approach to doing class abilities.

Use this script which is the same script you will use for 80% of class abilities. It runs at Post-Level/10000. Then you just bootstrap the ability to the class multiple times at the correct levels and each time it increases its bonus by 1.

Way easier to use generic scripts than ones with hard-coded class ids and stuf as it prevents you from ever re-using the class ability with a different class, PrC, or Archetype.

Code:
      ~ Set the list name
      field[listname].text = field[thingname].text & " " & signed(field[xIndex].value)

      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] <> 1)
      ~ if we've been disabled, get out now
      doneif (tagis[Helper.SpcDisable] <> 0)

      ~ Calculate our "plus" here based on level and how many times
      ~ we are bootstrapped to the class.
      field[abValue].value += field[xCount].value
      field[livename].text = field[thingname].text & " " & signed(field[abValue].value)

      ~ The following should only happen once on the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

      hero.child[skDiplo].field[BonComp].value += field[abValue].value
      hero.child[skIntim].field[BonComp].value += field[abValue].value
      hero.child[AllPerform].field[BonComp].value += field[abValue].value
      hero.child[skSenseMot].field[BonComp].value += field[abValue].value

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #2 Reply With Quote
ashuramarsh
Member
 
Join Date: Jul 2011
Posts: 56

Old February 11th, 2017, 12:32 PM
OK, thanks. I'm not a programmer so i just take from what i can find and modify as much as I can. I'm not really past brute forcing something to work
ashuramarsh is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old February 11th, 2017, 12:53 PM
Quote:
Originally Posted by ashuramarsh View Post
OK, thanks. I'm not a programmer so i just take from what i can find and modify as much as I can. I'm not really past brute forcing something to work
Figured why I would share as you can pretty much re-use the top part of that script over and over again.

You just need to change the logic to your specific class ability after this:
Code:
      ~ The following should only happen once on the first copy
      doneif (tagis[Helper.FirstCopy] = 0)
I like script logic that lets me copy/paste 90% of the work. I am lazy.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #4 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 02:21 PM.


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