Functions

From Heroforge Wiki
Jump to: navigation, search

Here are several functions, that are often used in many of the formulas in Heroforge. They are presented here to help you understand how they are used. All functions can be nested within each other and themselves.

Contents

ROUNDDOWN:

Rounds a value (usually after dividing) down to the nearest whole number.

  • Format: ROUNDDOWN(formula,decimal)

The formula is the calculation to arrive at the value you want. It may include references and even other functions.
The decimal is the number of decimal places you wish to show. This will typically be “0” making the result an interger.

Example:

  • Spells that refer to "half your caster level", "one per three caster levels" etc.:
           ROUNDDOWN(CasterLvl/2,0)
           ROUNDDOWN(CasterLvl/3,0) 

MAX

Provides the maximum value from a list of 2 or more values.

  • Format:
           MAX(value1,value2,value3…valueX)

You can use as many values as you need to. This function is excellent for use with multiple bonuses of the same type which can’t stack.

Example:

Spells like Fireball that do damage based on the caster level, but can max out at a certain number of dice (Fireball's max is 10d6).

           =MAX(CasterLvl,10)

IF

Provides the a potential value based on a TRUE/FALSE condition

  • Format:
           IF(testvalue,trueResult,falseResult)

Example:

  • If the Magic ring is a Ring of Protection then use the bonus value of 10, otherwise leave this cell blank. This formula is part of a table that is populated based on a selection on the Magic Equip tab.
           =IF(MagicEquipRingType1=26,10,"") 

INDEX

Provides the value from a list of values elsewhere in the workbook.

  • Format:
           INDEX(array,row_num,column_num)

For HeroForge the Array will typically be a named range.

The row_num will be the row within the array. If the array takes up lines 8-18 of the worksheet, then worksheet line 8 will be array line 1 and worksheet line 18 will be array line 11.

The column_num is rarely used in HeroForge, if ever. Most named ranges are single column arrays.

Typically the arrays will have a list of number along the left side to make referencing easier. These numbers are not used in any other capacity.

Example:

  • Use the value from the named range “TblMagicEquipFace”, on the line number that matches that in the named cell “MagicEquipFaceType”.
           =INDEX(TblMagicEquipFace,MagicEquipFaceType) 

If you can't figure out how to do a formula, highlight the cell, and add it to your list of proposed changes that you will submit to the group.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox