Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old March 10th, 2018, 01:26 PM
I am attempting to script this in a feat:
Quote:
~ Improve our maneuverability based on how many copies of this feat we have.
field[abValue].value = field[xCount].value
if (field[abValue].value = 1) then
perform hero.childfound[xFly].tagreplace[Maneuver.Clumsy,Maneuver.Poor]
elseif (field[abValue].value = 2) then
perform hero.childfound[xFly].tagreplace[Maneuver.Poor,Maneuver.Average]
elseif (field[abValue].value = 3) then
perform hero.childfound[xFly].tagreplace[Maneuver.Average,Maneuver.Good]
elseif (field[abValue].value >= 4) then
perform hero.childfound[xFly].tagreplace[Maneuver.Good,Maneuver.Perfect]
endif
I noticed I cannot use xCount in feats so what other options do I have here?

Forum link for my content work:
Pathfinder Thread
Forum link for SU 5e content work:
5e Steven Universe Thread
This link is for my group, but feel free to play it with:
DMM 5e | "https://www.dropbox.com/s/vsd9w1eodlnwjq0/updatesDMM.xml?dl=1" Copy this link to your update manager to get updates when available.
This adds the Pisky subrace to elves from Berserk! and additional subraces for the Gem Race.
Please post comments in the provided threads above.
DeltaMasterMind is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old March 10th, 2018, 03:18 PM
Use a foreach to count the number of copies of the feat.
Aaron is offline   #2 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old March 10th, 2018, 03:33 PM
Would someone please write up that code and post it here? I am not sure how to use the foreach in that way specifically. Thanks for the suggestion otherwise Aaron.

Forum link for my content work:
Pathfinder Thread
Forum link for SU 5e content work:
5e Steven Universe Thread
This link is for my group, but feel free to play it with:
DMM 5e | "https://www.dropbox.com/s/vsd9w1eodlnwjq0/updatesDMM.xml?dl=1" Copy this link to your update manager to get updates when available.
This adds the Pisky subrace to elves from Berserk! and additional subraces for the Gem Race.
Please post comments in the provided threads above.
DeltaMasterMind 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 March 10th, 2018, 10:38 PM
Quote:
Originally Posted by DeltaMasterMind View Post
Would someone please write up that code and post it here? I am not sure how to use the foreach in that way specifically. Thanks for the suggestion otherwise Aaron.
I would actually just count the Ability tags to know how many times the feat was taken.

Like this:
Code:
~ Improve our maneuverability based on how many copies of this feat we have.
field[abValue].value += hero.tagcount[Ability.XXXXXXXX]

if (field[abValue].value = 1) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Clumsy,Maneuver.Poor]
elseif (field[abValue].value = 2) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Poor,Maneuver.Average]
elseif (field[abValue].value = 3) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Average,Maneuver.Good]
elseif (field[abValue].value >= 4) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Good,Maneuver.Perfect]
endif
Just replace XXXXXXXX with the Unique ID of your Feat.

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
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old March 11th, 2018, 06:49 AM
Quote:
Originally Posted by ShadowChemosh View Post
I would actually just count the Ability tags to know how many times the feat was taken.

Like this:
Code:
~ Improve our maneuverability based on how many copies of this feat we have.
field[abValue].value += hero.tagcount[Ability.XXXXXXXX]

if (field[abValue].value = 1) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Clumsy,Maneuver.Poor]
elseif (field[abValue].value = 2) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Poor,Maneuver.Average]
elseif (field[abValue].value = 3) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Average,Maneuver.Good]
elseif (field[abValue].value >= 4) then
  perform hero.childfound[xFly].tagreplace[Maneuver.Good,Maneuver.Perfect]
endif
Just replace XXXXXXXX with the Unique ID of your Feat.
Thank you so much for that Shadow!

Forum link for my content work:
Pathfinder Thread
Forum link for SU 5e content work:
5e Steven Universe Thread
This link is for my group, but feel free to play it with:
DMM 5e | "https://www.dropbox.com/s/vsd9w1eodlnwjq0/updatesDMM.xml?dl=1" Copy this link to your update manager to get updates when available.
This adds the Pisky subrace to elves from Berserk! and additional subraces for the Gem Race.
Please post comments in the provided threads above.
DeltaMasterMind is offline   #5 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old March 11th, 2018, 10:25 AM
While I did have some success with the tagcount, I found issue with it at the timings I needed to have it work. So I ended up using the foreach to simulate the effect of the tagcount. I had to do it in the First 23xx range, but the later scripts used the tagcount flawlessly. Just updating my findings.

