Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Quintain
Senior Member
 
Join Date: Feb 2012
Posts: 546

Old March 28th, 2017, 06:36 PM
I just wanted to differentiate the code block from the text of the post. It isn't in the code itself.

As for timing, I have tried multiple different timings, usually the same timings as the abilities themselves. Timing (for me) is kind of a fog of guessing.

There have been no error messages of any kind when I compile.

Last edited by Quintain; March 28th, 2017 at 06:41 PM.
Quintain is offline   #1111 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 28th, 2017, 06:42 PM
Then I recommend one of our youtube seminars: https://www.youtube.com/channel/UCB2...lz0AIRw/videos

Find one of the intro seminars we've recorded at previous gen cons - timing is normally something we talk about relatively early in the seminars.
Mathias is online now   #1112 Reply With Quote
Quintain
Senior Member
 
Join Date: Feb 2012
Posts: 546

Old March 28th, 2017, 06:44 PM
I found it. Apparently the += 1 wasn't incrementing like it should have. When I changed to

Code:
hero.child[cWldSurBla].field[abValue].value = hero.child[cWldSurBla].field[abValue].value + 1
With the same timing as the Wild Surge ability (post-levels 10000), it worked fine. -- Wierd. I reverted to the increment syntax and now it's working. :/

Last edited by Quintain; March 28th, 2017 at 06:47 PM.
Quintain is offline   #1113 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 28th, 2017, 06:46 PM
No, if you're at the same timing as the thing you're trying to modify, you've got a 50/50 chance as to which one runs first, which can mean that the change you've made can get overwritten if they run in the wrong order that time.
Mathias is online now   #1114 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 28th, 2017, 06:46 PM
Quote:
Originally Posted by Quintain View Post
I found it. Apparently the += 1 wasn't incrementing like it should have. When I changed to

Code:
hero.child[cWldSurBla].field[abValue].value = hero.child[cWldSurBla].field[abValue].value + 1
With the same timing as the Wild Surge ability (post-levels 10000), it worked fine.
if you use the exact same timing then its a flip of the coin if it will work. You want to run BEFORE the Wild Surge ability.

In addition please use #value[] macro for the above. If Wild surge runs at Post-Levels/10000 then you MUST run BEFORE at Post-Level/9000 in example.

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   #1115 Reply With Quote
Quintain
Senior Member
 
Join Date: Feb 2012
Posts: 546

Old March 28th, 2017, 06:50 PM
Shadow:

So, conceptually, if you are modifying an ability, you want to apply modifiers prior to it existing?

Also: I changed to the #value macro per request.
Quintain is offline   #1116 Reply With Quote
Quintain
Senior Member
 
Join Date: Feb 2012
Posts: 546

Old March 28th, 2017, 06:58 PM
Shadow:

Can you create a "Collective" category like you did with Psion Disciplines? Edit: nm.. I did.. abCategory.PUPsiCllct will be pushed on the 3 collective class abilities once I commit the changes.

Suggestion: As a design convention, I think we should make categories of all cross-class class abilities, or class abilities with multiple custom abilities going forward. This would make testing of a hero having a particular class ability simpler without having to check for multiple versions of what amounts to the same class ability.

Last edited by Quintain; March 28th, 2017 at 07:09 PM.
Quintain is offline   #1117 Reply With Quote
Roadie
Senior Member
 
Join Date: Feb 2010
Posts: 125

Old March 28th, 2017, 09:58 PM
Quote:
Originally Posted by Quintain View Post
So, conceptually, if you are modifying an ability, you want to apply modifiers prior to it existing?
Bootstrapped things are populated on the character before the phases where scripts generally run. A thing might have a script that runs at Post-Levels/10000, but the thing itself generally exists from some point in the First phase.
Roadie is offline   #1118 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 29th, 2017, 10:41 AM
Quote:
Originally Posted by Quintain View Post
Shadow:

Can you create a "Collective" category like you did with Psion Disciplines? Edit: nm.. I did.. abCategory.PUPsiCllct will be pushed on the 3 collective class abilities once I commit the changes.

Suggestion: As a design convention, I think we should make categories of all cross-class class abilities, or class abilities with multiple custom abilities going forward. This would make testing of a hero having a particular class ability simpler without having to check for multiple versions of what amounts to the same class ability.
Not in disagreement about adding abCategory to Custom Abilities. The reason this exists is that LW ran into the same issues. So this ability has only existed for about a year and many parts of Psionics was built 5+ years ago.

Soulknife Blade Skills have an abCategory because I need it to do some of the soulknife Archetypes. In addition setting up Custom Expressions become much easier using abCategory tags.

The only thing is that we want to define the new abCategory "one" time on the mechanic. We should not create the tag on a Custom Ability. It can cause issues when making changes or if that "single" ability is ever removed the tag goes with. For these reasons I define them on the Psionic Mechanic so the logic is in a single place.

If you already did it on the Custom Ability I can change to to the mechanic pretty easily. Just if you do this in the future make sure to let me know.

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.

Last edited by ShadowChemosh; March 29th, 2017 at 10:54 AM.
ShadowChemosh is offline   #1119 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 29th, 2017, 10:54 AM
Quote:
Originally Posted by Quintain View Post
So, conceptually, if you are modifying an ability, you want to apply modifiers prior to it existing?
Maybe I will try an example.

Thingid.Shadow1
Post-Level/10000
Code:
field[abValue].value += 1
field[livename].text = "abValue =" & field[abValue].value
Assuming abValue starts at 0 after the above script runs at Post-Level/10000 the live name will be "abValue = 1".

Now then we add the following script logic:
Thingid.Shadow2
Post-Level/9000 (9000 is before 10000)
Code:
#value[Shadow1] += 2
Now abValue of Shadow1 starts at 2 and after the script runs at Post-Level/10000 the live name will be "abValue = 3".

In this example we will run AFTER Shadow1 script fires.

Thingid.Shadow2
Post-Level/11000 (11000 is AFTER 10000)
Code:
#value[Shadow1] += 2
This time abValue of Shadow1 is still at 0 and after the script runs at Post-Level/10000 the live name will be "abValue = 1". Then at Post-Level/11000 the abValue will be increased to 3 but sense Shadow1 script already ran the display to the user is 1 not 3.

Hopefully that helps some.

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   #1120 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 04:00 PM.


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