CustomGame.SetHeroSettings(params SetHeroValue[] herodata);
Syntax
public void SetHeroSettings(
    params SetHeroValue[] herodata
)

herodata
Array of hero data to set settings to.
Type: CustomGameOW.SetHeroValue

(class) CustomGameOW.SetHeroValue(Hero hero, BotTeam team, int[] set, int[] setto);
public void SetHeroValue(
    Hero hero,
    BotTeam team,
    int[] set,
    int[] setto
)

hero
Hero to target.
Type: CustomGameOW.Hero

team
Team to target.
Type: CustomGameOW.BotTeam

set
ID of setting to change. Must be same length as setto.
Type: int[]

setto
Change setting to. Must be same length as set.
Type: int[]

Change individual hero settings.

The code below will set both teams' Ultimate Generation to 500%. You can target a specific setting for a hero by looking at their settings screen ingame. General's ultimate generation is number 3, if you count starting at 0.

using System;
using CustomGameOW;

...

static void Main(string[] args)
{
    CustomGame cg = new CustomGame();
    cg.SetHeroSettings(
        new SetHeroValue
        (
            Hero.General, // Hero to change settings of, or in this case, all heroes.
            BotTeam.Both, // Team to target.
            new int[] { 3 }, // Ultimate generation setting.
            new int[] { 500 }, // Set setting to.
        )
    );
}

You can also target multiple settings. The code below will set ultimate generation to 500%, ability cooldown time to 25%, and health to 250%.

using System;
using CustomGameOW;

...

static void Main(string[] args)
{
    CustomGame cg = new CustomGame();
    cg.SetHeroSettings(
        new SetHeroValue
        (
            Hero.General, // Hero to change settings of, or in this case, all heroes.
            BotTeam.Both, // Team to target.
            //         |set ultimate generation to 500% | Set ability cooldown to 25% | Set health to 250%
            new int[] { 3,                               0,                            8 }, // Setting to set.
            new int[] { 500,                             25,                           250 }, // Set setting to.
        )
    );
}

To target an ENABLE/DISABLE or ON/OFF value, set to -1. The code below will toggle if heroes can quick melee.

using System;
using CustomGameOW;

...

static void Main(string[] args)
{
    CustomGame cg = new CustomGame();
    cg.SetHeroSettings(
        new SetHeroValue
        (
            Hero.General, // Hero to change settings of, or in this case, all heroes.
            BotTeam.Both, // Team to target.
            new int[] { 1 }, // Quick melee setting.
            new int[] { -1 }, // Set setting to.
        )
    );
}

To target an option in a dropdown menu, set to -2 for option 1, -3 for option 2, and -4 for option 3. The code below will change Torbjorn's equipable weapon to "Forge hammer only".

using System;
using CustomGameOW;

...

static void Main(string[] args)
{
    CustomGame cg = new CustomGame();
    cg.SetHeroSettings(
        new SetHeroValue
        (
            Hero.Torbjorn, // Torbjorn hero.
            BotTeam.Both, // Both teams.
            new int[] { 16 }, // Weapons enabled setting.
            new int[] { -4 }, // Set setting to.
        )
    );
}

You can also target multiple heroes. The code below will set Ana's sleep dart cooldown to 0%, and torbjorn's equipable weapon to "Forge hammer only".

using System;
using CustomGameOW;

...

static void Main(string[] args)
{
    CustomGame cg = new CustomGame();
    cg.SetHeroSettings(
        new SetHeroValue
        (
            Hero.Torbjorn, // Torbjorn hero.
            BotTeam.Both, // Both teams.
            new int[] { 16 }, // Weapons enabled setting.
            new int[] { -4 }, // Set setting to.
        ),
        new SetHeroValue
        (
            Hero.Ana, // Ana hero.
            BotTeam.Both, // Both teams.
            new int[] { 3 }, // Ana sleep dart cooldown setting.
            new int[] { 0 }, // Set setting to.
        )
    );
}

The above examples may stop working if Blizzard adds or changes more hero settings.