Manual / How to

Curve Connector & Table Module Editor

Build calculations by connecting source nodes to operators and a destination. This guide reflects the two editor scripts used in Let's Balance.

Two editors, two destinations: Curve Connector builds an expression for a curve and uses a single Output node. Table Module Editor builds a graph of table references and calculations, and requires at least one Output Cell node when applying.

1. Understand the ports

Source
Curve / cell / constant
→
Operator
A × B
→
Destination
Output / Output Cell

Drag a connection from a source node's output port to an operator's input port, then connect the operator's output to the destination. The editors validate connection direction and replace an existing wire when you connect a different source to an occupied input port.

2. Curve Connector

Use the Curve Connector when you want to define a calculated curve from other curves, table cells, or constants. Choose Add Curve for an existing curve, Add Const for a fixed number, Add Table for a table-cell reference, or choose an operation from the operator picker and add it.

Curve

References an existing curve. Select the source sheet and curve in the inspector. When editing an existing curve, that target curve is excluded from the available inputs to prevent direct self-reference.

Const

Provides a fixed numeric value. Select the node and edit its value in the inspector.

Table cell

References a numeric cell from a table. Select the table and cell reference in its node controls.

Output

The single destination for the curve expression. The Apply action requires an incoming connection to Output and a successfully compiled expression.

Worked example: increase production by 20%

Curve
Production
↘
Multiply
A × B
→
Output
Adjusted production
Const
1.2
↗Connect this to the other Multiply input.
  1. Add a Curve node and select your production curve.
  2. Add a Const node and set it to 1.2.
  3. Add a multiplication operator (*) and connect the curve to input A and the constant to input B.
  4. Connect the operator's Out port to Output.
  5. Choose Apply. A production value of 100 becomes 120 in the resulting expression.

Curve Connector operators: inputs → output

Each operator produces one output that can feed another operator or the final Output node. A and B are input ports, not spreadsheet column letters. For a curve input, the calculation is evaluated using the curve expression; examples below show sample numeric results.

OperatorRequired inputsOutputExampleWhen to use it
+A, BA + B100 + 25 → 125Add a fixed bonus to production.
−A, BA − B100 − 25 → 75Subtract expenses from income. Order matters.
*A, BA × B100 × 1.2 → 120Apply a 20% production boost.
/A, BA ÷ B100 ÷ 4 → 25Convert a total into a per-unit value. B must not be zero.
pow(a,b)A = base, B = exponentA raised to power B2 ^ 3 → 8Model exponential cost or growth. Example: base cost × pow(growth factor, level).
min(a,b)A, BSmaller of A and Bmin(80,100) → 80Apply a maximum allowance by taking the lower value.
max(a,b)A, BLarger of A and Bmax(−5,0) → 0Keep a calculated value at or above a floor.
log10(x)XBase-10 logarithm of Xlog10(1000) → 3Compress large progression values for comparison. X must be positive.
exp(x)Xe raised to Xexp(0) → 1Build continuous exponential scaling.
floor(x)XRound downward to an integerfloor(3.8) → 3Convert a fractional result into whole items or levels.
ceil(x)XRound upward to an integerceil(3.2) → 4Count whole actions needed to reach a target.
clamp(x,min,max)X = value, Min = lower bound, Max = upper boundRestrict X to the given boundsclamp(130,0,100) → 100Keep a stat or percentage inside an allowed range.
Σ SeriesValue = term expression, Count = number of termsSum a sequence defined by the supplied term and countValue = 10, Count = 3 → sum three terms of 10 = 30Use for repeated costs or contributions. Exact series behavior follows the expression evaluator.
sheet_sum(...)Choose the source sheet in the nodeA sheet-wide summation expressionValues 5, 10, 15 → 30 (illustrative)Total values from a selected sheet. Select the correct sheet in the node rather than wiring an ordinary numeric input.
sum(...)Up to three inputs (A, B, C); at least one must be connectedAdd all connected inputs10 + 20 + 30 → 60Combine several bonuses or contributions. This is not a table-range sum.
Σ CumulativeFunction = curve/value expression; settings: Start X, Step, Auto Start XRunning accumulation across sampled X valuesInput 2, 3, 4 → cumulative 2, 5, 9 (conceptual)Model accumulated resources or total progression. Step controls sample spacing; Auto Start X uses the first valid sample.
Important: sheet_sum is configured by selecting a sheet; although its graph node is created with an input row, its expression compiler reads the selected sheet ID. The Σ Cumulative settings are specific to the Curve Connector.

