Wiki
Guides for writing, testing and publishing BotWithUs scripts
Getting started
Pick a language, find your scripts folder and run your first script.
-
Start here
Pick a language, find out where scripts live on disk, and run your first one.
Java
Write, test and publish scripts for the Java host.
-
Project setup
A Gradle Kotlin DSL project that compiles against the BotWithUs API and builds a script JAR.
-
A complete example
Every file of a small working script project, ready to build.
-
Anatomy of a script
BotScript, @ScriptManifest and the onStart, onLoop, onStop lifecycle.
-
API tour
Snapshot reads, GameAPI actions, inventory, entity queries, walking, events, settings and a custom UI.
-
Logging, reloading and testing
Log with SLF4J, reload your JAR while you work, and unit-test against mocks.
-
Preparing for SDN
What a Script Market JAR must contain, and how to submit it.
Python
Write and run Python scripts in bwu_host.
-
Your first script
Set up, write a script class, and run it from the bwu_host GUI or a console.
-
Lifecycle, settings and stopping
The order of the callbacks, how to pace on server ticks, settings fields and the cooperative stop.
-
API tour
The context, game state, actions, inventories, entity queries, walking and events.
-
Logs and crash files
Where your script's output goes, and what a crash file tells you.
Lua
Write and run Lua scripts in bwu_host.
-
Your first script
Set up, write a script table with a manifest, and run it.
-
Lifecycle, pacing and settings
on_loop returns server ticks, not milliseconds. Settings fields and stopping.
-
Modules, require and walking
What each botwithus module gives you, loading your own files, actions and the two walking styles.
-
Logs and running
Log with bwu.log, find your run logs, and run scripts from the GUI or a console.
SDN
Publish scripts through the Script Market.
-
What SDN is
How scripts are published and delivered through the Script Market, from an author's side.
-
Java: live
Java scripts can be published through the Script Market today.
-
Python and Lua: coming soon
SDN is not live for Python and Lua yet. How to write your script now so it is ready.