Scripting
Build visual automation for SoulFire bots with the current node-based scripting system.
Build SoulFire scripts by connecting nodes in the visual editor. Triggers, data flow, and limits control how each script runs.
Use scripting when the available nodes can express your workflow. Use Development for Mixins, packet handling, custom settings pages, or direct object access.
What scripting is in SoulFire
A SoulFire script is a graph of connected nodes.
- Trigger nodes start a run when something happens.
- Action nodes tell bots to do work.
- Data nodes read state from the world, the bot, or SoulFire itself.
- Flow nodes decide which node runs next.
- Utility nodes transform values so the next node gets the shape it needs.
Build scripts in the Scripts tab of an instance. Each script belongs to one instance and can be active or paused. An active script listens for events.
How scripts actually run
SoulFire scripts are event-driven. A script waits for a trigger, then runs the connected nodes.
This design means that:
- Idle scripts cost very little.
- Different triggers in the same script can start separate runs.
- Script limits control how many trigger runs can happen at once. The default is 1 run per script.
- Event triggers use a buffer. If the buffer fills, SoulFire can discard new events.
On Pre Entity TickandOn Post Entity Tickrun on the tick thread. Use them only for per-tick timing.
The mental model
1. Triggers start runs
SoulFire currently ships with 12 trigger nodes:
On Bot InitOn ChatOn Container OpenOn DamageOn DeathOn DisconnectOn IntervalOn JoinOn Pre Entity TickOn Post Entity TickOn Script InitOn Script End
SoulFire does not have one general On Tick trigger.
Use On Pre Entity Tick or On Post Entity Tick instead.
2. Execution connections decide the order
An execution connection tells SoulFire which node runs next.
If you connect On Join -> Send Chat -> Wait -> Pathfind To, SoulFire runs those nodes in that order when the trigger fires.
3. Data connections carry values
Data connections move values such as:
- numbers
- strings
- booleans
- vectors
- bots
- entities
- blocks
- items
- lists
For example, On Chat provides the plain-text message.
String Contains reads it, and Branch selects the next path.
4. Not every trigger gives you a bot
This is one of the most important implementation details.
- Most bot event triggers output a
bot. On Interval,On Script Init, andOn Script Enddo not give you a bot.- If you want to act on bots from
On Interval, start withGet Botsand then loop withFor Each Bot.
Quick start
Build a simple "say hello on join" script:
- Open an instance and go to Scripts.
- Create a new script.
- Add
On Join. - Add
Send Chat. - Connect the
execoutput ofOn Jointo theexecinput ofSend Chat. - Set the message on
Send Chat, for examplehello from SoulFire. - Save the script and make sure it is active.
That is enough to make each joining bot send a message once it is fully ready in the world.
Choose the right trigger
Use this table when you are deciding where to start.
| If you want to... | Start with... | Why |
|---|---|---|
| Do one-time setup when the script starts | On Script Init | Good for initialization that is not tied to a specific bot |
| Run logic when a bot is fully ready in the world | On Join | Best default for bot startup actions |
| Run logic before the player object is ready | On Bot Init | Earlier than On Join |
| React to chat | On Chat | Gives you the message and the bot |
| Poll on a timer | On Interval | Simple, predictable, not tied to a single bot |
| Run precise per-tick movement or aiming logic | On Pre Entity Tick | Happens before entity physics |
| Run precise per-tick combat or post-move logic | On Post Entity Tick | Happens after entity physics |
Common building blocks
You will use these node groups in most scripts:
- Actions for movement, chat, inventory, combat, and pathfinding
- Data for reading bot state, inventory, position, light, weather, effects, and nearby targets
- Flow Control for branching, looping, rate limiting, and iterating over bots or lists
- Variables and State for session data, saved metadata, and data in memory
- Network, Integration, and AI for web requests, Discord webhooks, and LLM calls
SoulFire currently exposes 163 built-in nodes across 17 categories.
Practical advice
- Start with
On Join,On Chat, orOn Intervalunless you specifically need lower-level timing. - Keep tick-trigger scripts small. Expensive chains do not belong in pre-tick or post-tick paths.
- Use
Printwhile building. It is the fastest way to see what your script is doing. - Use
Wait,Debounce, orRate Limitbefore repeated network calls or chat actions. - Prefer
Vector3values for movement-related logic when a node supports them. - Store saved data in persistent variables. Use session variables for temporary data.
Learn more
How is this page?
Last updated on
