long aiActivateOpportunity( int opportunityID, bool flag ) : activates or deactivates an opportunity on the player's opp list.
long aiActivateOpportunity( int opportunityID, bool flag ): 在玩家的机会列表中激活或停用某个机会。
void aiAttemptResign() : asks the player if its ok to resign
void aiAttemptResign(): 询问玩家是否要投降。
void aiAutoSavegame( string filename ) : Saves the auto, debugging savegames (THIS DOESN'T REALLY DO ANYTHING).
void aiAutoSavegame( string filename ): 保存自动调试存档(实际上并没有任何实际作用)。
void aiBreakpointGo( int playerID ) : Restart XS execution after the current breakpoint.
void aiBreakpointGo( int playerID ): 在当前断点之后重新开始 XS 的执行。
void aiBreakpointSet( int playerID, string filename, int lineNumber, bool on ) : Sets a breakpoint.
void aiBreakpointSet( int playerID, string filename, int lineNumber, bool on ): 设置一个断点。
bool aiBreakTreaty( int escrowID ) : breaks the treaty using funds from the given escrow.
bool aiBreakTreaty( int escrowID ): 使用给定托管资金打破条约。
bool aiBuildWall( int buildingID, int escrowID ) : builds walls around the specified building's colony using the specified escrow.
bool aiBuildWall( int buildingID, int escrowID ): 使用指定的托管资金在目标建筑的殖民地周围建造城墙。
bool aiBuyResourceOnMarket( int resourceID ) : buys (+100) the given resource.
bool aiBuyResourceOnMarket( int resourceID ): 在市场上购买指定资源(+100 数量)。
int aiCalculateMostHatedPlayerID( int comparePlayerID ) : Returns the playerID for the player the AI thinks it should be attacking.
int aiCalculateMostHatedPlayerID( int comparePlayerID ): 返回 AI 认为最应该攻击的玩家 ID。
bool aiCanBuildWall( int buildingID, int escrowID ) : returns whether it is allowed to build a wall around the specified building's colony, and whether the player can afford it from the specified escrow.
bool aiCanBuildWall( int buildingID, int escrowID ): 返回是否允许在目标建筑的殖民地周围建墙,以及玩家是否能从指定托管资金中负担费用。
bool aiCastGodPowerAtPosition( int godPowerTechID, vector pos ) : Casts the given God power tech, at the specified position.
bool aiCastGodPowerAtPosition( int godPowerTechID, vector pos ): 在指定位置施放给定的神力科技。
bool aiCastGodPowerAtUnit( int godPowerTechID, int unitID ) : Casts the given God power tech, at the specified unit.
bool aiCastGodPowerAtUnit( int godPowerTechID, int unitID ): 在指定单位上施放给定的神力科技。
void aiChat( int playerID, string chatString ) : CP AI chat to playerID.
void aiChat( int playerID, string chatString ): 向 playerID 发送 CP AI 聊天信息。
aiCommsAllowChat( bool flag ) : enables or disables the chats from this ai player.
aiCommsAllowChat( bool flag ): 启用或禁用此 AI 玩家发送聊天信息的功能。
long aiCommsGetChatTargetType( int sentenceID ) : get target type for specified sentence.
long aiCommsGetChatTargetType( int sentenceID ): 获取指定聊天语句的目标类型。
long aiCommsGetChatVerb( int sentenceID ) : get chat verb for specified sentence.
long aiCommsGetChatVerb( int sentenceID ): 获取指定聊天语句的动词信息。
long aiCommsGetSendingPlayer( int sentenceID ) : get sending player for specified sentence.
long aiCommsGetSendingPlayer( int sentenceID ): 获取指定聊天语句的发送玩家 ID。
long aiCommsGetTargetListCount( int sentenceID ) : get number of items in target list for specified sentence.
long aiCommsGetTargetListCount( int sentenceID ): 获取指定聊天语句的目标列表中包含的数量。
long aiCommsGetTargetListItem( int sentenceID, int index ) : get index item from specified sentence.
long aiCommsGetTargetListItem( int sentenceID, int index ): 从指定聊天语句中获取目标列表的第 index 个项目。
vector aiCommsGetTargetLocation( int sentenceID ) : get target location from specified sentence.
vector aiCommsGetTargetLocation( int sentenceID ): 获取指定聊天语句的目标位置(坐标)。
void aiCommsSendReply( int sentenceID, int responseID ) : send a reply to a sentence.
void aiCommsSendReply( int sentenceID, int responseID ): 向某聊天语句发送回复。
int aiCommsSendStatement( targetPlayerID, int promptType ) : Sends a statement to the designated player.
int aiCommsSendStatement( targetPlayerID, int promptType ): 向指定玩家发送一个声明。
int aiCommsSendStatementWithVector( targetPlayerID, int promptType, vector v ) : Sends a statement to the designated player. Adds a location flare.
int aiCommsSendStatementWithVector( targetPlayerID, int promptType, vector v ): 向指定玩家发送声明,并添加一个位置标示。
bool aiCommsSetEventHandler( string handlerFunctionName ) : Sets the handler for the communications system (invalid name unsets the handler).
bool aiCommsSetEventHandler( string handlerFunctionName ): 为通信系统设置处理函数(若名称无效则取消处理函数)。
long aiCreateOpportunity( int type, int targettype, int targetID, int targetPlayerID, int source ) : adds an opportunity to the list and returns the id.
long aiCreateOpportunity( int type, int targettype, int targetID, int targetPlayerID, int source ): 将一个机会添加到列表并返回其 ID。
long aiDestroyOpportunity( int opportunityID ) : remove an opportunity on the player's opp list.
long aiDestroyOpportunity( int opportunityID ): 从玩家的机会列表中移除指定机会。
bool aiDoesWallExist( int buildingID ) : returns whether a wall exists around the specified building's colony.
bool aiDoesWallExist( int buildingID ): 返回在指定建筑殖民地周围是否已有城墙。
bool aiDoTradeMonopoly() : Executes a trade monopoly command, returns false if it fails.
bool aiDoTradeMonopoly(): 执行贸易垄断指令,如失败返回 false。
void aiEcho( string echoString ) : CP AI echo.
void aiEcho( string echoString ): CP AI 回显。
void aiErrorMessage( string errorString ) : CP AI error.
void aiErrorMessage( string errorString ): CP AI 错误信息输出。
int aiFindBestAttackGodPowerPlan(void) : find a valid god power plan to attach to an attack plan
int aiFindBestAttackGodPowerPlan(void): 查找一个可用于攻击计划的神力方案。
void aiFindBestOpportunity() : finds the best currently scored opp.
void aiFindBestOpportunity(): 查找当前得分最高的机会(opp)。
int aiFindBestTownDefenseGodPowerPlan(void) : find a valid god power plan to use for town defense
int aiFindBestTownDefenseGodPowerPlan(void): 查找一个可用于城镇防御的神力方案。
bool aiGetAllowBuildings( void ) : Returns allow buildings on/off.
bool aiGetAllowBuildings( void ): 返回是否允许建造建筑的开关状态。
float aiGetAttackResponseDistance( void ) : Returns the attack response distance.
float aiGetAttackResponseDistance( void ): 返回攻击响应的距离阈值。
int aiGetAutoFarmEscrowID( void ) : Returns the auto Farm escrow ID.
int aiGetAutoFarmEscrowID( void ): 返回自动农场托管资金的 ID。
int aiGetAutoGatherEscrowID( void ) : Returns the auto gather escrow ID.
int aiGetAutoGatherEscrowID( void ): 返回自动采集托管资金的 ID。
bool aiGetAutosaveOn() : returns whether or not its cool to turn ai autosaves on.
bool aiGetAutosaveOn(): 返回是否允许开启 AI 自动存档功能。
int aiGetAvailableEconomyPop( void ) : Returns the available economy pop for this player.
int aiGetAvailableEconomyPop( void ): 返回该玩家可用的经济人口数量。
int aiGetAvailableMilitaryPop( void ) : Returns the script-defined military pop for this player.
int aiGetAvailableMilitaryPop( void ): 返回脚本定义的玩家可用军事人口。
int aiGetCaptainPlayerID( int playerID ) : Returns the captain for the given player's team.
int aiGetCaptainPlayerID( int playerID ): 返回指定玩家所在队伍的“队长”玩家 ID。
int aiGetCurrentEconomyPop( void ) : Returns the current economy pop for this player.
int aiGetCurrentEconomyPop( void ): 返回该玩家当前的经济人口数。
void aiGetCurrentResourceNeed( int resourceID ) : returns the current resource need for the given resource.
void aiGetCurrentResourceNeed( int resourceID ): 返回指定资源的当前需求量。
float aiGetEconomyPercentage( void ) : Returns the economy priority percentage.
float aiGetEconomyPercentage( void ): 返回经济优先级的百分比。
int aiGetEconomyPop( void ) : Returns the script-defined economy pop for this player.
int aiGetEconomyPop( void ): 返回脚本定义的该玩家经济人口数。
float aiGetExploreDangerThreshold() : gets the ai's Explore Danger Threshold value.
float aiGetExploreDangerThreshold(): 获取 AI 探索的危险阈值。
int aiGetFallenExplorerID() : returns the ID of the fallen explorer; if there isn't one, returns -1
int aiGetFallenExplorerID(): 返回已阵亡探险家的 ID;若不存在则返回 -1。
int aiGetFarmLimit( void ) : Returns the per plan farm build limit.
int aiGetFarmLimit( void ): 返回每个计划可建造农场的上限。
int aiGetGameMode( void ) : Returns the game's mode.
int aiGetGameMode( void ): 返回当前游戏模式。
int aiGetGameType() : returns the current game type (e.g., cGameTypeScenario, cGameTypeRandom, etc).
int aiGetGameType(): 返回当前游戏类型(如 cGameTypeScenario、cGameTypeRandom 等)。
int aiGetGodPowerProtoIDForTechID( int techID ) : translate a granted tech id into a protopower id
int aiGetGodPowerProtoIDForTechID( int techID ): 将授权的科技 ID 转换为一个神力(protoPower)ID。
int aiGetGodPowerTechIDForSlot( int slotID ) : Get the god power tech id from the given slot.
int aiGetGodPowerTechIDForSlot( int slotID ): 从指定槽位获取对应的神力科技 ID。
int aiGetGodPowerType( int protoPowerID ) : get the type for a ProtoPower
int aiGetGodPowerType( int protoPowerID ): 获取指定神力(protoPower)的类型。
vector aiGetHCGatherPoint( void ) : Returns the HCGP.
vector aiGetHCGatherPoint( void ): 返回主城(HC)的集合点坐标。
int aiGetKOTHController() : Gets the team that is king of the hill.
int aiGetKOTHController(): 获取当前占领“王者山丘”(KOTH)的队伍。
int aiGetLastCollectedNuggetEffect(int playerID) : Gets the last collected nugget's effect
int aiGetLastCollectedNuggetEffect(int playerID): 获取该玩家最后收集的宝物效果。
int aiGetLastCollectedNuggetType(int playerID) : Gets the last collected nugget's type
int aiGetLastCollectedNuggetType(int playerID): 获取该玩家最后收集的宝物类型。
float aiGetMarketBuyCost( int resourceID ) : Returns the amount required to buy 100 units of the given resource.
float aiGetMarketBuyCost( int resourceID ): 返回购买 100 单位指定资源所需的市场价格。
float aiGetMarketSellCost( int resourceID ) : Returns the amount received for selling 100 units of the given resource.
float aiGetMarketSellCost( int resourceID ): 返回出售 100 单位指定资源可获得的市场收益。
int aiGetMaxLOSProtoUnitLimit() : gets the limit for how many LOS Protounits the AI can build
int aiGetMaxLOSProtoUnitLimit(): 获取 AI 所能建造的视野(LOS)类单位的上限。
float aiGetMilitaryPercentage( void ) : Returns the militarypriority percentage.
float aiGetMilitaryPercentage( void ): 返回军事优先级的百分比。
int aiGetMilitaryPop( void ) : Returns the script-defined military pop for this player.
int aiGetMilitaryPop( void ): 返回脚本定义的该玩家军事实力(人口)。
int aiGetMinNumberNeedForGatheringAggressives() : gets the min number of needed units to gather aggressive animals.
int aiGetMinNumberNeedForGatheringAggressives(): 获取采集具有攻击性的动物所需的最少单位数量。
int aiGetMinNumberWantForGatheringAggressives() : gets the min number of wanted units to gather aggressive animals.
int aiGetMinNumberWantForGatheringAggressives(): 获取采集具有攻击性的动物所希望的最少单位数量。
int aiGetMostHatedPlayerID( void ) : Returns the script-defined most hated player ID for this player.
int aiGetMostHatedPlayerID( void ): 返回脚本定义的该玩家最厌恶的敌对玩家 ID。
int aiGetNumberIdlePlans( int planType ) : Gets the of idle plans of the given type.
int aiGetNumberIdlePlans( int planType ): 获取指定类型的空闲计划数量。
int aiGetNumberRelicsControlled(int teamID) : Gets the number of relics controlled by this team (for relic victory).
int aiGetNumberRelicsControlled(int teamID): 获取该队伍控制的遗物数量(用于遗物胜利)。
int aiGetNumberRelicsNeededForVictory() : Gets the number of relics needed to make a relic win possible.
int aiGetNumberRelicsNeededForVictory(): 获取达成遗物胜利所需的遗物数量。
long aiGetNumberTeams() : returns the number of teams in the game.
long aiGetNumberTeams(): 返回游戏中的队伍数量。
int aiGetNumberTradePostsControlled(int teamID) : Gets the number of tradeposts controlled by this team (for monopoly victory).
int aiGetNumberTradePostsControlled(int teamID): 获取该队伍控制的交易站数量(用于垄断胜利)。
int aiGetNumberTradePostsNeededForMonopoly() : Gets the number of tradeposts needed to make a monopoly win possible.
int aiGetNumberTradePostsNeededForMonopoly(): 获取达成交易站垄断胜利所需的交易站数量。
vector aiGetOpportunityLocation(int opportunityID) : gets the location from this opportunity
vector aiGetOpportunityLocation(int opportunityID): 获取该机会(opportunity)的位置信息。
float aiGetOpportunityRadius(int opportunityID) : gets the radius from this opportunity
float aiGetOpportunityRadius(int opportunityID): 获取该机会的作用半径。
long aiGetOpportunitySourceID(int opportunityID) : gets the source id from this opportunity
long aiGetOpportunitySourceID(int opportunityID): 获取该机会的来源 ID。
long aiGetOpportunitySourceType(int opportunityID) : gets the source type from this opportunity
long aiGetOpportunitySourceType(int opportunityID): 获取该机会的来源类型。
long aiGetOpportunityTargetID(int opportunityID) : gets the target id from this opportunity
long aiGetOpportunityTargetID(int opportunityID): 获取该机会的目标 ID。
long aiGetOpportunityTargetPlayerID(int opportunityID) : gets the target playerID from this opportunity
long aiGetOpportunityTargetPlayerID(int opportunityID): 获取该机会的目标玩家 ID。
long aiGetOpportunityTargetType(int opportunityID) : gets the target type from this opportunity
long aiGetOpportunityTargetType(int opportunityID): 获取该机会的目标类型。
long aiGetOpportunityType(int opportunityID) : gets the type from this opportunity
long aiGetOpportunityType(int opportunityID): 获取该机会的类型。
bool aiGetPauseAllAgeUpgrades() : gets the pause all age upgrades flag from the AI.
bool aiGetPauseAllAgeUpgrades(): 获取 AI 是否暂停所有时代升级的标志。
string aiGetPersonality( void ) : Gets the player's personality.
string aiGetPersonality( void ): 获取该玩家的 AI 个性描述(personality)。
int aiGetPoliticianChoice(int age) : Gets the scripts choice for the AgeX Politician.
int aiGetPoliticianChoice(int age): 获取此脚本对 AgeX 政治家的选择。
int aiGetPoliticianListByIndex(int age, int index) : Gets the index'th Politicans avaiable for AgeX.
int aiGetPoliticianListByIndex(int age, int index): 获取可用于 AgeX 的第 index 个政治家。
int aiGetPoliticianListCount(int age) : Gets the number of Politicans avaiable for AgeX.
int aiGetPoliticianListCount(int age): 获取 AgeX 可选政治家的数量。
int aiGetPopNeeds() : gets the current Pop needs of all the plans.
int aiGetPopNeeds(): 获取所有计划对人口数量的当前需求。
int aiGetResourceBreakdownNumberPlans ( int resourceTypeID, int resourceSubTypeID, int baseID ) : Gets the number of plans for the given breakdown.
int aiGetResourceBreakdownNumberPlans ( int resourceTypeID, int resourceSubTypeID, int baseID ): 获取给定资源细分(breakdown)对应的计划数量。
float aiGetResourceBreakdownPercentage ( int resourceTypeID, int resourceSubTypeID, int baseID ) : Gets the percentage for the given breakdown.
float aiGetResourceBreakdownPercentage ( int resourceTypeID, int resourceSubTypeID, int baseID ): 获取给定资源细分对应的百分比。
int aiGetResourceBreakdownPlanPriority ( int resourceTypeID, int resourceSubTypeID, int baseID ) : Gets the priority of the plans for the given breakdown.
int aiGetResourceBreakdownPlanPriority ( int resourceTypeID, int resourceSubTypeID, int baseID ): 获取给定资源细分对应的计划优先级。
float aiGetResourceGathererPercentage ( int resourceID, int rgpIndex ) : Returns the resource gatherer percentage for the given resource.
float aiGetResourceGathererPercentage ( int resourceID, int rgpIndex ): 返回指定资源的采集者百分比。
float aiGetResourceGathererPercentageWeight( int rgpIndex ) : Returns the RGP weight.
float aiGetResourceGathererPercentageWeight( int rgpIndex ): 返回该采集百分比配置的权重(RGP weight)。
long aiGetScore(int playerID) : returns the score for the given player.
long aiGetScore(int playerID): 返回指定玩家的分数。
bool aiGetWallRadius(int buildingID) : returns the wall radius for the specified building's colony.
bool aiGetWallRadius(int buildingID): 返回指定建筑殖民地的城墙半径。
bool aiGetWaterMap() : Tells us if the AI thinks this is a water map or not.
bool aiGetWaterMap(): 判断 AI 是否认为这是一个水域地图。
int aiGetWorldDifficulty( void ) : Returns the world difficulty level.
int aiGetWorldDifficulty( void ): 返回世界难度等级。
string aiGetWorldDifficultyName( int level ) : Returns the name of the level.
string aiGetWorldDifficultyName( int level ): 返回指定难度等级对应的名称。
int aiGoalGetIDByIndex( int goalType, int goalState, bool active, int index ) : Returns the ID of matching goal.
int aiGoalGetIDByIndex( int goalType, int goalState, bool active, int index ): 返回与条件匹配的目标(goal)ID。
int aiGoalGetNumber( int goalType, int goalState, bool active ) : Returns the number of matching goals.
int aiGoalGetNumber( int goalType, int goalState, bool active ): 返回符合条件的目标(goal)数量。
bool aiHCCardsBuyCard(int cardIndex) : Buy this card now
bool aiHCCardsBuyCard(int cardIndex): 立即购买此卡片。
bool aiHCCardsCanIBuyThisCard(int deckIndex, int cardIndex) : Can I buy this card now?
bool aiHCCardsCanIBuyThisCard(int deckIndex, int cardIndex): 当前是否可以购买这张卡片?
long aiHCCardsFindBestCard(int cardType, int levelPref, int resourcePref) : Get the best card using the optional cardtype and optional resourcePreference
long aiHCCardsFindBestCard(int cardType, int levelPref, int resourcePref): 根据可选卡类型和资源偏好选出最佳卡片。
long aiHCCardsGetCardAgePrereq(int cardIndex) : For this cardIndex, get the age prereq.
long aiHCCardsGetCardAgePrereq(int cardIndex): 获取此卡片所需的时代前提。
long aiHCCardsGetCardCount() : For this cardIndex, get the CardCount, -1 is Infinite.
long aiHCCardsGetCardCount(): 获取该卡片的可用数量,-1 表示无限。
long aiHCCardsGetCardLevel(int cardIndex) : For this cardIndex, get the age prereq.
long aiHCCardsGetCardLevel(int cardIndex): 获取该卡片所需的时代等级。
long aiHCCardsGetCardTechID() : For this cardIndex, get the TechID.
long aiHCCardsGetCardTechID(): 获取该卡片对应的科技 ID。
long aiHCCardsGetCardUnitCount() : For this cardIndex, get the UnitCount.
long aiHCCardsGetCardUnitCount(): 获取该卡片对应的单位数量。
long aiHCCardsGetCardUnitType() : For this cardIndex, get the UnitType.
long aiHCCardsGetCardUnitType(): 获取该卡片对应的单位类型。
long aiHCCardsGetTotal() : Returns the number of cards in the Current HC.
long aiHCCardsGetTotal(): 返回当前主城(HC)中卡片的总数。
bool aiHCCardsIsCardBought(int cardIndex) : Has the cardindex been bought yet?
bool aiHCCardsIsCardBought(int cardIndex): 该卡片是否已经购买?
bool aiHCDeckActivate( long deckIndex ) : Makes the deckIndex the current active HC deck.
bool aiHCDeckActivate( long deckIndex ): 将 deckIndex 对应的套牌设为当前激活的主城套牌。
long aiHCDeckAddCardToDeck( long deckIndex, long cardIndex ) : Adds the card given to the givenHC Deck.
long aiHCDeckAddCardToDeck( long deckIndex, long cardIndex ): 将指定卡片添加到指定 HC 套牌中。
bool aiHCDeckCanPlayCard( long cardIndex ) : Can we play this card from the given deck?
bool aiHCDeckCanPlayCard( long cardIndex ): 是否能从该套牌中使用这张卡片?
bool aiHCDeckCardGetCardCount ( long deskIndex, long cardIndex ) : Gets how many cards of this type we can send. -1 mean infinite.
bool aiHCDeckCardGetCardCount ( long deskIndex, long cardIndex ): 获取此卡在该套牌中可发送的数量,-1 表示无限。
bool aiHCDeckCreate( string ) : Create a new HC Deck with the given name.
bool aiHCDeckCreate( string ): 使用给定名称创建一个新的 HC 套牌。
long aiHCDeckGetCardAgePrereq ( long deckIndex, long cardIndex ) : For this card, get the age prereq
long aiHCDeckGetCardAgePrereq ( long deckIndex, long cardIndex ): 获取该卡片所需的时代前提。
long aiHCDeckGetCardLevel ( long deckIndex, long cardIndex ) : For this card, get the level
long aiHCDeckGetCardLevel ( long deckIndex, long cardIndex ): 获取该卡片需要的等级要求。
long aiHCDeckGetCardTechID ( long deckIndex, long cardIndex ) : For this card, get the techID
long aiHCDeckGetCardTechID ( long deckIndex, long cardIndex ): 获取该卡片对应的科技 ID。
long aiHCDeckGetCardUnitCount ( long deckIndex, long cardIndex ) : For this card, get the unit Count
long aiHCDeckGetCardUnitCount ( long deckIndex, long cardIndex ): 获取该卡片对应的单位数量。
long aiHCDeckGetCardUnitType ( long deckIndex, long cardIndex ) : For this card, get the unitType
long aiHCDeckGetCardUnitType ( long deckIndex, long cardIndex ): 获取该卡片对应的单位类型。
long aiHCDeckGetNumberCards( long deckIndex ) : Returns the number of cards in the Current HC Deck.
long aiHCDeckGetNumberCards( long deckIndex ): 返回当前 HC 套牌中的卡片总数。
bool aiHCDeckPlayCard( long cardIndex ) : play this card.
bool aiHCDeckPlayCard( long cardIndex ): 使用(打出)这张卡片。
long aiHCGetNumberDecks() : Returns the number of decks in the Current HC.
long aiHCGetNumberDecks(): 返回当前 HC 中套牌的数量。
bool aiIsKOTHAllowed() : Returns true if a King of the Hill victory is possible in this game type.
bool aiIsKOTHAllowed(): 如果在当前游戏类型下能够进行“王者山丘”胜利,则返回 true。
bool aiIsMapType(string -see 3 constants at right-) : Is this a certain maptype or not. (AIFishingUseful, AITransportRequired, AITransportUseful)
bool aiIsMapType(string): 判断地图类型是否符合某种特征(如 AIFishingUseful、AITransportRequired 等)。
bool aiIsMonopolyAllowed() : Returns true if a trade monopoly is possible in this game type.
bool aiIsMonopolyAllowed(): 若在此游戏类型下可进行交易垄断,则返回 true。
bool aiIsMultiplayer() : returns true, if this is a multiplayer game.
bool aiIsMultiplayer(): 判断当前是否为多人游戏模式(true 表示是)。
bool aiIsRelicCaptureAllowed() : Returns true if a relic capture victory is possible in this game type.
bool aiIsRelicCaptureAllowed(): 在此游戏类型下是否可以通过占领遗物获得胜利。
int aiIsTeamKOTH(int teamID) : Returns true if this team is king of the hill.
int aiIsTeamKOTH(int teamID): 若该队伍是“王者山丘”掌控队则返回 true。
void aiNormalizeResourceGathererPercentages( int rgpIndex ) : Normalizes all of the resource gatherer percentages to 1.0.
void aiNormalizeResourceGathererPercentages( int rgpIndex ): 将所有资源采集者的百分比归一化到 1.0。
void aiNormalizeResourceGathererPercentageWeights( void ) : Normalizes all of the resource gatherer percentages weights to 1.0.
void aiNormalizeResourceGathererPercentageWeights( void ): 将资源采集者百分比权重归一化到 1.0。
int aiNumberUnassignedUnits( int typeID ) : Returns the number of unassigned units of the given type.
int aiNumberUnassignedUnits( int typeID ): 返回指定类型尚未分配的单位数量。
int aiNumberUnassignedUnitsByGoal( int goalID ) : Returns the number of unassigned units based on the goal's unit type(s).
int aiNumberUnassignedUnitsByGoal( int goalID ): 根据给定目标(goal)的单位类型,返回尚未分配的单位数量。
int aiPersonalityCreatePlayerHistory( void ) : Creates are player history for the given playername.
int aiPersonalityCreatePlayerHistory( void ): 为给定玩家创建玩家历史记录。
bool aiPersonalityGetDidIWinLastGameVS(int playerHistoryIndex)
bool aiPersonalityGetDidIWinLastGameVS(int playerHistoryIndex): 判断在上一次对战中 AI 是否战胜了 playerHistoryIndex 对象。
int aiPersonalityGetGameFirstAttackTime(int playerHistoryIndex, int gameIndex) : Returns the 1st attacktime from the gameIndex game.
int aiPersonalityGetGameFirstAttackTime(int playerHistoryIndex, int gameIndex): 返回在索引为 gameIndex 的游戏中,AI 发动首次攻击的时间。
float aiPersonalityGetGameResource (int playerHistoryIndex, int gameIndex, int resourceID) : Returns the given resource from the gameIndex game. If gameIndex is -1, this will return the avg of all games played.
float aiPersonalityGetGameResource (int playerHistoryIndex, int gameIndex, int resourceID): 从 gameIndex 对应的游戏中获取指定资源;若 gameIndex = -1,则返回所有已玩游戏的资源平均值。
int aiPersonalityGetGameUnitCount (int playerHistoryIndex, int gameIndex, int unitType) : Returns the unit count from the gameIndex game. If gameIndex is -1, this will return the avg of all games played.
int aiPersonalityGetGameUnitCount (int playerHistoryIndex, int gameIndex, int unitType): 从 gameIndex 对应的游戏中获取某单位类型的数量;若 gameIndex = -1,则返回所有已玩游戏的平均数量。
int aiPersonalityGetNumberPlayerHistories( void ) : Returns the number of player's in the Personality's history.
int aiPersonalityGetNumberPlayerHistories( void ): 返回此 AI 个性信息中所记录的玩家历史数量。
int aiPersonalityGetPlayerGamesPlayed (int playerHistoryIndex, int playerRelation) : Returns the number of games played against/with the given the playerHistoryIndex.
int aiPersonalityGetPlayerGamesPlayed (int playerHistoryIndex, int playerRelation): 返回与 playerHistoryIndex 对应的玩家对战或同队的游戏次数。
int aiPersonalityGetPlayerHistoryIndex( string searchPlayerName ) : Returns a playerHistoryIndex if this personality has played searchPlayerName before.
int aiPersonalityGetPlayerHistoryIndex( string searchPlayerName ): 若 AI 个性记录里曾与名为 searchPlayerName 的玩家对局过,则返回其 playerHistoryIndex。
string aiPersonalityGetPlayerHistoryName( int index ) : Returns the name of the index'th player in the Personality's history.
string aiPersonalityGetPlayerHistoryName( int index ): 返回个性记录(personality)里第 index 个玩家的名称。
float aiPersonalityGetPlayerUserVar ( int playerHistoryIndex, string userVarName ) : Returns the user value, given the playerHistoryIndex and the userVarName.
float aiPersonalityGetPlayerUserVar ( int playerHistoryIndex, string userVarName ): 根据 playerHistoryIndex 和 userVarName,返回该玩家的用户变量值。
float aiPersonalityGetRushBoom( void ) : Returns the rush boom scale for this ai.
float aiPersonalityGetRushBoom( void ): 返回该 AI 的快攻与爆经济(rush-boom)系数。
int aiPersonalityGetTotalGameWins (int playerHistoryIndex, int playerRelation) : Returns the total games the given player has won against this AI
int aiPersonalityGetTotalGameWins (int playerHistoryIndex, int playerRelation): 返回此玩家在与该 AI 的对局中总共获得的胜场数。
bool aiPersonalityResetPlayerHistory( int playerHistoryIndex ) : Resets the given player history.
bool aiPersonalityResetPlayerHistory( int playerHistoryIndex ): 重置指定 playerHistoryIndex 对应的玩家历史数据。
bool aiPersonalitySetPlayerUserVar ( int playerHistoryIndex, string userVarName, float val ) : sets the value, given the playerHistoryIndex, userVarName (max 255 chars), and value.
bool aiPersonalitySetPlayerUserVar ( int playerHistoryIndex, string userVarName, float val ): 为指定玩家历史(playerHistoryIndex)设置名为 userVarName(最多 255 字符)且值为 val 的用户变量。
bool aiPlanAddUnit( int planID, int unitID ) : Adds a unit to the plan.
bool aiPlanAddUnit( int planID, int unitID ): 向指定计划中添加一个单位。
bool aiPlanAddUnitType ( int planID, int unitTypeID, int numberNeed, int numberWant, int numberMax ) : Adds a unit type to the plan.
bool aiPlanAddUnitType ( int planID, int unitTypeID, int numberNeed, int numberWant, int numberMax ): 为指定计划添加某单位类型的信息,包括需求(Need)、期望(Want)及最大值(Max)。
bool aiPlanAddUserVariableBool ( int planID, int planVariableIndex, string name, int numberValues ) : Adds the variable to the given plan.
bool aiPlanAddUserVariableBool ( int planID, int planVariableIndex, string name, int numberValues ): 向指定计划添加一个布尔类型的自定义变量。
bool aiPlanAddUserVariableFloat ( int planID, int planVariableIndex, string name, int numberValues ) : Adds the variable to the given plan.
bool aiPlanAddUserVariableFloat ( int planID, int planVariableIndex, string name, int numberValues ): 向指定计划添加一个浮点类型的自定义变量。
bool aiPlanAddUserVariableInt ( int planID, int planVariableIndex, string name, int numberValues ) : Adds the variable to the given plan.
bool aiPlanAddUserVariableInt ( int planID, int planVariableIndex, string name, int numberValues ): 向指定计划添加一个整数类型的自定义变量。
bool aiPlanAddUserVariableString ( int planID, int planVariableIndex, string name, int numberValues ) : Adds the variable to the given plan.
bool aiPlanAddUserVariableString ( int planID, int planVariableIndex, string name, int numberValues ): 向指定计划添加一个字符串类型的自定义变量。
bool aiPlanAddUserVariableVector ( int planID, int planVariableIndex, string name, int numberValues ) : Adds the variable to the given plan.
bool aiPlanAddUserVariableVector ( int planID, int planVariableIndex, string name, int numberValues ): 向指定计划添加一个向量(vector)类型的自定义变量。
bool aiPlanAddWaypoint( int planID, vector waypoint ) : Adds the waypoint to the given plan.
bool aiPlanAddWaypoint( int planID, vector waypoint ): 向指定计划添加一个航点(waypoint)。
int aiPlanCreate( string planName, int typeName ) : Creates a plan of the given name and type.
int aiPlanCreate( string planName, int typeName ): 创建一个名称为 planName、类型为 typeName 的计划并返回其 ID。
bool aiPlanDestroy( int planID ) : Destroys the given plan.
bool aiPlanDestroy( int planID ): 销毁指定 ID 的计划。
bool aiPlanDestroyByName( string name ) : Destroys the plan of the given name.
bool aiPlanDestroyByName( string name ): 根据名称销毁相应计划。
bool aiPlanGetActive( int planID ) : Gets the active-ness of the given plan.
bool aiPlanGetActive( int planID ): 获取指定计划是否处于激活状态。
int aiPlanGetActualPriority( int planID ) : Returns the priority of the given plan.
int aiPlanGetActualPriority( int planID ): 返回该计划的优先级数值。
bool aiPlanGetAllowUnderAttackResponse( int planID ) : Gets the UA response-ness of the given plan.
bool aiPlanGetAllowUnderAttackResponse( int planID ): 查询指定计划是否允许遭受攻击时进行响应。
bool aiPlanGetAttack( int planID ) : Gets the attack flag of the given plan.
bool aiPlanGetAttack( int planID ): 返回该计划的“进攻”标志是否开启。
int aiPlanGetBaseID( int planID ) : gets the plan's base id.
int aiPlanGetBaseID( int planID ): 获取指定计划关联的基地(base)ID。
int aiPlanGetDesiredPriority( int planID ) : Returns the priority of the given plan.
int aiPlanGetDesiredPriority( int planID ): 返回该计划的期望优先级。
bool aiPlanGetEconomy( int planID ) : Gets the economy flag of the given plan.
bool aiPlanGetEconomy( int planID ): 返回该计划是否为“经济”计划标志。
int aiPlanGetEscrowID( int planID ) : Gets the escrow for the plan.
int aiPlanGetEscrowID( int planID ): 获取该计划使用的托管资金(escrow)ID。
int aiPlanGetID( string name ) : Returns the ID of the plan with the given name.
int aiPlanGetID( string name ): 根据名称获取计划的 ID。
int aiPlanGetIDByActiveIndex( int activeIndex ) : Returns the ID of the plan with the given active index.
int aiPlanGetIDByActiveIndex( int activeIndex ): 根据活跃索引获取对应计划的 ID。
int aiPlanGetIDByIndex ( int planType, int planState, bool active, int index ) : Returns the ID of matching plan.
int aiPlanGetIDByIndex ( int planType, int planState, bool active, int index ): 根据类型、状态、活跃标志及索引,获取匹配计划的 ID。
int aiPlanGetIDByTypeAndVariableType ( int planType, int varType, int varID, bool active ) : Returns the ID of the plan with the given parms.
int aiPlanGetIDByTypeAndVariableType ( int planType, int varType, int varID, bool active ): 根据给定的类型、变量类型、变量 ID 及活跃标志,获取相应计划的 ID。
int aiPlanGetIDSubStr( string searchStr ) : Returns the ID of the first plan containing the given string in its name.
int aiPlanGetIDSubStr( string searchStr ): 返回名称中含有 searchStr 的第一个计划的 ID。
vector aiPlanGetInitialPosition( int planID ) : Returns the initial positon that was set for this plan.
vector aiPlanGetInitialPosition( int planID ): 返回该计划最初设置的位置(坐标)。
vector aiPlanGetLocation( int planID ) : Returns the location for this plan.
vector aiPlanGetLocation( int planID ): 获取该计划的当前坐标位置。
bool aiPlanGetMilitary( int planID ) : Gets the military flag of the given plan.
bool aiPlanGetMilitary( int planID ): 返回该计划是否为“军事”计划标志。
string aiPlanGetName( int planID ) : Returns the name of the given plan.
string aiPlanGetName( int planID ): 返回该计划的名称。
bool aiPlanGetNoMoreUnits( int planID ) : Gets the noMoreUnits-ness of the given plan.
bool aiPlanGetNoMoreUnits( int planID ): 查询此计划是否已不再需要新单位(noMoreUnits)。
int aiPlanGetNumber( int planType, int planState, bool active ) : Returns the number of matching plans.
int aiPlanGetNumber( int planType, int planState, bool active ): 返回符合指定类型、状态及活跃标志的计划数量。
int aiPlanGetNumberUnits( int planID, int unitTypeID ) : Returns the number of units currently assigned in the given plan.
int aiPlanGetNumberUnits( int planID, int unitTypeID ): 返回此计划中指定单位类型目前的分配数量。
int aiPlanGetNumberUserVariableValues ( int planID, int planVariableIndex ) : Returns the number of values for this variable index.
int aiPlanGetNumberUserVariableValues ( int planID, int planVariableIndex ): 返回此计划自定义变量索引对应的值数量。
int aiPlanGetNumberVariableValues ( int planID, int planVariableIndex ) : Returns the number of values for this variable index.
int aiPlanGetNumberVariableValues ( int planID, int planVariableIndex ): 返回此计划变量索引对应的值数量。
bool aiPlanGetOrphan( int planID ) : Gets the orphan-ness of the given plan.
bool aiPlanGetOrphan( int planID ): 返回此计划是否为“孤儿”计划(无上级关联)。
int aiPlanGetState( int planID ) : Returns the state of the given plan.
int aiPlanGetState( int planID ): 返回此计划当前所处的状态。
int aiPlanGetType( int planID ) : Returns the type of the given plan.
int aiPlanGetType( int planID ): 获取此计划的类型。
float aiPlanGetUnitCost(int planID, bool considerHitPoints) : gets total aiCost of plan's units, weighted for HP if requested.
float aiPlanGetUnitCost(int planID, bool considerHitPoints): 获取该计划中所有单位的总成本(若 considerHitPoints=true,则按生命值加权)。
int aiPlanGetUnitStance( int planID ) : Gets the unit stance of the given plan.
int aiPlanGetUnitStance( int planID ): 返回此计划的单位战斗姿态(stance)。
bool aiPlanGetUserVariableBool ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
bool aiPlanGetUserVariableBool ( int planID, int planVariableIndex, int valueIndex ): 获取此计划布尔类型的自定义变量。
float aiPlanGetUserVariableFloat ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
float aiPlanGetUserVariableFloat ( int planID, int planVariableIndex, int valueIndex ): 获取此计划浮点类型的自定义变量。
int aiPlanGetUserVariableInt ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
int aiPlanGetUserVariableInt ( int planID, int planVariableIndex, int valueIndex ): 获取此计划整数类型的自定义变量。
string aiPlanGetUserVariableString ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
string aiPlanGetUserVariableString ( int planID, int planVariableIndex, int valueIndex ): 获取此计划字符串类型的自定义变量。
vector aiPlanGetUserVariableVector ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
vector aiPlanGetUserVariableVector ( int planID, int planVariableIndex, int valueIndex ): 获取此计划向量类型的自定义变量。
bool aiPlanGetVariableBool ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
bool aiPlanGetVariableBool ( int planID, int planVariableIndex, int valueIndex ): 获取此计划布尔类型的内置变量。
float aiPlanGetVariableFloat ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
float aiPlanGetVariableFloat ( int planID, int planVariableIndex, int valueIndex ): 获取此计划浮点类型的内置变量。
int aiPlanGetVariableInt ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
int aiPlanGetVariableInt ( int planID, int planVariableIndex, int valueIndex ): 获取此计划整数类型的内置变量。
string aiPlanGetVariableString ( int planID, int planVariableIndex ) : Gets the given variable of the given plan.
string aiPlanGetVariableString ( int planID, int planVariableIndex ): 获取此计划字符串类型的内置变量。
vector aiPlanGetVariableVector ( int planID, int planVariableIndex, int valueIndex ) : Gets the given variable of the given plan.
vector aiPlanGetVariableVector ( int planID, int planVariableIndex, int valueIndex ): 获取此计划向量类型的内置变量。
bool aiPlanRemoveUserVariable ( int planID, int planVariableIndex ) : Removes the user variable.
bool aiPlanRemoveUserVariable ( int planID, int planVariableIndex ): 删除此计划自定义变量索引对应的变量。
bool aiPlanRemoveUserVariables( int planID ) : Removes all of the user variables from the given plan.
bool aiPlanRemoveUserVariables( int planID ): 删除此计划中的所有自定义变量。
bool aiPlanRemoveUserVariableValue ( int planID, int planVariableIndex, int variableIndex ) : Removes the index-th value of the user variable.
bool aiPlanRemoveUserVariableValue ( int planID, int planVariableIndex, int variableIndex ): 删除此计划自定义变量在 variableIndex 位置的值。
bool aiPlanRemoveVariableValue ( int planID, int planVariableIndex, int variableIndex ) : Removes the index-th value of the variable.
bool aiPlanRemoveVariableValue ( int planID, int planVariableIndex, int variableIndex ): 删除此计划内置变量在 variableIndex 位置的值。
bool aiPlanSetActive( int planID, bool active ) : Sets active on/off for the given plan.
bool aiPlanSetActive( int planID, bool active ): 启用或禁用指定计划。
bool aiPlanSetAllowUnderAttackResponse ( int planID, bool uAR ) : Sets under attack response on/off for the given plan.
bool aiPlanSetAllowUnderAttackResponse ( int planID, bool uAR ): 设置此计划在遭到攻击时是否允许自动响应。
bool aiPlanSetAttack( int planID, bool v ) : Sets attack flag on/off for the given plan.
bool aiPlanSetAttack( int planID, bool v ): 打开或关闭该计划的进攻标志。
bool aiPlanSetBaseID( int planID, int baseID ) : sets the plan's base id.
bool aiPlanSetBaseID( int planID, int baseID ): 设置该计划的基地 ID。
bool aiPlanSetDesiredPriority( int planID, int priority ) : Sets the priority of the given plan.
bool aiPlanSetDesiredPriority( int planID, int priority ): 设置此计划的优先级。
bool aiPlanSetEconomy( int planID, bool v ) : Sets economy on/off for the given plan.
bool aiPlanSetEconomy( int planID, bool v ): 启用或禁用该计划的经济标志。
bool aiPlanSetEscrowID( int planID, int escrowID ) : Sets the escrow for the plan.
bool aiPlanSetEscrowID( int planID, int escrowID ): 为该计划设置托管资金 ID。
bool aiPlanSetEventHandler ( int planID, int eventType, string handlerName ) : Sets event handler function for the given plan and event.
bool aiPlanSetEventHandler ( int planID, int eventType, string handlerName ): 为该计划在特定事件类型下设置处理函数。
void aiPlanSetInitialPosition ( int planID, vector initialPosition ) : Sets the initial positon for this plan.
void aiPlanSetInitialPosition ( int planID, vector initialPosition ): 设置该计划的初始位置。
bool aiPlanSetMilitary( int planID, bool v ) : Sets military on/off for the given plan.
bool aiPlanSetMilitary( int planID, bool v ): 打开或关闭该计划的“军事”标志。
bool aiPlanSetNoMoreUnits( int planID, bool v ) : Sets noMoreUnits on/off for the given plan.
bool aiPlanSetNoMoreUnits( int planID, bool v ): 设置该计划是否不再需要新单位。
bool aiPlanSetNumberUserVariableValues ( int planID, int planVariableIndex, int numberValues, bool clearCurrentValues ) : Sets the number of values for this variable.
bool aiPlanSetNumberUserVariableValues ( int planID, int planVariableIndex, int numberValues, bool clearCurrentValues ): 为该计划的某自定义变量设置值数量,并可选择是否清空当前值。
bool aiPlanSetNumberVariableValues ( int planID, int planVariableIndex, int numberValues, bool clearCurrentValues ) : Sets the number of values for this variable.
bool aiPlanSetNumberVariableValues ( int planID, int planVariableIndex, int numberValues, bool clearCurrentValues ): 为该计划内置变量设置值数量,并可选择是否清空当前值。
bool aiPlanSetOrphan( int planID, bool orphan ) : Sets orphan on/off for the given plan.
bool aiPlanSetOrphan( int planID, bool orphan ): 设置此计划是否为“孤儿”状态。
bool aiPlanSetRequiresAllNeedUnits( int planID, bool rANU ) : Sets 'requiresAllNeedUnits' on/off for the given plan.
bool aiPlanSetRequiresAllNeedUnits( int planID, bool rANU ): 打开或关闭此计划对所有需求单位的要求(requiresAllNeedUnits)。
bool aiPlanSetUnitStance( int planID, int stance ) : Sets unit stance for the given plan.
bool aiPlanSetUnitStance( int planID, int stance ): 为指定计划设置单位的战斗姿态(stance)。
bool aiPlanSetUserVariableBool ( int planID, int planVariableIndex, int valueIndex, bool value ) : Sets the given variable of the given plan.
bool aiPlanSetUserVariableBool ( int planID, int planVariableIndex, int valueIndex, bool value ): 设置此计划布尔类型的自定义变量值。
bool aiPlanSetUserVariableFloat ( int planID, int planVariableIndex, int valueIndex, float value ) : Sets the given variable of the given plan.
bool aiPlanSetUserVariableFloat ( int planID, int planVariableIndex, int valueIndex, float value ): 设置此计划浮点类型的自定义变量值。
bool aiPlanSetUserVariableInt ( int planID, int planVariableIndex, int valueIndex, int value ) : Sets the given variable of the given plan.
bool aiPlanSetUserVariableInt ( int planID, int planVariableIndex, int valueIndex, int value ): 设置此计划整数类型的自定义变量值。
bool aiPlanSetUserVariableString ( int planID, int planVariableIndex, int valueIndex, string value ) : Sets the given variable of the given plan.
bool aiPlanSetUserVariableString ( int planID, int planVariableIndex, int valueIndex, string value ): 设置此计划字符串类型的自定义变量值。
bool aiPlanSetUserVariableVector ( int planID, int planVariableIndex, int valueIndex, vector value ) : Sets the given variable of the given plan.
bool aiPlanSetUserVariableVector ( int planID, int planVariableIndex, int valueIndex, vector value ): 设置此计划向量类型的自定义变量值。
bool aiPlanSetVariableBool ( int planID, int planVariableIndex, int valueIndex, bool value ) : Sets the given variable of the given plan.
bool aiPlanSetVariableBool ( int planID, int planVariableIndex, int valueIndex, bool value ): 设置此计划布尔类型的内置变量。
bool aiPlanSetVariableFloat ( int planID, int planVariableIndex, int valueIndex, float value ) : Sets the given variable of the given plan.
bool aiPlanSetVariableFloat ( int planID, int planVariableIndex, int valueIndex, float value ): 设置此计划浮点类型的内置变量。
bool aiPlanSetVariableInt ( int planID, int planVariableIndex, int valueIndex, int value ) : Sets the given variable of the given plan.
bool aiPlanSetVariableInt ( int planID, int planVariableIndex, int valueIndex, int value ): 设置此计划整数类型的内置变量。
bool aiPlanSetVariableString ( int planID, int planVariableIndex, int valueIndex, string value ) : Sets the given variable of the given plan.
bool aiPlanSetVariableString ( int planID, int planVariableIndex, int valueIndex, string value ): 设置此计划字符串类型的内置变量。
bool aiPlanSetVariableVector ( int planID, int planVariableIndex, int valueIndex, vector value ) : Sets the given variable of the given plan.
bool aiPlanSetVariableVector ( int planID, int planVariableIndex, int valueIndex, vector value ): 设置此计划向量类型的内置变量。
bool aiPlanSetWaypoints( int planID, int pathID ) : Sets the waypoints of the given plan to the waypoints of the given path.
bool aiPlanSetWaypoints( int planID, int pathID ): 将指定计划的路径点设置为 pathID 对应路径的航点序列。
bool aiPopulatePoliticianList(): Call this to make the AI fill out what Politicians are available.
bool aiPopulatePoliticianList(): 调用此函数让 AI 刷新可用的政治家列表。
void aiQueueAutoSavegame( int saveNumber ) : Queues the auto savegame.
void aiQueueAutoSavegame( int saveNumber ): 将自动存档排队等待保存(队列方式)。
int aiRandInt( int max ) : Returns a random number (mod'ed by max if provided).
int aiRandInt( int max ): 返回随机数(若提供 max,则返回结果取模于 max)。
vector aiRandLocation( void ) : Returns a random location guaranteed to be on the map.
vector aiRandLocation( void ): 返回一个地图上有效的随机坐标位置。
void aiRandSetSeed( int seed ) : Sets the seed of the random number generator.
void aiRandSetSeed( int seed ): 设置随机数生成器的种子。
bool aiRansomExplorer(int explorerID, int escrowID, int sourceBuildingID) : ransoms the specified explorer using funds from the specified escrow account and spawns it from the specified building.
bool aiRansomExplorer(int explorerID, int escrowID, int sourceBuildingID): 使用指定托管资金赎回指定探险家,并从指定建筑处复活该探险家。
bool aiReadyForTradeMonopoly() : Returns true if the monopoly command can be given now. Does not check cost.
bool aiReadyForTradeMonopoly(): 如当前可执行垄断命令,则返回 true(不检查其花费)。
bool aiRemoveResourceBreakdown ( int resourceTypeID, int resourceSubTypeID, int baseID ) : Removes the given breakdown.
bool aiRemoveResourceBreakdown ( int resourceTypeID, int resourceSubTypeID, int baseID ): 移除给定资源细分的配置。
void aiResign() : reigns the current player..
void aiResign(): 让当前玩家投降(退出游戏)。
bool aiResourceIsLocked(int resourceID) : Is this Escrow resource locked.
bool aiResourceIsLocked(int resourceID): 判断该托管资源是否处于锁定状态。
void aiResourceLock(int resourceID) : Prevent a resource from being spent by the AI.
void aiResourceLock(int resourceID): 锁定该资源,使 AI 无法使用。
void aiResourceUnlock(int resourceID) : Allow a resource to be spent by the AI.
void aiResourceUnlock(int resourceID): 解锁该资源,使 AI 可再次使用。
bool aiSellResourceOnMarket( int resourceID ) : sells (+100) the given resource.
bool aiSellResourceOnMarket( int resourceID ): 在市场上卖出指定资源(+100 数量)。
void aiSendChatToAllies( string chatString ) : CP AI chat to allies.
void aiSendChatToAllies( string chatString ): 向盟友发送 CP AI 聊天消息。
void aiSendChatToEnemies( string chatString ) : CP AI chat to enemies.
void aiSendChatToEnemies( string chatString ): 向敌人发送 CP AI 聊天消息。
void aiSendChatToEveryone( string chatString ) : CP AI chat to everyone.
void aiSendChatToEveryone( string chatString ): 向所有玩家发送 CP AI 聊天消息。
void aiSet( string filename, int playerID ) : Sets playerID's AI to the given filename.
void aiSet( string filename, int playerID ): 将指定玩家的 AI 脚本设置为给定文件名。
void aiSetAllowBuildings( bool v ) : Sets allow buildings on/off.
void aiSetAllowBuildings( bool v ): 设置是否允许建造建筑。
void aiSetAttackResponseDistance( float v ) : Set the attack response distance.
void aiSetAttackResponseDistance( float v ): 设置 AI 攻击响应的距离阈值。
void aiSetAutoFarmEscrowID( int escrowID ) : Sets the auto Farm escrow ID.
void aiSetAutoFarmEscrowID( int escrowID ): 设置自动农场托管资金的 ID。
void aiSetAutoGatherEscrowID( int escrowID ) : Sets the auto gather escrow ID.
void aiSetAutoGatherEscrowID( int escrowID ): 设置自动采集托管资金的 ID。
bool aiSetAutoGatherMilitaryUnits( bool v ) : Turns auto gathering of military units at bases on/off.
bool aiSetAutoGatherMilitaryUnits( bool v ): 设置是否自动在基地聚集军队。
void aiSetDefaultStance( int defaultStance ) : Sets your default stance for all of your units.
void aiSetDefaultStance( int defaultStance ): 为所有单位设置默认战斗姿态。
void aiSetEconomyPercentage( float v ) : Set the economy priority percentage.
void aiSetEconomyPercentage( float v ): 设置 AI 的经济优先级百分比。
void aiSetEconomyPop( int v ) : Set the script-defined economy pop for this player.
void aiSetEconomyPop( int v ): 设置脚本定义的该玩家经济人口数量。
bool aiSetExploreDangerThreshold( float value ) : sets the ai's Explore Danger Threshold value.
bool aiSetExploreDangerThreshold( float value ): 设置 AI 的探索危险阈值。
void aiSetFarmLimit( int limit ) : Sets the per plan farm build limit.
void aiSetFarmLimit( int limit ): 设置每个计划可建造农场的上限。
bool aiSetHandler( string handlerFunctionName, int type ) : Sets the handler for given type of event.
bool aiSetHandler( string handlerFunctionName, int type ): 为指定事件类型设置处理函数。
bool aiSetHCGatherPoint( vector point ) : Sets the HCGP.
bool aiSetHCGatherPoint( vector point ): 设置主城(HC)的集合点坐标。
void aiSetMaxLOSProtoUnitLimit(int limit) : sets the limit for how many LOS Protounits the AI can build
void aiSetMaxLOSProtoUnitLimit(int limit): 设置 AI 能建造的视野(LOS)类单位数量上限。
void aiSetMilitaryPercentage( float v ) : Set the military priority percentage.
void aiSetMilitaryPercentage( float v ): 设置军事优先级的百分比。
void aiSetMilitaryPop( int v ) : Set the script-defined military pop for this player.
void aiSetMilitaryPop( int v ): 设置脚本定义的玩家军事人口上限。
void aiSetMinArmySize(long v) : sets the min number of units in an attack army.
void aiSetMinArmySize(long v): 设置攻击部队的最少单位数量。
void aiSetMinNumberNeedForGatheringAggressvies(long v) : sets the min number of needed units to gather aggressive animals.
void aiSetMinNumberNeedForGatheringAggressvies(long v): 设置采集具攻击性动物所需的最少单位数量。
void aiSetMinNumberWantForGatheringAggressives(long v) : sets the min number of wanted units to gather aggressive animals.
void aiSetMinNumberWantForGatheringAggressives(long v): 设置采集具攻击性动物所希望的最少单位数量。
void aiSetMostHatedPlayerID( int v ) : Sets the script-defined most hated player ID for this player.
void aiSetMostHatedPlayerID( int v ): 设置此玩家最厌恶的敌对玩家 ID(脚本定义)。
void aiSetOpportunityLocation ( int opportunityID, vector location ) : sets the location for this opp.
void aiSetOpportunityLocation ( int opportunityID, vector location ): 为指定机会(opportunity)设置位置坐标。
void aiSetOpportunityRadius ( int opportunityID, float radius ) : sets the radius for this opp.
void aiSetOpportunityRadius ( int opportunityID, float radius ): 为指定机会设置作用半径。
bool aiSetOpportunityScore ( long oppID, long permission, float affordable, float classscore, float instance, float total ) : sets the score for this opp.
bool aiSetOpportunityScore ( long oppID, long permission, float affordable, float classscore, float instance, float total ): 设置该机会的评分(Score)。
void aiSetOpportunityTargetID ( int opportunityID, int targetType ) : sets the target id for this opp.
void aiSetOpportunityTargetID ( int opportunityID, int targetType ): 为该机会设置目标 ID。
void aiSetOpportunityTargetType ( int opportunityID, int targetType ) : sets the target type for this opp.
void aiSetOpportunityTargetType ( int opportunityID, int targetType ): 为该机会设置目标类型。
void aiSetPauseAllAgeUpgrades(bool v) : sets the pause all age upgrades flag in the AI.
void aiSetPauseAllAgeUpgrades(bool v): 设置 AI 是否暂停所有时代升级。
void aiSetPoliticianChoice(int age, int puid) : Sets the scripts choice for the AgeX Politician.
void aiSetPoliticianChoice(int age, int puid): 为 AgeX 设置指定政治家(puid)的脚本选择。
void aiSetRandomMap(bool v) : Sets the RM bool in the AI.
void aiSetRandomMap(bool v): 设置 AI 是否启用随机地图(RM)。
bool aiSetResourceBreakdown ( int resourceTypeID, int resourceSubTypeID, int numberPlans, int planPriority, float percentage, int baseID ) : Sets a subtype breakdown for a resource.
bool aiSetResourceBreakdown ( int resourceTypeID, int resourceSubTypeID, int numberPlans, int planPriority, float percentage, int baseID ): 为指定资源设置子类型细分配置(如数量、优先级、比例等)。
void aiSetResourceGathererPercentage ( int resourceID, float value, bool normalize, int rgpIndex ) : Sets the resource gatherer percentage for the given resource (if normalized is true, the percentages will be normalized to 1.0).
void aiSetResourceGathererPercentage ( int resourceID, float value, bool normalize, int rgpIndex ): 设置指定资源的采集百分比;若 normalize 为 true,则会归一化到 1.0。
void aiSetResourceGathererPercentageWeight ( int rgpIndex, float weight ) : Sets the RGP weight.
void aiSetResourceGathererPercentageWeight ( int rgpIndex, float weight ): 设置采集百分比的权重值(RGP weight)。
void aiSetWaterMap( bool v ) : Tells the AI if this is a water map or not.
void aiSetWaterMap( bool v ): 告知 AI 当前地图是否为水域地图。
void aiSetWorldDifficulty( int v ) : Sets the world difficulty level.
void aiSetWorldDifficulty( int v ): 设置世界难度级别。
void aiSwitchMainBase(int newBaseID, bool force) : switch the newBaseID to be the main base.
void aiSwitchMainBase(int newBaseID, bool force): 切换主基地为 newBaseID,force 指定是否强制切换。
bool aiTaskUnitBuild( int unitID, int buildingTypeID, vector position ) : Does a lightweight (no plan) build tasking of the given unit to build the given building.
bool aiTaskUnitBuild( int unitID, int buildingTypeID, vector position ): 用指定单位执行轻量级建造任务(无计划),在给定坐标处建造指定类型的建筑。
bool aiTaskUnitDelete( int unitID ) : Deletes the given unit.
bool aiTaskUnitDelete( int unitID ): 删除指定单位。
bool aiTaskUnitMove( int unitID, vector position ) : Does a lightweight (no plan) move tasking of the given unit to the given location.
bool aiTaskUnitMove( int unitID, vector position ): 让指定单位执行轻量级移动任务(无计划),前往给定位置。
bool aiTaskUnitResearch( int unitID, int techID ) : Does a lightweight (no plan) research tasking of the given unit for the given tech ID.
bool aiTaskUnitResearch( int unitID, int techID ): 让指定单位进行轻量级研究任务(无计划),研究指定科技。
bool aiTaskUnitSpecialPower ( int unitID, int powerID, vector position ) : Does a lightweight (no plan) research tasking of the given unit for the given special power.
bool aiTaskUnitSpecialPower ( int unitID, int powerID, vector position ): 让指定单位执行轻量级特殊能力任务(无计划),在给定位置使用指定能力。
bool aiTaskUnitTrain ( int unitID, int unitTypeID ) : Does a lightweight (no plan) train tasking of the given unit for the given target unit type.
bool aiTaskUnitTrain ( int unitID, int unitTypeID ): 让指定单位进行轻量级的训练任务(无计划),训练特定类型的单位。
bool aiTaskUnitWork( int unitID, int targetUnitID ) : Does a lightweight (no plan) work tasking of the given unit on the given target unit.
bool aiTaskUnitWork( int unitID, int targetUnitID ): 让指定单位对目标单位执行轻量级工作任务(无计划)。
bool aiTreatyActive() : checks whether the given player has a treaty.
bool aiTreatyActive(): 检查当前玩家是否处于某个条约状态。
bool aiTribute( int playerID, int resourceID, float amount ) : Tributes the given player.
bool aiTribute( int playerID, int resourceID, float amount ): 向指定玩家进贡指定资源及数量。
int aiUnitGetTactic(int unitID) : gets the specified unit's current tactic.
int aiUnitGetTactic(int unitID): 获取指定单位当前采用的战术(tactic)。
bool aiUnitSetTactic(int unitID, int tacticID) : sets the specified tactic on the specified unit.
bool aiUnitSetTactic(int unitID, int tacticID): 为指定单位设置指定的战术。