Skip to main content

Writing your own Overwolf plugin

It's entirely possible for you to create new plug-ins for your needs, just follow these basic rules:

1. Implement the Overwolf interface

Create a .NET class library that implements a public constructor. When you call for overwolf.extensions.current.getExtraObject from Javascript, it will create an instance of your plugin and call on it’s constructor.

  • It should be an empty constructor or a constructor that accepts an int variable (specifically, the Win32 window handle for the app window hosting your plugin).
  • Your class library can contain multiple classes – however you will need a new “extra-object” entry for each class with a unique name.

2. Make your public functions accessible

Any public function, property or event will be accessible to your Javascript code automatically if it's in your class. Global events should look like: public event Action<object, object> onMyEvent (where you can pass any number of object parameters).

  • Your app will crash if it will try to load a plugin that declares a public event of a different form or which doesn’t pass objects.

3. Implement asynchronous functions

Our best practice is to implement asynchronous-only functions that accept a callback function triggered by completion:

public void add(int x, int y, Action<object> callback)
info
  • Overwolf version 116.2 and all later versions will only support 64 bit CPUs, and therefore you’ll be required to compile your .DLL to target the x64 platform.
  • It is recommended that plugin DLLs be compiled with the .NET 4.8 framework (using a higher/lower framework version might lead to unexpected behaviors)

We recommend you take a look at the overwolf-plugin-sample or overwolf-plugins entry to get a quick start on developing your own plugins.