NetLogo supports extensions as a way of adding functionality that it does not already provide. Here are a few common reasons you might want to make an extension:
file-*
prims built in to NetLogo work great for desktop, but they cannot be reproduced in NetLogo Web due to the differences in how web browsers interact with files. So the Fetch extension and the SendTo extension were created to operate identically in both environments.NetLogo desktop extensions can be easily written in any programming language that targets the Java Virtual Machine (JVM). This includes Java, Scala, and Kotlin, among others.
Here is a very brief outline of the process to get your project setup and producing an extension you can run with NetLogo (see below for technical details):
table
will have a table.jar
).ClassManager
for your extension, and create Primitive
classes for each extension primitive you’re making.NetLogo and many of its bundled extensions are written in Scala and so use the Scala build tool (SBT). We’ve created a NetLogo extension plugin for SBT that handles many of the above steps automatically, once it’s configured through the build.sbt
file.
For more technical information on creating your own extensions, including tutorials and samples, please see this page on the NetLogo repository wiki. It also includes ways to get help or to discuss NetLogo extension development.
To share an extension you’ve made with the built-in Extension Manager, you’ll need to have it added to our NetLogo-Libraries repository. See the instructions on the repository website for more information.