Forum link for my content work:
Pathfinder Thread
Forum link for SU 5e content work:
5e Steven Universe Thread
This link is for my group, but feel free to play it with:
DMM 5e | "https://www.dropbox.com/s/vsd9w1eodlnwjq0/updatesDMM.xml?dl=1" Copy this link to your update manager to get updates when available.
This adds the Pisky subrace to elves from Berserk! and additional subraces for the Gem Race.
Please post comments in the provided threads above.
DeltaMasterMind is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 11th, 2018, 11:32 AM
Quote:
Originally Posted by DeltaMasterMind View Post
While I did have some success with the tagcount, I found issue with it at the timings I needed to have it work. So I ended up using the foreach to simulate the effect of the tagcount. I had to do it in the First 23xx range, but the later scripts used the tagcount flawlessly. Just updating my findings.
Why would you need to run that early? Nothing in your script requires that?

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   #7 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 11th, 2018, 11:38 AM
Looking at your script again I would also not use tagreplace[] as its not really needed. xFly is designed to use the BEST maneuverability rating regardless of how many tags are on it.

Just need this:
Code:
~ Improve our maneuverability based on how many copies of this feat we have.
field[abValue].value += hero.tagcount[Ability.XXXXXXXX]

if (field[abValue].value = 1) then
  perform hero.childfound[xFly].assign[Maneuver.Poor]
elseif (field[abValue].value = 2) then
  perform hero.childfound[xFly].assign[Maneuver.Average]
elseif (field[abValue].value = 3) then
  perform hero.childfound[xFly].assign[Maneuver.Good]
elseif (field[abValue].value >= 4) then
  perform hero.childfound[xFly].assign[Maneuver.Perfect]
endif
Which goes back to my idea of nothing in here requires early timing. Its always better to get away from early timing if you can.

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   #8 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old March 11th, 2018, 12:47 PM
The feat says this:
{b}Benefit{/b}: Your fly speed increases by 10 feet and your maneuverability by one step.
This feat can be taken multiple times.
{b}Special{/b}: This feat can be taken more than once. If you have this feat more than once, you gain run as a bonus feat, but can only apply it to flight unless you buy it normally.

The reason for the early timing is for the bootstrap condition which I must contend with.
So you suggest just to change it to assign instead of replace since my timing comes before it's own correct?

Forum link for my content work:
Pathfinder Thread
Forum link for SU 5e content work:
5e Steven Universe Thread
This link is for my group, but feel free to play it with:
DMM 5e | "https://www.dropbox.com/s/vsd9w1eodlnwjq0/updatesDMM.xml?dl=1" Copy this link to your update manager to get updates when available.
This adds the Pisky subrace to elves from Berserk! and additional subraces for the Gem Race.
Please post comments in the provided threads above.
DeltaMasterMind is offline   #9 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 11th, 2018, 12:56 PM
Quote:
Originally Posted by DeltaMasterMind View Post
The reason for the early timing is for the bootstrap condition which I must contend with.
What bootstrap? Fly is on every character in the world. I am guessing your bootstrapping xFly if that is the case no need. Just assign the fly speed in the script.

Quote:
Originally Posted by DeltaMasterMind View Post
So you suggest just to change it to assign instead of replace since my timing comes before it's own correct?
Assuming your bootstrapping xFly as the reason for early timing. Then make your script as this and you can set pretty much any time before Final:

Code:
~ Improve our maneuverability based on how many copies of this feat we have.
field[abValue].value += hero.tagcount[Ability.XXXXXXXX]

~ Give fly speed of XXft based on the abValue2 setup on feat
#applybonus[abValue,hero.child[xFly],field[abValue2].value]

if (field[abValue].value = 1) then
  perform hero.childfound[xFly].assign[Maneuver.Poor]
elseif (field[abValue].value = 2) then
  perform hero.childfound[xFly].assign[Maneuver.Average]
elseif (field[abValue].value = 3) then
  perform hero.childfound[xFly].assign[Maneuver.Good]
elseif (field[abValue].value >= 4) then
  perform hero.childfound[xFly].assign[Maneuver.Perfect]
endif
I use #applybonus[] to set the HIGHEST Fly speed. Meaning if two scripts run for #applybonus with 60ft of movement and 30ft of movement you end up with 60ft of fly speed not 90.

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   #10 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 06:16 PM.


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