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
The Numerator
Junior Member
 
Join Date: Aug 2012
Posts: 21

Old November 26th, 2014, 08:31 PM
I'm trying to go a little deeper in the editor functions, and attempting to make custom abilities that can effect the calculated fields. I can't really code (though can puzzle through VBA and SQL macros here and there), but I'm trying to get better and thought this a great opportunity, but I could use some help.

I'm creating the Trailgaunt from the back of Pathfinder Comics #11. I was using the Bestiary Monster Creator for the most part, but was building custom Racial Special abilities to choose within the builder. I've got all of them done (just text based) except for "Vengeful Strike", which acts sort of like a favorite enemy bonus. Here's the text:

"A Trailgaunt particularly hates living Varisians. The undead gains a +2 bonus on all attack rolls made against Varisians, as well as on any Perception or Survival checks made against Varisians"

So in setting up the ability, I have it checked to Show in Activated Abilities List, with the name as "vs. Varisians". It looks like this created the field "actName" with a value of "vs. Varisians". What I'd like to do is build the Eval Scripts such that when the box is checked, it adds in the +2 to Attack, Perception, and Survival.

I've figured out that the names of those fields to modify are called [hero.child[skPercpe] [hero.child[skSurvival] and [hero.child[Attack] (from playing around w/ the favorite enemy scripts), but I'm stumped on what to do next. Any help (and if you have the time, a brief explanation of the why) in how to do this?
The Numerator is offline   #1 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old November 26th, 2014, 08:45 PM
What you are needing is the situational macro as the bonuses apply only to Varisians

Take a look at other things that apply a situation modifier for code examples but here is a basic code example to reference.

Code:
#situational[chosen save,bonus text,source's name]
chosen save is the chosen save. bonus text is the text you want to add to that saving throw, and source's name is the name of the ability that's applying the effect. You'll almost always use field[name].text for this.

Dormio Forte Somnio


Community Created Resources :
Data Package Repositories :
d20pfsrd
Custom Character Sheets
Community Server Setup (Packs)

Hero Lab Help- Video Tutorials and Pathfinder FAQ

Created by the community for the community
bodrin is offline   #2 Reply With Quote
The Numerator
Junior Member
 
Join Date: Aug 2012
Posts: 21

Old November 27th, 2014, 05:17 AM
Ok, first pass at writing it and I got an error... here was the script:

#situational[hero.child[skPercep], "+2 vs. Varisians", field[actName].txt]

and it gave me an error for invalid use of a reserved word in script.

One other question... would this just be adding in the text when I hover over the related skill? My hope was instead to have the check mark in the in play tab which then actually modifies the skill and attack checks... would the situational code above do this?
The Numerator 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 November 28th, 2014, 09:45 AM
Quote:
Originally Posted by The Numerator View Post
Ok, first pass at writing it and I got an error... here was the script:

#situational[hero.child[skPercep], "+2 vs. Varisians", field[actName].txt]

and it gave me an error for invalid use of a reserved word in script.
field[actName].txt is not valid. Use field[name].text

[QUOTE=The Numerator;198390
One other question... would this just be adding in the text when I hover over the related skill? My hope was instead to have the check mark in the in play tab which then actually modifies the skill and attack checks... would the situational code above do this?[/QUOTE]
Situational text adds text to the skill as a reminder. It will not actually adjust the values.

Pre-levels/4000:
Code:
~ If not activated get out now!
doneif (field[abilActive].value = 0)

#skillbonus[skSurvival] += 2
#skillbonus[skPercpe] += 2
hero.child[Attack].field[Bonus].value += 2
So the above is looking at the "activated" field which is a boolean that is either 1 for on or 0 for off. So if we are not activated the script ends and does nothing else.

If we are on we use a Macro (ie those with #) in front to give a skill bonus of 2 to Survival and Perception. Then as we get a "bonus" to attack we transition from the hero to the "Attack" thing and then look for the "Field" called Bonus and give it 2.

Hope that helps.

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:25 PM.


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