3. Table Module Editor

Use the Table Module Editor to connect table cells or ranges to operations and write the result to a selected output cell. This editor has its own graph format and an explicit Output Cell requirement.

Table Cell

Read one table cell, such as A1. Select the table and cell reference.

Table Range

Reference a range, such as A1:A5, for range-aware calculations.

Const

Supply a fixed numeric input, such as 1.2 or 50.

Output Cell

Choose the table and destination cell for a result. At least one Output Cell node must exist when you press Apply.

Worked example: adjust a table value

Table Cell
A1 = 100
↘
Multiply
A × B
→
Output Cell
B1
Const
1.2
↗Example result: 120 written to the chosen destination when the graph is evaluated.
  1. Add a Table Cell node, select a table, and enter A1.
  2. Add a Const node with value 1.2.
  3. Add * and connect both inputs.
  4. Add an Output Cell node and select destination B1.
  5. Connect the operator to Output Cell and apply the graph.
The editor script confirms graph creation and the Apply requirement. Actual write-back and recalculation behavior depends on the code that receives the emitted graph; the example describes the intended workflow, not a verified automatic-update guarantee.

Table Editor operators: inputs → output

Connect Table Cell, Table Range, or Const nodes to operator inputs. Connect the operator result to an Output Cell destination. The operator names below match the editor script; the examples illustrate the intended arithmetic rather than guaranteeing a particular write-back schedule.

OperatorRequired inputsOutputExampleWhen to use it
+A, BA + B100 + 25 → 125Add a fixed bonus to production.
−A, BA − B100 − 25 → 75Subtract expenses from income. Order matters.
*A, BA × B100 × 1.2 → 120Apply a 20% production boost.
/A, BA ÷ B100 ÷ 4 → 25Convert a total into a per-unit value. B must not be zero.
pow(a,b)A = base, B = exponentA raised to power B2 ^ 3 → 8Model exponential cost or growth. Example: base cost × pow(growth factor, level).
min(a,b)A, BSmaller of A and Bmin(80,100) → 80Apply a maximum allowance by taking the lower value.
max(a,b)A, BLarger of A and Bmax(−5,0) → 0Keep a calculated value at or above a floor.
log10(x)XBase-10 logarithm of Xlog10(1000) → 3Compress large progression values for comparison. X must be positive.
exp(x)Xe raised to Xexp(0) → 1Build continuous exponential scaling.
floor(x)XRound downward to an integerfloor(3.8) → 3Convert a fractional result into whole items or levels.
ceil(x)XRound upward to an integerceil(3.2) → 4Count whole actions needed to reach a target.
clamp(x,min,max)X = value, Min = lower bound, Max = upper boundRestrict X to the given boundsclamp(130,0,100) → 100Keep a stat or percentage inside an allowed range.
Σ SeriesValue = term expression, Count = number of termsSum a sequence defined by the supplied term and countValue = 10, Count = 3 → sum three terms of 10 = 30Use for repeated costs or contributions. Exact series behavior follows the expression evaluator.
sheet_sum(...)Choose the source sheet in the nodeA sheet-wide summation expressionValues 5, 10, 15 → 30 (illustrative)Total values from a selected sheet. Select the correct sheet in the node rather than wiring an ordinary numeric input.
Σ Range SumRange / Value = a Table Range or numeric valueTotal the supplied range or valueA1:A3 = 5, 10, 15 → 30Sum a column segment or a selected range. The table graph runner handles this operator.
Table-specific differences: Σ Range Sum has one input named Range / Value. Curve Connector sum(...) instead has three possible numeric inputs. Σ Cumulative is not in the Table Editor operator picker.

4. Which editor should I use?

GoalEditorDestination
Make a curve from existing curves and numbersCurve ConnectorOutput
Combine table cells or ranges into table calculationsTable Module EditorOutput Cell
Calculate cumulative values across a curveCurve ConnectorΣ Cumulative → Output

5. Troubleshooting

Curve Apply does nothing

Confirm that Output exists and has an incoming wire. Missing inputs or an expression that cannot compile also prevent applying.

Table Apply is rejected

Make sure the graph contains at least one Output Cell node. Check the selected destination table and cell.

Wrong values

Verify the selected curve/sheet, table ID, cell or range reference, constant values, and operator input order (especially subtraction and division).

Connection replaced

Each input port accepts one wire; attaching a new wire replaces the old one. Use separate operator inputs for separate sources.

Related guides

Module Manual · Learning Hub · Controls & Tips