[2.1] Guide/documentation for parameterized blueprints.

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

everything-narrative
Inserter
Inserter
Posts: 26
Joined: Fri Aug 16, 2019 5:31 pm
Contact:

[2.1] Guide/documentation for parameterized blueprints.

Post by everything-narrative »

TL;DR
Parameterized blueprints are awesome, let's document them better.
What?
A guide in the Tips and Tricks menu, detailing how to use them. The nature of parameters, placing a parameterized blueprint, what it means that the parameterization is evaluated top-to-bottom, examples of how to use the dependent parameters, and so on.

In particular, the 'formula' should have a guide which should explain:
  • How declaring variables with the "Variable:" field works.
  • That variable names can contain arbitrary alphanumeric characters so long as they start with a letter.
  • Examples of how to use the special variables created by item/recipe parameters.
  • The operators available and, what they mean, such as / and * being division and multiplication.
  • The operator precendence hierarchy and the use of parentheses.
  • That integer arithemtic are available, not decimal numbers. Optionally, a guide on common tricks to get around this, like multiplying before dividing.
  • The function-call syntax.
  • The list of functions that are available to be called.
Why?
Most of the features parameterized blueprints is admittedly pretty intuitive, but the way numeric values are set is quite arcane.

The 'formula' field uses "programming syntax" as I have previously criticized which is easy to intuit if you're a programmer, but hard to intuit if you're not. (I know the venn diagram of factorio players and people with programming skills are, if not a circle, very close to.)

There is already the helpful popup that specially named variables are avaialble when parameterized items/recipes are present, but all the rest is open season.

Through trial and error I have identified the following interesting features:
  • The ^ operator is the exponential/raise to power function.
As well as the following:
  • There is no remainder operator % as you would usually find it in a programming language.
  • I can't find any bitwise operators either.
Personally, I'd really like a full list of all the goodies :D
Post Reply

Return to “Ideas and Suggestions”