Autonomous Spell Handbook
Your workshop has golems to gather minerals, a furnace to process them, and storage for your supplies. An autonomous spell sets out what to request and when to request it, so the workshop follows the plan you write.
Begin by leaving a short message in the log. Then learn to store numbers and check conditions before entrusting a golem with mining.
Start with the fundamentals
Read from chapter one onward. Practice with messages and familiar numbers before learning the workshop's mining and equipment rules.
| Chapter | What you will learn to do |
|---|---|
| 1. What is an autonomous spell? | Put instructions in order |
| 2. Display a message | Run one instruction and observe its result |
| 3. Instruction order | Run two instructions in sequence |
| 4. Store values in variables | Name and use a value |
| 5. Calculate with numbers | Write additions and multiplications |
| 6. Choose with conditions | Select a message based on a condition |
Workshop practice
After the fundamentals, replace practice values with actual workshop state. These chapters use features available from the start.
| Chapter | What you will learn to do |
|---|---|
| 7. Read workshop state | Read the amount of available ore |
| 8. Request mining and production | Request one job and check acceptance |
| 9. Act on changing state | Check repeatedly and request work when needed |
Further lessons
Continue as research and prestige unlock new features. Each chapter starts with its requirement. See Equipment and research for the full unlock list.
| Chapter | What you will learn to do |
|---|---|
| 10. Loops | Repeat instructions a chosen number of times |
| 11. Methods | Give a calculation a name |
| 12. Arrays | Select stored values by index |
| 13. Classes and objects | Group state and behavior and create separate instances |
| 14. Keep values between calls | Retain state across calls and prestige |
| 15. Wait for a job | Wait for a job to end and inspect its result |
How to use each chapter
Read the explanation, try the example, then solve the exercise. Predict the result before running the spell. If you get stuck, start with the previous example and change one part.
Answers start closed. Think through the problem first, then select Show example solution and compare the reasoning. You can click it or use Tab followed by Enter or Space.
Use Prestige and Achievements and titles for game progression. Use the API reference for command details.
