Skip to Content
Stoatly Docs
Formulas

Formula fields

A formula field's value is calculated, not typed. Add one to show a weapon's damage per second beside its damage and speed, and the number is always current. Designers can't edit it. Admins and schema designers add them.

Add a formula field

Create the formula first

The formula must exist on the object type, and it must have no parameters. Create a formula first if it doesn't exist.

Add a field

On the Fields tab, choose Add field and choose the Formula type.

Pick the formula

Choose which formula the field shows. Formula fields don't have a collection setting.

How it appears on a record

The field carries a Formula badge. Its value is shown but can't be edited. It updates as you change the fields it reads, and you see the result before you save.

A formula you have drafted but not yet sent can be used too, and it's evaluated with your draft.

The Stale badge

After a pull request merges, a value can be briefly out of date. Stoatly marks it Stale with the note "A recent merge may have changed what this value is calculated from. It will update shortly." No action is needed.

In your game

A formula field becomes a property on the generated C# class, so your code reads it like any other field.

Formulas that take parameters can't be formula fields, because there's no value to give them on a record. Use a runtime formula instead.

On this page