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 this commit for a real life example of adding a mutator HERE also this commit about the extrainfo icon: HERE

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