Advice on my big ongoing project...
I am working on an alternate magic system, in which characters have some ability in 6 magic affinities (the 4 elements, light and darkness) to a variable degree. Each of the 6 affinities is linked to one of the basic attributes. The character puts ranks in those affinities, and bonuses can also be applied; the total score is no greater than the character total level. I have coded these as Custom Abilities linked to a configurable.
Thus, an 8th character with Air affinity 2 ranks + bonus 2 has a total Air level of 4, and if he has Dark 6 ranks + bonus 3 his Dark level would still be 8. Of course, I have run into problems... |
One of the other abilities a character can have is a large short-term stat buff from those affinities; when the ability is used, you get a bonus to any stat for which you have at least 2 ranks in the corresponding affinity, the bonus being one-half the total level (rank + bonus) of the affinity (yes, crazy at high levels).
I am trying to code the buff without using a series of if/then statements. A foreach loop iterating through the affinities seems appropriate, but I can’t get it to work so far. Post-Levels 50100 (...) Code:
foreach pick in hero where "abCategory.AMSAffin & Helper.FirstCopy" the field [abValue3] holds the total level for each affinity (and is calculated at post levels 50000) The error message: Hero Lab was forced to stop compilation after the following errors were detected: Syntax error in 'eval' script for Thing 'cAMSElAug' (Eval Script '#2') on line 15 -> Unspecified error parsing script Line 15 is the bonus macro 1) Is the problem the use of variables such in the macro? At least for the number, it usually works. Is there a problem with the string variable? 2) Any advice on how to optimize this script? I can't seem to find a way to travel to the attribute linked to the affinity without reconstructing it through the above string. Tags? Thanks! |
I don't understand what AffAttr even trying to do? Looking up a text field on a pick to get the Id of something?
Variables are not at all allowed to be used to generate Ids to target something. If the individual abilities know which ability score they target, why aren't they each running this script, applying just their own bonus? |
Quote:
2) That answers that part , thanks! Quote:
To illustrate, a character with Fire 6 and Water 4 gets a +3 to CHA and +2 to CON, but not to the other stats; another with Light 10 and Air 3 gets +5 to WIS and +1 to DEX. EDIT: Maybe having the ability have no script, but scripts on the affinities looks for that ability being activated do the trick? |
Quote:
|
Now trying to code for a "generic" item that can improve one of the wearer's affinities. I want to use a dropdown selector to allow the player to choose which item slot the item occupies.
Selection: Magic Item Slots Restriction: None First-500 Code:
~ We establish the item slot |
Progressing, using the Ornament (gear item) script as guide
Candidate expression for usrChosen2: component.ItemSlot & !Helper.Cyberware & !thingid.isEqpArmor & !thingid.isEqpPFRun & !thingid.isEqpS2Les (usrChosen1 is for targeting the affinity improved by the item) Pre-Levels - 9000 Code:
~ We establish the item slot How can I keep the item from competing with itself for slot use??? |
You're pulling an ExtraSlot tag, then forwarding a Hero tag? Shouldn't those be the same tag group?
|
I am still at the "copying similar things found elsewhere" stage, not necessarily fully understanding what I'm doing...
I lifted from the Ornament gear thing, which is the only thing I found which allows the user to set the item's equipment slot. This is from LoneWolf! Code:
(...) EDIT / UPDATE: "Ornament" is from a Lone Wolf file, but may be 3rd party as it is not sourced and I can't even locate it on d20pfsrd... Will try to use one of ShadowChemosh's adjustments that looks more promising. |
Finally got it to work! ShadowChemosh's adjustment used to change an item slot gave me everything I needed!
|
All times are GMT -8. The time now is 03:54 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.