This package contains art, text, or software code produced using generative AI.
LLM was used as an assistant to speed up development and bugfixing.
Your Game, Your Rules.
Need a 'Sanity' score or homebrew resource? Custom Fields lets you add any field to Actor & Item sheets. Features auto-formulas (#path#), token bar linking, item counters & permissions. System-agnostic, it's the perfect way to integrate your custom rules seamlessly.
What is Custom Fields?
Custom Fields is a powerful and intuitive module that allows Game Masters to add new, custom-tailored data fields directly onto Actor and Item sheets. It's designed to be completely system-agnostic, meaning it works seamlessly with the vast majority of game systems available on Foundry VTT. Whether you need a new resource, a special counter, or a place for notes, this module makes it possible with just a few clicks.
Key Features
-
Versatile Field Types: Create the exact field you need:
- Short Text: For titles or simple labels.
- Long Text: For detailed descriptions or notes.
- Number: For any numerical value.
- Value/Max: For resources like HP, Mana, or Energy (e.g.,
12/20). - List (Dropdown): For a predefined list of options.
-
Automatic Formulas: Define numeric fields that automatically calculate their value based on other data in the actor's sheet. The result is updated whenever the source data changes.
- Example: Create a "Carry Bonus" field with the formula
#system.abilities.str.mod# + 1.
- Example: Create a "Carry Bonus" field with the formula
-
Actor Resources (Token Bars & Macros): Mark any Number or Value/Max field as an "Actor Resource." This makes it instantly available in the token configuration to be linked to a token's resource bars. Once created, these resources can also be referenced in macros or chat commands just like any other system attribute (e.g.,
@custom-fields.honor.value). -
Item Counters: Make a numeric field on an item display as a small counter over its icon in a character's inventory. This is ideal for tracking ammo, potion doses, or magic item charges at a glance.
-
Granular Permissions: Control exactly who can see and who can edit each individual field. You can set permissions based on document ownership (Observer, Owner) and user role (Player, GM).
-
Intuitive Configuration: All fields are managed through a clean, easy-to-use settings menu. Reorder fields with drag-and-drop, easily add or delete them, and configure all options in one place.
When to Use Custom Fields?
The possibilities are limitless, but here are a few common scenarios:
- Homebrew Mechanics: Add and track system-wide rules like Sanity, Honor, Reputation, or Doom Points.
- Custom Resource Tracking: Create dedicated fields for class resources not native to the system, such as a Monk's Ki, a Barbarian's Rage, or a Sorcerer's spell points.
- GM Information: Keep secret notes, plot triggers, or tactical information on NPC sheets, visible only to you.
- Detailed Item Management: Track charges on a magic wand, the number of special arrows in a quiver, or the expiration of a potion.
- Enhanced Roleplaying: Add fields for character Bonds, Ideals, Flaws, or personal goals to keep them front-and-center during gameplay.
How to Use
Getting started is easy. Follow these steps:
1. Enable Document Types
Before creating fields, you must tell the module which sheets to modify.
- Go to
Settings->Custom Fields. - Find and click
Configure Types. - Select the Actor and Item types you want to add fields to (e.g., "character", "npc", "weapon").
- Save changes.
2. Create Your Fields
- Go back to
Settings->Custom Fieldsand open eitherConfigure Actor FieldsorConfigure Item Fields. - Click
Add Fieldto create your first field. - Display Label: This is the name that will appear on the sheet.
- Data Type: Choose the type of field (Text, Number, etc.).
3. Configure Special Features
-
To create a Formula:
- Check the
Enable Formulabox. - The field on the character sheet will now accept mathematical formulas.
- Rule: Always wrap data paths in hashes (
#...#), like#system.abilities.str.mod#. Do not use@.
- Check the
-
To create a Token Resource (Actor Fields Only):
- Set Data Type to
NumberorValue/Max. - Check the
Set as Resourcebox. - Save the settings (the world will reload).
- Now you can open a Token's configuration and find your new field in the "Resource Bars" dropdown menus.
- Set Data Type to
-
To create an Item Counter (Item Fields Only):
- Set Data Type to
Number. - Check the
Enable Counterbox. - Configure its position and color.
- Now, any value greater than 0 in this field will appear as a number on the item's icon in an actor's inventory.
- Set Data Type to
4. Save and Enjoy!
- Click
Save Changes. - Open an Actor or Item sheet of an enabled type, and your new fields will be there!
FAQ (Frequently Asked Questions)
-
Q: Will this work with my game system?
- A: Most likely, yes. The module is designed to be system-agnostic and injects its HTML into the sheet. As long as your system uses a standard sheet structure, it should work.
-
Q: How do I reference my new fields in macros or other modules?
- A: There are two ways:
- Attribute Key (Easy): If you've marked a field as a Resource, you can reference it with
@custom-fields.field-id.value. You can get the exact ID from the "Copy Attribute Key" button (@) in the settings. - Flag Path (Advanced): All fields are saved as flags. You can access them via
flags.custom-fields.field-id. Use the "Copy Field Path" button (📋) in the settings to get the precise path.
- Attribute Key (Easy): If you've marked a field as a Resource, you can reference it with
- A: There are two ways:
-
Q: I created a field, but it's not showing up on the sheet.
- A: Check these three things:
- Did you enable the correct Actor/Item type in the
Configure Document Typessettings menu? This is the most common reason. - Did you save your changes in the
Actor/Item Fieldsconfiguration window? - Try a hard refresh of your browser (Ctrl+F5).
- Did you enable the correct Actor/Item type in the
- A: Check these three things:
-
Q: My formula just shows
#ERR. What did I do wrong?- A: This means the formula could not be calculated. Check for:
- Incorrect Syntax: Make sure every data path is wrapped in
#...#. - Invalid Path: The path inside the hashes might be wrong. Double-check the path on the actor's data structure.
- Wrong Data Type: The path must point to a single number. If it points to a Value/Max object (like
system.attributes.hp), you must specify which part you want:#system.attributes.hp.value#or#system.attributes.hp.max#.
- Incorrect Syntax: Make sure every data path is wrapped in
- A: This means the formula could not be calculated. Check for:
