# Default Expansion

FlagsNative | Action

Attempts to make the specified player expand. There are certain conditions under which the AI will not expand, such as if the player does not have enough workers. The Minerals and Gas parameters are thresholds that the player must be under in order to expand (unless the player has too many extra workers).

# Arguments

  • int — Player
  • string<gamelink::Unit> — TownHall
  • int — Minerals
  • int — Gas
  • int — Flags

Returns — void

native void AIDefaultExpansion(
	int player,
	string hall,
	int minerals,
	int gas,
	int expandFlags,
);

Category: AI Advanced / Construction / Actions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeHighAI.galaxy:316

    }

    AIDefaultExpansion(player, hall, minerals, gas, expandFlags);
}

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeLowAI.galaxy:408

//--------------------------------------------------------------------------------------------------
void TerranBasicExpansion (int player, int tier, int minerals, int gas) {
    AIDefaultExpansion(player, c_TB_CommandCenter, minerals, gas, c_expandDefault);
}

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeLowAI.galaxy:550

//--------------------------------------------------------------------------------------------------
void ZergBasicExpansion (int player, int tier, int minerals, int gas) {
    AIDefaultExpansion(player, c_ZB_Hatchery, minerals, gas, c_expandDefault);
}

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeLowAI.galaxy:692

//--------------------------------------------------------------------------------------------------
void ProtossBasicExpansion (int player, int tier, int minerals, int gas) {
    AIDefaultExpansion(player, c_PB_Nexus, minerals, gas, c_expandDefault);
}

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:2067


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:2066


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/liberty.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:2097


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:2557


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:2556


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/liberty.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:2589


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/liberty.sc2modbase.sc2data/TriggerLibs/Zerg/ZergChIn.galaxy:1874


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/liberty.sc2modbase.sc2data/TriggerLibs/Zerg/ZergHdVH.galaxy:1873


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/liberty.sc2modbase.sc2data/TriggerLibs/Zerg/ZergVyHd.galaxy:1903


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/swarm.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:2067


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/swarm.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:2066


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/swarm.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:2097


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/swarm.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:2552


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/swarm.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:2548


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/swarm.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:2581


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/swarm.sc2modbase.sc2data/TriggerLibs/Zerg/ZergChIn.galaxy:1939


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/swarm.sc2modbase.sc2data/TriggerLibs/Zerg/ZergHdVH.galaxy:1938


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/swarm.sc2modbase.sc2data/TriggerLibs/Zerg/ZergVyHd.galaxy:1969


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/void.sc2modbase.sc2data/TriggerLibs/MeleeHighAI.galaxy:316

    }

    AIDefaultExpansion(player, hall, minerals, gas, expandFlags);
}

mods/void.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossChIn.galaxy:2593


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/void.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossHdVH.galaxy:2595


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/void.sc2modbase.sc2data/TriggerLibs/Protoss/ProtossVyHd.galaxy:2626


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_PB_Nexus, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/void.sc2modbase.sc2data/TriggerLibs/Terran/TerranChIn.galaxy:2815


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/void.sc2modbase.sc2data/TriggerLibs/Terran/TerranHdVH.galaxy:2817


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/void.sc2modbase.sc2data/TriggerLibs/Terran/TerranVyHd.galaxy:2847


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_TB_CommandCenter, 3000, 1000, c_expandVitalHard);

// Choose what type of endgame army we'd like to make

mods/void.sc2modbase.sc2data/TriggerLibs/Zerg/ZergChIn.galaxy:2256


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/void.sc2modbase.sc2data/TriggerLibs/Zerg/ZergHdVH.galaxy:2255


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );

mods/void.sc2modbase.sc2data/TriggerLibs/Zerg/ZergVyHd.galaxy:2291


// Desperate expand (we're about to run out of minerals/gas)
    AIDefaultExpansion(player, c_ZB_Hatchery, 3000, 1000, c_expandVitalHard);
    AISetStockUnitNext( player, 1, c_ZU_Queen, c_stockAlways );