Skip to content

How to add a new Mutator

darklordabc edited this page Nov 17, 2016 · 3 revisions

For this example, I'm using the example of creating a mutator for duels.

  1. Find an appropriate image, and save it to here MUTATORS IMAGE FOLDER. You can use an existing mutator as a template to make sure you have the right resolution.

  2. Add the image to the cache file, so that the game will preload the image to be presented later: CACHE FILE HERE

  3. Add an entry in the "game_setup_options.js" file for the mutator here: MUTATOR JAVASCRIPT DISPLAY OPTIONS . This part is tricker because there is different kind of mutators, some have multiple "states", that you can click multiple times to cycle through the states, some are simple toggle on and off, and one or two are always enabled. For this example, we are adding a simple toggle, but if you want to add one with states, copy the format of the a mutator with states.

  4. Add an entry for the mutator in the addon_english file (and Russian and Chinese optionally), so that the mutator has a name.

Please see the commit below for a real life example of adding a mutator. https://github.com/darklordabc/Dota-2-Redux/pull/454/commits/6f91f997a3ceba1c86eddfb5e81a20d7165070f1 also this commit about the extrainfo icon https://github.com/darklordabc/Dota-2-Redux/pull/454/commits/b8915ba1c9a8c241af21802c40a6394d34700984

Feel free to improve this wiki entry if you find it lacking.