| AI Production Scoring Functions |
| Functions |
| AIProductionScoring_AlliedCombatFitness( PlayerID aiPlayer, Real minFitness, Real maxFitness, Integer aiArmyType, Boolean highFitnessIsGood ) | |
|
Create a AlliedCombatFitness scoring function. Returns 1.0 to 0.0, based on how the allied combat fitness is. 1.0 if the allied fitness is at or below minFitness, 0.0 if fitness is above the maxFitness, smooth transition in between. If highFitnessIsGood, returns 0.0 to 1.0 instead. 0.0 if at or below minFitness and 1.0 if at or above maxFitness. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (666) | |
| AIProductionScoring_AlliedCombatFitnessVsStrongestEnemy( PlayerID aiPlayer, Real minFitness, Real maxFitness, Integer aiArmyType, Boolean highFitnessIsGood ) | |
|
Create a AlliedCombatFitness scoring function (versus strongest enemy). Returns 1.0 to 0.0, based on how the allied combat fitness is. 1.0 if the fitness is at or below minFitness, 0.0 if fitness is above the maxFitness, smooth transition in between. If highFitnessIsGood, returns 0.0 to 1.0 instead. 0.0 if at or below minFitness and 1.0 if at or above maxFitness. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (697) | |
| AIProductionScoring_AlliedCombatFitnessVsWeakestEnemy( PlayerID aiPlayer, Real minFitness, Real maxFitness, Integer aiArmyType, Boolean highFitnessIsGood ) | |
|
创建盟军战斗力评分函数(对抗最弱敌人)。【功能:评估盟军对抗最弱敌人时的战斗能力】 Returns 1.0 to 0.0, based on how the allied combat fitness is. 1.0 if the fitness is at or below minFitness, 0.0 if fitness is above the maxFitness, smooth transition in between. If highFitnessIsGood, returns 0.0 to 1.0 instead. 0.0 if at or below minFitness and 1.0 if at or above maxFitness. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (728) | |
| AIProductionScoring_AmountOfResourceNeeded( PlayerID aiPlayer, Real maxResources ) | |
|
Create an AmountOfResourceNeeded scoring function. If this building is a dropoff, this returns a value between 0 and 1 indicating how much of that resources is needed. Any amount >= maxResources will result in a value of 1. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (932) | |
| AIProductionScoring_CanPushProductionScoringFunction( PlayerID aiPlayer ) | |
|
检查当前是否是创建评分函数的适当时机。【功能:判断是否可以推送生产评分函数】 Score functions should only be made within functions referenced by ProductionGroups |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (61) | |
| AIProductionScoring_ClampedScoringFunction( PlayerID aiPlayer, Real min, Real max, ScoringFunction* innerScoringFunction ) | |
|
Create a ClampedScoringFunction scoring function. Clamps the returned value of the inner scoring function |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (755) | |
| AIProductionScoring_CounterScore( PlayerID aiPlayer, Real baseScoreContributuion ) | |
|
Create a CounterScore scoring function If a item is a chosen counter it will get the score = (baseScoreContributuion + (1 - baseScoreContributuion) * counter score) |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (134) | |
| AIProductionScoring_DeficiencyScore( PlayerID aiPlayer, Real weight ) | |
|
创建资源匮乏评分函数。【功能:评估资源短缺程度】 Returns positive score if drop off is required to either serve gathering of a resource or improve existing gathering |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (532) | |
| AIProductionScoring_EntityCombatUpgrade( PlayerID aiPlayer ) | |
|
创建实体战斗升级评分函数。【功能:评估单位战斗升级的价值】 Returns positive score if entity's combat fitness is improved. The aforementioned entity is the entity that the upgrade is being produce on. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (571) | |
| AIProductionScoring_GroupNotProducedRecently( PlayerID aiPlayer, Real timePeriodSeconds ) | |
|
Create an GroupNotProducedRecently scoring function. Returns 1.0f if any item in group was not produced within the time period supplied, 0.0f otherwise |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (861) | |
| AIProductionScoring_HasProductionQueue( PlayerID aiPlayer ) | |
|
创建拥有生产队列评分函数。【功能:检查是否存在生产队列】 HasProductionQueue returns 0 or 1 if the production queue for the item is found. Useful to ensure this items score isnt propagated to its requirements |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (274) | |
| AIProductionScoring_IncreaseOverTime( PlayerID aiPlayer, Real minGameTime, Real increasePerSecond ) | |
|
Create a MinimumGameTime scoring function. minGameTime is time from start in seconds. Returns 0.0 until minGameTime has passed, 1.0f after. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (387) | |
| AIProductionScoring_InversePercentOfResourcesOwned( PlayerID aiPlayer ) | |
|
创建资源拥有比例反向评分函数。【功能:反向评估玩家拥有的资源百分比】 InversedPercentOfResourcesOwned returns 1 - the value from PercentOfResourcesOwned |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (262) | |
| AIProductionScoring_InverseRandomIntScore( PlayerID aiPlayer ) | |
|
创建反向随机整数评分函数。【功能:生成反向随机整数值用于评分】 Returns either 0.0f or 1.0f (inverse of RandomIntScore) based on a random number picked at the start of the game |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (910) | |
| AIProductionScoring_IslandNeedingExpansionBase( PlayerID aiPlayer ) | |
|
Create an IslandNeedingExpansionBase scoring function. Returns 1.0f if there is an island requiring an expansion base |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (834) | |
| AIProductionScoring_LackOfSecuredResourceDeposits( PlayerID aiPlayer, ResourceType resourceType, Real scarceAmount, Real wellOffAmount ) | |
|
创建缺乏安全资源点评分函数。【功能:评估安全资源点的匮乏程度】 Returns between 0 and 1, 1 if the total sum of secured resource deposits is less or equal to scarce amount, 0 if the amount is equal to or greater than well off amount, lerps in between |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (808) | |
| AIProductionScoring_LowResourceIncome( PlayerID aiPlayer, Real resourceIncomePerSecond ) | |
|
创建低资源收入评分函数。【功能:评估资源收入是否过低】 Returns 1 when income per second is lower than amount, otherwise returns 0. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (942) | |
| AIProductionScoring_LuaScoringFunction( PlayerID aiPlayer, LuaFunction scoringFunction ) | |
|
创建Lua评分函数。【功能:使用Lua脚本自定义评分逻辑】 Takes a reference to a lua function. Lua function will be called and passed AIPlayer and Pbg. Lua function is expected to return a value >= 0.0 DO NOT call any methods that do stuff to the AIPlayer in your referenced lua function. The referenced lua function must exist within the player's lua context |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (608) | |
| AIProductionScoring_MaximumGameTime( PlayerID aiPlayer, Real maxGameTime ) | |
|
创建最大游戏时间评分函数。【功能:评估游戏时间是否超过最大值】 minGameTime is time from start in seconds. Returns 1.0 until maxGameTime has passed, 0.0f after. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (373) | |
| AIProductionScoring_MaxPopCapPercentage( PlayerID aiPlayer, Real targetPopulationPercentageAlive, Boolean groupPopulation ) | |
|
Create a MaxPopCapPercentage scoring function targetPopulationPercentageAlive should be in range 0.0 -> 1.0. Return 1.0f as long as the combined population of the production item /group does not exceed a percentage of the player's max pop cap. If groupPopulation == true then all members of the item's Production Group are counted towards the current population to be compared against the target population. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (785) | |
| AIProductionScoring_MaxScoringFunction( PlayerID aiPlayer, vector< ScoringFunction*> innerScoringFunction ) | |
|
Create a MaxScoringFunction scoring function. Returns the max value of the inner scoring functions |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (768) | |
| AIProductionScoring_MaxWeaponDamage( PlayerID aiPlayer, Real maxDamage ) | |
|
创建最大武器伤害评分函数。【功能:评估单位武器最大伤害】 Units max weapon damage is normalized by max damage. (returns between 0.0 and 1.0) |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (398) | |
| AIProductionScoring_MilitaryPlayerUpgrade( PlayerID aiPlayer, Real upgradeExponent ) | |
|
创建军事玩家升级评分函数。【功能:评估军事升级的价值】 Quantifies how a player upgrade will improve the current army's combat fitness. Result = 1 - (1 - combat_fitness_improvment)^upgradeExponent |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (351) | |
| AIProductionScoring_MinimumGameTime( PlayerID aiPlayer, Real minGameTime ) | |
|
创建最小游戏时间评分函数。【功能:评估游戏时间是否达到最小值】 minGameTime is time from start in seconds. Returns 0.0 until minGameTime has passed, 1.0f after. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (362) | |
| AIProductionScoring_MinimumTeamControlledSacredSites( PlayerID aiPlayer, Integer targetAmount ) | |
|
创建团队控制圣地最小数量评分函数。【功能:评估团队控制的圣地数量是否达到最小值】 Takes an integer as target amount of sacred sites the provided player's team should be controlling and returns 1.0 if the team meets the requirements |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (433) | |
| AIProductionScoring_MultipleProduced( PlayerID aiPlayer, Real additionalFactor ) | |
|
创建多重生产评分函数。【功能:评估多次生产的数量】 Item will get a score of 1 +(additionalFactor * number of additional produced) |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (145) | |
| AIProductionScoring_MultiplyListScoringFunction( PlayerID aiPlayer, vector< ScoringFunction*> innerScoringFunction ) | |
|
创建乘法列表评分函数。【功能:将多个评分函数的结果相乘】 Takes a list of scoring functions and multiplies them together. This scoring function can be paired with MaxScoringFunction to generate OR scoring expressions, such as Max(IslandNeedingExpansionBase, (ProductionQueueContention * TimeToAcquire)) |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (989) | |
| AIProductionScoring_NavalTransportRequired( PlayerID aiPlayer ) | |
|
Create a NavalTransportRequired scoring function. Returns 0.0 -> 1.0, depending on strategic island decisions that would require transport |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (824) | |
| AIProductionScoring_NotProducedEver( PlayerID aiPlayer ) | |
|
Create an NotProducedEver scoring function. Returns 1.0f has never been produced, 0.0f if it has been produced |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (878) | |
| AIProductionScoring_NotProducedRecently( PlayerID aiPlayer, Real timePeriodSeconds ) | |
|
Create an NotProducedRecently scoring function. Returns 1.0f if the item was not produced within the time period supplied, 0.0f otherwise |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (844) | |
| AIProductionScoring_NoUpgradeProductionBlockedByThisProduction( PlayerID aiPlayer, String type ) | |
|
Create a IsUpgradeProductionTypeBlockedByThisProduction scoring function. Returns 1 if AI is not trying to build another upgrade, which is being blocked by the current production type |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (556) | |
| AIProductionScoring_OneStructureFromGroupAtATime( PlayerID aiPlayer ) | |
|
创建一次仅生产组中一个建筑评分函数。【功能:确保同一组建筑一次只生产一个】 Returns 1.0f if this is the first structure planned to be built in the group or if no items in the group are planned. 0.0f otherwise |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (888) | |
| AIProductionScoring_OnlyProduceOneAtATime( PlayerID aiPlayer ) | |
|
创建一次仅生产一个评分函数。【功能:确保一次只生产一个单位】 Returns 0.0 while another item of the same type is being produced |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (508) | |
| AIProductionScoring_PercentOfResourcesOwned( PlayerID aiPlayer ) | |
|
创建资源拥有百分比评分函数。【功能:评估玩家拥有的资源百分比】 PercentOfResourcesOwned returns a value between 0 and 1 representing the amount of the player's relevant resources that would be consumed to produce the build item. Returns 1 if the build item requires more resources than the player has. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (251) | |
| AIProductionScoring_PlannedPlacementScore( PlayerID aiPlayer, Real minPlacementScore ) | |
|
Create a PlannedPlacementScore scoring function. Returns the value of the planned placement, returns 0.0 if no planned placement Will return 0.0 if placement score is below minPlacementScore. Set minPlacementScore < 0.0 to ignore this minimum filtering. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (314) | |
| AIProductionScoring_PlannedPlacementScoreIsMoreThan( PlayerID aiPlayer, Real minPlacementScore ) | |
|
创建计划放置评分大于某值评分函数。【功能:检查计划放置评分是否超过指定值】 Returns 1 if placement score is more than min value, otherwise returns 0.0 Will return 0.0 if placement score is invalid |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (328) | |
| AIProductionScoring_PlannedPlacementScoreValid( PlayerID aiPlayer ) | |
|
创建计划放置评分有效评分函数。【功能:验证计划放置评分是否有效】 |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (339) | |
| AIProductionScoring_PlayerGatheringUpgrade( PlayerID aiPlayer, Real improvementScalingFactor, Real approxDistToDeposit ) | |
|
创建玩家采集升级评分函数。【功能:评估采集升级的价值】 Result is gatheringImprovment * improvementScalingFactor |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (288) | |
| AIProductionScoring_PlayersAndCapturePointsOnDifferentIslands( PlayerID aiPlayer ) | |
|
创建玩家与占领点位于不同岛屿评分函数。【功能:评估玩家与占领点是否位于不同岛屿】 Returns 1.0 if there are capture points separated by water on the map |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (421) | |
| AIProductionScoring_PlayersOnDifferentIslands( PlayerID aiPlayer ) | |
|
创建玩家位于不同岛屿评分函数。【功能:评估玩家是否位于不同岛屿】 Returns 1.0 if any players are on different pathfinding islands, 0 if they are all on the same island |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (410) | |
| AIProductionScoring_PopCapGenerator( PlayerID aiPlayer ) | |
|
创建人口上限生成器评分函数。【功能:评估人口上限生成建筑的价值】 Returns 1.0 score if the item generates required pop cap |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (619) | |
| AIProductionScoring_PopulationPercentage( PlayerID aiPlayer, Real targetPopulationPercentageAlive, Real scoreDropOffFactor, Boolean groupPopulation, Boolean useSquadPopulation ) | |
|
创建人口百分比评分函数。【功能:评估当前人口占总人口的百分比】 targetPopulationPercentageAlive should be in range 0.0 -> 1.0. Score will approach zero as an item's population (as a percentage of the global population) approaches the target, i.e. score = 1.0f - (currentPercentage / target)^dropOffFactor; The global population is number of squads or structures belonging to the player alive. If groupPopulation == true then all members of the item's Production Group are counted towards the current population to be compared against the global population. if useSquadPopulation == true, number of squads will be used in calculation instead of checking if the item pbg corresponds to a squad or building |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (111) | |
| AIProductionScoring_PresenceOfEnemyTypes( PlayerID aiPlayer, Real weights, Boolean squadTypes ) | |
|
创建敌方类型存在评分函数。【功能:评估敌方特定类型单位的存在情况】 Every time a unit type is observed it's weight is added to the return value of this scoring function. if squadTypes == false, then entity types assumed. Max return value is 1.0 |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (479) | |
| AIProductionScoring_PresenceOfMyTypes( PlayerID aiPlayer, Real weights, Boolean squadTypes ) | |
|
Create a PresenceOfMyTypes scoring function Every time a unit type is observed it's weight is added to the return value of this scoring function. if squadTypes == false, then entity types assumed. Max return value is 1.0 |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (490) | |
| AIProductionScoring_PresenceOfUpgradeableSquads( PlayerID aiPlayer, Real weight ) | |
|
创建可升级小队存在评分函数。【功能:评估是否存在可升级的小队】 For each player squad that this upgrade applies to the score is increased by the weight to a max of 1.0. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (497) | |
| AIProductionScoring_ProductionQueueContention( PlayerID aiPlayer, Real contentionThreshold, Real normalFactor ) | |
|
创建生产队列竞争评分函数。【功能:评估生产队列的竞争程度】 Returns a score of productionQueueContention / normalFactor. productionQueueContention is the number of contentions recorded for the associated item (which is a production building), normalFactor is clamped >= 1 |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (634) | |
| AIProductionScoring_RandomChoiceFromRange( PlayerID aiPlayer, Integer iterations, Integer range, Integer choice ) | |
|
创建范围内随机选择评分函数。【功能:从指定范围内随机选择一个值】 Returns either 0.0f or 1.0f based on if the choice from the range is hit game |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (921) | |
| AIProductionScoring_RandomIntScore( PlayerID aiPlayer ) | |
|
创建随机整数评分函数。【功能:生成随机整数值用于评分】 Returns either 0.0f or 1.0f based on a random number picked at the start of the game |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (899) | |
| AIProductionScoring_RemainingPersonnelPopCap( PlayerID aiPlayer, Real requiredRemainingPop ) | |
|
创建剩余人员人口上限评分函数。【功能:评估剩余的人员人口上限空间】 Returns 1.0f if there is enough remaining personnel pop cap, 0.0f otherwise |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (954) | |
| AIProductionScoring_ResourceGeneratorScore( PlayerID aiPlayer, Real depletionTimeThreshold ) | |
|
Create a ResourceGeneratorScore scoring function. Gives positive score if the item produces required resources |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (647) | |
| AIProductionScoring_ScarcityAndDeficiencyScore( PlayerID aiPlayer ) | |
|
Create a DropOffScore scoring function. Returns positive score if drop off is required to either serve gathering of a resource or improve existing gathering |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (520) | |
| AIProductionScoring_ShouldConsiderDeepwaterFishDeposits( PlayerID aiPlayer ) | |
|
创建是否考虑深海鱼点评分函数。【功能:评估是否应该考虑深海鱼资源点】 Returns 1.0 if there are any fish deposits on the map |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (178) | |
| AIProductionScoring_ShouldConsiderLimitedNaval( PlayerID aiPlayer ) | |
|
Create an AIShouldConsiderLimitedNaval scoring function. Returns 1.0 if there are large bodies of water on the map |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (167) | |
| AIProductionScoring_ShouldConsiderNaval( PlayerID aiPlayer ) | |
|
创建是否考虑海军评分函数。【功能:评估是否应该考虑海军生产】 Returns 1.0 if players start on different islands or there are large bodies of water on the map |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (156) | |
| AIProductionScoring_ShouldNotConsiderNaval( PlayerID aiPlayer, Boolean shouldIncludeLimitedNaval ) | |
|
若非海军地图则返回1,否则返回0。【功能:判断当前地图是否不需要海军】 If shouldIncludeLimitedNaval is true, limited naval maps return 1, otherwise limited naval maps return 0 |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (1002) | |
| AIProductionScoring_StrategicIntention( PlayerID aiPlayer, Real weights ) | |
|
Create a StrategicIntention scoring function Weights table format: { ["weight name"] = weight, } The score is the sum of current intention values * weight, divided by the sum of weights Ex: (currentSiegeIntention* siegeIntentionWeight)/siegeIntentionWeight |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (193) | |
| AIProductionScoring_TierUpgrade( PlayerID aiPlayer, Real weight ) | |
|
创建等级升级评分函数。【功能:评估等级升级的价值】 For each player squad that this upgrade applies to the score is increased by the weight to a max of 1.0. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (299) | |
| AIProductionScoring_TimeToAcquire( PlayerID aiPlayer, Real maxTimeSeconds, Boolean includeTimeToGather, Boolean includeTimeToBuildThis, Boolean includeTimeToBuildRequirements ) | |
|
创建获取时间评分函数。【功能:评估获取某物品所需的时间】 TimeToAcquire returns values between 0 and 1 and penalizes things that need lots of resources or prerequisites to be produced. Score will approach 0.01 as the time to build something approaches maxTimeSeconds. Time to build something is the sum of the time to gather the outstanding resources, time to build the item, and time to build the requirements of the item |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (237) | |
| AIProductionScoring_TradeRouteExistsScore( PlayerID aiPlayer, Boolean landRoute ) | |
|
创建贸易路线存在评分函数。【功能:评估贸易路线是否存在及其价值】 Returns 0.0 if no safe trade routes exist, 1.0 otherwise. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (582) | |
| AIProductionScoring_UnderCountLimit( PlayerID aiPlayer, Integer maxAlive, Integer maxEverProduced, Boolean groupPopulation ) | |
|
创建数量低于限制评分函数。【功能:检查单位数量是否低于限制】 Keeps an item within limits. If groupPopulation == true then all members of the item's Production Group are counted towards the current population to be compared against the limit. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (76) | |
| AIProductionScoring_UnderCountLimitFromStateModel( PlayerID aiPlayer, String keyMaxAlive ) | |
|
创建状态模型数量低于限制评分函数。【功能:从状态模型检查单位数量是否低于限制】 Keeps an item within limits. If groupPopulation == true then all members of the item's Production Group are counted towards the current population to be compared against the limit. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (90) | |
| AIProductionScoring_VehicleUnderCountLimit( PlayerID aiPlayer, Boolean groupPopulation, Boolean maxCap ) | |
|
创建载具数量低于限制评分函数。【功能:检查载具数量是否低于限制】 Keeps an item within limits. If groupPopulation == true then all members of the item's Production Group are counted towards the current vehicle (Chinese official) population to be compared against the limit. |
|
| Source: [E:\P4Share\engine\source\runtime\ai\public\ai\lua\lualibs\LuaLibAIProductionScoring.cpp] (973) | |