![[Avatar]](/uploads/avatar/4257.gif)
Rank: Member
|
List of Native functions//AI native void AIStart (int player, bool isCampaign, int apm); native bool AIGivingUp (int player); native void AIGoodGame (int player); native bool AIIsCampaign (int player); native void AISetAPM (int player, int apm); native unit AIGrabUnit (int player, string aliasUnitType, int prio, point location); native int AIState (int player, int index); native void AISetSpecificState (int player, int index, int state); native void AISetAllStates (int player, int state); native void AISetFlag (int player, int index, bool state); native bool AIGetFlag (int player, int index); native void AITechFlag (int player, int index, int count, string what, int state); native void AIResetUserData (int player); native void AISetUserString (int player, int index, string data); native string AIGetUserString (int player, int index); native void AISetUserInt (int player, int index, int data); native int AIGetUserInt (int player, int index); native void AIAddStringInt (int player, string data, int change); native fixed AIGetTime (); native int AIGetTotalStartLocs (); native int AIGetGroundStartLocs (point loc); native int AIGetAirStartLocs (point loc); native int AIGetTotalTownLocs (); native int AIGetGroundTownLocs (point loc); native int AIGetAirTownLocs (point loc); native int AIRandomVal (int player, int which); native void AINewChooseSubState (int player, int which, int min, int max, int defaultSubState); native void AISetSubStateChance (int subState, int chance); native int AIChooseSubState (); native bool AIWantsMultipleTransport (int player); native void AISetWantsMultipleTransport (int player, bool enable); native int AIGetNumMobileTransports (int player); native point AIGetBestCreepSpot (int player, unit creator, fixed createRadius); native void AIAddDetectionDanger (int player, string unitType); native bool AIDefaultSuspectDetectionDanger (int player); native bool AIAnyWorkersFleeingNearby (int player, point loc, fixed radius); native int AIGetNumEnemies (int player); native int AIGetNumAllies (int player); native point AIPlacementNearbyFindTest (int player, point loc, fixed range, string unitType); native void AIAddToExtraScoutGroup (int player, unit u); native bool AIOfferNewScout (int player, unit u); native bool AIAnyAllyAttacking (int player); native point AIBestAllyAttackPoint (int player, wave w); native bool AIAnyAllyNeedsDefending (int player); native point AIBestAllyDefendPoint (int player, wave w); native void AIGlobalSuicide (int player); native wave AIUnitGetWave (unit u); native unitgroup AIWaveGetUnits (wave w); native unitgroup AIGetAllEscorts (unit u); native unitgroup AIGetAllEscortsGroup (unitgroup ug); native void AIRemoveUnitFromAnyWaves (unit u); native void AIRemoveGroupFromAnyWaves (unitgroup ug); native unitgroup AIGetUnitsInWavesWithTarget (int player, wavetarget target); native bool AIIsScriptControlled (unit u); native void AISetUnitScriptControlled (unit u, bool enable); native void AISetGroupScriptControlled (unitgroup ug, bool enable); native bool AIIsSuicideUnit (unit u); native void AISetUnitSuicide (unit u, bool enable); native void AISetGroupSuicide (unitgroup ug, bool enable); native bool AIIsNotUsableInWaves (unit u); native void AISetUnitNotUsableInWaves (unit u, bool enable); native void AISetGroupNotUsableInWaves (unitgroup ug, bool enable); native void AISetWantsToUpgrade (unit u); native void AIInitCampaignTowns (int player); native void AIInitCampaignHarvest (int player); native void AIDeclareTown (int player, int town, point center); native int AIGetMainTown (int player); native void AISetMainTown (int player, int maintown); native void AIUpdateMainTown (int player); native int AIGetTownState (int player, int town); native fixed AIGetTownEstablishedTime (int player, int town); native point AIGetTownLocation (int player, int town); native int AIGetClosestTown (int player, point location); native int AIGetNextUnusedTownSlot (int player); native int AIGetBuildingCountInTown (int player, int town, string aliasUnitType, int countMask); native bool AIIsTownHarvestRunning (int player, int town); native void AIHarvest (int player, int town); native void AIHarvestRate (int player, int rate); native void AIHarvestBonus (int player, fixed bonus); native void AISetGasPeonCountOverride (int player, int town, int desiredGasCount); native int AIGetCurPeonCount (int player, int town); native int AIGetMinPeonCount (int player, int town); native int AIGetMaxPeonCount (int player, int town); native int AIGetMineralAmountLeft (int player, int town); native int AIGetGasAmountLeft (int player, int town); native int AIGetMineralNumSpots (int player, int town); native int AIGetRawGasNumSpots (int player, int town); native point AIGetGatherLocation (int player, int town);//xxx remove old functions native point AIGetGatherDefLocation (int player, int town); native int AIExpand (int player, point searchStart, string firstBuilding); native unitgroup AIGetTownThreats (int player, int town); native unit AIGetObstruction (int player); native bool AIHasNearbyOpenExpansion (int player); native void AIScout (int player); native void AISetNumScouts (int player, int num); native void AISetScoutTimes (int player, int starts, int obstructed, int resources, int other); native point AIGetNextScoutLoc (int player); native void AIClearCampaignScout (int player); native void AIBuild (int player, int priority, int town, string aliasUnitType, int count, int flags); native void AITrain (int player, int priority, int town, string aliasUnitType, int count); native void AIResearch (int player, int priority, int town, string aliasUpgradeType); 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 AIClearBuildQueue (int player); native void AIClearTrainQueue (int player); native void AIClearResearchQueue (int player); native bool AIHasRes (int player, int minerals, int gas); native int AITechCount (int player, string aliasType, int countMask); native void AITechCountFixupSingle (int player, string baseUnit, string upgradeOne); native void AITechCountFixupEither (int player, string baseUnit, string upgradeOne, string upgradeTwo); native void AITechCountFixupInOrder (int player, string baseUnit, string upgradeOne, string upgradeTwo); native int AIKnownUnitCount (int player, int testPlayerId, string aliasUnitType); native void AIResetCounterUnits (int player); native void AICounterUnit (int player, string seeWhat, fixed factor, string makeWhat); native int AICounterUnits (int player, int testPlayerId, string makeWhat); native point AIGetRallyPoint (unit u); native void AISetPowerBuilding (int player, string building); native void AISetCreepBuilding (int player, string building, string noCreepBehavior); native void AIClearStock (int player); native void AIEnableStock (int player); native void AISetStockEx (int player, int town, int count, string aliasType, int buildFlags, int stockFlags); native void AISetStock (int player, int count, string aliasType); native void AISetStockOpt (int player, int count, string aliasType); native void AISetStockUnitNext (int player, int count, string aliasUnitType, bool when); native bool AISetStockTown (int player, string aliasUnitTypeTH, string aliasUnitTypeGas); native bool AISetStockExpand (int player, string aliasUnitTypeTH, int count); native void AISetStockExtra (int player, int count, string aliasUnitType, int minerals); native void AISetStockFarms (int player, string aliasUnitType, bool onlyNeeded); native void AISetStockPeons (int player, int max, string aliasUnitType, bool onlyMinPeons, bool peonMode); native void AINewTechStock (int player); native void AITechStockAdd (string upgradeType); native void AISetStockTechNext (int player); 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 AIClearLimitTech (int player); native void AILimitTech (int player, int totalMin, int totalGas, int buildingMin, int buildingGas, int upgradeMin, int upgradeGas); native void AIImportantTech (int player, string aliasType); native void AILimitStockLarva (int player, string aliasType); native bool AIHasStock (int player); native bool AIHasStockFromTown (int player, int town); native void AIRemoveStockFromTown (int player, int town); native int AIDefaultGetObjectType (int player, string aliasType); native string AIDefaultGetMaker (int player, string aliasType); native string AIDefaultGetFirstMissingReq (int player, string aliasType); native string AIDefaultGetFirstUnfinishedReq (int player, string aliasType); native int AIDefaultGetFullMakeTime (int player, string aliasType); native string AIGetBaseName (string aliasType); native string AIGetBuildAtName (string aliasType); native void AIReqCountAsBuiltObject (int player, string aliasType); native void AIReqAddSpecialMaker (string objType, string makerType, string abilName, int abilIndex); native void AIBaseThink (unit who, unitgroup candidates); native bool AIEvalTacticalData (unit who, string data); native int AICast (unit u, order o, marker m, bool retreat); native int AICastFlee (unit who, unit from, int distance, marker mark); native bool AINearbyUnits (int player, string unitType, point p, fixed range, int requiredCount); native unitgroup AIFindUnits (int player, string unitType, point p, fixed range, int inMaxCount); native bool AISameCommand (unit u1, unit u2); native unit AILastAttacker (unit u); native int AILastAttack (unit u); native bool AIControlWantsToMove (unit u); native bool AIControlForceToMove (unit u); native bool AIControlWantsToUnburrow (unit u); native bool AIControlWantsToBurrow (unit u); native bool AIControlForceUnburrow (unit u); native bool AIUnitIsInCombat (unit u); native bool AIIsIgnoredByWave (unit u); native void AISetIgnoredByWave (unit u, bool enable); native point AIGetHomePosition (unit u); native point AIGetCloakedAttacker (int p); native void AIClearCloakedAttacker (int p, point pt); native bool AISawCloakedUnit (int p); native point AIRandomSpawnPoint (int player, region r, fixed minDistFromEnemy, fixed maxDistFromEnemy, fixed maxDistFromBuilding); native point AIBestTargetPoint (unitgroup group, int minHits, int damageBase, fixed minScore, fixed radius, point from, fixed range, int bonusAttri); native unit AIDefaultCombatPriority (unit target, unitgroup attackers, unitgroup enemies); native bool AICloakEvaluate (unit u, fixed minEnergy, fixed maxLife, fixed range); native bool AICombatTargetProduction (int player, int action); native bool AICombatTargetDropOffs (int player, int action); native bool AICombatTargetFood (int player, int action); native bool AICombatTargetActiveProduction (int player, int action); native bool AICombatTargetWorkers (int player, int action); native bool AICombatTargetAllyThreats (int player, int action); native bool AICombatTargetSelfThreats (int player, int action); native bool AICombatTargetCurrent (int player, int action); native bool AICombatTargetAir (int player, int action); native bool AICombatTargetMovers (int player, int action); native bool AICombatTargetInjuries (int player, int action); native bool AICombatTargetInAttackRange (int player, int action); native bool AICombatTargetThreats (int player, int action); native bool AICombatTargetHealers (int player, int action); native bool AICombatTargetSiege (int player, int action); native bool AICombatTargetAttackers (int player, int action); native bool AICombatTargetSpecial (int player, int action); native bool AICombatAvoidTimedUnits (int player, int action); native bool AICombatAvoidNonThreats (int player, int action); native bool AICombatAvoidWeakUnits (int player, int action); native bool AICombatAvoidDisabledUnits (int player, int action); native void AITransportIgnore (int player, string unitType); native void AITransportSetPanic (int player, fixed value); native void AITransportSetReturn (int player, point center); native waveinfo AIWaveInfoCreate (); native waveinfo AIWaveInfo (wave w); native void AIWaveInfoAdd (waveinfo info, string unitType, int count); native int AIWaveInfoAttack (waveinfo info, int player, point from, wavetarget target, int time); native int AIWaveInfoSuicide (waveinfo info, int player, point from, wavetarget target, int time); native int AIWaveInfoScout (waveinfo info, int player, point from, int time); native string AIWaveToString (wave w); native text AIWaveToText (wave w); native wave AIWaveCreate (waveinfo info, int player, point from); native void AIWaveAddUnit (wave w, unit u); native void AIWaveAddUnitPriority (wave w, unit u, int prio); native void AIWaveRemoveUnit (wave w, unit u); native int AIWaveUnitCount (wave w); native int AIWaveDetectorCount (wave w); native void AIWaveSetType (wave w, int type, wavetarget target); native int AIWaveState (wave w); native void AIWaveDelete (wave w); native wavetarget AIWaveTargetUnit (unit u); native wavetarget AIWaveTargetUnitGroup (unitgroup g); native wavetarget AIWaveTargetUnitPoint (unit u); native wavetarget AIWaveTargetPoint (point p); native wavetarget AIWaveTargetPlayer (playergroup players); native wavetarget AIWaveTargetMelee (int player); native wavetarget AIWaveTargetMeleeHarass (int player); native wavetarget AIWaveTargetMeleeDrop (int player, point dropLoc, point goalLoc); native wavetarget AIWaveTargetMeleeDefend (int player); native wavetarget AIWaveTargetMerge (wave w); native wavetarget AIWaveTargetPatrol (int replaceType); native wavetarget AIWaveTargetEscort (unitgroup g, int replaceType); native wavetarget AIWaveTargetEscortNL (unitgroup g, int replaceType); native wavetarget AIWaveTargetGatherO (int player, int town); native wavetarget AIWaveTargetGatherD (int player, int town); native wavetarget AIWaveTargetRegion (region r, int replaceType); native point AIWaveTargetGatherOPoint (int player, int town); native point AIWaveTargetGatherDPoint (int player, int town); native unit AIWaveTargetGetUnit (wavetarget wt); native unitgroup AIWaveTargetGetUnitGroup (wavetarget wt); native wavetarget AIWaveHarassRetreat (int player, wave w, fixed range); native wavetarget AIWaveGetTarget (wave w); native bool AIWaveIsInCombat (wave w); native int AIWaveGetTimeInCombat (wave w); native int AIWaveGetTimeSinceCombat (wave w); native int AIWaveGetTimeSinceOrdered (wave w); native int AIWaveGetTimeSinceRetreat (wave w); native bool AIDefenseThreat (int type, int player, wave w); native int AIDefenseThreatEval (int type, int player); native int AIWaveEval (wave w); native int AIWaveEvalRatio (wave w, fixed range); native int AIUnitAreaEvalRatio (unit u, fixed range); native int AIEvalRatio (int player); native void AIEvalSetCustomIndex (int index); native int AILastWaveEvalStaticRatio (); native void AIWaveTargetAddWaypoint (wavetarget wt, point waypoint, bool useTransport, int index); native void AIWaveTargetClearWaypoints (wavetarget wt); native wave AIWaveGet (int player, int waveName); native void AIWaveSet (int player, int waveName, wave waveRef); native int AIWaveType (wave waveRef); native void AIWaveMerge (int player, int waveFrom, int waveInto); native void AIWaveMergeMelee (int player); native wave WaveLastCreated (); native point AIGetBestTarget (int player, playergroup enemies, point gatherPoint, int flags); native bool AIFindDropAttackTarget (int player, point gatherPoint); native point AILastDropLocation (); native point AILastDropGoal (); native fixed AIGetNextDropTimeCheck(int player); native void AISetNextDropTimeCheck(int player, fixed time); native int AILastAttackRatio (wave w); native int AILastAttackStartEval (wave w); native void AIAttackWaveAddUnits (int difficulty, int count, string unitType); native int AIAttackWaveSend (int player, int time, bool wait); native void AIAttackWaveCancel (wave waveRef); native void AIAttackWaveSetGatherPoint (int player, point gather); native void AIAttackWaveUseUnit (int player, unit u); native void AIAttackWaveUseGroup (int player, unitgroup ug); native void AIAttackWaveAddEscortUnit (int player, unit u, unit escort, fixed offset, fixed angle); native void AIAttackWaveAddEscortType (int player, string unitType, unit escort, fixed offset, fixed angle); native void AIAttackWaveSetTargetUnit (int player, unit u); native void AIAttackWaveSetTargetUnitGroup (int player, unitgroup ug); native void AIAttackWaveSetTargetUnitPoint (int player, unit u); native void AIAttackWaveSetTargetPoint (int player, point p); native void AIAttackWaveSetTargetPlayer (int player, playergroup players); native void AIAttackWaveSetTargetMelee (int player); native void AIAttackWaveSetTargetMeleeHarass (int player); native void AIAttackWaveSetTargetMeleeDrop (int player, point dropLoc, point goalLoc); native void AIAttackWaveSetTargetMeleeDefend (int player); native void AIAttackWaveSetTargetMerge (int player, wave w); native void AIAttackWaveSetTargetPatrol (int player, int replaceType); native void AIAttackWaveSetTargetEscort (int player, unitgroup g, int replaceType); native void AIAttackWaveSetTargetEscortNL (int player, unitgroup g, int replaceType); native void AIAttackWaveSetTargetGatherO (int player, int town); native void AIAttackWaveSetTargetGatherD (int player, int town); native void AIAttackWaveSetTargetRegion (int player, region r, int replaceType); native void AIAttackWaveSetGatherEarlyNoReplace (int player); native void AIAttackWaveSetKeepAlive (int player); native void AIAttackWaveAddWaypoint (int player, point waypoint, bool useTransport); native void AIAttackWaveClearWaypoints (int player); native void AISetMinimumBullyCount (int count, string unitType, int player); native void AISetGeneralRebuildCount (int count, bool building, int player); native void AISetSpecificRebuildCount (int count, string unitType, int player); native void AISetBullyAttackWavePercent (int percent, int player); native void AINearestTownLimitWaveGather (int player, bool enable); native void AINearestTownBullyRebuild (int player, bool enable); native void AIToggleBulliesInRegion (int player, region reg, bool activate); native void AIResetBullyRebuildCountsInRegion (int player, region reg); native void AIClearAllBullies (int player); native void AIAddBully (int player, string unitType, point loc, int rebuildCount); native string AIGetBullyType (unit u); //TacticalAI native aifilter AIFilter (int player); native void AISetFilterAlliance (aifilter filter, int want); native void AISetFilterMarker (aifilter filter, int min, int max, marker m); native void AISetFilterSelf (aifilter filter, unit exclude); native void AISetFilterBits (aifilter filter, unitfilter uf); native void AISetFilterRange (aifilter filter, unit center, fixed radius); native void AISetFilterLife (aifilter filter, fixed min, fixed max); native void AISetFilterLifeLost (aifilter filter, fixed min, fixed max); native void AISetFilterLifePercent (aifilter filter, fixed min, fixed max); native void AISetFilterLifeSortReference (aifilter filter, fixed value, fixed distance); native void AISetFilterLifeMod (aifilter filter, int type, fixed mod); native void AISetFilterLifePerMarker (aifilter filter, fixed each, marker m); native void AISetFilterShields (aifilter filter, fixed min, fixed max); native void AISetFilterPlane (aifilter filter, int plane); native void AISetFilterCanAttackEnemy (aifilter filter, int enemyGroundCount, int enemyAirCount); native void AISetFilterCanAttackAlly (aifilter filter, bool groundAllies, bool airAllies); native void AISetFilterBehaviorCount (aifilter filter, int minBehavior, int maxBehavior, string behaviorType); native unitgroup AIGetFilterGroup (aifilter filter, unitgroup group); native unitgroup AIFilterCasters (unitgroup group); native unitgroup AIFilterPathable (unitgroup group, point inStart); native unitgroup AIFilterGathering (unitgroup group, int inResource, fixed distance); native fixed AIUnitGroupStrength (unitgroup inGroup); native fixed AIAllyEnemyRatio (int player, point p, unitfilter filter, fixed range, fixed minThreshold); native bool AIIsFollowingUnit (unit aiUnit, string unitType); native int AIGetPlayerGroup (unitgroup inGroup); native bool AINearbyPlaneTest (point p, int player, fixed range, int inPlane, int inAlliance); native void AISetTacticalAttackTargetPoint (unit u, point t); native void AISetTacticalAttackTargetUnit (unit u, unit t); native order AIUnitGroupGetValidOrder(unitgroup inGroup, order inOrder, unit caster, bool forwards);
//sc2 native trigger TriggerCreate (string s); native void TriggerDestroy (trigger t); native void TriggerExecute (trigger t, bool testConds, bool runActions); native void TriggerAddEventMapInit (trigger t);
Small code featuring Pointint __stdcall Point(int x, int y) { galaxyPoint *p; p = sub_B35410(32); if (p) { sub_AA3160(p, 11, 0); //This is a __thiscall, so it would prolly look like this in normal code: "p->sub_AA3160(11, 0);" p->field_0 = &off_137892C; p->field_C = 0; p->field_10 = 0; p->field_14 = 0; p->field_18 = 0; p->field_1C = 0; } else { p = 0; } p->field_10 = x; p->field_14 = y; return p->field_8; }
|