Advanced - Parse Effect

From Wiki for The Only Sheet
Jump to navigation Jump to search

BACK to the Advanced User Guide

What is Parse Effect ?

Parse Effect is actually the name of a function that is available to users of the Sheet. Its goal is to allow anyone to create new content which will be compatible with the stacking Rules of D&D. Not only that, but it also permits to handle the stacking of Abilities like Animal Companion or Turn Undead. In these sections, we'll examine in more details what Parse Effect can do to help you create new content. Note that it is quite simple to use, and you do not required advance knowledge of Excel to use it!!



Using ParseEffect()

The prototype to use Parse Effect is:

The ParseEffect() Function with its arguments
=ParseEffect(
Main_Target,
Table_to_Search,
Specific_Type [Optional],
Second_Target [Optional],
Third_Target [Optional],
Fourth_Target [Optional],
Fifth_Target [Optional],
Sixth_Target [Optionnal] )

Ok this seems a bit complex at first, but this is only an illusion (cast by the evil gnome!). Lets review the parameters to the function. Only the first 2 parameters are required, the rest are optional.

Main_Target

As we've already seen, the target is what characteristic we wish to locate, like 'Lay on Hands (Su)' or 'All CHA-based skills'. The IntegrationData worksheet lists all the available targets. It is ordered by category to facilitate searching for specific effects.

Table_to_Search

This parameter is to tell ParseEffect() which internal table it should search the effects in. For now, leave this parameter to t_Integration, which is the named cell that contains all the Effects that ParseEffect() has to go thru.

So with just those two parameters, we can already access the power of ParseEffect()! For example:

Example of use
=ParseEffect("STR", t_Integration)

Will return the total modifier to apply to the STR Ability Score. So if your character is wearing Gauntlets of Ogre Power, this would return '2'. If the character is also wearing a Belt of Giant Strength +4, you know those bonuses will not stack, and the call to ParseEffect() would return '4'.

Specific_Type

Specifies which type you wish the ParseEffect() to return - all other types will be ignored.

If the same character would also become enraged (like a 1st level Barbarian), a +4 [unnamed] bonus to strength would be added to the +4 already granted by the enhancement bonus of the Belt (the gauntlets are ignored, as the bonus is also enhancement, and does not stack with the belt). What if you wanted ONLY to see the enhancement bonus to Strength, then you could use the 3rd parameter of ParseEffect() to specify that you want only to see these bonuses:

Example of use
=ParseEffect("STR", t_Integration, "Enhancement")

Now what would happen if we would have created a very powerful godlike effect that would grant a +1 bonus to ALL ability scores? (an effect like "+1 Sacred Bonus to ALL ability Score"). This is where all the others parameters to Parse Effect would come into play.

Second_Target, Third_Target, Fourth_Target, Fifth_Target, Sixth_Target

WARNING: If using these, all effects names, including the first one, will be case sensitive! Be sure to check the spelling!

These four additional parameters tells ParseEffect() to also add the bonus from these effects.

So for example, with our new godlike ability, if we wanted to see ALL the bonuses applied to Strength, we would use:

Example of use, with parameter breakdown
=ParseEffect("STR",t_Integration,"","ALL Ability Scores")
Parameter Description
"STR" the Strength ability score
t_Integration The table to check effect (always the same)
"" No specific type checked
"ALL Ability Scores" Include values affecting ALL ability Scores

Here is another example - check it out and see if you can figure it out:

Example of use
=ParseEffect("Climb",t_Integration,"","All Skills","All STR-based skills")


This would be useful to catch all effects that would affect the Climb Skill, including any effects that would increase ALL skills (like the Heroism spell that gives a +2 morale bonus on all skills). It would also catch any effects that would modify all the strength based skills (Remember that the Sheet allows you to create a Feat/Ability/Class feature/Weapon... that would do exactly that!)


Although many of the Class features have been turned into Effects, some things cannot be made into an effect because it does not grant a specific bonus to something. For instance, while the Cleric's "Turn Undead (Su)" is easily made into an effect, the Monk's "Diamond Body (Su)" cannot!

Limitations

As powerful as ParseEffect() is, there are a couple of limitations you should be made aware of. First, ParseEffect() is a Visual Basic function: This means it is a piece of code which is executed each time the function is called. You need to be aware that, although it has been optimized for speed, there is a cost to having many calls to it. The more Effects are in your character, the more often ParseEffect() will be called. This leads to a progressive slowdown when Excel recalculates, which is a direct result of those many calls to ParseEffect().

The second limitation is Circular References: Since many of the total numbers presented in the Sheet are based on work done by ParseEffect(), it is easy to inadventently create circular references. For instance, if you create an Effect which checks the valus of the Strength ability, you will have a circular reference, since the Strength ability itself is based on the work of ParseEffect(). So do not be surprised if this happends.

Reducing Calls to ParseEffect()

To reduce the number of calls to ParseEffect(), dozens of named cells representing specific calls to ParseEffect() have been defined in the Tables worksheet. You can see those if you click on the "ParseEffect Def." link provided at the top of the Tables worksheet. Comments are present to explain the purpose. To use any of these effects, simply refer to the named cell.

For instance, if you want to know the total level counting toward your Familiar, the "PE_FamiliarLevel" named cell has that total value. So for a 2nd Wizard/3rd Sorcerer, PE_FamiliarLevel will contain the value 5!

Please examine that table for a list of all ParseEffect() shortcuts!

More Examples of Use

If you would like to see more example on using ParseEffect(), the Parse Effect Samples page will be a good source of knowledge.


BACK to the Advanced User Guide