Porting v0.5 plugins to v0.6

For most v0.5 plugins, upgrading is as simple as following these two steps:

  • First, replace plugin.register(new Plugin()); (usually the last line of the v0.5 plugin) with export default Plugin;.

  • If the plugin is tracked in the plugins repositoryarrow-up-right, replace 0.5.0 in the version field with 0.6.0, and the date to the current date.

Here's an examplearrow-up-right port (doesn't update the date field).

In a few cases, you might have to alter a few more lines. Here is a (possibly incomplete) list of additional modifications you may have to make:

  • If the plugin is importing utils dynamically with import('https://plugins.zkga.me/utils/utils.js'), you should replace any instances of canUpgrade with canPlanetUpgrade. examplearrow-up-right

  • entityStore.planetCanUpgrade is now a static method; any instance of df.entityStore.planetCanUpgrade(planet) should be replaced with df.entityStore.constructor.planetCanUpgrade(planet).

If you want to inspect the differences between the v0.5 and v0.6 clients, you can find the last v0.5 client source code herearrow-up-right. Documentation on the v0.6 df and ui objects can be found herearrow-up-right and herearrow-up-right, and the source code can be found in the Dark Forest open-source clientarrow-up-right.

Last updated

Was this helpful?