Junior Member
Join Date: Oct 2017
Posts: 1
|
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 |
#1 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
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 |
#2 |
Senior Member
Join Date: Sep 2013
Location: Vancouver, Canada.
Posts: 813
|
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. |
#3 |
|
|