Plugins

From Dark Forest Wiki
Jump to: navigation, search

Plugins are made by the community and can be installed easily by just copy and pasting the source code.
You can download plugins from here: https://plugins.zkga.me/

Template:Warning A malicious plugin can steal your private key, your money, your planets, your artifacts. Be sure the plugin you want to install is ok.

How to install a plugin[edit]

video tutorial: https://www.youtube.com/watch?v=ub_irFNixoo&list=PLVdl_HSgIhD4joZHXd2i_AJE0gQDbw11P&index=7

How to create a plugin[edit]

To make your plugin public you can upload it to the official github here: https://github.com/darkforest-eth/plugins
Make sure you read the README.md
You can also review other plugins or create issues, help is always welcome.

Inside a plugin you can access global Dark Forest objects like df and ui. for example:
let planets = df.getMyPlanets(); // get a list of all of your planets
ui.centerPlanet(planets[0]) // jump to your first planet

You can access functions related to procedural generation (such as planet names) by using df.getProcgenUtils() by first creating an object, for example:
let pu = df.getProcgenUtils();
pu.getPlanetName(planets[0]); // returns the name of your first planet