Jesus4Lyf
Good Idea™
- Reaction score
- 397
Full list can be found here.
Native function list:
Source.
Players are integers. Starting from 1, as far as I know.
Unit types are strings.
Just to explain some of the parameters.
Native function list:
JASS:
native abilcmd AbilityCommand(string, int);
native abilcmd OrderGetAbilityCommand(order);
native aifilter AIFilter(int);
native bool AIAnyAllyAttacking(int);
native bool AIAnyAllyNeedsDefending(int);
native bool AIAnyWorkersFleeingNearby(int, point, fixed);
native bool AICloakEvaluate(unit, fixed, fixed, fixed);
native bool AICombatAvoidDisabledUnits(int, int);
native bool AICombatAvoidNonThreats(int, int);
native bool AICombatAvoidTimedUnits(int, int);
native bool AICombatAvoidWeakUnits(int, int);
native bool AICombatTargetActiveProduction(int, int);
native bool AICombatTargetAir(int, int);
native bool AICombatTargetAllyThreats(int, int);
native bool AICombatTargetAttackers(int, int);
native bool AICombatTargetCurrent(int, int);
native bool AICombatTargetDropOffs(int, int);
native bool AICombatTargetFood(int, int);
native bool AICombatTargetHealers(int, int);
native bool AICombatTargetInAttackRange(int, int);
native bool AICombatTargetInjuries(int, int);
native bool AICombatTargetMovers(int, int);
native bool AICombatTargetProduction(int, int);
native bool AICombatTargetSelfThreats(int, int);
native bool AICombatTargetSiege(int, int);
native bool AICombatTargetSpecial(int, int);
native bool AICombatTargetThreats(int, int);
native bool AICombatTargetWorkers(int, int);
native bool AIControlForceToMove(unit);
native bool AIControlForceUnburrow(unit);
native bool AIControlWantsToBurrow(unit);
native bool AIControlWantsToMove(unit);
native bool AIControlWantsToUnburrow(unit);
native bool AIDefaultSuspectDetectionDanger(int);
native bool AIDefenseThreat(int, int, wave);
native bool AIEvalTacticalData(unit, string);
native bool AIFindDropAttackTarget(int, point);
native bool AIGetDifficulty(int, int);
native bool AIGetFlag(int, int);
native bool AIGivingUp(int);
native bool AIHasNearbyOpenExpansion(int);
native bool AIHasRes(int, int, int);
native bool AIHasStock(int);
native bool AIHasStockFromTown(int, int);
native bool AIIsCampaign(int);
native bool AIIsFollowingUnit(unit, string);
native bool AIIsIgnoredByWave(unit);
native bool AIIsNotUsableInWaves(unit);
native bool AIIsScriptControlled(unit);
native bool AIIsSuicideUnit(unit);
native bool AIIsTownHarvestRunning(int, int);
native bool AINearbyPlaneTest(point, int, fixed, int, int);
native bool AINearbyUnits(int, string, point, fixed, int);
native bool AIOfferNewScout(int, unit);
native bool AISameCommand(unit, unit);
native bool AISawCloakedUnit(int);
native bool AISetStockExpand(int, string, int);
native bool AISetStockTown(int, string, string);
native bool AIUnitIsInCombat(unit);
native bool AIWantsMultipleTransport(int);
native bool AIWaveIsInCombat(wave);
native bool OrderSetTargetPlacement(order, point, unit, string);
native bool PlayerGetAlliance(int, int, int);
native bool PointsInRange(point, point, fixed);
native bool StringEqual(string, string, bool);
native bool UnitGroupTestPlane(unitgroup, int);
native bool UnitIsAlive(unit);
native bool UnitIsHarvesting(unit, int);
native bool UnitOrderHasAbil(unit, string);
native bool UnitOrderIsValid(unit, order);
native bool UnitTestPlane(unit, int);
native bool UnitTestState(unit, int);
native bool UnitTypeTestAttribute(string, int);
native bool UnitTypeTestFlag(string, int);
native bool UnitWeaponsPlaneTest(unit, int);
native fixed AIAllyEnemyRatio(int, point, unitfilter, fixed, fixed);
native fixed AIGetNextDropTimeCheck(int);
native fixed AIGetTime();
native fixed AIGetTownEstablishedTime(int, int);
native fixed AIUnitGroupStrength(unitgroup);
native fixed AngleBetweenPoints(point, point);
native fixed DistanceBetweenPoints(point, point);
native fixed IntToFixed(int);
native fixed MaxF(fixed, fixed);
native fixed StringToFixed(string);
native fixed UnitGetFacing(unit);
native fixed UnitGetPropertyFixed(unit, int, bool);
native int AIAttackWaveSend(int, int, bool);
native int AICast(unit, order, marker, bool);
native int AICastFlee(unit, unit, int, marker);
native int AIChooseSubState();
native int AICounterUnits(int, int, string);
native int AIDefaultGetFullMakeTime(int, string);
native int AIDefaultGetObjectType(int, string);
native int AIDefenseThreatEval(int, int);
native int AIEvalAllAllied(int);
native int AIEvalLargestEnemy(int);
native int AIEvalRatio(int);
native int AIExpand(int, point, string);
native int AIGetAirStartLocs(point);
native int AIGetAirTownLocs(point);
native int AIGetBuildingCountInTown(int, int, string, int);
native int AIGetClosestTown(int, point);
native int AIGetCurPeonCount(int, int);
native int AIGetGasAmountLeft(int, int);
native int AIGetGroundStartLocs(point);
native int AIGetGroundTownLocs(point);
native int AIGetMainTown(int);
native int AIGetMaxPeonCount(int, int);
native int AIGetMinPeonCount(int, int);
native int AIGetMineralAmountLeft(int, int);
native int AIGetMineralNumSpots(int, int);
native int AIGetNextUnusedTownSlot(int);
native int AIGetNumAllies(int);
native int AIGetNumEnemies(int);
native int AIGetNumMobileTransports(int);
native int AIGetPlayerGroup(unitgroup);
native int AIGetRawGasNumSpots(int, int);
native int AIGetTotalStartLocs();
native int AIGetTotalTownLocs();
native int AIGetTownState(int, int);
native int AIGetUserInt(int, int);
native int AIKnownUnitCount(int, int, string);
native int AILastAttack(unit);
native int AILastAttackRatio(wave);
native int AILastAttackStartEval(wave);
native int AILastWaveEvalStaticRatio();
native int AIRandomVal(int, int);
native int AIState(int, int);
native int AITechCount(int, string, int);
native int AIUnitAreaEvalRatio(unit, fixed);
native int AIWaveDetectorCount(wave);
native int AIWaveEval(wave);
native int AIWaveEvalRatio(wave, fixed);
native int AIWaveGetTimeInCombat(wave);
native int AIWaveGetTimeSinceCombat(wave);
native int AIWaveGetTimeSinceOrdered(wave);
native int AIWaveGetTimeSinceRetreat(wave);
native int AIWaveGetUserData(wave, int);
native int AIWaveInfoAttack(waveinfo, int, point, wavetarget, int);
native int AIWaveInfoScout(waveinfo, int, point, int);
native int AIWaveInfoSuicide(waveinfo, int, point, wavetarget, int);
native int AIWaveState(wave);
native int AIWaveType(wave);
native int AIWaveUnitCount(wave);
native int AbsI(int);
native int CliffLevel(point);
native int DifficultyAPM(int);
native int FixedToInt(fixed);
native int OrderGetPlayer(order);
native int OrderGetTargetType(order);
native int PlayerDifficulty(int);
native int PlayerGetColorIndex(int, bool);
native int PlayerGetPropertyInt(int, int);
native int RandomInt(int, int);
native int StringToInt(string);
native int TechTreeBehaviorCount(int, string, int);
native int TechTreeUnitCount(int, string, int);
native int UnitBehaviorCount(unit, string);
native int UnitCargoValue(unit, int);
native int UnitGetOwner(unit);
native int UnitGetPropertyInt(unit, int, bool);
native int UnitGroupCount(unitgroup, int);
native int UnitMarkerCount(unit, marker);
native int UnitOrderCount(unit);
native int UnitRallyPointTargetCount(unit, int);
native marker MarkerCastingUnit(string, unit);
native order AIUnitGroupGetValidOrder(unitgroup, order, unit, bool);
native order Order(abilcmd);
native order UnitOrder(unit, int);
native playergroup PlayerGroupAll();
native point AIBestAllyAttackPoint(int, wave);
native point AIBestAllyDefendPoint(int, wave);
native point AIBestTargetPoint(unitgroup, int, int, fixed, fixed, point, fixed, int);
native point AIGetBestCreepSpot(int, unit, fixed);
native point AIGetBestTarget(int, playergroup, point, int);
native point AIGetCloakedAttacker(int);
native point AIGetGatherDefLocation(int, int);
native point AIGetGatherLocation(int, int);
native point AIGetHomePosition(unit);
native point AIGetNextScoutLoc(int);
native point AIGetRallyPoint(unit);
native point AIGetTownLocation(int, int);
native point AILastDropGoal();
native point AILastDropLocation();
native point AIPlacementNearbyFindTest(int, point, fixed, string);
native point AIRandomSpawnPoint(int, region, fixed, fixed, fixed);
native point AIWaveTargetGatherDPoint(int, int);
native point AIWaveTargetGatherOPoint(int, int);
native point CameraGetTarget(int);
native point OrderGetTargetPoint(order);
native point OrderGetTargetPosition(order);
native point PlayerStartLocation(int);
native point Point(fixed, fixed);
native point PointWithOffset(point, fixed, fixed);
native point PointWithOffsetPolar(point, fixed, fixed);
native point RegionRandomPoint(region);
native point UnitGetPosition(unit);
native point UnitRallyPointTargetPoint(unit, int, int);
native region RegionCircle(point, fixed);
native string AIDefaultGetFirstMissingReq(int, string);
native string AIDefaultGetFirstUnfinishedReq(int, string);
native string AIDefaultGetMaker(int, string);
native string AIGetBaseName(string);
native string AIGetBuildAtName(string);
native string AIGetBullyType(unit);
native string AIGetUserString(int, int);
native string AIWaveToString(wave);
native string AbilityCommandGetAbility(abilcmd);
native string CatalogFieldValueGet(int, string, string, int);
native string EventChatMessage(bool);
native string IntToString(int);
native string PlayerRace(int);
native string StringWord(string, int);
native string UnitGetType(unit);
native text AIWaveToText(wave);
native text PlayerColorName(int);
native text StringToText(string);
native trigger TriggerCreate(string);
native unit AIDefaultCombatPriority(unit, unitgroup, unitgroup);
native unit AIGetObstruction(int);
native unit AIGrabUnit(int, string, int, point);
native unit AILastAttacker(unit);
native unit AIWaveTargetGetUnit(wavetarget);
native unit OrderGetTargetUnit(order);
native unit UnitGroupNearestUnit(unitgroup, point);
native unit UnitGroupUnit(unitgroup, int);
native unitfilter UnitFilter(int, int, int, int);
native unitfilter UnitFilterStr(string);
native unitgroup AIFilterCasters(unitgroup);
native unitgroup AIFilterGathering(unitgroup, int, fixed);
native unitgroup AIFilterPathable(unitgroup, point);
native unitgroup AIFindUnits(int, string, point, fixed, int);
native unitgroup AIGetAllEscorts(unit);
native unitgroup AIGetAllEscortsGroup(unitgroup);
native unitgroup AIGetFilterGroup(aifilter, unitgroup);
native unitgroup AIGetTownThreats(int, int);
native unitgroup AIGetUnitsInWavesWithTarget(int, wavetarget);
native unitgroup AIWaveGetUnits(wave);
native unitgroup AIWaveTargetGetUnitGroup(wavetarget);
native unitgroup UnitCargoGroup(unit);
native unitgroup UnitGroup(string, int, region, unitfilter, int);
native unitgroup UnitGroupAlliance(int, int, region, unitfilter, int);
native unitgroup UnitGroupCopy(unitgroup);
native unitgroup UnitGroupFilter(string, int, unitgroup, unitfilter, int);
native unitgroup UnitGroupFilterAlliance(unitgroup, int, int, int);
native unitgroup UnitGroupFilterPlane(unitgroup, int, int);
native unitgroup UnitGroupFilterRegion(unitgroup, region, int);
native unitgroup UnitGroupFilterThreat(unitgroup, unit, string, int);
native void AIAddBully(int, string, point, int);
native void AIAddDetectionDanger(int, string);
native void AIAddStringInt(int, string, int);
native void AIAddToExtraScoutGroup(int, unit);
native void AIAttackWaveAddEscortType(int, string, unit, fixed, fixed);
native void AIAttackWaveAddEscortUnit(int, unit, unit, fixed, fixed);
native void AIAttackWaveAddUnits(int, int, string);
native void AIAttackWaveAddWaypoint(int, point, bool);
native void AIAttackWaveCancel(wave);
native void AIAttackWaveClearWaypoints(int);
native void AIAttackWaveSetGatherEarlyNoReplace(int);
native void AIAttackWaveSetGatherPoint(int, point);
native void AIAttackWaveSetKeepAlive(int);
native void AIAttackWaveSetTargetEscort(int, unitgroup, int);
native void AIAttackWaveSetTargetEscortNL(int, unitgroup, int);
native void AIAttackWaveSetTargetGatherD(int, int);
native void AIAttackWaveSetTargetGatherO(int, int);
native void AIAttackWaveSetTargetMelee(int);
native void AIAttackWaveSetTargetMeleeDefend(int);
native void AIAttackWaveSetTargetMeleeDrop(int, point, point);
native void AIAttackWaveSetTargetMeleeHarass(int);
native void AIAttackWaveSetTargetMerge(int, wave);
native void AIAttackWaveSetTargetPatrol(int, int);
native void AIAttackWaveSetTargetPlayer(int, playergroup);
native void AIAttackWaveSetTargetPoint(int, point);
native void AIAttackWaveSetTargetRegion(int, region, int);
native void AIAttackWaveSetTargetUnit(int, unit);
native void AIAttackWaveSetTargetUnitGroup(int, unitgroup);
native void AIAttackWaveSetTargetUnitPoint(int, unit);
native void AIAttackWaveUseGroup(int, unitgroup);
native void AIAttackWaveUseUnit(int, unit);
native void AIBaseThink(unit, unitgroup);
native void AIBuild(int, int, int, string, int, int);
native void AIClearAllBullies(int);
native void AIClearBuildQueue(int);
native void AIClearCampaignScout(int);
native void AIClearCloakedAttacker(int, point);
native void AIClearLimitTech(int);
native void AIClearResearchQueue(int);
native void AIClearStock(int);
native void AIClearTrainQueue(int);
native void AICounterUnit(int, string, fixed, string);
native void AIDeclareTown(int, int, point);
native void AIDefaultEconomy(int, string, string, string, string, int, bool);
native void AIDefaultExpansion(int, string, int, int, int);
native void AIEnableStock(int);
native void AIEvalSetCustomIndex(int);
native void AIGlobalSuicide(int);
native void AIGoodGame(int);
native void AIHarvest(int, int);
native void AIHarvestBonus(int, fixed);
native void AIHarvestRate(int, int);
native void AIImportantTech(int, string);
native void AIInitCampaignHarvest(int);
native void AIInitCampaignTowns(int);
native void AILimitStockLarva(int, string);
native void AILimitTech(int, int, int, int, int, int, int);
native void AIMakeAlways(int, int, int, string, int);
native void AIMakeOnce(int, int, int, string, int);
native void AINearestTownBullyRebuild(int, bool);
native void AINearestTownLimitWaveGather(int, bool);
native void AINewChooseSubState(int, int, int, int, int);
native void AINewTechStock(int);
native void AIRemoveGroupFromAnyWaves(unitgroup);
native void AIRemoveStockFromTown(int, int);
native void AIRemoveUnitFromAnyWaves(unit);
native void AIReqAddSpecialMaker(string, string, string, int);
native void AIReqCountAsBuiltObject(int, string);
native void AIResearch(int, int, int, string);
native void AIResetBullyRebuildCountsInRegion(int, region);
native void AIResetCounterUnits(int);
native void AIResetUserData(int);
native void AIScout(int);
native void AISetAPM(int, int);
native void AISetAllStates(int, int);
native void AISetBullyAttackWavePercent(int, int);
native void AISetCreepBuilding(int, string, string);
native void AISetDifficulty(int, int, bool);
native void AISetFilterAlliance(aifilter, int);
native void AISetFilterBehaviorCount(aifilter, int, int, string);
native void AISetFilterBits(aifilter, unitfilter);
native void AISetFilterCanAttackAlly(aifilter, bool, bool);
native void AISetFilterCanAttackEnemy(aifilter, int, int);
native void AISetFilterEnergy(aifilter, fixed, fixed);
native void AISetFilterLife(aifilter, fixed, fixed);
native void AISetFilterLifeLost(aifilter, fixed, fixed);
native void AISetFilterLifeMod(aifilter, int, fixed);
native void AISetFilterLifePerMarker(aifilter, fixed, marker);
native void AISetFilterLifePercent(aifilter, fixed, fixed);
native void AISetFilterLifeSortReference(aifilter, fixed, fixed);
native void AISetFilterMarker(aifilter, int, int, marker);
native void AISetFilterPlane(aifilter, int);
native void AISetFilterRange(aifilter, unit, fixed);
native void AISetFilterSelf(aifilter, unit);
native void AISetFilterShields(aifilter, fixed, fixed);
native void AISetFlag(int, int, bool);
native void AISetGasPeonCountOverride(int, int, int);
native void AISetGeneralRebuildCount(int, bool, int);
native void AISetGroupNotUsableInWaves(unitgroup, bool);
native void AISetGroupScriptControlled(unitgroup, bool);
native void AISetGroupSuicide(unitgroup, bool);
native void AISetIgnoredByWave(unit, bool);
native void AISetMainTown(int, int);
native void AISetMinimumBullyCount(int, string, int);
native void AISetNextDropTimeCheck(int, fixed);
native void AISetNukeCloak(int, string);
native void AISetNukeCloakAbilLink(int, string);
native void AISetNukeCloakCost(int, fixed);
native void AISetNukeCloakRegenRate(int, fixed);
native void AISetNukeDamage(int, fixed, fixed);
native void AISetNukeGhost(int, string);
native void AISetNukeNukeAbilLink(int, string);
native void AISetNukeNukeCastTime(int, fixed);
native void AISetNukeNukeEffect(int, string);
native void AISetNukeRadiusClose(int, fixed, fixed);
native void AISetNukeRadiusFar(int, fixed, fixed);
native void AISetNukeRadiusMedium(int, fixed, fixed);
native void AISetNumScouts(int, int);
native void AISetPowerBuilding(int, string);
native void AISetScoutTimes(int, int, int, int, int);
native void AISetSpecificRebuildCount(int, string, int);
native void AISetSpecificState(int, int, int);
native void AISetStock(int, int, string);
native void AISetStockEx(int, int, int, string, int, int);
native void AISetStockExtra(int, int, string, int);
native void AISetStockFarms(int, string, bool);
native void AISetStockOpt(int, int, string);
native void AISetStockPeons(int, int, string, bool, bool);
native void AISetStockTechNext(int);
native void AISetStockUnitNext(int, int, string, bool);
native void AISetSubStateChance(int, int);
native void AISetTacticalAttackTargetPoint(unit, point);
native void AISetTacticalAttackTargetUnit(unit, unit);
native void AISetUnitNotUsableInWaves(unit, bool);
native void AISetUnitScriptControlled(unit, bool);
native void AISetUnitSuicide(unit, bool);
native void AISetUserInt(int, int, int);
native void AISetUserString(int, int, string);
native void AISetWantsMultipleTransport(int, bool);
native void AISetWantsToUpgrade(unit);
native void AIStart(int, bool, int);
native void AITechCountFixupEither(int, string, string, string);
native void AITechCountFixupInOrder(int, string, string, string);
native void AITechCountFixupSingle(int, string, string);
native void AITechFlag(int, int, int, string, int);
native void AITechStockAdd(string);
native void AIToggleBulliesInRegion(int, region, bool);
native void AITrain(int, int, int, string, int);
native void AITransportIgnore(int, string);
native void AITransportSetPanic(int, fixed);
native void AITransportSetReturn(int, point);
native void AIUpdateMainTown(int);
native void AIWaveAddUnit(wave, unit);
native void AIWaveAddUnitPriority(wave, unit, int);
native void AIWaveDelete(wave);
native void AIWaveInfoAdd(waveinfo, string, int);
native void AIWaveMerge(int, int, int);
native void AIWaveMergeMelee(int);
native void AIWaveRemoveUnit(wave, unit);
native void AIWaveSet(int, int, wave);
native void AIWaveSetType(wave, int, wavetarget);
native void AIWaveSetUserData(wave, int, int);
native void AIWaveTargetAddWaypoint(wavetarget, point, bool, int);
native void AIWaveTargetClearWaypoints(wavetarget);
native void DebugDump(int);
native void DebugFixed(fixed);
native void DebugInt(int);
native void DebugPoint(point);
native void DebugString(string);
native void DebugUnit(unit);
native void MarkerSetMatchFlag(marker, int, bool);
native void MarkerSetMismatchFlag(marker, int, bool);
native void MeleeInitAI();
native void MeleeInitOptions();
native void MeleeInitResources();
native void MeleeInitUnits();
native void OrderSetPlayer(order, int);
native void OrderSetTargetPassenger(order, unit);
native void OrderSetTargetPoint(order, point);
native void OrderSetTargetUnit(order, unit);
native void TriggerAddEventChatMessage(trigger, int, string, bool);
native void TriggerAddEventMapInit(trigger);
native void TriggerDebugOutput(int, text, bool);
native void UIDisplayMessage(playergroup, int, text);
native void UnitFilterSetState(unitfilter, int, int);
native void UnitGroupAdd(unitgroup, unit);
native void Wait(fixed, int);
native wave AIUnitGetWave(unit);
native wave AIWaveCreate(waveinfo, int, point);
native wave AIWaveGet(int, int);
native wave WaveLastCreated();
native waveinfo AIWaveInfo(wave);
native waveinfo AIWaveInfoCreate();
native wavetarget AIWaveGetTarget(wave);
native wavetarget AIWaveHarassRetreat(int, wave, fixed);
native wavetarget AIWaveTargetEscort(unitgroup, int);
native wavetarget AIWaveTargetEscortNL(unitgroup, int);
native wavetarget AIWaveTargetGatherD(int, int);
native wavetarget AIWaveTargetGatherO(int, int);
native wavetarget AIWaveTargetMelee(int);
native wavetarget AIWaveTargetMeleeDefend(int);
native wavetarget AIWaveTargetMeleeDrop(int, point, point);
native wavetarget AIWaveTargetMeleeHarass(int);
native wavetarget AIWaveTargetMerge(wave);
native wavetarget AIWaveTargetPatrol(int);
native wavetarget AIWaveTargetPlayer(playergroup);
native wavetarget AIWaveTargetPoint(point);
native wavetarget AIWaveTargetRegion(region, int);
native wavetarget AIWaveTargetUnit(unit);
native wavetarget AIWaveTargetUnitGroup(unitgroup);
native wavetarget AIWaveTargetUnitPoint(unit);
native aifilter AIFilter(int player);
native bool AIAnyAllyAttacking(int player);
native bool AIAnyAllyNeedsDefending(int player);
native bool AIAnyWorkersFleeingNearby(int player, point loc, fixed radius);
native bool AICloakEvaluate(unit u, fixed minEnergy, fixed maxLife, fixed range);
native bool AICombatAvoidDisabledUnits(int player, int action);
native bool AICombatAvoidNonThreats(int player, int action);
native bool AICombatAvoidTimedUnits(int player, int action);
native bool AICombatAvoidWeakUnits(int player, int action);
native bool AICombatTargetActiveProduction(int player, int action);
native bool AICombatTargetAir(int player, int action);
native bool AICombatTargetAllyThreats(int player, int action);
native bool AICombatTargetAttackers(int player, int action);
native bool AICombatTargetCurrent(int player, int action);
native bool AICombatTargetDropOffs(int player, int action);
native bool AICombatTargetFood(int player, int action);
native bool AICombatTargetHealers(int player, int action);
native bool AICombatTargetInAttackRange(int player, int action);
native bool AICombatTargetInjuries(int player, int action);
native bool AICombatTargetMovers(int player, int action);
native bool AICombatTargetProduction(int player, int action);
native bool AICombatTargetSelfThreats(int player, int action);
native bool AICombatTargetSiege(int player, int action);
native bool AICombatTargetSpecial(int player, int action);
native bool AICombatTargetThreats(int player, int action);
native bool AICombatTargetWorkers(int player, int action);
native bool AIControlForceToMove(unit u);
native bool AIControlForceUnburrow(unit u);
native bool AIControlWantsToBurrow(unit u);
native bool AIControlWantsToMove(unit u);
native bool AIControlWantsToUnburrow(unit u);
native bool AIDefaultSuspectDetectionDanger(int player);
native bool AIDefenseThreat(int type, int player, wave w);
native bool AIEvalTacticalData(unit who, string data);
native bool AIFindDropAttackTarget(int player, point gatherPoint);
native bool AIGetDifficulty(int player, int index);
native bool AIGetFlag(int player, int index);
native bool AIGivingUp(int player);
native bool AIHasNearbyOpenExpansion(int player);
native bool AIHasRes(int player, int minerals, int gas);
native bool AIHasStock(int player);
native bool AIHasStockFromTown(int player, int town);
native bool AIIsCampaign(int player);
native bool AIIsFollowingUnit(unit aiUnit, string unitType);
native bool AIIsIgnoredByWave(unit u);
native bool AIIsNotUsableInWaves(unit u);
native bool AIIsScriptControlled(unit u);
native bool AIIsSuicideUnit(unit u);
native bool AIIsTownHarvestRunning(int player, int town);
native bool AINearbyPlaneTest(point p, int player, fixed range, int inPlane, int inAlliance);
native bool AINearbyUnits(int player, string unitType, point p, fixed range, int requiredCount);
native bool AIOfferNewScout(int player, unit u);
native bool AISameCommand(unit u1, unit u2);
native bool AISawCloakedUnit(int p);
native bool AISetStockExpand(int player, string aliasUnitTypeTH, int count);
native bool AISetStockTown(int player, string aliasUnitTypeTH, string aliasUnitTypeGas);
native bool AIUnitIsInCombat(unit u);
native bool AIWantsMultipleTransport(int player);
native bool AIWaveIsInCombat(wave w);
native fixed AIAllyEnemyRatio(int player, point p, unitfilter filter, fixed range, fixed minThreshold);
native fixed AIGetNextDropTimeCheck(int player);
native fixed AIGetTime();
native fixed AIGetTownEstablishedTime(int player, int town);
native fixed AIUnitGroupStrength(unitgroup inGroup);
native int AIKnownUnitCount(int player, int testPlayerId, string aliasUnitType);
native int AIState(int player, int index);
native int AITechCount(int player, string aliasType, int countMask);
native int AIWaveDetectorCount(wave w);
native int AIWaveType(wave waveRef);
native int AIWaveUnitCount(wave w);
native int AIAttackWaveSend(int player, int time, bool wait);
native int AICast(unit u, order o, marker m, bool retreat);
native int AICastFlee(unit who, unit from, int distance, marker mark);
native int AIChooseSubState();
native int AICounterUnits(int player, int testPlayerId, string makeWhat);
native int AIDefaultGetFullMakeTime(int player, string aliasType);
native int AIDefaultGetObjectType(int player, string aliasType);
native int AIDefenseThreatEval(int type, int player);
native int AIEvalRatio(int player);
native int AIExpand(int player, point searchStart, string firstBuilding);
native int AIGetAirStartLocs(point loc);
native int AIGetAirTownLocs(point loc);
native int AIGetBuildingCountInTown(int player, int town, string aliasUnitType, int countMask);
native int AIGetClosestTown(int player, point location);
native int AIGetCurPeonCount(int player, int town);
native int AIGetGasAmountLeft(int player, int town);
native int AIGetGroundStartLocs(point loc);
native int AIGetGroundTownLocs(point loc);
native int AIGetMainTown(int player);
native int AIGetMaxPeonCount(int player, int town);
native int AIGetMinPeonCount(int player, int town);
native int AIGetMineralAmountLeft(int player, int town);
native int AIGetMineralNumSpots(int player, int town);
native int AIGetNextUnusedTownSlot(int player);
native int AIGetNumAllies(int player);
native int AIGetNumEnemies(int player);
native int AIGetNumMobileTransports(int player);
native int AIGetPlayerGroup(unitgroup inGroup);
native int AIGetRawGasNumSpots(int player, int town);
native int AIGetTotalStartLocs();
native int AIGetTotalTownLocs();
native int AIGetTownState(int player, int town);
native int AIGetUserInt(int player, int index);
native int AILastAttack(unit u);
native int AILastAttackRatio(wave w);
native int AILastAttackStartEval(wave w);
native int AILastWaveEvalStaticRatio();
native int AIRandomVal(int player, int which);
native int AIUnitAreaEvalRatio(unit u, fixed range);
native int AIWaveEval(wave w);
native int AIWaveEvalRatio(wave w, fixed range);
native int AIWaveGetTimeInCombat(wave w);
native int AIWaveGetTimeSinceCombat(wave w);
native int AIWaveGetTimeSinceOrdered(wave w);
native int AIWaveGetTimeSinceRetreat(wave w);
native int AIWaveInfoAttack(waveinfo info, int player, point from, wavetarget target, int time);
native int AIWaveInfoScout(waveinfo info, int player, point from, int time);
native int AIWaveInfoSuicide(waveinfo info, int player, point from, wavetarget target, int time);
native int AIWaveState(wave w);
native order AIUnitGroupGetValidOrder(unitgroup inGroup, order inOrder, unit caster, bool forwards);
native point AIBestAllyAttackPoint(int player, wave w);
native point AIBestAllyDefendPoint(int player, wave w);
native point AIBestTargetPoint(unitgroup group, int minHits, int damageBase, fixed minScore, fixed radius, point from, fixed range, int bonusAttri);
native point AIGetBestCreepSpot(int player, unit creator, fixed createRadius);
native point AIGetBestTarget(int player, playergroup enemies, point gatherPoint, int flags);
native point AIGetCloakedAttacker(int p);
native point AIGetGatherDefLocation(int player, int town);
native point AIGetGatherLocation(int player, int town);//xxx remove old functions
native point AIGetHomePosition(unit u);
native point AIGetNextScoutLoc(int player);
native point AIGetRallyPoint(unit u);
native point AIGetTownLocation(int player, int town);
native point AILastDropGoal();
native point AILastDropLocation();
native point AIPlacementNearbyFindTest(int player, point loc, fixed range, string unitType);
native point AIRandomSpawnPoint(int player, region r, fixed minDistFromEnemy, fixed maxDistFromEnemy, fixed maxDistFromBuilding);
native point AIWaveTargetGatherDPoint(int player, int town);
native point AIWaveTargetGatherOPoint(int player, int town);
native string AIDefaultGetFirstMissingReq(int player, string aliasType);
native string AIDefaultGetFirstUnfinishedReq(int player, string aliasType);
native string AIDefaultGetMaker(int player, string aliasType);
native string AIGetBaseName(string aliasType);
native string AIGetBuildAtName(string aliasType);
native string AIGetBullyType(unit u);
native string AIGetUserString(int player, int index);
native string AIWaveToString(wave w);
native text AIWaveToText(wave w);
native trigger TriggerCreate(string s);
native unit AIWaveTargetGetUnit(wavetarget wt);
native unit AIDefaultCombatPriority(unit target, unitgroup attackers, unitgroup enemies);
native unit AIGetObstruction(int player);
native unit AIGrabUnit(int player, string aliasUnitType, int prio, point location);
native unit AILastAttacker(unit u);
native unitgroup AIWaveTargetGetUnitGroup(wavetarget wt);
native unitgroup AIFilterCasters(unitgroup group);
native unitgroup AIFilterGathering(unitgroup group, int inResource, fixed distance);
native unitgroup AIFilterPathable(unitgroup group, point inStart);
native unitgroup AIFindUnits(int player, string unitType, point p, fixed range, int inMaxCount);
native unitgroup AIGetAllEscorts(unit u);
native unitgroup AIGetAllEscortsGroup(unitgroup ug);
native unitgroup AIGetFilterGroup(aifilter filter, unitgroup group);
native unitgroup AIGetTownThreats(int player, int town);
native unitgroup AIGetUnitsInWavesWithTarget(int player, wavetarget target);
native unitgroup AIWaveGetUnits(wave w);
native void TriggerAddEventMapInit(trigger t);
native void TriggerDestroy(trigger t);
native void TriggerExecute(trigger t, bool testConds, bool runActions);
native void AIAddBully(int player, string unitType, point loc, int rebuildCount);
native void AIAddDetectionDanger(int player, string unitType);
native void AIAddStringInt(int player, string data, int change);
native void AIAddToExtraScoutGroup(int player, unit u);
native void AIAttackWaveAddEscortType(int player, string unitType, unit escort, fixed offset, fixed angle);
native void AIAttackWaveAddEscortUnit(int player, unit u, unit escort, fixed offset, fixed angle);
native void AIAttackWaveAddUnits(int difficulty, int count, string unitType);
native void AIAttackWaveAddWaypoint(int player, point waypoint, bool useTransport);
native void AIAttackWaveCancel(wave waveRef);
native void AIAttackWaveClearWaypoints(int player);
native void AIAttackWaveSetGatherEarlyNoReplace(int player);
native void AIAttackWaveSetGatherPoint(int player, point gather);
native void AIAttackWaveSetKeepAlive(int player);
native void AIAttackWaveSetTargetEscort(int player, unitgroup g, int replaceType);
native void AIAttackWaveSetTargetEscortNL(int player, unitgroup g, int replaceType);
native void AIAttackWaveSetTargetGatherD(int player, int town);
native void AIAttackWaveSetTargetGatherO(int player, int town);
native void AIAttackWaveSetTargetMelee(int player);
native void AIAttackWaveSetTargetMeleeDefend(int player);
native void AIAttackWaveSetTargetMeleeDrop(int player, point dropLoc, point goalLoc);
native void AIAttackWaveSetTargetMeleeHarass(int player);
native void AIAttackWaveSetTargetMerge(int player, wave w);
native void AIAttackWaveSetTargetPatrol(int player, int replaceType);
native void AIAttackWaveSetTargetPlayer(int player, playergroup players);
native void AIAttackWaveSetTargetPoint(int player, point p);
native void AIAttackWaveSetTargetRegion(int player, region r, int replaceType);
native void AIAttackWaveSetTargetUnit(int player, unit u);
native void AIAttackWaveSetTargetUnitGroup(int player, unitgroup ug);
native void AIAttackWaveSetTargetUnitPoint(int player, unit u);
native void AIAttackWaveUseGroup(int player, unitgroup ug);
native void AIAttackWaveUseUnit(int player, unit u);
native void AIBaseThink(unit who, unitgroup candidates);
native void AIBuild(int player, int priority, int town, string aliasUnitType, int count, int flags);
native void AIClearAllBullies(int player);
native void AIClearBuildQueue(int player);
native void AIClearCampaignScout(int player);
native void AIClearCloakedAttacker(int p, point pt);
native void AIClearLimitTech(int player);
native void AIClearResearchQueue(int player);
native void AIClearStock(int player);
native void AIClearTrainQueue(int player);
native void AICounterUnit(int player, string seeWhat, fixed factor, string makeWhat);
native void AIDeclareTown(int player, int town, point center);
native void AIDefaultEconomy(int player, string hall, string gas, string food, string peon, int cap, bool peonMode);
native void AIDefaultExpansion(int player, string hall, int minerals, int gas, int expandFlags);
native void AIEnableStock(int player);
native void AIEvalSetCustomIndex(int index);
native void AIGlobalSuicide(int player);
native void AIGoodGame(int player);
native void AIHarvest(int player, int town);
native void AIHarvestBonus(int player, fixed bonus);
native void AIHarvestRate(int player, int rate);
native void AIImportantTech(int player, string aliasType);
native void AIInitCampaignHarvest(int player);
native void AIInitCampaignTowns(int player);
native void AILimitStockLarva(int player, string aliasType);
native void AILimitTech(int player, int totalMin, int totalGas, int buildingMin, int buildingGas, int upgradeMin, int upgradeGas);
native void AIMakeAlways(int player, int priority, int town, string aliasType, int count);
native void AIMakeOnce(int player, int priority, int town, string aliasType, int count);
native void AINearestTownBullyRebuild(int player, bool enable);
native void AINearestTownLimitWaveGather(int player, bool enable);
native void AINewChooseSubState(int player, int which, int min, int max, int defaultSubState);
native void AINewTechStock(int player);
native void AIRemoveGroupFromAnyWaves(unitgroup ug);
native void AIRemoveStockFromTown(int player, int town);
native void AIRemoveUnitFromAnyWaves(unit u);
native void AIReqAddSpecialMaker(string objType, string makerType, string abilName, int abilIndex);
native void AIReqCountAsBuiltObject(int player, string aliasType);
native void AIResearch(int player, int priority, int town, string aliasUpgradeType);
native void AIResetBullyRebuildCountsInRegion(int player, region reg);
native void AIResetCounterUnits(int player);
native void AIResetUserData(int player);
native void AIScout(int player);
native void AISetAPM(int player, int apm);
native void AISetAllStates(int player, int state);
native void AISetBullyAttackWavePercent(int percent, int player);
native void AISetCreepBuilding(int player, string building, string noCreepBehavior);
native void AISetDifficulty(int player, int index, bool state);
native void AISetFilterAlliance(aifilter filter, int want);
native void AISetFilterBehaviorCount(aifilter filter, int minBehavior, int maxBehavior, string behaviorType);
native void AISetFilterBits(aifilter filter, unitfilter uf);
native void AISetFilterCanAttackAlly(aifilter filter, bool groundAllies, bool airAllies);
native void AISetFilterCanAttackEnemy(aifilter filter, int enemyGroundCount, int enemyAirCount);
native void AISetFilterLife(aifilter filter, fixed min, fixed max);
native void AISetFilterLifeLost(aifilter filter, fixed min, fixed max);
native void AISetFilterLifeMod(aifilter filter, int type, fixed mod);
native void AISetFilterLifePerMarker(aifilter filter, fixed each, marker m);
native void AISetFilterLifePercent(aifilter filter, fixed min, fixed max);
native void AISetFilterLifeSortReference(aifilter filter, fixed value, fixed distance);
native void AISetFilterMarker(aifilter filter, int min, int max, marker m);
native void AISetFilterPlane(aifilter filter, int plane);
native void AISetFilterRange(aifilter filter, unit center, fixed radius);
native void AISetFilterSelf(aifilter filter, unit exclude);
native void AISetFilterShields(aifilter filter, fixed min, fixed max);
native void AISetFlag(int player, int index, bool state);
native void AISetGasPeonCountOverride(int player, int town, int desiredGasCount);
native void AISetGeneralRebuildCount(int count, bool building, int player);
native void AISetGroupNotUsableInWaves(unitgroup ug, bool enable);
native void AISetGroupScriptControlled(unitgroup ug, bool enable);
native void AISetGroupSuicide(unitgroup ug, bool enable);
native void AISetIgnoredByWave(unit u, bool enable);
native void AISetMainTown(int player, int maintown);
native void AISetMinimumBullyCount(int count, string unitType, int player);
native void AISetNextDropTimeCheck(int player, fixed time);
native void AISetNumScouts(int player, int num);
native void AISetPowerBuilding(int player, string building);
native void AISetScoutTimes(int player, int starts, int obstructed, int resources, int other);
native void AISetSpecificRebuildCount(int count, string unitType, int player);
native void AISetSpecificState(int player, int index, int state);
native void AISetStock(int player, int count, string aliasType);
native void AISetStockEx(int player, int town, int count, string aliasType, int buildFlags, int stockFlags);
native void AISetStockExtra(int player, int count, string aliasUnitType, int minerals);
native void AISetStockFarms(int player, string aliasUnitType, bool onlyNeeded);
native void AISetStockOpt(int player, int count, string aliasType);
native void AISetStockPeons(int player, int max, string aliasUnitType, bool onlyMinPeons, bool peonMode);
native void AISetStockTechNext(int player);
native void AISetStockUnitNext(int player, int count, string aliasUnitType, bool when);
native void AISetSubStateChance(int subState, int chance);
native void AISetTacticalAttackTargetPoint(unit u, point t);
native void AISetTacticalAttackTargetUnit(unit u, unit t);
native void AISetUnitNotUsableInWaves(unit u, bool enable);
native void AISetUnitScriptControlled(unit u, bool enable);
native void AISetUnitSuicide(unit u, bool enable);
native void AISetUserInt(int player, int index, int data);
native void AISetUserString(int player, int index, string data);
native void AISetWantsMultipleTransport(int player, bool enable);
native void AISetWantsToUpgrade(unit u);
native void AIStart(int player, bool isCampaign, int apm);
native void AITechCountFixupEither(int player, string baseUnit, string upgradeOne, string upgradeTwo);
native void AITechCountFixupInOrder(int player, string baseUnit, string upgradeOne, string upgradeTwo);
native void AITechCountFixupSingle(int player, string baseUnit, string upgradeOne);
native void AITechFlag(int player, int index, int count, string what, int state);
native void AITechStockAdd(string upgradeType);
native void AIToggleBulliesInRegion(int player, region reg, bool activate);
native void AITrain(int player, int priority, int town, string aliasUnitType, int count);
native void AITransportIgnore(int player, string unitType);
native void AITransportSetPanic(int player, fixed value);
native void AITransportSetReturn(int player, point center);
native void AIUpdateMainTown(int player);
native void AIWaveAddUnit(wave w, unit u);
native void AIWaveAddUnitPriority(wave w, unit u, int prio);
native void AIWaveDelete(wave w);
native void AIWaveInfoAdd(waveinfo info, string unitType, int count);
native void AIWaveMerge(int player, int waveFrom, int waveInto);
native void AIWaveMergeMelee(int player);
native void AIWaveRemoveUnit(wave w, unit u);
native void AIWaveSet(int player, int waveName, wave waveRef);
native void AIWaveSetType(wave w, int type, wavetarget target);
native void AIWaveTargetAddWaypoint(wavetarget wt, point waypoint, bool useTransport, int index);
native void AIWaveTargetClearWaypoints(wavetarget wt);
native void DebugFixed(fixed value);
native void DebugInt(int value);
native void DebugPoint(point value);
native void DebugString(string value);
native void DebugUnit(unit value);
native wave AIUnitGetWave(unit u);
native wave AIWaveCreate(waveinfo info, int player, point from);
native wave AIWaveGet(int player, int waveName);
native wave WaveLastCreated();
native waveinfo AIWaveInfo(wave w);
native waveinfo AIWaveInfoCreate();
native wavetarget AIWaveGetTarget(wave w);
native wavetarget AIWaveHarassRetreat(int player, wave w, fixed range);
native wavetarget AIWaveTargetEscort(unitgroup g, int replaceType);
native wavetarget AIWaveTargetEscortNL(unitgroup g, int replaceType);
native wavetarget AIWaveTargetGatherD(int player, int town);
native wavetarget AIWaveTargetGatherO(int player, int town);
native wavetarget AIWaveTargetMelee(int player);
native wavetarget AIWaveTargetMeleeDefend(int player);
native wavetarget AIWaveTargetMeleeDrop(int player, point dropLoc, point goalLoc);
native wavetarget AIWaveTargetMeleeHarass(int player);
native wavetarget AIWaveTargetMerge(wave w);
native wavetarget AIWaveTargetPatrol(int replaceType);
native wavetarget AIWaveTargetPlayer(playergroup players);
native wavetarget AIWaveTargetPoint(point p);
native wavetarget AIWaveTargetRegion(region r, int replaceType);
native wavetarget AIWaveTargetUnit(unit u);
native wavetarget AIWaveTargetUnitGroup(unitgroup g);
native wavetarget AIWaveTargetUnitPoint(unit u);
Players are integers. Starting from 1, as far as I know.
Unit types are strings.
Just to explain some of the parameters.