What you learn today
- Instructions and devices of the level
- Typical traps
- Practice questions
The pro exam is the day after tomorrow. It asks about things you built in three months – and about the traps you stumbled over along the way. Today you go through both once more.
What you should be able to do
| Area | Keywords |
|---|---|
| Math | sin, cos, atan2, radians, deg2rad, rad2deg |
| Energy | solar, Ratio, PowerMode 0–4 at the APC, charge level 0–6 at the battery, load shedding, transformer Setting, cable limits |
| Production | lr with Contents/Required/Recipe/TotalContents, rmap, target quantities |
| Logistics | SortingClass, sorters, inventory with Sum |
| Greenhouse | slots 0 and 1, Mature, Health, Harvie, climate, many trays |
The three batch traps
Almost every pro plant reads many devices at once. You must know three return values in your sleep:
| Situation | Result | Catch it with |
|---|---|---|
Maximum without a device | −inf | seq tmp value ninf |
| tray without a plant | −1 for Mature, Health, Growth | sgtz or seq … 1 |
Sum without a device | 0 | separate check with PrefabHash and Average |
snan does not help with −inf: minus infinity is a number, just a very small one. If you subtract 273.15 from it, it stays −inf, and the display shows nonsense.
lbn value FURNACE HASH("Ofen") Temperature Maximum
seq tmp value ninf # no furnace on the network?
sub value value CELSIUSOFFSET
select value tmp -1 value
More traps of the level
sin r0 90computes with 90 radians, not degrees. Firstmul r0 90 deg2rad.Harveston an unripe plant destroys it.- A transformer with
Setting0 passes on nothing. A supply exactly equal to the demand is not enough. - A loop over 30 slots needs more than one tick – output only after the loop.
The exam draws 20 questions from a larger pool. The questions below are in the same style. If you hesitate on one, look up the day instead of memorising the answer.
Diagram
Exercise
Task
Build a status board that catches all three batch traps:
- display “Ofen”: hottest furnace “Ofen” in whole °C, −1 without a furnace
- light “Ernte”: on when any tray “Beet” is ripe
- display “Barren”: quantity in slot 0 of all lockers “Barren”, −1 without a locker
Hints
Hint 1
Furnace: Maximum, then seq tmp value ninf – not snan.
Hint 2
Harvest: lbns … Mature Maximum and sgtz. Empty trays (−1) and missing ones (−inf) become 0 that way.
Hint 3
Ingots: Sum plus a presence check with PrefabHash and Average.
Quiz
5 questions. You pass from 60 % – the server does the grading.
Complete the day
- Passed the simulator exercise
- Passed the quiz with at least 60 %
Without an account progress is saved in this browser only.
Report a mistake in this lesson
Please sign in to report. Sign in