Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
welxo88
Junior Member
 
Join Date: Oct 2017
Posts: 1

Old October 6th, 2017, 11:39 PM
Hey!

I'm helping our DM in creating item/gear with situational bonuses against certain creature type (this case undead). Bonuses should affect certain skill checks (knowledge religion, sense motive, stealth, perception) as well as attack and damage roll. It should work same as favored enemy for rangers, but without changes into the core classes of PCs.

So far, I understand that this should be accomplished somehow this way:

Code:
if (field[gIsEquip].value = 1) then
	hero.child[wpDmg].field[wpDmgBonus].value += 1
	#skillbonus[skReligion] += 2
endif
I've never did eval script before (although have experience with other coding), and I don't have previous knowledge of Hero Lab soul life, so any help is much appreciated!
welxo88 is offline   #1 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old October 10th, 2017, 11:24 PM
Since it's situational, you don't want to actually add the bonus. It won't be relevant in every case, so it shouldn't be added to the total. What you want is similar to what's done with racial bonus for saving throws. For example, if you're a dwarf, your normal fortitude save might be +10, but you get a + 2 bonus vs. poison, and you'll see that as a little note on the character sheet. That's what you want to do here.

You can do that with a macro named #situational. See the code below, and if I got the details wrong, adapt it however you like.

When you're creating the text string, the signed function adds the + or - to the number, so it makes it appear as "+2" or "-2" appropriately.

The #situational macro takes three parameters. The variable you're adding the situational bonus to, the text you want to display, and the description of the bonus to display on the character sheet which, in this example, is the thingname of the item.

So, say the thingname is "Positive Energy Ring". On your character sheet, the Know: Religion skill will have a note that says, "Positive Energy Ring: +2 vs. undead", and your weapons will have a note that says, "Positive Energy Ring +1 vs. undead".

Code:
var bonus as number
var text as string
if (field[gIsEquip].value = 1) then
   bonus = 2
   text = signed(bonus) & " vs. undead"
   #situational[hero.childfound[skReligion],text,field[thingname].text
   
   bonus = 1
   text = signed(bonus) & " vs. undead"
   #situational[hero.childfound[wpDmg],text,field[thingname].text
endif
EightBitz is offline   #2 Reply With Quote
Ualaa
Senior Member
 
Join Date: Sep 2013
Location: Vancouver, Canada.
Posts: 813

Old October 13th, 2017, 12:34 PM
Without coding, the Shadow adjustments portion of the Community pack would allow this too.
Since it is the same as Favored Enemy, you can (on the adjust tab) and in the middle set of adjustments (Conferred Ability Adjustments), add Favored Enemy.

The second version is Shadow's, which then puts the option to select the type of creature the bonus applies towards, select amount of the bonus, and have a check box to enable it.
Rather than have situational text, you then have a check box, which when checked includes all the relevant bonuses to the assorted skills, attack/damage rolls, etc.
Ualaa is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

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 12:44 AM.


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