# Get Max Desired Harvest Peon Count

Grammar — Get the maximum number of peons we want to have harvesting in town town for player player
FlagsNative | Function

Returns the maximum number of peons the AI wants to have harvesting in a town for a player.

# Arguments

  • int — Player
  • int — Town

Returns — int

native int AIGetMaxPeonCount(int player, int town);

Category: AI Advanced / Towns / Functions

# Examples

# mods/core.sc2mod

MeleeAI.galaxy

// L79
AIGetMaxPeonCount(player, c_townMax)

# mods/core.sc2mod

MeleeLowAI.galaxy

// L380
AIGetMaxPeonCount(player, c_townMax)

# mods/starcoop/starcoop.sc2mod

MeleeAI.galaxy

// L79
AIGetMaxPeonCount(player, c_townMax)