# Set StockTown
Grammar — Town set stock for player player using town hall type townHall and refinery type refinery|Gas
Flags —Native
|Action
Adds Town into the stock for an AI player. When the AI reaches this point in the stock list, it will ensure that every Town it owns has two refineries and a town hall of the specified types. This ensures that AI towns are never without these buildings.
# Arguments
int
— Playerstring
<gamelink::Unit> — TownHallstring
<gamelink::Unit> — Refinery
Returns — bool
native bool AISetStockTown(
int player,
string aliasUnitTypeTH,
string aliasUnitTypeGas,
);
# Related
Category: AI Advanced / Construction / Actions
- Build —
void
— AIBuild - Train —
void
— AITrain - Research —
void
— AIResearch - Make Always —
void
— AIMakeAlways - Make Once —
void
— AIMakeOnce - Clear Build Queue —
void
— AIClearBuildQueue - Clear Train Queue —
void
— AIClearTrainQueue - Clear Research Queue —
void
— AIClearResearchQueue - Clear Stock —
void
— AIClearStock - Enable Stock —
void
— AIEnableStock - Set StockEx —
void
— AISetStockEx - Set Stock —
void
— AISetStock - Set StockOpt —
void
— AISetStockOpt - Set StockUnitNext —
void
— AISetStockUnitNext - Set StockTown —
bool
— AISetStockTown - Set StockExpand —
bool
— AISetStockExpand - Set StockAlias —
void
— AISetStockAlias - Set StockFree —
void
— AISetStockFree - Default Economy —
void
— AIDefaultEconomy - Default Expansion —
void
— AIDefaultExpansion
# Examples
— None found —