Class RetoldFunctions

java.lang.Object
RetoldFunctions

public class RetoldFunctions extends Object
AoM Retold Code Reference.
Version:
30/12/2024 (Update in progress)
Author:
JeHathor
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    ability(int abilityID, int unitID)
    Abilities use.
    void
    Abort the current cinematic.
    void
    Abort the current cinematic.
    float
    abs(float x)
    Returns the absolute value of x as a float.
    float
    acos(float x)
    Returns the arccosine of x.
    void
    Set the photo screen window as current active window.
    int
    Adds a category with the provided categoryName to the AI Debug Output window, must be a unique name.
    void
    aiAddToResourceBreakdown(int resourceID, int resourceSubTypeID, int numberPlans, int planPriority, float percentage, int baseID, int[] numNeeded, int[] numWanted, int[] numMax, int[] kbResourceIDs)
    Increments an existing breakdown.
    void
    aiAttemptResign(int promptType)
    Asks the player if its ok to resign.
    void
    aiBreakpointGo(int playerID)
    Restart XS execution after the current breakpoint.
    void
    aiBreakpointSet(int playerID, String filename, int lineNumber, boolean on)
    Sets a breakpoint.
    void
    aiBuyResourceOnMarket(int resourceID)
    Buys 100 of the given resource.
    boolean
    aiCanUseAbility(int unitID, int protoPowerID)
    Checks whether an unit can use the ability associated with the proto power.
    boolean
    aiCastGodPowerAtDualPosition(int protoPowerID, Vector position1, Vector position2)
    Casts the given God power at the specified 2 positions.
    boolean
    aiCastGodPowerAtPosition(int protoPowerID, Vector position, boolean setAsQueued)
    Casts the given God power at the specified position.
    boolean
    aiCastGodPowerAtUnit(int protoPowerID, int unitID, boolean setAsQueued)
    Casts the given God power at the specified unit.
    void
    aiChat(int playerID, String chatString)
    CP AI chat to playerID.
    void
    aiCommsAllowChat(boolean enable)
    Enables or disables the chats from this ai player.
    int
    Get sending player for specified taunt.
    int
    Get the player ID of a given statement.
    Get the position of a given statement.
    int
    Get the prompt type of a given statement.
    int
    aiCommsGetTauntCode(int tauntID)
    Get code for specified taunt.
    void
    aiCommsSendStatement(int targetPlayerID, int promptType)
    Sends a statement to the designated player.
    void
    aiCommsSendStatementWithVector(int targetPlayerID, int promptType, Vector position)
    Sends a statement to the designated player; Adds a location flare.
    void
    aiCommsSetEventHandler(String handlerFunctionName)
    Sets the handler for the communications system (invalid name unsets the handler).
    void
    Toggles whether the ai gatherer distribution window is up, refreshing if first showing.
    void
    Shows the ai debug menu with new data.
    void
    Toggles whether the ai debug menu is up, refreshing if first showing.
    void
    Toggles whether the ai output window is up, refreshing if first showing.
    void
    Toggles whether the ai pop distribution window is up, refreshing if first showing.
    void
    Toggles the showing of area danger ratings.
    void
    Toggles the display of bases.
    void
    Toggles the display of extra area debug information.
    void
    Toggles the display of selected plans.
    void
    Toggles the display of all plans.
    void
    Toggles whether the kb timed stats window is up, refreshing if first showing.
    void
    Toggles the showing of Building placement value text.
    void
    Toggles the showing of engine info echoes.
    void
    Toggles the showing of warning echoes.
    void
    aiEcho(String text)
    Adds this text to the AI Debug Output window in the "All" category.
    void
    Adds this text to the AI Debug Output window in the "All" category and in the provided categoryIndex.
    void
    Adds this text to the AI Debug Output window in the "All" and "Warnings" categories; Additionally prefixes the message with "WARNING:".
    void
    Opens up an error window with the text.
    void
    Opens up an error window with the text belonging to the stringID.
    int
    aiGetAgeUpListByIndex(int age, int index)
    Gets the index-th Minor God avaiable for Age X.
    int
    Gets the number of Minor Gods avaiable for Age X.
    boolean
    Returns allow buildings on/off.
    float
    Returns the attack response distance.
    int
    Returns the available economy pop.
    int
    Returns the scriptdefined military pop.
    int
    Returns the available naval economy pop.
    int
    Returns the scriptdefined naval military pop.
    int
    Returns the current economy pop.
    int
    Returns the current military pop.
    int
    Returns the current naval economy pop.
    int
    Returns the current naval military pop.
    int
    Returns the scriptdefined economy pop.
    float
    Gets the ais Explore Danger Threshold value.
    int
    Gets the next time when the unit distribution will be updated.
    int
    aiGetMaxAge(int playerID)
    Returns the maximum age for the given player.
    int
    Gets micro management flags.
    int
    Returns the scriptdefined military pop.
    float[]
    aiGetMinimumFutureNeedsCost(int escrowID, int planPriority)
    Returns the minimum future costs of all plans with higher priority than planPriority.
    float
    aiGetMinimumFutureNeedsCostPerResource(int escrowID, int planPriority, int resourceID)
    Returns the minimum future cost of all plans with higher priority than planPriority on the given resource; Difference with aiPlanGetFutureNeedsCostPerResource is that the train plans only return the cost of 1 unit.
    int
    Returns the scriptdefined most hated naval player ID.
    int
    Returns the scriptdefined most hated player ID.
    int
    Returns the scriptdefined naval economy pop.
    int
    Returns the scriptdefined naval military pop.
    int
    Returns the next time when the gatherer distribution will be updated.
    int
    aiGetNumberGatherers(int gathererPUID, int resourceID, int resourceSubType, int resourcePUID)
    Iterates through all gather plans; Optionally filters out plans based on the given resourceID and resourceSubType (must provide resourceID in order to use resourceSubType); If not provided just takes all gather plans; Optionally filters on the resourcePUID to look for specific resources; Likecutting from a specific Tree PU if desired; Returnshow many of gathererPUID the plans combined have.
    int
    Gets the limit for how many Outposts the AI can build.
    int
    aiGetResourceBreakdownID(int resourceID, int resourceSubTypeID, int baseID)
    Gets breakdown id.
    int
    aiGetResourceBreakdownNumberPlans(int resourceID, int resourceSubTypeID, int baseID)
    Gets the number of plans for the given breakdown.
    float
    aiGetResourceBreakdownPercentage(int resourceID, int resourceSubTypeID, int baseID)
    Gets the percentage for the given breakdown.
    int
    aiGetResourceBreakdownPlanPriority(int resourceID, int resourceSubTypeID, int baseID)
    Gets the priority of the plans for the given breakdown.
    float
    aiGetResourcePercentage(int resourceID)
    Returns the resource percentage for the given resource.
    int
    Gets the next time when the unassigned units assigment gets updated.
    aiGetWorldDifficultyName(int difficulty)
    Returns the name of the difficulty.
    void
    Normalizes all of the resource percentages to 1.0.
    int
    aiNumberUnassignedUnits(int unitTypeID)
    Returns the number of unassigned units of the given type, must provide a unitTypeID or it wont work.
    boolean
    aiPlanAddUnit(int planID, int unitID, boolean loan)
    Adds the unit to the plan; If the unit is currently in a plan that the provided planID is a child of then the unit will automatically be loaned; If loan is true then this will attempt to loan the unit to the new plan; If we end up loaning via either of the 2 ways described earlier, then you dont need to manually call aiPlanAddUnitType, it's automatically done for the unit; If this unit is currently part of a child plan it will be removed from the child + parent automatically.
    void
    aiPlanAddUnitType(int planID, int unitTypeID, int numberNeed, int numberWant, int numberMax, boolean relative, boolean popImmediately)
    Adds a unit type to the plan, you MUST do this before assigning any unit or the plan wont allow them to be assigned; If relative is set to false these new numbers wont be added onto the previous numbers, but will overwrite the previous numbers instead; If popImmediately is set it will instantly remove any units from the plan that may now be excessive; (if you lowered the numbers).
    void
    aiPlanAddUserVariableBool(int planID, int variableIndex, String name, int numberValues)
    Adds a bool variable to the plan.
    void
    aiPlanAddUserVariableFloat(int planID, int variableIndex, String name, int numberValues)
    Adds a float variable to the plan.
    void
    aiPlanAddUserVariableInt(int planID, int variableIndex, String name, int numberValues)
    Adds an int variable to the plan.
    void
    aiPlanAddUserVariableString(int planID, int variableIndex, String name, int numberValues)
    Adds a string variable to the plan.
    void
    aiPlanAddUserVariableVector(int planID, int variableIndex, String name, int numberValues)
    Adds a vector variable to the plan.
    void
    aiPlanAddWaypoint(int planID, Vector waypoint)
    Adds the waypoint to the given plan.
    int
    aiPlanCreate(String planName, int type, int parentPlanID, int outputCategoryID)
    Creates a plan with the name and type, assigns it as a child of parentPlanID if provided; outputCategoryID sets the channel it outputs to.
    void
    aiPlanDestroy(int planID)
    Sets the destroy flag on the plan assigned to the planID; This wont notify any potential parent plans.
    void
    Sets the destroy flag on the plan assigned to the planID; This wont notify any potential parent plans.
    int
    aiPlanGetActiveCount(boolean ignoreChildPlans)
    Returns the number of active plans.
    int
    aiPlanGetBaseID(int planID)
    Return the baseID of the given plan.
    int
    aiPlanGetChildIDByIndex(int planID, int index)
    Returns the planID of the child plan at the given index, use in combination with aiPlanGetNumberChildren to know how many indexes there are.
    int
    aiPlanGetCurrentPopulation(int planID, int unitTypeID, boolean countLoans)
    Returns how much population the units in the plan are currently taking up; If unitTypeID is set to -1 it will count all units; If countLoans is set to true it will also return loaned out units.
    float[]
    Returns the future costs of the plan.
    float
    aiPlanGetFutureNeedsCostPerResource(int planID, int resourceID)
    Returns the future cost of the plan on the given resource; Build plans return the cost for their buildings; Research plans return the cost of their upgrades, but only if they have a valid research building alive; Train plans return the cost for the units it can train within the next 30 seconds.
    int
    aiPlanGetIDByActiveIndex(int activeIndex, boolean ignoreChildPlans)
    Iterates over all the active plans and returns the planID at the given index; Use in combination with aiPlanGetActiveCount to know how many indexes there are.
    int
    aiPlanGetIDByName(String searchStr, boolean subString)
    Returns the ID of the plan with the exact searchStr name; If subString is true it will return the first plan that has the searchStr in its name.
    int
    aiPlanGetIDByTypeAndState(int planType, int planState, int index)
    Iterates over all the plans matching the parameters and returns the planID at the given index; Use in combination with aiPlanGetNumberByTypeAndState to know how many indexes there are.
    int
    aiPlanGetIDByTypeAndVariableIntValue(int planType, int varIndex, int variableValue, int index)
    Iterates over all the plans matching the parameters and returns the planID at the given index.
    int
    aiPlanGetIDByTypeIndex(int planType, int index)
    Iterates over all the plans matching the parameters and returns the planID at the given index; Use in combination with aiPlanGetNumberByType to know how many indexes there are.
    int[]
    aiPlanGetIDsByType(int planType)
    Returns plan IDs with the given parameters.
    int[]
    aiPlanGetIDsByTypeAndState(int planType, int planState)
    Returns plan IDs with the given parameters.
    int[]
    aiPlanGetIDsByTypeAndVariableBoolValue(int planType, int varType, boolean variableValue)
    Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    int[]
    aiPlanGetIDsByTypeAndVariableFloatValue(int planType, int varType, float variableValue)
    Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    int[]
    aiPlanGetIDsByTypeAndVariableIntValue(int planType, int varType, int variableValue)
    Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    int[]
    aiPlanGetIDsByTypeAndVariableStringValue(int planType, int varType, String variableValue)
    Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    int[]
    aiPlanGetIDsByTypeAndVariableVectorValue(int planType, int varType, Vector variableValue)
    Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    Returns the initial positon that was set for this plan.
    boolean
    aiPlanGetIsIDValid(int planID)
    Returns if the planID is valid.
    aiPlanGetLocation(int planID, boolean firstUnit)
    Returns the location for this plan, which is the average position of all units; If firstUnit is true it will return the position of the unit at index 0 instead.
    aiPlanGetName(int planID)
    Returns the name of the given plan.
    int
    aiPlanGetNumberByType(int planType)
    Returns the number of matching plans.
    int
    aiPlanGetNumberByTypeAndState(int planType, int planState)
    Returns the number of matching plans.
    int
    aiPlanGetNumberByTypeAndVariableIntValue(int planType, int varIndex, int variableValue)
    Returns the number of matching plans.
    int
    Gets the number of child plans the planID has.
    int
    aiPlanGetNumberMaxUnits(int planID, int unitTypeID)
    Returns the number of max units for the given plan.
    int
    aiPlanGetNumberNeededUnits(int planID, int unitTypeID)
    Returns the number of needed units for the given plan.
    int
    aiPlanGetNumberUnits(int planID, int unitTypeID, boolean countLoans)
    Returns the number of unitTypeID units currently assigned to the given plan; If unitTypeID is set to -1 it will instead just return an unfiltered total; If countLoans is set to true it will count loaned out units.
    int
    aiPlanGetNumberUserVariableValues(int planID, int variableIndex)
    Returns the number of values that can be set for the variableIndex.
    int
    aiPlanGetNumberVariableValues(int planID, int variableIndex)
    Returns the number of values that can be set for the variableIndex.
    int
    aiPlanGetNumberWantedUnits(int planID, int unitTypeID)
    Returns the number of wanted units for the given plan.
    int
    aiPlanGetParentID(int planID)
    Returns the parentID of the given plan.
    int
    aiPlanGetPriority(int planID)
    Returns the priority of the given plan.
    int
    aiPlanGetState(int planID)
    Returns the state of the given plan.
    int
    aiPlanGetType(int planID)
    Returns the type of the given plan.
    float
    aiPlanGetUnitCost(int planID, boolean considerHitPoints)
    Returns the total aiCost of the given plans units, weighted for HP if requested; This cost is calculated using values set via kbSetAICostWeight.
    int
    aiPlanGetUnitIDByIndex(int planID, int index)
    Iterates over all the units in the plan and returns the unitID at the given index; Use in combination with an unfiltered aiPlanGetNumberUnits to know how many indexes there are.
    int[]
    aiPlanGetUnits(int planID, int unitTypeID, boolean countLoans)
    Returns the units of unitTypeID currently assigned to the given plan; If unitTypeID is set to -1 it will instead just return all units; If countLoans is set to true it will also return loaned out units.
    int
    aiPlanGetUnitStance(int planID)
    Return the unit stance of the given plan.
    int[]
    aiPlanGetUnitTypes(int planID)
    Returns the unit types assigned to the given plan.
    boolean
    aiPlanGetUserVariableBool(int planID, int variableIndex, int valueIndex)
    Returns the bool that is associated with the given valueIndex of the variableIndex.
    float
    aiPlanGetUserVariableFloat(int planID, int variableIndex, int valueIndex)
    Returns the float that is associated with the valueIndex of the variableIndex.
    int
    aiPlanGetUserVariableInt(int planID, int variableIndex, int valueIndex)
    Returns the int that is associated with the valueIndex of the variableIndex.
    aiPlanGetUserVariableString(int planID, int variableIndex, int valueIndex)
    Returns the string that is associated with the given valueIndex of the variableIndex.
    aiPlanGetUserVariableVector(int planID, int variableIndex, int valueIndex)
    Returns the vector that is associated with the valueIndex of the variableIndex.
    boolean
    aiPlanGetVariableBool(int planID, int variableIndex, int valueIndex)
    Returns the bool that is associated with the valueIndex of the variableIndex.
    float
    aiPlanGetVariableFloat(int planID, int variableIndex, int valueIndex)
    Returns the float that is associated with the valueIndex of the variableIndex.
    int
    aiPlanGetVariableInt(int planID, int variableIndex, int valueIndex)
    Returns the int that is associated with the valueIndex of the variableIndex.
    aiPlanGetVariableString(int planID, int variableIndex, int valueIndex)
    Returns the string that is associated with the valueIndex of the variableIndex.
    aiPlanGetVariableVector(int planID, int variableIndex, int valueIndex)
    Returns the vector that is associated with the valueIndex of the variableIndex.
    boolean
    aiPlanIsFlagSet(int planID, int flag)
    Gets if the flag for the plan is set to true.
    void
    aiPlanRemoveParent(int planID)
    Removes the parent plan of the given plan.
    void
    aiPlanRemoveUnit(int planID, int unitID)
    Removes the unit from the plan.
    void
    aiPlanRemoveUserVariable(int planID, int variableIndex)
    Removes the user variable at the variableIndex.
    void
    Removes all of the user variables from the plan.
    void
    aiPlanRemoveUserVariableValue(int planID, int variableIndex, int valueIndex)
    Removas the valueIndex for the variableIndex; Note here that this is a completely removal and the number of values will decrease too.
    void
    aiPlanRemoveVariableValue(int planID, int variableIndex, int valueIndex)
    Removes the valueIndex for the variableIndex; Note here that this is a completely removal and the number of values will decrease too.
    void
    aiPlanSetBaseID(int planID, int baseID)
    Sets the baseID for the given plan.
    void
    aiPlanSetEventHandler(int planID, int eventType, String handlerName)
    Connect an XS function (handlerName) to a plan + eventType; All plan events can be found in the constants, cPlanEventStateChange is the best way to keep track of the entire lifecycle of a plan.
    void
    aiPlanSetFlag(int planID, int flag, boolean state)
    Sets the flag for the plan to the state.
    void
    aiPlanSetInitialPosition(int planID, Vector position)
    Sets the initial positon for this plan.
    void
    aiPlanSetName(int planID, String name)
    Sets the name of the plan.
    void
    aiPlanSetNumberUserVariableValues(int planID, int variableIndex, int numberValues, boolean clearCurrentValues)
    Sets the number of possible values for the variableIndex.
    void
    aiPlanSetNumberVariableValues(int planID, int variableIndex, int numberValues, boolean clearCurrentValues)
    Sets the number of possible values for the variableIndex.
    void
    aiPlanSetParentID(int planID, int parentPlanID, boolean persistentChild)
    Sets the parent plan of the given plan; If persistentChild is true the child plan will not be destroyed upon parent plan state change, unless that parent disallows persistent children too.
    void
    aiPlanSetPriority(int planID, int priority)
    Sets the priority of the plan.
    void
    aiPlanSetState(int planID, int planState)
    Sets the plan state, cPlanState constants.
    void
    aiPlanSetUnitStance(int planID, int stance)
    Sets unit stance for the given plan.
    void
    aiPlanSetUserVariableBool(int planID, int variableIndex, int valueIndex, boolean value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetUserVariableFloat(int planID, int variableIndex, int valueIndex, float value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetUserVariableInt(int planID, int variableIndex, int valueIndex, int value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetUserVariableString(int planID, int variableIndex, int valueIndex, String value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetUserVariableVector(int planID, int variableIndex, int valueIndex, Vector value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetVariableBool(int planID, int variableIndex, int valueIndex, boolean value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetVariableFloat(int planID, int variableIndex, int valueIndex, float value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetVariableInt(int planID, int variableIndex, int valueIndex, int value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetVariableString(int planID, int variableIndex, int valueIndex, String value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetVariableVector(int planID, int variableIndex, int valueIndex, Vector value)
    Sets the contents of the valueIndex of the variableIndex to the value.
    void
    aiPlanSetWaypoints(int planID, int pathID)
    Sets the waypoints of the given plan to the waypoints of the given path.
    void
    Call this to make the AI fill out what Minor Gods are available.
    boolean
    aiPrePurchaseGodPower(int protoPowerID, int numUses)
    Prepurchases the specified number of uses of the given God Power.
    Returns a random location guaranteed to be on the map.
    void
    aiRemoveResourceBreakdown(int resourceID, int resourceSubTypeID, int baseID)
    Removes the given breakdown.
    void
    Resigns this player.
    boolean
    aiResourceIsLocked(int resourceID)
    Returns if the resource is locked.
    void
    aiResourceLock(int resourceID)
    Prevent a resource from being spent by the AI.
    void
    aiResourceUnlock(int resourceID)
    Allow a resource to be spent by the AI.
    void
    aiSellResourceOnMarket(int resourceID)
    Sells 100 of the given resource.
    void
    No description.
    void
    No description.
    void
    No description.
    void
    Sets allow buildings on/off.
    void
    Set the attack response distance.
    void
    The AI automatically ungarrisons units from buildings if theyre not in a garrison plan; Setting this to false turns off that behavior.
    void
    aiSetDefaultStance(int defaultStance)
    Sets your default stance for all of your units.
    void
    Set the scriptdefined economy pop.
    void
    Turns escrow system on/off, Chairon has this off.
    void
    Sets the ais Explore Danger Threshold value.
    void
    Sets the next time that the unit distribution is updated.
    void
    aiSetHandler(String handlerName, int type)
    Connect an XS function (handlerName) to a handler; All handlers can be found in the constants under "XS AI handler type constants".
    void
    aiSetMicroFlags(int flags)
    Sets micro management flags.
    void
    If this is set to true then all the military gather points (all bases with a Town Center create one) will block all building placement checks; These points will be shown as if another BP already claimed the spot; This defaults to true; If this is false then aiSetMilitaryGatherPointBlocksDropsites/Walls dont do anything anymore.
    void
    If this is set to true then all the military gather points (all bases with a Town Center create one) will not block dropsite building placements; This can be false and aiSetMilitaryGatherPointBlocksBP true, causing dropsites to still be eligible to be built on military gather points, this is also the default setup.
    void
    If this is set to true then all the military gather points (all bases with a Town Center create one) will not block wall building placements; This can be false and aiSetMilitaryGatherPointBlocksBP true, causing walls to still be eligible to be built on military gather points, this is also the default setup.
    void
    Set the scriptdefined military pop.
    void
    Sets the scriptdefined most hated naval player ID.
    void
    Sets the scriptdefined most hated player ID.
    void
    Set the scriptdefined naval economy pop.
    void
    Set the scriptdefined naval military pop.
    void
    Sets the next time that the gatherer distribution is updated.
    void
    aiSetOutpostLimit(int limit)
    Sets the limit for how many Outposts the AI can build.
    void
    aiSetResourceBreakdown(int resourceID, int resourceSubTypeID, int numberPlans, int planPriority, float percentage, int baseID, int[] numNeeded, int[] numWanted, int[] numMax, int[] kbResourceIDs)
    Sets a subtype breakdown for a resource.
    void
    aiSetResourcePercentage(int resourceID, boolean normalize, float percentage)
    Sets the resource percentage for the given resource (if normalized is true, the percentages will be normalized to 1.0).
    void
    Sets the next time that the unassigned unit assigment is updated.
    void
    aiSwitchMainBase(int newBaseID)
    Switch the newBaseID to be the main base.
    boolean
    aiTaskBuildUnit(int unitID, int buildingTypeID, Vector position, boolean queue, int heading)
    Does a lightweight (no plan) build tasking of the given unit to build the given building.
    boolean
    aiTaskBuildUnits(int[] unitIDs, int buildingTypeID, Vector position, boolean queue, int heading)
    Does a lightweight (no plan) build tasking of given units to build the given building.
    boolean
    aiTaskCancelUnit(int unitID, int actionID)
    Does a lightweight (no plan) cancel tasking of the given unit for the given action.
    boolean
    aiTaskDeleteUnit(int unitID)
    Deletes the given unit.
    boolean
    aiTaskDeleteUnits(int[] unitIDs)
    Deletes given units.
    boolean
    aiTaskGarrisonUnit(int unitID, int targetID)
    Does a lightweight (no plan) garrison tasking of the given unit for the given target ID.
    boolean
    aiTaskGarrisonUnits(int[] unitIDs, int targetID)
    Does a lightweight (no plan) garrison tasking of given units for the given target ID.
    boolean
    aiTaskMoveUnit(int unitID, Vector position, boolean queue)
    Does a lightweight (no plan) move tasking of the given unit to the given location.
    boolean
    aiTaskMoveUnits(int[] unitIDs, Vector position, boolean queue)
    Does a lightweight (no plan) move tasking of given units to the given location.
    boolean
    aiTaskResearchUnit(int unitID, int techID)
    Does a lightweight (no plan) research tasking of the given unit for the given tech ID.
    boolean
    aiTaskSpecialPowerUnit(int unitID, int powerID, int targetID, Vector position, boolean setAsQueued)
    Does a lightweight (no plan) research tasking of the given unit for the given special power.
    boolean
    aiTaskStopUnit(int unitID)
    Does a lightweight (no plan) stopping of the unit.
    boolean
    aiTaskStopUnits(int[] unitIDs)
    Does a lightweight (no plan) stopping of the units.
    boolean
    aiTaskTrainUnit(int unitID, int unitTypeID)
    Does a lightweight (no plan) train tasking of the given unit for the given target unit type.
    boolean
    aiTaskUngarrisonUnit(int unitID, Vector position)
    Does a lightweight (no plan) ungarrison tasking of the given unit for the given position.
    boolean
    aiTaskUngarrisonUnits(int[] unitIDs, Vector position)
    Does a lightweight (no plan) ungarrison tasking of given units for the given position.
    boolean
    aiTaskWorkUnit(int unitID, int targetUnitID, boolean queue)
    Does a lightweight (no plan) work tasking of the given unit on the given target unit.
    boolean
    aiTaskWorkUnits(int[] unitIDs, int targetUnitID, boolean queue)
    Does a lightweight (no plan) work tasking of given units on the given target unit.
    void
    aiTransformWallIntoGate(int wallLongID)
    Transforms the given wallLongID into a gate.
    void
    aiTribute(int playerID, int resourceID, float amount)
    Tributes the given player.
    void
    aiUnitAddForbiddenPlanID(int unitID, int planID)
    Adds the provided planID to the unitIDs forbidden plan list.
    void
    Returns an array of planIDs that the provided unitID is currently banned from.
    void
    aiUnitSetRallyPointToPosition(int sourceUnitID, Vector position)
    Sets the economic rally point of the given unit to the given position.
    void
    aiUnitSetRallyPointToUnit(int sourceUnitID, int targetUnitID)
    Sets the military rally point of the given sourceUnitID to the given targetUnitID.
    void
    aiUnitSetStance(int unitID, int stance)
    Sets the stance for the given unit.
    void
    aiUpdateFullUnitAssignment(boolean allowPlanTransfer)
    Reassigns units to plans and removes them if needed.
    void
    Realigns all resources in the world to tile boundaries.
    void
    Realigns all selected units to tile boundaries.
    void
    Applies a Lighting set.
    float
    asin(float x)
    Returns the arcsine of x.
    float
    atan(float x)
    Returns the arctangent of x.
    float
    atan2(float y, float x)
    Returns the 2-argument arctangent.
    void
    autoAbility(int abilityID, boolean isAutoCasted)
    Abilities use.
    void
    Saves out autosave file - specifies that file write step should be done async.
    void
    Tries to auto train the selected unit type in any valid selected unit.
    void
    autoTrainInSelectedByID(int protoType)
    Just like autoTrainInSelected, but faster because it takes a.
    void
    Enters the benchmark.
    void
    brushCircularSize(float newSize)
    Sets the circular brush size.
    void
    brushSize(int size)
    Sets brush size.
    void
    cameraBackward(int keyState)
    Intended for ui use only; Indicates that camera backward key has gone up or down.
    void
    cameraDown(int keyState)
    Intended for ui use only; Indicates that camera down key has gone up or down.
    void
    Debug command to spew info about the current state of the game camera.
    void
    cameraForward(int keyState)
    Intended for ui use only; Indicates that camera forward key has gone up or down.
    void
    Returns the camera to the home position.
    void
    cameraLeft(int keyState)
    Intended for ui use only; Indicates that camera left key has gone up or down.
    void
    cameraLimit(int arg)
    Sets whether camera limiting is on.
    void
    cameraLocalYawLeft(int keyState)
    Intended for ui use only; Indicates that camera Local Yaw left key has gone up or down.
    void
    cameraLocalYawRight(int keyState)
    Intended for ui use only; Indicates that camera Local Yaw right key has gone up or down.
    void
    cameraMaxZoomSet(float zoom)
    Sets the current world camera Zoom to the given value.
    void
    cameraMinZoomSet(float zoom)
    Sets the current world camera minimum Zoom to the given value.
    void
    cameraMove(int keyState)
    Intended for ui use only; Indicates that camera move key has gone up or down.
    void
    Puts the camera in a reasonable orientation.
    void
    cameraPitchAngle(float angle)
    Resets world camera orientation and sets pitch to the given angle.
    void
    cameraPitchBackward(int keyState)
    Intended for ui use only; Indicates that camera pitch backward key has gone up or down.
    void
    cameraPitchForward(int keyState)
    Intended for ui use only; Indicates that camera pitch forward key has gone up or down.
    void
    Resets current world camera pitch to defaults, without affecting zoom or rotation.
    void
    cameraRight(int keyState)
    Intended for ui use only; Indicates that camera right key has gone up or down.
    void
    cameraRollLeft(int keyState)
    Intended for ui use only; Indicates that camera roll left key has gone up or down.
    void
    cameraRollRight(int keyState)
    Intended for ui use only; Indicates that camera roll right key has gone up or down.
    void
    cameraRotate(int arg)
    Sets whether camera limiting is on.
    void
    Resets current world camera rotation to defaults, without affecting zoom or pitch.
    void
    cameraSetRotationAngle(float degrees)
    Rotates the current world camera, without affecting zoom or pitch.
    void
    cameraStart(int playerID)
    If applicable, sets the camera to the starting view of the given player, or the active player, in case no player ID is given.
    void
    cameraUp(int keyState)
    Intended for ui use only; Indicates that camera up key has gone up or down.
    void
    cameraWorldBackward(int keyState)
    Intended for ui use only; Indicates that camera world backward key has gone up or down.
    void
    Intended for ui use only; Indicates that camera world backward left key has gone up or down.
    void
    Intended for ui use only; Indicates that camera world backward right key has gone up or down.
    void
    cameraWorldForward(int keyState)
    Intended for ui use only; Indicates that camera world forward key has gone up or down.
    void
    cameraWorldForwardLeft(int keyState)
    Intended for ui use only; Indicates that camera world forward left key has gone up or down.
    void
    Intended for ui use only; Indicates that camera world forward right key has gone up or down.
    void
    cameraXAxis(float axisValue)
    Intended for ui use only; Indicates the X position of the axis that controls the camera.
    void
    cameraYawLeft(int keyState)
    Intended for ui use only; Indicates that camera yaw left key has gone up or down.
    void
    cameraYawRight(int keyState)
    Intended for ui use only; Indicates that camera yaw right key has gone up or down.
    void
    cameraYAxis(float axisValue)
    Intended for ui use only; Indicates the Y position of the axis that controls the camera.
    void
    cameraZoomAxis(float axisValue)
    Intended for ui use only; Indicates the position of the axis that controls zoom level.
    void
    Resets current world camera Zoom to defaults.
    void
    Cancel all queued units and researches in all valid selected units.
    void
    cancelAutoTrainInAllOfType(String unitType, boolean checkOnScreen)
    Switches off all autotrain entries in all valid buildings of the given.
    void
    Switches off all autotrain entries in all valid selected units.
    void
    cancelRepairUnit(int unitID)
    Cancels the auto repair on the specified unit.
    void
    Cancel researching of a tech in any valid selected unit.
    void
    cancelTrainInSelected(int protoID, boolean all)
    Cancel training of a unit type in any valid selected unit.
    void
    Cancel training of a reinforcement.
    void
    castGodPower(String godPower)
    Casts a power.
    void
    castGodPowerAtSlot(int slotID)
    Casts the god power at the given UI slot.
    float
    ceil(float x)
    Rounds x up to the next higher integer and returns it as a float.
    void
    chat(String text, int playernum)
    Adds a line of chat text from the given player (current if not provided).
    float
    clamp(float val, float minVal, float maxVal)
    Clamps a value to the provided interval.
    void
    Plays the default UI click sound.
    void
    closeFlareType(int keystate)
    Close menu to change Flare Type.
    void
    commandResearch(int commandID, int unitID)
    Researches the given command from the given unit.
    void
    Researches a protounit command associated with a tech in current unit selection.
    void
    Researches the transform command set in protoUnit data for each unit in current unit selection.
    void
    Researches the transform command set in protoUnit data for each civilian in current unit selection, when applicable.
    void
    commandTransformVillagerLimited(int numberToTransform)
    Researches the transform command set in protoUnit data for a number of civilians set by the integer parameter, or all of them if the parameter is -1.
    void
    config(String token)
    Changes config state just like a .cfg line.
    void
    Defines a config variable.
    void
    configSet(String name, String value)
    Sets a particular config var to a string value.
    void
    configSetFloat(String name, float value)
    Sets a config var to a floating point value.
    void
    configSetInt(String name, int value)
    Sets a config var to an integer value.
    void
    Defined var becomes undefined, and vice versa.
    void
    Undefines a config variable.
    void
    Toggles the state of the console dialog.
    void
    Cheap hack to allow loading of a file one frame after logic.
    float
    cos(float x)
    Returns the cosine of .
    float
    degToRad(float degrees)
    Converts an angle from degrees to radians.
    void
    deleteUnit(int unitID)
    Deletes the given unit.
    void
    displayType(int val)
    With no arg, cycles through the various status display modes; Otherwise sets display type.
    void
    doAbilityInSelected(String protoPowerName)
    Use ability in current unit selection.
    void
    doAbilityInType(String protoPowerName, String protoUnitName)
    Use ability in proto unit type if the player has one.
    void
    doCommandInSelected(String commandName, int unitID)
    Use command in current unit selection.
    void
    doCommandInSelected2(String commandName, int unitID)
    Use command in current unit selection.
    boolean
    doMPSetup(boolean useESO, boolean useRelicLink)
    Enter BMultiplayer setup.
    void
    Enter Single player setup for deathmatch.
    void
    Enter Single player setup for skirmish.
    void
    Load some triggers.
    void
    Drop back to the main menu.
    void
    echo(String text)
    Sends a message to the console output echoLocalized Syscall config error.
    void
    echoLocalized(int StringID)
    Sets the game status text from a string in the string resource.
    void
    echoNum(int num)
    Sends a number to the console output.
    void
    Starts the Economy victory if valid.
    void
    editMode(String modename)
    Changes the edit mode.
    void
    editorSetTechStatus(String techName, boolean active)
    Editor only function that activates/deactivates a given tech.
    void
    Editor only functions; goes thru all the units and updates thier visuals.
    void
    ejectAll(int unitID)
    Ejectsall units from the given unit.
    void
    TODO.
    void
    Loads a recorded game.
    void
    executeCommandOnButtonPos(int row, int column, boolean isSecondaryCommand)
    Use command in current unit selection.
    void
    executeCommandOnButtonPosAlt(int row, int column, boolean isSecondaryCommand)
    Use command in current unit selection.
    void
    exit(boolean confirmation)
    Exits the game screenshot.
    void
    Leave the current MP screen and return to the MP setup menu.
    void
    fadeToColor(int r, int g, int b, int duration, int delay, boolean inOut)
    Fade in/out using color specified.
    float
    floor(float x)
    Rounds x down to the next lower integer and returns it as a float.
    void
    fov(float newFov)
    Sets camera and renderer field of view.
    void
    gadgetFlash(String name, boolean flash)
    Turns gadget flashing on/off.
    void
    Makes real the named gadget.
    void
    Makes real the named gadget.
    void
    Refresh the contents of the named gadget.
    boolean
    Scrolls the gadget up one unit.
    boolean
    Scrolls the gadget to the left one unit.
    boolean
    Scrolls the gadget to the Right one unit.
    boolean
    Scrolls the gadget up one unit.
    void
    Toggles the reality of the named gadget.
    void
    Toggles the reality of the named gadget.
    void
    Makes unreal the named gadget.
    void
    gamepadCameraRotate(float axisValue)
    Intended for ui use only; Indicates the position of the axis that controls camera rotation.
    void
    handleCameraBackward(int keyState)
    Handle the Editor and Game UI; Indicates that camera forward key has gone up or down.
    void
    handleCameraForward(int keyState)
    Handles the Editor and Game UI; Indicates that camera forward key has gone up or down.
    void
    hideGameMenu(boolean playSound)
    Hide the ingame menu.
    void
    Hides the UI and closes the console; Press enter to reveal UI again.
    void
    holdToAbortCinematic(int keystate)
    Increment the timer that the main game screen maintains to skip the current cinematic.
    float
    hypot(float x, float y)
    Returns the hypothenuse between x and y (ie, sqrt(x^2 + y^2)).
    void
    IMEEnable(boolean enable)
    Enables or disables IME.
    void
    Toggles the ImGui version of the console.
    float
    kbAICostGetProtoUnitCost(int protoUnitTypeID)
    Returns the AI cost for the given protoUnit type ID.
    float
    kbAICostGetTechCost(int techID)
    Returns the AI cost for the given tech ID.
    float
    kbAICostGetWeight(int resourceID)
    Returns the AI cost weight for the given resource.
    boolean
    kbAICostSetWeight(int resourceID, float weight)
    Sets the weight this resource type is given during AI cost calculuations.
    boolean
    kbAreaBordersAreaID(int areaID, int borderAreaID)
    Returns true of the provided areaID borders the provided borderAreaID.
    int
    kbAreaGetBorderAreaID(int areaID, int index)
    Returns the areaID of the index-th border area in the given areaID.
    kbAreaGetCenter(int areaID)
    Returns the center of the given areaID.
    int
    kbAreaGetClosestAreaID(Vector position, int areaType, float minDistance)
    Scans from the given position for areas of the given type; Returnsthe areaID of the closest matching area; minDistance can be left undefined to set no distance at all, if defined the found areas must be within that distance; areaType MUST be defined.
    float
    kbAreaGetDangerLevel(int areaID, boolean averageInBorderAreas)
    Returns the danger rating of the given areaID; If averageInBorderAreas is defined you will get the average rating of the provided area plus its border areas.
    int
    kbAreaGetGroupID(int areaID)
    Returns the areaGroupID of the given areaID.
    int
    Returns the areaID that is located at the given position.
    boolean
    kbAreaGetIsIDValid(int areaID)
    Returns if the areaID is valid.
    int
    Returns the number of areas the KB has generated.
    int
    Returns the number of black tiles in the given areaID.
    int
    Returns the number of border areas for the given areaID.
    int
    Returns the number of fog tiles in the given areaID.
    int
    Returns the number of tiles in the given areaID.
    int
    Returns the number of units in the given areaID.
    int
    Returns the number of visible tiles in the given areaID.
    float
    Returns what percentage of tiles are either in fog or visible.
    int
    kbAreaGetType(int areaID)
    Returns the type of the given areaID, cAreaType constants.
    int
    kbAreaGetUnitID(int areaID, int index)
    Returns the unitID of the index-th unit in the given areaID.
    int
    Returns the gametime in milliseconds of the last visibility change for the given areaID; If any of the tiles change their visibility status this timer is updated.
    int
    kbAreaGroupGetAreaID(int areaGroupID, int index)
    Returns the areaID at the given index of the given areaGroupID.
    int
    kbAreaGroupGetBorderAreaGroupID(int areaGroupID, int index)
    Returns the areaGroupID of the index-th border area group in the given areaGroupID.
    kbAreaGroupGetCenter(int areaGroupID)
    Returns the center of the given areaGroupID.
    int
    Returns the areaGroupID that is located at the given position.
    boolean
    kbAreaGroupGetIsIDValid(int areaGroupID)
    Returns if the areaGroupID is valid.
    int
    Returns the number of area groups the KB has generated.
    int
    kbAreaGroupGetNumberAreas(int areaGroupID)
    Returns the number of areas of the given areaGroupID.
    int
    Returns the amount of border area groups this areaGroupID has.
    float
    kbAreaGroupGetSurfaceArea(int areaGroupID)
    Returns the surface area of the given areaGroupID.
    int
    kbAreaGroupGetType(int areaGroupID)
    Returns the type of the given areaGroupID, cAreaGroupType constants.
    int
    kbAreaGroupsBordersAreaGroupID(int areaGroupID, int borderAreaGroupID)
    Returns true of the provided areaGroupID borders the provided borderAreaGroupID.
    void
    Force updates all the areas, use with caution due to performance concerns.
    void
    kbArmyAddUnit(int armyID, int unitID)
    Adds the unitID to the given army.
    int
    kbArmyCreate(String name, boolean exclusiveUnits)
    Creates an army with the given name.
    void
    kbArmyDestroy(int armyID)
    Destroys the given army.
    int
    Returns the creation time for the given army.
    float
    Returns the current AI cost (worth) for the given army.
    float
    Returns the current total hitpoints for the given army.
    float
    kbArmyGetHealth(int armyID)
    Returns the health for the given army.
    int
    Returns the ID of the given army.
    int
    kbArmyGetIDByIndex(int index)
    Returns the index-th army ID.
    boolean
    kbArmyGetIsIDValid(int armyID)
    Return whether the armyID is valid.
    kbArmyGetLocation(int armyID)
    Returns the vector location for the given army.
    float
    Returns the maximum AI cost (worth) for the given army.
    float
    Returns the maximum total hitpoints for the given army.
    int
    Returns the creation time for the given army.
    kbArmyGetName(int armyID)
    Returns the name of the given army.
    int
    Returns the number of armies.
    int
    Returns the number of units in the given army.
    int
    kbArmyGetNumberWithHealth(int armyID, float minimumHealth)
    Returns the number of units with at least the minimum amount of health specified for the given army.
    int
    kbArmyGetNumberWithinLocation(int armyID, Vector location, float range)
    Returns the number of units within range of the given point in the given army (minimum 1.0).
    int
    kbArmyGetUnitID(int armyID, int unitNumber)
    Returns the appropriate unitID from the given army.
    void
    kbArmyRemoveUnit(int armyID, int unitID)
    Removes the unitID from the given army.
    void
    kbArmyRemoveUnitByIndex(int armyID, int unitIndex)
    Removes the unitIndex-th unit from the given army.
    void
    kbArmyRemoveUnits(int armyID)
    Removes all units from the given army.
    void
    kbAttackRouteAddPath(int routeID, int pathID, boolean addRouteStartAndTargetPoints)
    Adds the given pathID to the given routeID; If addRouteStartAndTargetPoints is true the path will be adjusted so its first waypoint is the startPoint of the route and the last waypoint is the targetPoint of the route (if they arent already); Existing waypoints wont be altered, just new ones insterted potentially.
    boolean
    TODO DOESNT WORK ATM; Creates all the paths following the provided parameters; The number of sectors equals the amount of paths generated.
    void
    kbAttackRouteDestroy(int routeID)
    Destroys the given routeID.
    int
    Returns the attack route ID with the matching name.
    int
    Returns the index-th attack route ID; Use in combination with kbAttackRouteGetNumber to know how many indexes there are; ATTENTION: this can often return -1 since destroyed attack routes are also fetched by this.
    boolean
    Returns if the provided routeID is valid.
    int
    Returns the number of attack routes the KB has saved; ATTENTION: this includes deleted attack routes.
    int
    Returns how many paths the given routeID has.
    int
    kbAttackRouteGetPathIDByIndex(int routeID, int index)
    Returns the index-th path ID of the routeID; Use in combination with kbAttackRouteGetNumberPaths to know how many indexes there are.
    void
    kbAttackRouteRemovePathByID(int routeID, int pathID)
    Removes the given pathID from the given routeID; ATTENTION: this does not delete the path, use kbPathDestroy for that.
    void
    kbBaseAddUnit(int playerID, int baseID, int unitID)
    Adds the given unit to the base.
    int
    kbBaseCreate(int playerID, String name, Vector position, float distance)
    Creates a base.
    boolean
    kbBaseDestroy(int playerID, int baseID)
    Destroys the given base.
    void
    kbBaseDestroyAll(int playerID)
    Destroys all of the bases for the given player.
    int
    kbBaseFindOrCreateResourceBase(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
    TODO.
    kbBaseGetBackVector(int playerID, int baseID)
    Gets the back vector of the base.
    float
    kbBaseGetDefenseRating(int playerID, int baseID)
    Returns the defense rating for the base.
    float
    kbBaseGetDistance(int playerID, int baseID)
    Gets distance of the base.
    kbBaseGetFrontVector(int playerID, int baseID)
    Gets the front vector of the base.
    int
    kbBaseGetIDByIndex(int playerID, int index)
    Returns the BaseID for the given base.
    boolean
    kbBaseGetIsIDValid(int playerID, int baseID)
    Returns if the base exists for the player.
    kbBaseGetLastKnownDamageLocation(int playerID, int baseID)
    Gets the last known damage location of the base.
    int
    kbBaseGetLastUnderAttackTime(int playerID, int baseID)
    Returns the time when the base was last attacked.
    kbBaseGetLocation(int playerID, int baseID)
    Gets the location of the base.
    int
    kbBaseGetMainID(int playerID)
    Gets the main base ID for the player.
    kbBaseGetMilitaryGatherPoint(int playerID, int baseID)
    Gets the military gather point of the base.
    kbBaseGetNameByID(int playerID, int baseID)
    Returns the name for the given base.
    int
    Returns the ID of the next base that will be created, can be used for base names.
    int
    kbBaseGetNumber(int playerID)
    Returns the number of bases for the given player.
    int
    kbBaseGetNumberUnitsOfType(int playerID, int baseID, int unitTypeID)
    Returns the number of units that match the unitTypeID.
    float
    kbBaseGetOffenseRating(int playerID, int baseID)
    Returns the offense rating for the base.
    int
    kbBaseGetOwner(int baseID)
    Returns the player ID of the specified bases owner.
    int
    kbBaseGetTimeUnderAttack(int playerID, int baseID)
    Returns the number of continuous seconds the base has been under attack.
    int[]
    kbBaseGetUnits(int playerID, int baseID)
    Returns the unitIDs of all the units that are in the base.
    boolean
    kbBaseIsFlagSet(int playerID, int baseID, int flag)
    Gets if the flag for the base is set to true.
    void
    kbBaseRemoveUnit(int playerID, int baseID, int unitID)
    Removes the given unit to the base.
    void
    kbBaseSetDistance(int playerID, int baseID, float newDistance)
    Sets distance of the base.
    void
    kbBaseSetFlag(int playerID, int baseID, int flag, boolean state)
    Sets the flag for the base to the state.
    void
    kbBaseSetFrontVector(int playerID, int baseID, Vector frontVector)
    Sets the front (and back) of the base.
    void
    kbBaseSetMilitaryGatherPoint(int playerID, int baseID, Vector gatherPoint)
    Sets the military gather point of the base.
    void
    kbBaseSetPositionAndDistance(int playerID, int baseID, Vector position, float distance)
    Sets position and distance of the base.
    void
    kbBuildingPlacementAddAreaID(int bpID, int areaID, int numberBorderAreaLayers, boolean addCenterInfluence)
    Puts this bpID into area PlacementType using area calculations, only one Type can be active at a time! You can call this function multiple times per bpID to add multiple areas, that's why it's called "add" and not "set"; Adds the AreaID to the bpID, addCenterInfluence adds a positional influence from the areaID center with 100 value, 30 range, and linear falloff; If numberBorderAreaLayers is 1 we loop through all our border areas and add them in the same way we did the original areaID (but no center influence); If numberBorderAreaLayers is 2 we also loop through all the newly added areas and add all their border areas too (no duplicates will be created); You can put numberBorderAreaLayers as high as you want but it will of course create the biggest placement ever.
    void
    kbBuildingPlacementAddBaseInfluence(int bpID, int baseID, int orientationPreference, float influenceValue, int falloff)
    Adds a base influence to the bpID, you can only do this AFTER setting your PlacementType; It is called BaseInfluence because of the input variables, but in the end this just adds a special position influence to the bpID; For the first step it works like any other position influence and calculates the value as normal using the commonly used parameters; But then there are 2 important/unique things: 1.
    void
    kbBuildingPlacementAddPositionInfluence(int bpID, Vector position, float value, float distance, int falloff)
    Adds the position influence for the given bpID, you can only do this AFTER setting your PlacementType; This works precisely the same as kbBuildingPlacementAddUnitInfluence(int, int, float, float, int, int, int) but instead of looking for a unit within range we just increase the value if the position is within range.
    void
    kbBuildingPlacementAddUnitInfluence(int bpID, int unitTypeID, float influenceValue, float influenceDistance, int falloff, int kbResourceID, int playerOrRelation)
    Adds a unit influence to the bpID, you can only do this AFTER setting your PlacementType; For example, the spot were analyzing is at X/Z=15; We have a unit influence for cUnitTypeHouse with 25.0 value, 5.0 distance, and linear falloff; There is a House located at X/Z=12.5, now the following happens: The House is within 5.0 distance of our spot so the unit influence will be analyzed.
    void
    Resets the given bpIDs PlacementType and influences, allowing you to configure it again without errors.
    int
    Creates a building placement with the given name (no concurrent duplicates), returns the bpID.
    void
    Destroys the bpID, freeing up its name/potential existing lot too.
    int
    Returns the bpIDs base ID, which is only set via kbBuildingPlacementSetBaseID(int, int, int).
    Returns the best results position for bpID.
    float
    Returns the best results value for bpID.
    float
    Returns the buffer space set for this bpID.
    int
    Gets the building set by kbBuildingPlacementSetBuildingPUID for the given bpID.
    boolean
    Returns whether the bpID is valid or not.
    int
    Returns the bpIDs placement type, cBuildingPlacementPlacementType constants.
    int
    Gets the socket ID set for this bpID.
    int
    Returns the bpIDs state, cBuildingPlacementPlacementState constants.
    void
    kbBuildingPlacementSetAreaGroupID(int bpID, int areaGroupID)
    Puts this bpID into area PlacementType using area calculations, only one Type can be active at a time! This resets all influences, so do this first! Adds all areas belonging to the areaGroupID to the given bpID; It also adds the center of the areas as a position influence of: 100 range, 30 value, and linear falloff.
    void
    kbBuildingPlacementSetBaseID(int bpID, int baseID, int orientationPreference)
    Puts this bpID into Base PlacementType using center position calculations, only one Type can be active at a time! This resets all influences, so do this first! Sets the base ID for this bpID which can be fetched via kbBuildingPlacementGetBaseID(int); Setting a base ID works as follows: it adds the center position of the base as the center position for the analysis.
    void
    kbBuildingPlacementSetBufferSpace(int bpID, float bufferSpace)
    Sets the bpIDs buffer space, must be = 0.0; This control the minimum distance the building will be placed away from anything else that also has obstructionDefaults to 2.0.
    void
    kbBuildingPlacementSetBuildingPUID(int bpID, int buildingTypeID)
    Sets the building that will be used during all the analysis of the given bpID; This must be a protoUnit, it cant be an abstractType.
    void
    kbBuildingPlacementSetCenterPosition(int bpID, Vector position, float distance)
    Puts this bpID into CenterPosition PlacementType, only one Type can be active at a time! This resets all influences, so do this first! Read the explanation for kbBuildingPlacementSetStepSize to learn how this works.
    void
    kbBuildingPlacementSetCheckGPExclusion(int bpID, boolean exclusion)
    Sets if the given bpID will take current GP Exclusion effects into account; Defaults to true.
    void
    kbBuildingPlacementSetDockPositions(int bpID, Vector landPosition, Vector waterPosition)
    Puts this bpID into Dock building mode with Area PlacementType using area calculations, only one Type can be active at a time! Sets the two points from which the building placement will calculate a possible Dock position; It will create a path as the crow flies between both points and must find a shoreline area on the way (the landPosition is included as the first waypoint on this path); Once it has found a shoreline area it will check all areas surrounding that specific shoreline area, and if theyre also of the type shoreline it will add them too to the list of areas to analyze; These automatically added areas have no influence added to them and dont add border areas, theyre just valid spots; The landPosition and waterPosition both get a position influence of 100 value in 100 range with linear falloff.
    void
    kbBuildingPlacementSetEventHandler(int bpID, int eventType, String handlerName)
    Sets an event handler for the bpID and event, use cBuildingPlacementEvent.
    void
    kbBuildingPlacementSetInnerRingRange(int bpID, float innerRingRange)
    In base mode every building placement has an mechanic active that prefers positions within an "inner ring" over positions in the "outer ring"; So even if a position in the outer ring has 100000 value and the position in the inner ring has 10 value the inner ring position will always be chosen; This mechanic is used to make sure we build close to the bases center wherever possible, because building too far away is potentially very bad; The default value for this is set to 37.50 on every building placement; Putting it to your bases size or above practically removes this mechanic from the placement.
    void
    kbBuildingPlacementSetLOSType(int bpID, int LOSType)
    Sets the given bpIDs LOS type; If set to cBuildingPlacementLOSNormal (default) the location must have active visibility or be under fog to be valid; If set to cBuildingPlacementFullVisible the location must have active visibility to be valid; Regardless of the mode, any spot in the blackmap is not valid.
    void
    kbBuildingPlacementSetMinimumValue(int bpID, float minimumValue)
    Sets the minimum value a spot must have to be considered valid for the provided bpID; Defaults to 0.0.
    void
    kbBuildingPlacementSetRandomness(int bpID, boolean randomness)
    Sets if the bpID will randomize the results a bit; Defaults to false; It will chose a number between -50% and +50% of the original value.
    void
    kbBuildingPlacementSetRequiresCompletelyUnobstructed(int bpID, boolean requiresCompletelyUnobstructed)
    Sets if the given BPIDs obstruction check should fail if there is any obstruction at all; Ordinarily units are ignored in this obstruction check since they can move off the foundation; But with this to true units will also cause specific spots to fail.
    void
    kbBuildingPlacementSetSocketID(int bpID, int socketID)
    Sets this bpID into Socket PlacementType, only one Type can be active at a time! Sets the bpIDs socket ID, which must be a valid unit ID.
    void
    kbBuildingPlacementSetStepSize(int bpID, float stepSize)
    Sets how big the step sizes are with which the bpID goes through the grid assigned to analyze; Default is 2.0; This is used for every placement type apart from socket; Example: You use kbBuildingPlacementSetCenterPosition(X/Z = 10.0, 5.0); This means that we will analyze all the spots between X/Z = 5.0 and X/Z = 15.0; The stepSize is used to increment X and Z until weve analyzed all spots; If we for this example take a stepSize of 5.0 we get the following: X=5, X=10, X=15 with Z remaining 5 are analyzed in the first run (we analyze one X row at a time and then increment Z).
    void
    Starts the bpIDs process of analyzing all the possible spots; Depending on the amount of spots that have to be analyzed this may take longer than a second; If this bpID is part of a build/godpower plan the plan will start it itself, and will also automatically destroy it; If were manually managing the bpID it wont be automatically started/destroyed.
    boolean
    kbCanAffordUnit(int protoUnitTypeID, int escrowID)
    Returns true if the player can afford the proto unit.
    boolean
    kbCanAreaPath(Vector pointA, Vector pointB, int movementType, float dangerThreshold, boolean allowPartialPath, int[] ignoreAreas)
    Returns true if the given area path can be made.
    boolean
    kbCanPath(Vector pointA, Vector pointB, int protoUnitTypeID, float range)
    Returns true if the given unit type can path from pointA to pointB; Only performs high level pathing (ignores moveable obstructions like units).
    kbCivGetName(int civID)
    Returns the civilization (major god) name for the given civID.
    int
    kbCreateAttackRouteWithPath(String name, Vector startPoint, Vector targetPoint, int numInitialSectors)
    Returns the Route ID if successful; Creates an attack route and automatically adds some random attack sectors based on numInitialSectors; The startPoint/targetPoint/numInitialSectors only comes into play if you call kbAttackRouteCreatePaths as well; If you just need a route to add paths to manually then you need not worry about these 3 parameters; You can give attack routes that dont have kbAttackRouteCreatePaths called to attack plans directly, as long as you added valid paths yourself.
    int
    Creates a tech progression of the given name.
    int
    Creates a unit progression of the given name.
    kbCultureGetName(int cultureID)
    Returns the culture name for the given culture.
    boolean
    kbDefaultGetProtoStatBool(int protoID, int statEnumID)
    Returns the value for the provided bool stat of a unit's proto unit.
    float
    kbDefaultGetProtoStatFloat(int protoID, int statEnumID)
    Returns the value for the provided float stat of a proto unit.
    int
    kbDefaultGetProtoStatInt(int protoID, int statEnumID)
    Returns the value for the provided integer stat of a unit's proto unit.
    kbDefaultGetProtoStatString(int protoID, int statEnumID)
    Returns the value for the provided string stat of a base proto unit.
    boolean
    Reallocates the current resource stockpile into the escrows.
    int
    kbEscrowCreate(String name, int resourceID, float percentage, int parentID)
    Creates an escrow.
    boolean
    kbEscrowDestroy(int escrowID, boolean promoteChildren)
    Destroys an escrow.
    boolean
    kbEscrowFlush(int escrowID, int resourceID, boolean flushChildren)
    Removes all credits (and puts them into the root escrow) of the given resource type from the given escrow.
    float
    kbEscrowGetAmount(int escrowID, int resourceID)
    Returns the amount of credits in the given escrow for the given resource.
    int
    Returns the ID of the named escrow.
    float
    kbEscrowGetPercentage(int escrowID, int resourceID)
    Returns the percentage of the escrow.
    boolean
    kbEscrowSetCap(int escrowID, int resourceID, float cap)
    Sets the cap of the escrow.
    boolean
    kbEscrowSetPercentage(int escrowID, int resourceID, float percentage)
    Sets the percentage of the escrow.
    int
    kbFindBestBuildingToRepair(Vector position, float distance, float healthRatio, int repairUnderAttackUnitTypeID)
    Returns the id of the best building to repair.
    int
    kbFindClosestBase(int playerID, int playerRelation, Vector location, boolean militaryBasesOnly)
    Gets the nearest base belonging to playerID OR player relation from the location; Only returns bases with the military flag set if militaryBasesOnly is defined.
    int
    kbFunctionUnitGetByIndex(int civ, int function, int index)
    Gets the function unit from the given civ and function at index.
    int
    kbFunctionUnitGetNumber(int civ, int function)
    Gets the number of function units from the given civ and function.
    float
    Returns allied trading bonus.
    float[]
    Returns the amount of resources for the given area group.
    float
    kbGetAmountValidResourcesByPosition(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
    Returns the combined resource amount of valid KB resources for the resource types.
    int
    Returns the hashed ID for a given animation name.
    boolean
    Returns the auto base creation value.
    float
    Returns the auto base creation distance.
    float
    Returns the auto base creation distance.
    boolean
    Returns the auto base detection value.
    float
    Returns the auto base creation distance.
    float
    Returns the auto base creation distance.
    float
    kbGetCombatEfficiency(int playerID1, int unitTypeID1, int playerID2, int unitTypeID2, boolean ignoreTrainCheck)
    Returns the combat efficiency of the comparison (in terms of playerID1s units).
    boolean
    Checks whether we have FFA turned on or not.
    boolean
    Returns whether this map is an island map or not; If not every land area group has a land path to every other land area group this will return true.
    boolean
    Returns if the provided location is on the map.
    int
    Returns how long a KOTH needs to be held for for the team to win, in seconds.
    Returns the center vector of the map.
    float
    Returns the X size of the map.
    float
    Returns the Z size of the map.
    float
    kbGetMarketBuyCost(int resourceID)
    Returns the gold amount required to buy 100 of the given resource.
    float
    kbGetMarketSellReward(int resourceID)
    Returns the gold amount received for selling 100 of the given resource.
    int
    Returns the number of mutual allies.
    int
    kbGetNumberResourceGatherers(int playerID, String resourceName)
    Gets the number of gatherers of a resource for the given player.
    int
    kbGetNumberUnitTypeKilled(String unitTypeName, int playerID)
    Gets the number of units killed of the given unitType.
    int
    kbGetNumberValidResourcesByPosition(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
    Returns the number of valid KB resources matching the parameters.
    int
    kbGetPopulationSlotsByUnitTypeID(int unitTypeID, int playerID)
    Returns the number of pop slots currently occupied by this unit type.
    int
    Returns the ID of a random unit among the living units on the map, belonging to any player, including Mother Nature units.
    float
    kbGetResourceAmount(int playerID, int resourceID)
    Gets current amount of the given resource.
    int
    Returns the resource ID.
    Returns the resource name.
    float
    kbGetResourceSelectorFactor(int type, int resourceType)
    Gets the ResourceSelector Factor value.
    float
    kbGetStatValueFloat(int playerID, int statTypeID, int param)
    Gets the value of a given KB Stat as float.
    int
    kbGetStatValueInt(int playerID, int statTypeID, int param)
    Gets the value of any given KB Stat as integer.
    float
    kbGetTotalResourceAmount(int playerID, int resourceID)
    Gets total amount of given resource so far.
    int
    Returns the unitType ID.
    int[]
    kbGetValidResourcesByPosition(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
    Returns the resourceIDs matching the parameters.
    boolean
    kbGodPowerCanPrePurchase(int protoPowerID, int playerID)
    Returns true if the given God Power is currently prepurchasable by the given player.
    TODO.
    int
    TODO.
    int
    TODO.
    boolean
    kbGodPowerCheckActive(int protoPowerID, int playerID)
    Returns whether that God Power type, for that player, is currently in effect.
    boolean
    Returns whether that God Power type is currently in effect.
    float
    kbGodPowerGetCost(int protoPowerID, int playerID, boolean includePrePurchased)
    Returns the current cost of the given God Power for the given player.
    float
    kbGodPowerGetDataCost(int protoPowerID, int playerID)
    Returns the current base cost of the given God Power within power data for the given player.
    float
    kbGodPowerGetDataRepeatCost(int protoPowerID, int playerID)
    Returns the current base repeat cost of the given God Power within power data for the given player.
    int
    kbGodPowerGetID(String protoPowerName)
    Returns the ID for the given protoPowerName.
    int
    kbGodPowerGetIDInSlot(int slotIndex, int playerID)
    Returns the protoPowerID of the god power that is currently in the slotIndex for the given playerID.
    boolean
    kbGodPowerGetIsIDValid(int protoPowerID)
    Returns if the provided protoPowerID corresponds to a valid god power.
    kbGodPowerGetName(int protoPowerID)
    Returns the name of the given protoPowerID.
    int
    kbGodPowerGetNumCharges(int protoPowerID, int playerID)
    Returns the number of available charges/uses of given God Power for a player.
    int
    kbGodPowerGetNumPrePurchasedUses(int protoPowerID, int playerID)
    Returns the current number of prepurchased uses/charges of a God Power for the given player.
    int
    kbGodPowerGetNumUsedTimes(int protoPowerID, int playerID)
    Returns the number of times the given God Power has been used by the given player.
    float
    kbGodPowerGetPrePurchaseCost(int protoPowerID, int playerID, int numUses)
    Returns the current cost of prepurchasing the provided number of charges of a God Power for the given player.
    float
    kbGodPowerGetRadius(int protoPowerID, int playerID)
    Returns the radius of the provided protoPowerID for the given playerID.
    boolean
    kbGodPowerIsOnCooldown(int protoPowerID, int playerID)
    Returns whether the given God Power, for that player, is currently under cooldown.
    boolean
    kbGodPowerIsRepeatable(int protoPowerID, int playerID)
    Returns true if the given God Power is infinitely castable by the given player.
    boolean
    Returns true if the location is currently fogged to the player.
    boolean
    Returns true if the location is currently visible to the player.
    void
    kbLookAtAllUnitsOnMap(boolean ignoreNature)
    Cheats and looks at all of the units on the map; This will format your harddrive if youre not authorized to use it.
    float
    kbMaximumResourceGet(int resourceID)
    Returns the maximum amount of the given resource you can have.
    void
    kbPathAddWaypoint(int pathID, Vector waypoint)
    Adds the waypoint to the given path.
    void
    kbPathAddWaypointAfter(int pathID, int waypointIndex, Vector waypoint)
    Adds the waypoint to the given path.
    float
    kbPathCalculateLength(int pathID, boolean ignoreY)
    Returns the length of the given path after calculating it.
    int
    Creates a path with the given name.
    boolean
    kbPathCreateAreaPath(int pathID, int startAreaID, int goalAreaID, int movementType, float dangerThreshold, boolean allowPartialPath)
    TODO.
    void
    kbPathDestroy(int pathID)
    Destroys the given path.
    int
    kbPathGetIDByIndex(int index)
    Returns the index-th pathID, use in combination with kbPathGetNumber.
    int
    Returns the pathID of the given name.
    boolean
    kbPathGetIsIDValid(int pathID)
    Returns if the provided pathID is valid.
    float
    kbPathGetLength(int pathID)
    Returns the length of the given path.
    kbPathGetName(int pathID)
    Returns the name of the given path.
    int
    Returns the number of paths the KB has.
    int
    Returns the number of waypoints in the given path.
    kbPathGetWaypoint(int pathID, int wpIndex)
    Returns the appropriate waypoint from the given path.
    int
    kbPlayerGetAge(int playerID)
    Returns the current age for the given player.
    float
    Returns the building efficiency for the given player.
    int
    kbPlayerGetCiv(int playerID)
    Returns the civilization (major god) for the given player.
    int
    kbPlayerGetCulture(int playerID)
    Returns the culture for the given player.
    float
    kbPlayerGetHandicap(int playerID)
    Returns the players handicap multiplier (ie, 1.0 = no handicap).
    int
    kbPlayerGetMaxPop(int playerID)
    Returns the maximum population for the given player.
    kbPlayerGetName(int playerID)
    Returns the players name.
    int
    kbPlayerGetPop(int playerID)
    Returns the current population for the player, means cheating if used by AI for other players.
    int
    kbPlayerGetPopCap(int playerID)
    Returns the current population cap for the given player, means cheating if used by AI for other players.
    boolean
    kbPlayerGetProtoStatBool(int playerID, int protoID, int statEnumID)
    Returns the value for the provided bool stat of a player's proto unit.
    float
    kbPlayerGetProtoStatFloat(int playerID, int protoID, int stat)
    Returns the value for the provided float stat of a player's proto unit.
    int
    kbPlayerGetProtoStatInt(int playerID, int protoID, int statEnumID)
    Returns the value for the provided integer stat of a player's proto unit.
    kbPlayerGetProtoStatString(int playerID, int protoID, int statEnumID)
    Returns the value for the provided string stat of a player's proto unit.
    Gets the player starting position.
    int
    kbPlayerGetTeam(int playerID)
    Returns the players team number.
    boolean
    kbPlayerHasLost(int playerID)
    Returns true if the player has either resigned or has been defeated.
    boolean
    kbPlayerIsAlly(int playerID)
    Returns true if the given player is an ally.
    boolean
    kbPlayerIsEnemy(int playerID)
    Returns true if the given player is an enemy.
    boolean
    kbPlayerIsHuman(int playerID)
    Returns true if the given player is a a human player.
    boolean
    kbPlayerIsMutualAlly(int playerID)
    Returns true if the given player is a mutual ally.
    boolean
    kbPlayerIsNeutral(int playerID)
    Returns true if the given player is a neutral player.
    boolean
    kbPlayerIsResigned(int playerID)
    Returns the players resigned status.
    void
    kbPlayerSetHandicap(int playerID, float handicap)
    Sets the indicated players handicap multiplier (ie, 1.0 = no handicap).
    float
    kbProgessionGetTotalResourceCost(int progressionID, int resourceID)
    Returns the total cost of the given resource for this progressionID; A resourceID of -1 will return the total Cost.
    int
    kbProgressionGetNodeData(int progressionID, int nodeIndex)
    Returns the data at nodeIndex, either UnitID or TechID, depending on the type.
    int
    kbProgressionGetNodeType(int progressionID, int nodeIndex)
    Returns the type of node at the given index, either Unit type or Tech type.
    int
    kbProgressionGetTotalNodes(int progressionID)
    Returns the total number of steps to complete the progression.
    boolean
    kbProtoUnitAvailable(int protoUnitID)
    Returns true if the protoUnit is currently available.
    boolean
    kbProtoUnitCanResearch(int protoUnitID, int techID)
    Checks whether the proto unit can research the specific technology.
    boolean
    kbProtoUnitCanTrain(int protoUnitID, int trainPUID)
    Checks whether the proto unit can train the specified unit.
    float
    kbProtoUnitCostPerResource(int protoUnitID, int resourceID)
    Returns the cost of the protounit for the given resource.
    float[]
    kbProtoUnitGetCost(int protoUnitID)
    Returns the cost of the protounit.
    float
    kbProtoUnitGetCostTotal(int protoUnitID)
    Returns the total cost of the protounit with AI cost weight factored in.
    float
    kbProtoUnitGetGatherRate(int puid, int resourcePUID)
    Gets the unit gather rate.
    int
    Returns the ID of the protounit.
    boolean
    kbProtoUnitGetIsValidID(int protoUnitID)
    Returns true if the protoUnitID is valid.
    kbProtoUnitGetName(int protoUnitTypeID)
    Returns the name of the protounit ID.
    int[]
    kbProtoUnitGetTrainers(int protoUnitID)
    Returns an array of all accessible PUIDs that can train this protoUnitID.
    boolean
    kbProtoUnitInitialResource(int protoUnitID, int resourceID)
    Returns the initial resource amount of the protounit for the given rsource.
    boolean
    kbProtoUnitIsType(int protoUnitID, int unitType)
    Returns true if the protoUnit has the given unitType set.
    int
    kbRelicGetTechID(int unitID)
    Returns the tech ID for the given relic unit ID, or -1, if it's invalid.
    void
    kbResourceCombineHerdableResourcesAroundUnit(int unitID, float distance)
    Combines all Herdable KB Resources around the provided unitID within the provided distance; If there is already an active gather plan harvesting from one of the resources then all others will be merged into that resource.
    float
    kbResourceGet(int resourceID)
    Returns the current amount of the given resource.
    boolean
    kbResourceGetBlacklisted(int resourceID)
    Returns whether the resourceID is blacklisted or not.
    int
    Returns the unitID of the dropsite that is closest to the center of the resourceID.
    int
    Returns the unitID of the Farm that is furthest away from a dropsite of the resourceID.
    int
    Returns the resourceID at the index; Use kbResourceGetNumber to find out how many indexes there are.
    int
    Returns the resourceID of the given unitID.
    float
    kbResourceGetIncome(int resourceID, float seconds, boolean relative)
    Returns the resource income over the last X seconds.
    boolean
    kbResourceGetIsIDValid(int resourceID)
    Returns if the resourceID is valid.
    int
    Returns the number of KB resources that we currently have.
    int
    kbResourceGetNumberUnits(int resourceID)
    Returns how many units are in the resourceID.
    int
    kbResourceGetPlanID(int resourceID)
    Returns the planID that may be associated with the resourceID; Each gather plan that goes to gather from a resource will attach its planID to said resourceID.
    kbResourceGetPosition(int resourceID)
    Returns the position of the resourceID; This position is the center position of all units combined in the resourceID; ATTENTION: for Berry Bush resources this position isn't updated when certain Berry Bushes disappear.
    int
    kbResourceGetSubType(int resourceID)
    Returns the resourceIDs subtype; A subtype here means the cAIResourceSubType constants, like cAIResourceSubTypeEasy.
    float
    Returns the total amount of resources that are left in the resourceID; If for example 10 trees with each 150 wood remain in the resource this func will return 1500.
    int
    kbResourceGetType(int resourceID)
    Returns the resourceIDs type; A type here means the cResource constants, like cResourceFood.
    int
    kbResourceGetUnit(int resourceID, int index)
    Returns the unitID found at the index of the resourceID; Use together with kbResourceGetNumberUnits to find out how many index there are; ATTENTION: you should always check if the unitID that is returned is valid for this specific function.
    void
    kbResourceSetBlacklisted(int resourceID, boolean toggle)
    Toggles whether or not the resourceID is blacklisted; A resource that is blacklisted cant be picked up by the automatic search for new KB resources that the gather plan does.
    void
    kbResourceSortTowardsPosition(int resourceID, Vector position)
    Sorts all the units in the resource towards to position.
    void
    Sets whether or not the KB automatically creates bases for its OWN units.
    void
    Sets the default distances for which OWN bases are made.
    void
    Sets the default distances for which OWN bases are made.
    void
    Sets whether or not the KB automatically creates bases for OTHER players units.
    void
    Sets the default distances for which OTHER players bases are made.
    void
    Sets the default distances for which OTHER players bases are made.
    void
    kbSetResourceSelectorFactor(int type, int resourceType, float val)
    Sets the ResourceSelector Factor value.
    int
    kbSharedFunctionUnitGetByIndex(int function, int index)
    Gets the shared function unit with the given function at index.
    int
    Gets the number of shared function units from the given function.
    boolean
    kbTechAffectsUnitType(int techID, int unitTypeID)
    Returns if the provided techID affects the provided unitTypeID; DETAIL: this only looks at cEffectTypeData effects.
    boolean
    kbTechAffectsWorkRate(int techID, int resourceID)
    Returns if the techID affects work rate in any way, for this resourceID must be left at -1; If resourceID is defined it will return if the techID affects the work rate of a specific resourceID.
    boolean
    kbTechCanAfford(int techID, int escrowID)
    Returns if the player can afford the provided techID with the current resource stockpile; If provided the escrow will be taken into account.
    float
    kbTechCostPerResource(int techID, int resourceID)
    Returns the cost of the provided techID for the given resourceID.
    float[]
    kbTechGetCost(int techID)
    Returns the cost of the provided techID, without taking AI weights into account.
    float
    kbTechGetCostTotal(int techID)
    Returns the total cost of the provided techID, takes AI weights into account.
    float
    kbTechGetDataEffectAmount(int techID, int effectIndex)
    Returns the data effects amount at the given effectIndex of the given techID; In the techtree.xml these are denoted by " amount= "; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetDataEffectData2(int techID, int effectIndex)
    The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetDataEffectData3(int techID, int effectIndex)
    The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetDataEffectData4(int techID, int effectIndex)
    The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetDataEffectData5(int techID, int effectIndex)
    The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetDataEffectData6(int techID, int effectIndex)
    The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetDataEffectTargetID(int techID, int effectIndex)
    Returns the effects target ID of the given techID at the given effectIndex; The return value is the cUnitType constant of the PUID/Abstract defined, the following would return cUnitTypeHoplite
    int
    kbTechGetDataEffectTargetType(int techID, int effectIndex)
    Returns the effects target type of the given techID at the given effectIndex; The return values correspond with the cEffectTargetType constants; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetDataEffectType(int techID, int effectIndex)
    Returns the data effect type at the given effectIndex of the given techID; In the techtree.xml these are denoted by " subtype= "The return values correspond to the cDataEffect constants; Reports warnings as kbTechGetDataEffectMember.
    int
    kbTechGetEffectType(int techID, int effectIndex)
    Returns the effect type of the given techID at the given effectIndex; The return values correspond with the cEffectType constants; For anything else than cDataEffect there is no way to get more information sadly.
    boolean
    kbTechGetFlag(int techID, int flag)
    Returns if the flag is set for the given techID, cTechFlag constants.
    int
    kbTechGetID(String techName)
    Returns the ID of the technology with the provided techName.
    kbTechGetName(int techID)
    Returns the name for the provided techID.
    int
    Returns the number of "" nodes of the tech; CAUTION: this number also includes effects that we're unable to give any information for.
    float
    Returns the percent complete for the provided techID; The return value will be within 0.0 and 1.0 (inclusive).
    float
    Returns the research points for the provided techID.
    int
    kbTechGetStatus(int techID, boolean checkPrereqs)
    Returns the current tech status for the provided techID; Takes prereqs into account if checkPrereqs is set to true; The return values correspond with the cTechStatus constants.
    kbTechGetType(int techID, int typeID)
    Returns if the type is set for the provided techID, these types are defined in tech_types.xml; Related constants are "cTechType".
    int[]
    kbTechTreeGetAllObtainableTechnologies(boolean needAliveResearcher)
    Returns all technology IDs of the technologies that are obtainable to us (excluding age ups and technologies which prereqs we havent met), the IDs correspond to the cTech constants; If needAliveResearcher is true we exclude technologies for which we have no building alive to research it.
    int
    kbTechTreeGetCheapestUnitUpgrade(int unitTypeID, int researcherTypeID)
    Gets cheapest researchable unit upgrade, optionally for specified unit/unit line.
    int[]
    Returns all PUIDs that are accessible to us and that can research the provided techID.
    int
    kbUnitCount(int unitTypeID, int player, int stateID)
    Returns a quick unit count of units for a player.
    float
    kbUnitGetActionDamageForType(int unitID, String ActionName, int XSDamageType, boolean addBuffs)
    Returns total damage stat for this unit action for this unit.
    int
    kbUnitGetActionID(int unitID)
    Returns action ID of the unit.
    int
    kbUnitGetActionIDByIndex(int unitID, int index)
    Returns action ID at the index of the unit.
    float
    kbUnitGetActionMaximumRange(int unitID, String action)
    Returns the maximum range of the action for the unit.
    float
    kbUnitGetActionStatFloat(int unitID, String actionName, int statEnumID)
    Returns the value for the provided float stat of a provided unit action.
    int
    kbUnitGetActionType(int unitID)
    Returns the actionTypeID of the unit.
    int
    kbUnitGetActionTypeByIndex(int unitID, int index)
    Returns action type at the index of the unit.
    int
    kbUnitGetAreaID(int unitID)
    Returns the area ID for this unit ID.
    int
    kbUnitGetArmyID(int unitID)
    Returns the army ID for this unit ID.
    int
    kbUnitGetBaseID(int unitID)
    Returns the base ID for this unit ID.
    float
    kbUnitGetCarryCapacity(int unitID, int resourceID)
    Returns the resource carry capacity of the unit.
    int
    kbUnitGetContainedUnitByIndex(int unitID, int unitTypeID)
    Returns the ID for the unit contained at the given index, or -1, if it's invalid; Use in combination with the constants in the BKBData::BKBStatusEffect enum.
    int
    kbUnitGetContainer(int unitID)
    Returns the container for the given unit, or -1, if it's not being currently contained.
    int
    Returns the ID of the current animation for the given unit.
    float
    Returns the current AI cost (worth) for this unit ID.
    float
    Returns the distance from the given unit to the point including the unit's radius.
    float
    kbUnitGetDistanceToUnit(int unitID, int otherUnitID)
    Returns the distance from the given unit to other unit including the unit's radii.
    int
    kbUnitGetHeading(int unitID)
    Returns the heading for this unit ID.
    int
    kbUnitGetIdleTime(int unitID)
    Returns the idle time for this unit ID.
    boolean
    kbUnitGetIsAffectedByStatusEffect(int unitID, int statusEffectID)
    Returns true if the selected unit is affected by the given status effect.
    boolean
    kbUnitGetIsIDValid(int unitID, boolean deadIsValid)
    Returns if the unitID corresponds to a unit that is currently in the game; Dead units remain valid for some time after their death, which is why deadIsValid variable exists; If deadIsValid is false then dead units are considered not valid.
    int
    Returns what KB resource this unit is in.
    boolean
    kbUnitGetMaintainActionPausedByIndex(int unitID, int index)
    Returns action is paused or not at the index of the unit.
    float
    Returns the maximum AI cost (worth) for this unit ID.
    int
    kbUnitGetMovementType(int unitTypeID)
    Returns the movementType for this unitTypeID.
    int
    Returns number of actions of the unit.
    int
    Returns the number of units contained within the given unit.
    int
    kbUnitGetNumberContainedOfType(int unitID, int unitTypeID)
    Returns the number of units contained of a particular unitType within the given unit.
    int
    Returns the number of units currently working on the given unit.
    int
    kbUnitGetPlanID(int unitID)
    Returns the plan ID for this unit ID.
    int
    kbUnitGetPlayerID(int unitID)
    Returns the player ID for this unit ID.
    kbUnitGetPosition(int unitID)
    Returns the position for this unit ID; If we dont know a recent position of this unit it reports back as cNoRecentPositionKnown; Any unit that isnt visible under fog of war will be set to cNoRecentPositionKnown after 2526 seconds of losing line of sight of the unit.
    int
    Returns the unit's protounit ID.
    float
    kbUnitGetResourceAmount(int unitID, int resourceID)
    Returns the resource amount of the unit.
    float
    kbUnitGetResourceAutoGatherRate(int unitID, int resourceID)
    Returns the autogather rate value for the provided resource of a unit.
    boolean
    kbUnitGetStatBool(int unitID, int statEnumID)
    Returns the value for the provided bool stat of a unit.
    float
    kbUnitGetStatFloat(int unitID, int statEnumID)
    Returns the value for the provided float stat of a unit.
    int
    kbUnitGetStatInt(int unitID, int statEnumID)
    Returns the value for the provided integer stat of a unit.
    kbUnitGetStatString(int unitID, int statEnumID)
    Returns the value for the provided string stat of a unit.
    int
    Returns the target unit ID of the given unit.
    int
    kbUnitGetWorkerID(int unitID, int index)
    Returns the index-th worker unit ID.
    boolean
    kbUnitIsContainedBy(int unitID, int unitTypeID)
    Returns true, if unit is contained by a container belonging to the given unitType.
    boolean
    kbUnitIsEmpowered(int unitID)
    Returns true if this unit is empowered.
    boolean
    kbUnitIsInLush(int unitID, int playerID)
    Returns true if unit is within terrain lush belonging to the given player.
    boolean
    Returns true if this unit is Training or Researching.
    boolean
    kbUnitIsType(int unitID, int unitTypeID)
    Returns true if the unit is of the unitTypeID.
    boolean
    kbUnitPickAddCombatEfficiencyType(int upID, int unitTypeID, float weight)
    Adds an enemy unitTypeID to the upID's combat efficiency calculation.
    int
    Creates a unit picker and return the ID of it.
    boolean
    Destroys the given upID.
    int
    Gets the upID's attack unit type.
    boolean
    Returns whether or not the unit picker actually went into counter mode, can only be used after kbUnitPickRun.
    boolean
    Returns if the upID is valid.
    int
    Returns the number of results, can only be used after kbUnitPickRun.
    float
    Gets the upID's preference weight.
    int
    kbUnitPickGetResult(int upID, int index)
    Returns the index-th ProtoUnitID, can only be used after kbUnitPickRun.
    float
    kbUnitPickGetResultFactor(int upID, int index)
    Returns the index-th total factor, can only be used after kbUnitPickRun.
    float[]
    Returns all the result factors, can only be used after kbUnitPickRun.
    int[]
    Returns all the results, can only be used after kbUnitPickRun.
    void
    kbUnitPickRemoveCombatEfficiencyType(int upID, int unitTypeID)
    Removes a unitTypeID from the upID's combat efficiency calculation.
    void
    Resets all the upID's values.
    void
    Resets the enemy unitTypeIDs for the upID's combat efficiency calculation.
    void
    Resets the unit pick movement type to cPassabilityNone.
    int
    kbUnitPickRun(int upID)
    Resets all the previous results and then runs the unit picker again.
    void
    kbUnitPickSetAttackUnitType(int upID, int unitTypeID)
    Sets the upID's attack unit type; When were querying to see if we have enough enemies to go into counter mode, this is the unitTypeID we use to query for.
    void
    kbUnitPickSetCombatEfficiencyWeight(int upID, float weight)
    Sets the upID's Combat Efficiency weight; We multiply the unit combat efficiencies by this amount for a final combat efficiency weight; Setting combat efficiency values is done via kbUnitPickAddCombatEfficiencyType.
    void
    kbUnitPickSetEnemyPlayerID(int upID, int playerID)
    Sets the upID's enemy player ID, -1 is allowed to not take any player into account; When we query to decide if we can go to counter mode we search for units belonging to this playerID; When analyzing the strength of units we take the stats of the units belonging to this playerID.
    void
    kbUnitPickSetMinimumCounterModeNumberUnits(int upID, int numberUnits)
    Sets the minimum number of enemy units that have to be visible (not seeable only) to turn on counter enemy mode; Can be used together with kbUnitPickSetMinimumCounterModePop, if one of the two is true we will enter counter mode.
    void
    Sets the minimum total pop count of enemy units that have to be visible (not seeable only) to turn on counter enemy mode; Can be used together with kbUnitPickSetMinimumCounterModeNumberUnits, if one of the two is true we will enter counter mode.
    void
    kbUnitPickSetMovementType(int upID, int movementType)
    Sets the upID's movement type, this is used to filter our own units; If any of our units dont have at least one of the specified movement types it's not valid; Use cPassability*** constants for this, you can stack multiple types on top of one another.
    boolean
    kbUnitPickSetPreferenceFactor(int upID, int unitTypeID, float preferenceFactor)
    Sets the upID's Preference Factor for that unitTypeID.
    void
    kbUnitPickSetPreferenceWeight(int upID, float weight)
    Sets the upID's Preference weight; We multiply the unit preferences by this amount for a final preference weight; Setting unit preference values is done via kbUnitPickSetPreferenceFactor.
    int
    Creates a unit query, returns the query ID.
    void
    kbUnitQueryDestroy(int queryID)
    Destroys the given unit query.
    int
    kbUnitQueryExecute(int queryID)
    Executes the query (using the query data) and returns the number of units found; ATTENTION
    int
    kbUnitQueryExecuteOnQuery(int currentQueryID, int previousQueryID)
    Executes the query (using the query data) on the other query and returns the number of units found; For example, your previousQueryID searches for enemy units and finds 20 of them of which 5 are myth units; Then your currentQueryID looks only for myth units; If you now execute your currentQueryID on your previousQueryID you will get back the 5 myth units you originally found in your previousQueryID.
    int
    Returns the number of pop slots currently occupied by the results in the given query; If this is called on a query that uses a player relation instead of a playerID it will calculate using default population values.
    int
    kbUnitQueryGetResult(int queryID, int index)
    Returns the UnitID of the index-th result in the current query.
    int[]
    kbUnitQueryGetResults(int queryID)
    Returns all unit IDs in the current query.
    float
    kbUnitQueryGetUnitCost(int queryID, boolean considerHealth)
    Returns the total aiCost of the found units, uses values set by kbSetAICostWeight to calculate multipliers; If considerHealth is true it will take the current hitpoints of the unit into account; For example, if your Hoplite is half hp then only half the cost of the Hoplite is added to the total.
    float
    kbUnitQueryGetUnitHitpoints(int queryID, boolean considerHealth)
    Returns the total maximum hitpoints of the found units; If considerHealth is true it will instead return the total of current hitpoints.
    int
    Returns the number of results in the current query.
    void
    kbUnitQueryResetData(int queryID)
    Resets the given unit query data AND results.
    void
    Resets the given unit query results.
    void
    kbUnitQuerySetActionType(int queryID, int actionTypeID)
    Query Data - Sets what action type the units must be performing to be picked up by the query; This can be all cActionType constants; If you call this on enemy units and dont have the cUnitQuerySeeableStateVisible state (requires active LOS of the unit) set then it will cheat!!! Default value: -1 (not filtered on actions).
    void
    kbUnitQuerySetAreaGroupID(int queryID, int areaGroupID)
    Query Data - Sets what areaGroupID the unit must be in to be valid for the query; Default value: -1 (not filtered on areas groups).
    void
    kbUnitQuerySetAreaID(int queryID, int areaID)
    Query Data - Sets what areaID the unit must be in to be valid for the query; Default value: -1 (not filtered on areas).
    void
    kbUnitQuerySetArmyID(int queryID, int armyID)
    Query Data - Sets what armyID the unit must be in to be valid for the query; Default value: -1 (not filtered on armies).
    void
    kbUnitQuerySetAscendingSort(int queryID, boolean value)
    Query Data - Sets if the query results will be sorted from closest to furthest in relation to the position; You MUST combine this with kbUnitQuerySetPosition(int, java.util.Vector) or it has no effect; Default value: false (randomly sorted).
    void
    kbUnitQuerySetBaseID(int queryID, int baseID)
    Query Data - Sets what base the unit must be in to be valid for the query; Main use for this is with AI scripting where the AI bases can be analyzed; Default value: -1 (not filtered on bases).
    void
    kbUnitQuerySetExcludeTypes(int queryID, int[] types)
    Query Data - if a unit is any of the types in the types array it will be skipped; This array accepts proto units as well as abstract types.
    void
    kbUnitQuerySetIgnoreKnockedOutUnits(int queryID, boolean value)
    Query Data - Sets if the query will count knocked out units or not; If for example this is set to true then a knocked out Arkantos will not be picked up by the query; Default value: true.
    void
    kbUnitQuerySetMaxCreationTime(int queryID, int time, boolean inclusive)
    Query Data - Sets maximum creation time, in game time milisseconds, for unit to be considered valid for the query and whether or not the check for creation time should be inclusive.
    void
    kbUnitQuerySetMaximumDistance(int queryID, float distance)
    Query Data - Sets the maximum distance from the position the query will search, in a circular radius; You MUST combine this with kbUnitQuerySetPosition(int, java.util.Vector) or it has no effect; Default value: -1.0 (no distance and thus entire map).
    void
    kbUnitQuerySetMinCreationTime(int queryID, int time, boolean inclusive)
    Query Data - Sets minimum creation time, in game time milisseconds, for unit to be considered valid for the query and whether or not the check for creation time should be inclusive.
    void
    kbUnitQuerySetPlayerID(int queryID, int playerID, boolean resetQueryData)
    Query Data - Sets the player whose units we will search for.
    void
    kbUnitQuerySetPlayerRelation(int queryID, int relation)
    Query Data - Sets the player relation the query will search for.
    void
    kbUnitQuerySetPosition(int queryID, Vector position)
    Query Data - Sets from what position the query will start searching; You MUST combine this with kbUnitQuerySetMaximumDistance or it has no effect; Default value: cInvalidVector (not filtered by position).
    void
    kbUnitQuerySetState(int queryID, int v)
    Query Data - Sets what unit state the queries will search for; Valid inputs here are the unit state constants which are prefixed by cUnitState; If you for example provide cUnitStateAlive inhere the query will only find units that are alive; Default value: cUnitStateAny (be mindful here that this state will also find dead units).
    void
    kbUnitQuerySetUnitType(int queryID, int unitType)
    Query Data - Set what units the query will search for; This can be all cUnitType constants; You MUST set this for every query, or it has no idea what to search for; Default value: -1 (finds no units).
    void
    kbUnitQuerySetVisibleState(int queryID, int state)
    Query Data - sets the state in relation to LOS for what units are considered valid for this queryID; A unit can have different visiblity states in the KB that you can uniquely search for: cUnitQuerySeeableStateAllValid: no filtering.
    int
    kbUnitTypeCount(String unitTypeName, int player, int stateID, boolean excludeKnockedoutUnits)
    Returns a quick unit count of units for a player.
    int
    kbUnitTypeCountInArea(String unitTypeName, int player, int stateID, int centerUnitID, float radius)
    Returns a quick unit count of units for a player, within the vicinity of the given center unit.
    kbUnitTypeGetName(int unitTypeID)
    Returns the name of the unit type.
    boolean
    kbUnitVisible(int unitID)
    Returns true if the unit is currently visible to the player.
    void
    Starts the King of the Hill victory if valid.
    void
    Leaves the currently running benchmark.
    void
    leaveGame(int fromMode, int reason)
    Destroys the world and returns to main menu.
    void
    Sets the main menu background scenario file.
    void
    For UI use only.
    void
    loadCamera(String filename)
    Load camera from file.
    void
    Loads in a campaign scenario file.
    void
    Loads in a saved game.
    void
    loadLightingSet(String set, boolean apply)
    Loads the specified lighting set.
    void
    Loads campaign scenario file within the next campaign node in campaign manager.
    void
    Loads the file named, interpreting whether it is a scenario, savegame, etc dynamically.
    void
    loadScenario(String scenarioName)
    Loads in a scenario file.
    void
    loadTutorial(String tutorialName, int nLoadMode, String loadingScreen, int nTextID)
    Loads in a tutorial scenario file.
    void
    loadTutorialWpf(String tutorialName, int nLoadMode, String wpfLoadImage, int nTextID)
    Loads in a tutorial scenario file, specifying wpf compliant load screen image.
    void
    For UI use only.
    float
    log(float x)
    Returns the natural logarithm of x.
    float
    log10(float x)
    Returns the common logarithm of x.
    float
    log2(float x)
    Returns the binary logarithm of x.
    void
    map(String eventName, String context, String command, boolean allowInGamepadMode)
    Maps input event to command, in that context; See input mapper design.doc for more details.
    void
    mapQuickAction(String exactUnitName, String action)
    TODO.
    float
    max(float a, float b)
    Returns the larger of the two values as a float.
    float
    min(float a, float b)
    Returns the smaller of the two values as a float.
    void
    Changes the minimap rotation mode; No arg means toggle.
    void
    minimapZoom(float delta)
    Sets the zoom factor of the minimap.
    void
    minimapZoomDelta(float delta)
    Changes the zoom factor of the minimap up or down by that amount (remaining centered on the current view).
    void
    modeEnter(String modeName)
    Enters the named mode.
    void
    modeToggleBetweenIfNotMP(String modeName1, String modeName2)
    Toggles between the two modes only if were not in a BMultiplayer game.
    void
    musicPlaySong(String szName, float fFade)
    Play a sound as if it were a music track.
    void
    musicSetVolume(float fv)
    Set the current music volume.
    void
    Stop playing music.
    void
    Toggles between battle mode and normal mode.
    void
    Toggles between different ways obscured units are shown.
    void
    Increments the current player.
    void
    Togglee Fog of War without effecting simulation.
    void
    Opens The Cinematic View Debugger.
    void
    Opens The Config Editor.
    void
    Open menu to change Flare Type.
    void
    Opens The Grass Type Editor Gui.
    void
    Opens The Lighting Editor Gui.
    void
    Opens The Model System Diagnostics window.
    void
    Open screen shot screen.
    void
    Opens load dialog for prefabs/groupings.
    void
    Opens The File Browser Gui.
    void
    Opens The minimap color guide Gui.
    void
    Opens The terrain texture browser.
    void
    Opens The terrain texture Editor.
    void
    Opens The Water Browser Gui.
    void
    Opens The Water Editor Gui.
    void
    Opens The Weathering Type Editor Gui.
    void
    pause(int val, boolean checkForAllowPause)
    With no arg, toggles pause state on/off; Otherwise, sets pause state.
    void
    pause2(int val, boolean checkForAllowPause)
    With no arg, toggles pause state on/off - otherwise, sets pause state.
    void
    Resigns the currently controlled player.
    void
    playMovie(String fileName)
    Plays movies from a playlist in the AVI directory.
    void
    Procedes to the post game report.
    void
    Does what needs to be done.
    float
    pow(float x, float y)
    Returns the yth power of x (x^y).
    void
    preQueueInSelected(String Name, boolean Tech)
    Tries to preQueue the selected unit type or tech in any valid selected unit.
    void
    preQueueInSelectedByID(int Id, boolean Tech)
    Just like preQueueInSelected, but faster because it takes an ID.
    void
    Create a save file named QuickSaveGame and close the pause pop up if its opened.
    float
    radToDeg(float radians)
    Converts an angle from radians to degrees.
    void
    Redoes the last undone operation.
    void
    Starts the Relic Capture victory if valid.
    void
    renderBaseID(int playerID, int basePlayerID, int areaID, int state)
    Sets the render state of the given base.
    void
    Forces the renderer to reset.
    void
    With no arg, toggles friend or foe colors; Otherwise, sets it.
    void
    renderPlanID(int playerID, int planID, int state)
    Sets the render state of the given plan.
    void
    renderWindow(int val)
    With no arg, toggles window/fullscreen; Otherwise, sets mode to window(1)/fullscreen(0).
    void
    repairUnit(int unitID)
    Starts the auto repair on the specified unit.
    void
    res(int xRes, int yRes)
    Changes screen resolution.
    void
    researchByID(int techID, int unitID, int playerID, boolean playClick)
    Start the research of TechID from ResearchingUnitID for the current player (if no player is specified).
    void
    Research a tech in current unit selection.
    void
    Reset camera in the photo mode.
    void
    Reloads the player colors from the XML file.
    void
    Reset the sun color to full.
    void
    resourceMarket(int playerID, String toResourceName, float resourceAmount, String fromResourceName, boolean shiftGivesMultiple)
    Sends out a market use command for the given player, resource and amount; Negative means selling.
    void
    resourceUnitConstructBuilding(int unitID, String unitName)
    Find a nearby villager and construct a specified unit.
    void
    Relaunch current scenario.
    void
    Restarts the current game with the same seed.
    void
    Restarts the current game with the specified seed (1 to randomize).
    void
    Restarts the playback of the current recorded game playback.
    void
    Retell the current game with the same seed.
    boolean
    rmAddClosestLocConstraint(int constraintID, float bufferDist)
    Adds a constraint to the closest point finder, optionally extending (or shrinking) it by the given buffer.
    boolean
    rmAddGlobalHeightNoise(int noiseType, float amplitude, float baseFrequency, int numOctaves, float persistence)
    Adds height noise to the entire map (much faster than a global area would); Noise types can be cNoiseFractalSum or cNoiseTurbulence, the latter generating more random Perlin noise.
    boolean
    rmAddPlayerResource(int playerID, int resourceID, float amount)
    Adds to the specified resource of one player.
    boolean
    Adds a point to the line to place players on.
    boolean
    rmAreaAddCliffEdgeConstraint(int areaID, int typeID, int constraintID, float bufferDist)
    Converts a cliff edge tile to the provided type if all constraints for that type pass (otherwise the default type is used); Priority is none, ramp, side.
    boolean
    rmAreaAddCliffOuterLayerConstraint(int areaID, int constraintID, float bufferDist)
    Adds a constraint that the outer cliff layers have to satisfy to get painted; Useful when building cliffs into other cliffs.
    boolean
    rmAreaAddCliffRampAtAngle(int areaID, float fraction, float angle)
    Adds a ramp to the cliff centered at the given angle with the given fraction of the cliff area circumference.
    boolean
    rmAreaAddConstraint(int areaID, int constraintID, float minBufferDist, float maxBufferDist)
    Adds the specified constraint to the area.
    boolean
    rmAreaAddForestConstraint(int areaID, int constraintID, float bufferDist)
    Adds a constraint that a tile must pass for forest to be painted in this area.
    int
    rmAreaAddHeightBlend(int areaID, int blendType, int filterID, int expansionTiles, int numPasses, boolean incrementalExpansion, boolean blendAfterPaint)
    Adds blending parameters that define how smoothly area height blends into its surroundings; Multipleblending instances can be applied to an area.
    boolean
    rmAreaAddHeightBlendConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
    Adds a constraint to the height blend with the given index to an area.
    boolean
    rmAreaAddHeightBlendExpansionConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
    Adds a constraint to the height blend with the given index to an area that will be used when blending with tiles reached by expanding.
    boolean
    rmAreaAddHeightConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
    Adds the specified constraint to the areas height constraints, ignoring tiles that do not pass all constraints when setting the height.
    boolean
    rmAreaAddInfluencePoint(int areaID, Vector loc)
    Adds an influence point for an area to grow towards.
    boolean
    rmAreaAddInfluenceSegment(int areaID, Vector startLoc, Vector endLoc)
    Adds an influence segment for an area to expand within/towards.
    boolean
    rmAreaAddOriginConstraint(int areaID, int constraintID, float minBufferDist, float maxBufferDist)
    Adds the specified constraint to the areas origin (the first tile the area grows from).
    boolean
    rmAreaAddRemoveType(int areaID, int typeID)
    Adds a unit type to remove from tiles that lie inside the area.
    boolean
    rmAreaAddTerrainConstraint(int areaID, int constraintID, float bufferDist)
    Adds a constraint that a tile must pass for forest to be painted in this area.
    boolean
    rmAreaAddTerrainLayer(int areaID, int terrainID, int minTileDistance, int maxTileDistance)
    Adds a terrain layer to an area.
    boolean
    rmAreaAddTerrainMixLayer(int areaID, int mixID, int minTileDistance, int maxTileDistance)
    Adds a terrain layer to an area.
    boolean
    rmAreaAddTerrainReplacement(int areaID, int terrainID, int newTerrainID)
    Adds a terrain replacement rule to the area.
    boolean
    rmAreaAddToClass(int areaID, int classID)
    Adds an area to the given class.
    boolean
    rmAreaBuild(int areaID, boolean doPaint)
    Builds the specified area, returning true if the minimum number of tiles has been reached.
    int[]
    rmAreaBuildAll(boolean doPaint, boolean buildConcurrently)
    Builds all unbuilt areas, returning an array of the IDs of all areas processed.
    void
    rmAreaBuildMany(int[] areaIDs, boolean doPaint, boolean buildConcurrently)
    Builds the given areas.
    int
    Creates a new area.
    boolean
    rmAreaDefAddCliffEdgeConstraint(int areaDefID, int typeID, int constraintID, float bufferDist)
    Converts a cliff edge tile to the provided type if all constraints for that type pass (otherwise the default type is used); Priority is none, ramp, side.
    boolean
    rmAreaDefAddCliffOuterLayerConstraint(int areaDefID, int constraintID, float bufferDist)
    Adds a constraint that the outer cliff layers have to satisfy to get painted; Useful when building cliffs into other cliffs.
    boolean
    rmAreaDefAddCliffRampAtAngle(int areaDefID, float fraction, float angle)
    Adds a ramp to the cliff centered at the given angle with the given fraction of the cliff area circumference.
    boolean
    rmAreaDefAddConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
    Adds the specified constraint to the area definition.
    boolean
    rmAreaDefAddForestConstraint(int areaDefID, int constraintID, float bufferDist)
    Adds a constraint that a tile must pass for terrain to be painted in this area.
    int
    rmAreaDefAddHeightBlend(int areaID, int blendType, int filterID, int expansionTiles, int numPasses, boolean incrementalExpansion, boolean blendBeforePaint)
    Adds blending parameters that define how smoothly area height blends into its surroundings; Multipleblending instances can be applied to an area.
    boolean
    rmAreaDefAddHeightBlendConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
    Adds a constraint to the height blend with the given index to an area def.
    boolean
    rmAreaDefAddHeightBlendExpansionConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
    Adds a constraint to the height blend with the given index to an area that will be used when blending with tiles reached by expanding.
    boolean
    rmAreaDefAddHeightConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
    Adds the specified constraint to the areas height constraints, ignoring tiles that do not pass all constraints when setting the height.
    boolean
    rmAreaDefAddInfluencePoint(int areaDefID, Vector loc)
    Adds an influence point for an area definition to grow towards.
    boolean
    rmAreaDefAddInfluenceSegment(int areaDefID, Vector startLoc, Vector endLoc)
    Adds an influence segment for an area definition to expand within/towards.
    boolean
    rmAreaDefAddOriginConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
    Adds the specified constraint to the areas origin (the first tile the area grows from) for the given area definition.
    boolean
    rmAreaDefAddRemoveType(int areaDefID, int typeID)
    Adds a unit type to remove from tiles that lie inside areas of the given definition.
    boolean
    rmAreaDefAddTerrainConstraint(int areaDefID, int constraintID, float bufferDist)
    Adds a constraint that a tile must pass for terrain to be painted in this area.
    boolean
    rmAreaDefAddTerrainLayer(int areaDefID, int terrainID, int minTileDistance, int maxTileDistance)
    Adds a terrain layer to an area definition.
    boolean
    rmAreaDefAddTerrainMixLayer(int areaDefID, int mixID, int minTileDistance, int maxTileDistance)
    Adds a terrain layer to an area definition.
    boolean
    rmAreaDefAddTerrainReplacement(int areaDefID, int terrainID, int newTerrainID)
    Adds a terrain replacement rule to the area definition.
    boolean
    rmAreaDefAddToClass(int areaDefID, int classID)
    Adds areas created from an area definition to the given class.
    int
    Creates a new area definition.
    int[]
    rmAreaDefCreateAndBuildAreas(int areaDefID, int numAreas, boolean doPaint, boolean buildConcurrently)
    Creates multiple areas from an area definiton and builds them; If a name override is provided that name is used incrementally, otherwise the name of the area definition followed by the number of areas created with the definition so far is used.
    int
    rmAreaDefCreateArea(int areaDefID, String nameOverride)
    Creates an area from an area definiton; If a name override is provided that name is used, otherwise the name of the area definition followed by the number of areas created with the definition so far is used.
    int[]
    rmAreaDefCreateAreas(int areaDefID, int numAreas, String nameOverride)
    Creates multiple areas from an area definiton; If a name override is provided that name is used incrementally, otherwise the name of the area definition followed by the number of areas created with the definition so far is used.
    int
    rmAreaDefGetCreatedArea(int areaDefID, int index)
    Gets the ID of the ith area created by this area definition.
    int[]
    rmAreaDefGetCreatedAreas(int areaDefID)
    Gets all area IDs created by this area definition.
    int
    Gets the area definition ID for a given area definiton name.
    rmAreaDefGetName(int areaDefID)
    Gets the name for a given area definition ID.
    int
    Gets the number of areas created by this area definition.
    boolean
    rmAreaDefSetAvoidSelfDistance(int areaDefID, float distance, float bufferDistance)
    Sets the distance that all areas created by this definition should avoid each other by.
    boolean
    rmAreaDefSetBlobDistance(int areaDefID, float minDist, float maxDist)
    Sets the minimum and maximum distance blobs can be from the center of areas from a definition.
    boolean
    rmAreaDefSetBlobs(int areaDefID, int minBlobs, int maxBlobs)
    Sets the minimum and maximum number of blobs for an area definition.
    boolean
    rmAreaDefSetCliffEmbellishmentDensity(int areaDefID, float density)
    Sets the embellishment density for all cliff layers.
    boolean
    rmAreaDefSetCliffLayerEmbellishmentDensity(int areaDefID, int layer, float density)
    Sets the embellishment density for the specified cliff layer.
    boolean
    rmAreaDefSetCliffLayerPaint(int areaDefID, int layer, boolean doPaint)
    Sets whether or not to paint the given cliff layer.
    boolean
    rmAreaDefSetCliffPaintInsideAsSide(int areaDefID, boolean paintTopAsSide)
    If set, the inside of a cliff will be painted with side terrain instead.
    boolean
    rmAreaDefSetCliffRamps(int areaDefID, int count, float size, float variance, float spacing, float angle)
    Adds ramps with the given size, variance, and spacing centering around the given angle to the cliff.
    boolean
    rmAreaDefSetCliffRampSteepness(int areaDefID, float rampSteepness)
    Sets an area definitions cliff ramp steepness.
    boolean
    rmAreaDefSetCliffSideRadius(int areaDefID, int innerRadius, int outerRadius)
    Sets the inner and outer radius in tiles to consider as cliff edge for an area definition (extending the area outwards if necessary, ignoring any constraints).
    boolean
    rmAreaDefSetCliffSideSheernessThreshold(int areaDefID, float sheernessAngleThresh)
    Sets the minimum slope (angle in radians) a cliff side tile must have to be considered as a sheer tile instead (radians within [0, PI/2]).
    boolean
    rmAreaDefSetCliffType(int areaDefID, int cliffID)
    Sets the cliff type for an area definition.
    boolean
    rmAreaDefSetCoherence(int areaDefID, float coherence, float minDistThresh)
    Sets the area definition coherence between 0.0 (randomly) and 1.0 (circular); If minDistThresh is set, coherence is only applied to tiles further away than the threshold (with 1.0 being used otherwise).
    boolean
    rmAreaDefSetCoherenceSquare(int areaDefID, boolean useSquareCoherence)
    Uses square instead of circular coherence, making areas grow as a square instead of a circle.
    boolean
    rmAreaDefSetConstraintBuffer(int areaDefID, float minBufferDist, float maxBufferDist)
    Sets an override for the min/max constraint buffers in meters for the given area definition.
    boolean
    rmAreaDefSetEdgeSmoothDistance(int areaDefID, int smoothDistance, boolean smoothOnMapEdge)
    Sets an area definitions edge smoothing distance.
    boolean
    rmAreaDefSetForestTreeDensity(int areaDefID, float density)
    Sets the probability to place a tree on forest tree tiles in an area definition.
    boolean
    rmAreaDefSetForestType(int areaDefID, int forestID)
    Sets the forest type for an area definition.
    boolean
    rmAreaDefSetForestUnderbrushDensity(int areaDefID, float frequency)
    Sets the probability to place underbrush on forest underbrush tiles in an area definition.
    boolean
    rmAreaDefSetHeight(int areaDefID, float height)
    Sets the height for an area definition.
    boolean
    rmAreaDefSetHeightFactors(int areaDefID, float oneTileFactor, float twoTilesFactor, float threeTilesFactor, float fourTilesFactor)
    Defines the factor to apply to the height of each cliff tile vertex depending on how many cliff tiles the vertex is part of.
    boolean
    rmAreaDefSetHeightNoise(int areaID, int type, float amplitude, float baseFrequency, int octaves, float persistence)
    Adds height noise to the area; Noise types can be cNoiseFractalSum or cNoiseTurbulence, the latter generating more random Perlin noise.
    boolean
    rmAreaDefSetHeightNoiseBias(int areaDefID, float bias)
    Sets the area definitions elevation variation noise bias (-1 means down only, 0 means down and up equally, 1 means up only).
    boolean
    rmAreaDefSetHeightNoiseEdgeFalloffDist(int areaDefID, float dist)
    Sets the area definitions elevation noise to falloff as it gets closer to the areas edge.
    boolean
    rmAreaDefSetHeightRelative(int areaDefID, float height)
    Sets the relative height for an area definition.
    boolean
    rmAreaDefSetLoc(int areaDefID, Vector loc)
    Sets the area location for an area definition.
    boolean
    rmAreaDefSetLocPlayer(int areaDefID, int playerID)
    Sets the area location to a player's location for an area definition.
    boolean
    rmAreaDefSetLocTeam(int areaDefID, int teamID)
    Sets the area location to a teams location for an area definition.
    boolean
    rmAreaDefSetMix(int areaDefID, int mixID)
    Sets the mix for an area definition, overriding the terrain type if set.
    boolean
    rmAreaDefSetOriginConstraintBuffer(int areaDefID, float minBufferDist, float maxBufferDist)
    Sets an override for the min/max origin constraint buffers in meters for the given area.
    boolean
    rmAreaDefSetParent(int areaDefID, int parentAreaID)
    Sets an areas parent area to which the areas from this def are restricted to; If you can, use this instead of an area constraint for performance.
    boolean
    rmAreaDefSetPath(int areaDefID, int pathID, float minWidthMeters, float extraWidthMeters)
    Sets an area derived from an area def to follow a previously built path.
    boolean
    rmAreaDefSetPathSegment(int areaDefID, int pathID, int segmentIdx, float minWidthMeters, float extraWidthMeters)
    Sets an area derived from an area def to follow a segment (between two waypoints) of a previously built path.
    boolean
    rmAreaDefSetReveal(int areaDefID, int tiles)
    Sets areas created from the given area definition to be revealed (1 means dont reveal, 0 means reveal, 0 means reveal plus that number of extra tiles.
    boolean
    rmAreaDefSetSize(int areaDefID, float fraction, float minSuccessFraction)
    Sets the size of an area derived from an area definition as a fraction of the total map and allows to specify a minimum fraction that is required for the area to be reached to be marked as built successfully when building it.
    boolean
    rmAreaDefSetSizeRange(int areaDefID, float minFraction, float maxFraction, float minSuccessFraction)
    Sets the size of areas derived from an area def, randomizing between the provided fraction.
    boolean
    rmAreaDefSetTerrainType(int areaDefID, int terrainID)
    Sets the terrain type for an area definition.
    boolean
    rmAreaDefSetWarnOnBuildFailure(int areaDefID, int minAcceptedState)
    Makes the debugger break with a warning if an area derived from this area def does not reach at least the specified build state (failed -> incomplete -> complete).
    boolean
    rmAreaDefSetWaterDepth(int areaDefID, float depth)
    Sets the water depth to be used (0.0f) for the water painted by this area def.
    boolean
    rmAreaDefSetWaterEdgeHeight(int areaDefID, float height, float bufferDistance)
    Sets the height of the land around the water painted by this area def (applied before the height blend); The buffer distance determines the width of the land around the water.
    boolean
    rmAreaDefSetWaterHeight(int areaDefID, float height, int heightType)
    Sets the level up to which water will be painted for the area def; The type defines whether the provided value is absolute, or whether the minimum, average, or maximum height of the area should be used as an offset instead.
    boolean
    rmAreaDefSetWaterHeightBlend(int areaDefID, int filterID, float smoothDistance, int numPasses)
    Sets the height blend to be applied at the edge of the water painted by this area def up to a given distance away from the edge.
    boolean
    rmAreaDefSetWaterPaintTerrain(int areaDefID, boolean paintEdges)
    If set to true, the water edge terrain (beaches/shores) will be painted for water painted by this area def.
    boolean
    rmAreaDefSetWaterType(int areaDefID, int waterID)
    Sets the water type for an area definition.
    boolean
    rmAreaFindOriginLoc(int areaID)
    (Re)randomizes the areas origin tile, returning true if one has been found successfully and false otherwise; If not called previously, building the area will also call this.
    boolean
    rmAreaFindOriginLocClosestToLoc(int areaID, Vector loc, float maxDistMeters)
    (Re)randomizes the areas origin tile, trying to find the tile that is closest to the provided location while still satisfying the (origin) constraints; Returnstrue if one has been found successfully and false otherwise.
    boolean
    rmAreaFindOriginLocFurthestFromLoc(int areaID, Vector loc, float maxDistMeters)
    (Re)randomizes the areas origin tile, trying to find the tile that is furthest from the provided location while still satisfying the (origin) constraints; Returnstrue if one has been found successfully and false otherwise; Keep maxDist small or this may be very slow.
    int
    rmAreaGetBuildState(int areaID)
    Gets the build state of an area (not started, failed, incomplete, success).
    rmAreaGetClosestLoc(int areaID, Vector loc, int[] constraintIDs)
    Returns the loc fraction of the tile of an area that's closest to the given loc, optionally requiring that it passes the given constraints.
    int
    Gets the area ID for a given area name.
    rmAreaGetLoc(int areaID)
    Gets the fractions of a an areas (origin) location.
    rmAreaGetName(int areaID)
    Gets the name for a given area ID.
    int
    rmAreaGetTileCount(int areaID)
    Gets the number of tiles of a built area.
    rmAreaGetTiles(int areaID)
    Returns the tiles of an area as an array of vectors of tile coordinates (not meters).
    boolean
    rmAreaPaint(int areaID)
    Paints the specified area (must be built first).
    int[]
    Paints all unpainted (but built) areas.
    void
    rmAreaPaintMany(int[] areaIDs)
    Paints the given areas (must be built first).
    boolean
    rmAreaSetBlobDistance(int areaID, float minDist, float maxDist)
    Sets the minimum and maximum distance blobs can be from the center of an area.
    boolean
    rmAreaSetBlobs(int areaID, int minBlobs, int maxBlobs)
    Sets the minimum and maximum number of blobs for an area.
    boolean
    rmAreaSetCliffEmbellishmentDensity(int areaID, float density)
    Sets the embellishment density for all cliff layers.
    boolean
    rmAreaSetCliffLayerEmbellishmentDensity(int areaID, int layer, float density)
    Sets the embellishment density for the specified cliff layer.
    boolean
    rmAreaSetCliffLayerPaint(int areaID, int layer, boolean doPaint)
    Sets whether or not to paint the given cliff layer.
    boolean
    rmAreaSetCliffPaintInsideAsSide(int areaID, boolean paintTopAsSide)
    If set, the inside of a cliff will be painted with side terrain instead.
    boolean
    rmAreaSetCliffRamps(int areaID, int count, float size, float variance, float spacing, float angle)
    Adds ramps with the given size, variance, and spacing centering around the given angle to the cliff.
    boolean
    rmAreaSetCliffRampSteepness(int areaID, float rampSteepness)
    Sets an areas cliff ramp steepness.
    boolean
    rmAreaSetCliffSideRadius(int areaID, int innerRadius, int outerRadius)
    Sets the inner and outer radius in tiles to consider as cliff edge for an area (extending the area outwards if necessary, ignoring any constraints).
    boolean
    rmAreaSetCliffSideSheernessThreshold(int areaID, float sheernessAngleThresh)
    Sets the minimum slope (angle in radians) a cliff side tile must have to be considered as a sheer tile instead (radians within [0, PI/2]).
    boolean
    rmAreaSetCliffType(int areaID, int cliffID)
    Sets the cliff type for an area.
    boolean
    rmAreaSetCoherence(int areaID, float coherence, float minDistThresh)
    Sets the area coherence between 0.0 (randomly) and 1.0 (circular); If minDistThresh is set, coherence is only applied to tiles further away than the threshold (with 1.0 being used otherwise).
    boolean
    rmAreaSetCoherenceSquare(int areaID, boolean useSquareCoherence)
    Uses square instead of circular coherence, making areas grow as a square instead of a circle.
    boolean
    rmAreaSetConstraintBuffer(int areaID, float minBufferDist, float maxBufferDist)
    Sets an override for the min/max constraint buffers in meters for the given area.
    boolean
    rmAreaSetEdgeSmoothDistance(int areaID, int smoothDistance, boolean smoothOnMapEdge)
    Sets an areas edge smoothing distance.
    boolean
    rmAreaSetFailed(int areaID)
    Marks an area as failed if building has not started yet, meaning it cannot be built anymore and will not be considered by rmAreaBuildAll().
    boolean
    rmAreaSetForestTreeDensity(int areaID, float density)
    Sets the probability to place a tree on forest tree tiles in an area.
    boolean
    rmAreaSetForestType(int areaID, int forestID)
    Sets the forest type for an area.
    boolean
    rmAreaSetForestUnderbrushDensity(int areaID, float frequency)
    Sets the probability to place underbrush on forest underbrush tiles in an area.
    boolean
    rmAreaSetHeight(int areaID, float height)
    Sets the height for an area.
    boolean
    rmAreaSetHeightFactors(int areaID, float oneTileFactor, float twoTilesFactor, float threeTilesFactor, float fourTilesFactor)
    Defines the factor to apply to the height of each tile vertex depending on how many tiles the vertex is part of.
    boolean
    rmAreaSetHeightNoise(int areaID, int type, float amplitude, float baseFrequency, int octaves, float persistence)
    Adds height noise to the area; Noise types can be cNoiseFractalSum or cNoiseTurbulence, the latter generating more random Perlin noise.
    boolean
    rmAreaSetHeightNoiseBias(int areaID, float bias)
    Sets the areas elevation variation noise bias (-1 means down only, 0 means down and up equally, 1 means up only).
    boolean
    rmAreaSetHeightNoiseEdgeFalloffDist(int areaID, float dist)
    Sets the areas elevation noise to falloff as it gets closer to the areas edge.
    boolean
    rmAreaSetHeightRelative(int areaID, float height)
    Sets the relative height for an area.
    boolean
    rmAreaSetLoc(int areaID, Vector loc)
    Sets the area location.
    boolean
    rmAreaSetLocPlayer(int areaID, int playerID)
    Sets the area location to a player's location.
    boolean
    rmAreaSetLocTeam(int areaID, int teamID)
    Sets the area location to a teams location.
    boolean
    rmAreaSetMix(int areaID, int mixID)
    Sets the mix for an area, overriding the terrain type if set.
    boolean
    rmAreaSetOriginConstraintBuffer(int areaID, float minBufferDist, float maxBufferDist)
    Sets an override for the min/max origin constraint buffers in meters for the given area.
    boolean
    rmAreaSetPainted(int areaID)
    Marks an area as painted, meaning it cannot be painted and will not be considered by rmAreaBuildAll() or rmAreaPaintAll().
    boolean
    rmAreaSetParent(int areaID, int parentAreaID)
    Sets an areas parent area to which the area is restricted to; If you can, use this instead of an area constraint for performance.
    boolean
    rmAreaSetPath(int areaID, int pathID, float minWidthMeters, float extraWidthMeters)
    Sets an area to follow a previously built path.
    boolean
    rmAreaSetPathSegment(int areaID, int pathID, int segmentIdx, float minWidthMeters, float extraWidthMeters)
    Sets an area to follow a segment (between two waypoints) of a previously built path.
    boolean
    rmAreaSetReveal(int areaID, int tiles)
    Sets the area to be revealed (1 means dont reveal, 0 means reveal, 0 means reveal plus that number of extra tiles.
    boolean
    rmAreaSetSize(int areaID, float minFraction, float minSuccessFraction)
    Sets the size of an area as a fraction of the total map and allows to specify a minimum fraction that is required for the area to be reached to be marked as built successfully when building it.
    boolean
    rmAreaSetSizeRange(int areaID, float minFraction, float maxFraction, float minSuccessFraction)
    Sets the size of an area as a fraction, randomizing between the provided fraction.
    boolean
    rmAreaSetTerrainType(int areaID, int terrainID)
    Sets the terrain type for an area.
    boolean
    rmAreaSetWarnOnBuildFailure(int areaID, int minAcceptedState)
    Makes the debugger break with a warning if the area does not reach at least the specified build state (failed -> incomplete -> complete).
    boolean
    rmAreaSetWaterDepth(int areaID, float depth)
    Sets the water depth to be used (0.0f) for the water painted by this area.
    boolean
    rmAreaSetWaterEdgeHeight(int areaID, float height, float bufferDistance)
    Sets the height of the land around the water painted by this area (applied before the height blend); The buffer distance determines the width of the land around the water.
    boolean
    rmAreaSetWaterHeight(int areaID, float height, int heightType)
    Sets the level up to which water will be painted for the area; The type defines whether the provided value is absolute, or whether the minimum, average, or maximum height of the area should be used as an offset instead.
    boolean
    rmAreaSetWaterHeightBlend(int areaID, int filterID, float smoothDistance, int numPasses)
    Sets the height blend to be applied at the edge of the water painted by this area up to a given distance away from the edge.
    boolean
    rmAreaSetWaterPaintTerrain(int areaID, boolean paintEdges)
    If set to true, the water edge terrain (beaches/shores) will be painted for water painted by this area.
    boolean
    rmAreaSetWaterType(int areaID, int waterID)
    Sets the water type for an area.
    int
    Defines a new class with the given name.
    int
    Defines a new class with the given name; Deprecated, please use rmClassCreate(java.lang.String) instead!
    int[]
    rmClassGetAreas(int classID)
    Returns the area IDs that have been added to this class.
    int
    Gets the class ID for a given class name.
    int
    rmClassGetNumberAreas(int classID)
    Returns the number of areas (no defs) that have been added to this class.
    int
    Returns the number of tiles all areas in this class span across the entire map.
    int
    Returns the number of objects (no defs) that have been added to this class.
    int
    rmClassGetNumberPaths(int classID)
    Returns the number of paths (no defs) that have been added to this class.
    int[]
    rmClassGetObjects(int classID)
    Returns the object IDs that have been added to this class.
    int[]
    rmClassGetPaths(int classID)
    Returns the path IDs that have been added to this class.
    void
    Clears the constraints for the closest loc finder.
    int
    rmCreateAreaConstraint(int areaID, String name)
    Creates a constraint to force something to remain within an area.
    int
    rmCreateAreaDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an area at least by the given distance.
    int
    Creates a constraint to make something remain within an areas edge.
    int
    rmCreateAreaEdgeDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an areas edge by at least the given distance.
    int
    rmCreateAreaEdgeMaxDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an areas edge by no more than the given distance.
    int
    rmCreateAreaMaxDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an area by no more than the given distance.
    int
    rmCreateBoxConstraint(Vector startLoc, Vector endLoc, String name)
    Creates a constraint to remain within the specified box.
    int
    rmCreateBoxDistanceConstraint(Vector startLoc, Vector endLoc, float minDist, String name)
    Creates a constraint to avoid the specified box.
    int
    rmCreateBoxMaxDistanceConstraint(Vector startLoc, Vector endLoc, float maxDist, String name)
    Creates a constraint to remain within the specified distance to a square or rectangle.
    int
    rmCreateCircularConstraint(Vector loc, float radiusMeters, float minAngle, float maxAngle, boolean inverted, String name)
    Creates a circular area to avoid.
    int
    rmCreateClassDistanceConstraint(int classID, float distance, int areaDistFunType, String name)
    Creates a constraint to avoid elements of a given class by a distance.
    int
    rmCreateClassMaxDistanceConstraint(int classID, float distance, int areaDistFunType, String name)
    Creates a constraint to remain within the specified distance to elements of a given class.
    int
    Creates a constraint to make something remain within an areas cliff ramp edge.
    int
    rmCreateCliffRampDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an areas cliff edge by at least the given distance.
    int
    rmCreateCliffRampMaxDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an areas cliff edge by no more than the given distance.
    int
    Creates a constraint to make something remain within an areas cliff edge.
    int
    rmCreateCliffSideDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an areas cliff edge by at least the given distance.
    int
    rmCreateCliffSideMaxDistanceConstraint(int areaID, float distance, String name)
    Creates a constraint to avoid an areas cliff edge by no more than the given distance.
    int
    rmCreateFlagDistanceConstraint(int flagID, float distance, boolean state, String name)
    Creates a constraint to avoid units with a certain flag by a distance.
    int
    rmCreateFlagMaxDistanceConstraint(int flagID, float distance, boolean state, String name)
    Creates a constraint to remain within the specified distance to units with certain flag.
    int
    rmCreateLocDistanceConstraint(Vector loc, float minDist, String name)
    Creates a constraint that requires valid tiles to avoid a location by at least the given distance.
    int
    rmCreateLocMaxDistanceConstraint(Vector loc, float maxDist, String name)
    Creates a constraint that requires valid tiles to be within a given disance to the specified location.
    int
    rmCreateMaxHeightConstraint(float height, String name)
    Creates a constraint to avoid terrain with height higher than the provided height.
    int
    Creates a constraint to avoid terrain with water deeper than the provided depth.
    int
    rmCreateMinHeightConstraint(float height, String name)
    Creates a constraint to avoid terrain with height lower than the provided height.
    int
    Creates a constraint to avoid terrain with water less deep than the provided depth.
    int
    rmCreatePassabilityDistanceConstraint(int passabilityType, boolean passable, float distance, String name)
    Creates a constraint to avoid terrain with the given passability by more than the specified distance.
    int
    rmCreatePassabilityMaxDistanceConstraint(int passabilityType, boolean passable, float distance, String name)
    Creates a constraint to remain within the specified distance to terrain with the given passability.
    int
    rmCreatePathDistanceConstraint(int pathID, float minDist, String name)
    Creates a constraint to avoid a path by at least a given a distance (in meters).
    int
    rmCreatePathMaxDistanceConstraint(int pathID, float maxDist, String name)
    Creates a constraint to make something remain within a distance (in meters) of a path.
    int
    rmCreateTerrainTypeDistanceConstraint(int terrainID, float minDist, String name)
    Creates a constraint to avoid terrain of the specified type.
    int
    rmCreateTerrainTypeMaxDistanceConstraint(int terrainID, float maxDist, String name)
    Creates a constraint to make something remain within a distance (in meters) of a terrain type.
    int
    rmCreateTileDistanceConstraint(Vector tileLoc, float minDist, String name)
    Creates a constraint to avoid a tile by a distance.
    int
    rmCreateTileMaxDistanceConstraint(Vector tileLoc, float maxDist, String name)
    Creates a constraint to remain within the specified distance of a tile.
    int
    rmCreateTypeDistanceConstraint(int typeID, float distance, boolean state, String name)
    Creates a constraint to avoid units of a certain type by a distance.
    int
    rmCreateTypeMaxDistanceConstraint(int typeID, float distance, boolean state, String name)
    Creates a constraint to remain within the specified distance to units a certain type.
    int
    rmCreateWaterDistanceConstraint(boolean hasWater, float minDist, String name)
    Creates a constraint to avoid terrain that does (not) have water (shallow and impassable).
    int
    rmCreateWaterMaxDistanceConstraint(boolean hasWater, float maxDist, String name)
    Creates a constraint to make something remain within a distance (in meters) of terrain that does (not) have water (shallow and impassable).
    boolean
    rmCustomCliffAddObject(int cliffID, int layerID, int protoID, float weight)
    Adds a proto and assigns a weight when placing it for one layer of a custom cliff.
    boolean
    rmCustomCliffAddObjectToAllLayers(int cliffID, int protoID, float weight)
    Adds a proto and assigns a weight when placing it for a custom cliff.
    int
    Creates a new custom cliff.
    boolean
    rmCustomCliffSetMix(int cliffID, int layerID, int mixID, float objectDensity)
    Sets the cliff mix and object density for one layer of a custom cliff.
    boolean
    rmCustomCliffSetTerrain(int cliffID, int layerID, int terrainID, float objectDensity)
    Sets the cliff terrain and object density for one layer of a custom cliff.
    boolean
    rmCustomForestAddTreeType(int forestID, int protoID, float weight)
    Adds a tree type to randomize from with the given weight to a custom forest.
    boolean
    rmCustomForestAddUnderbrushType(int forestID, int protoID, float weight)
    Adds an underbrush type to randomize from with the given weight to a custom forest.
    int
    Creates a new custom forest.
    boolean
    rmCustomForestSetMix(int forestID, int mixID)
    Sets the floor mix for a custom forest.
    boolean
    rmCustomForestSetParams(int forestID, float treeDensity, float underbrushDensity)
    Sets the tree and underbrush density parameters for a custom forest.
    boolean
    rmCustomForestSetTerrain(int forestID, int terrainTypeID)
    Sets the terrain type for a custom forest.
    boolean
    rmCustomMixAddObjectEntry(int mixID, int protoID, float weight, float scaleMin, float scaleMax)
    Adds a proto object entry for the custom mix with the given ID.
    boolean
    rmCustomMixAddPaintEntry(int mixID, int terrainID, float weight)
    Adds a terrain paint entry for the custom mix with the given ID.
    int
    Creates a new custom mix.
    boolean
    rmCustomMixSetObjectParams(int mixID, float baseWeight)
    Sets the base weight (weight to not place anything) for a custom mix.
    boolean
    rmCustomMixSetPaintParams(int mixID, int mode, float freq, int octaves, float persistence)
    Sets the terrain paint parameters for the custom mix with the given ID.
    void
    rmEchoError(String errorString)
    Prints an error message to the debugger.
    void
    rmEchoInfo(String echoString)
    Prints an info message to the debugger.
    void
    rmEchoWarning(String warningString)
    Prints a warning message to the debugger.
    float
    rmFractionToAreaRadius(float fraction, boolean clamp, boolean warn)
    Calculates the radius of the area that covers the given fraction of the entire map.
    float
    rmFractionToAreaSquareMeters(float fraction, boolean clamp, boolean warn)
    Converts a fraction of the entire map to an area in square meters.
    int
    rmFractionToAreaTiles(float fraction, boolean clamp, boolean warn)
    Converts a fraction of the entire map to a number of tiles.
    rmFractionToMeters(Vector meters, boolean clamp, boolean warn)
    Converts a vector of fractions to a vector in meters.
    rmFractionToTileIndex(Vector fraction, boolean warn)
    Converts a vector of fractions to the vector of the closest the closest tile.
    void
    Adds a line to the generation log printed to the debugger once generation finishes.
    boolean
    Gets the internal generation result previously set by rmGenerationSetSuccess().
    void
    rmGenerationSetSuccess(boolean success)
    Sets the internal generation result to true (success) or false (failure).
    rmGetClosestLoc(Vector loc, float maxDistance, boolean additiveConstraints)
    Finds the closest loc to another loc, satisfying the previously added constraints; If additiveConstraints is set to false, only one constraint has to evaluate to true for a tile to be accepted.
    int
    Gets the constraint ID for a given constraint name.
    rmGetConstraintName(int constraintID)
    Gets the constraint name for a given constraint ID.
    float
    Returns the area of the map in square meters.
    int
    Returns the total number of tiles.
    float
    Returns the X size of the map in meters.
    int
    Returns the X size of the map in tiles.
    float
    Returns the Z size of the map in meters.
    int
    Returns the Z size of the map in tiles.
    int
    Returns the number of players that have already been placed.
    int
    Gets the number of players that have already placed for the team with the specified ID.
    int
    Gets the number of players on the specified team.
    int
    rmGetPlacedPlayer(int index)
    Gets the ID of the player in the specified index based on the placement order.
    int
    rmGetPlacedPlayerOnTeam(int teamID, int index)
    Gets the player in the specified position on the team (in the order of placement).
    int
    rmGetPlacedTeam(int index)
    Gets the team ID in the specified position based on placement order (ie, the first team that had all of its players placed is at position 0, etc).
    int
    rmGetPlayerCiv(int playerID)
    Gets the civilization ID of the specified player.
    int
    rmGetPlayerColorIndex(int playerID)
    Gets the color index of the specified player.
    int
    rmGetPlayerCulture(int playerID)
    Gets the culture ID of the specified player.
    rmGetPlayerLoc(int playerID)
    Gets a player's starting location.
    rmGetPlayerName(int playerID)
    Gets a player's name.
    int
    rmGetPlayerOnTeam(int teamID, int index)
    Gets the player in the specified position on the team (as loaded into the game).
    int
    rmGetPlayerTeam(int playerID)
    Gets the team the specified player is on.
    boolean
    rmInitializeLand(int terrainID, float height)
    Initializes the terrain to the specified type and height.
    boolean
    rmInitializeMix(int mixID, float height)
    Initializes the terrain to the specified mix type and height.
    boolean
    rmInitializeWater(int waterID, float waterLevel, float waterDepth)
    Initializes the terrain to the specified water type, level, and depth (defaults to the depth value from the waterbody file).
    boolean
    rmIsTileAcceptableForConstraint(int constraintID, int tileX, int tileZ, float bufferDist)
    Checks whether a tile is acceptable under a given constraint.
    boolean
    rmLocGenAddAngleRandomizerSectorPriority(int angleRandomizerID, int startIdx, int endIdx, int priority, int incrementType, boolean isAdditive)
    Simon TODO.
    boolean
    rmLocGenAddLocBinding(int locID, int otherLocID, float minDist, float maxDist, boolean mutual)
    Simon TODO.
    boolean
    rmLocGenAddLocConstraint(int locID, int constraintID, float bufferDist)
    Simon TODO.
    boolean
    rmLocGenApply(boolean buildAreas, boolean paintAreas)
    Simon TODO.
    int
    Simon TODO.
    int
    Simon TODO.
    int
    Creates a new radius randomizer.
    boolean
    Simon TODO.
    float
    Simon TODO.
    rmLocGenGetLoc(int locID)
    Simon TODO.
    int
    rmLocGenGetLocIDByOwner(int ownerID, int idx)
    Simon TODO.
    int
    Simon TODO.
    int
    Simon TODO.
    int
    Simon TODO.
    float
    Simon TODO.
    boolean
    Simon TODO.
    boolean
    rmLocGenSetArea(int locID, int areaID)
    Simon TODO.
    boolean
    rmLocGenSetDistStrictness(float strictnessThresh)
    Sets a threshold (0-1) for a fraction of iterations after which the location generator will start to loosen the set distance for locs to avoid themselves (e.g., 0.1 -> after 10% of the iterations, the generator will start to linearly reduce the avoidance distances).
    boolean
    rmLocGenSetInAreaID(int locID, int areaID)
    Simon TODO.
    boolean
    rmLocGenSetLocAngleParams(int locID, boolean randomizeSide, boolean rotateClockwise)
    Simon TODO.
    boolean
    rmLocGenSetLocAngleRandomizer(int locID, int radiusRandomizerID)
    Simon TODO.
    boolean
    rmLocGenSetLocAngleVariance(int locID, float angleVar, boolean isAbsolute)
    Simon TODO.
    boolean
    rmLocGenSetLocAvoidDistance(int locID, float avoidDist)
    Simon TODO.
    boolean
    rmLocGenSetLocForwardAngle(int locID, float forwardAngle)
    Simon TODO.
    boolean
    rmLocGenSetLocOrigin(int locID, Vector loc)
    Simon TODO.
    boolean
    rmLocGenSetLocOwner(int locID, int ownerID)
    Simon TODO.
    boolean
    rmLocGenSetLocRadiusRandomizer(int locID, int radiusRandomizerID)
    Simon TODO.
    boolean
    rmLocGenSetLocRadiusVariance(int locID, float radiusVar, boolean isAbsolute)
    Simon TODO.
    boolean
    rmLocGenSetLocSquarePlacement(int locID, boolean squarePlacement)
    Simon TODO.
    boolean
    rmLocGenSetMaxIterations(int maxIterations)
    Sets the maximum number of iterations the location generator will run for before giving up.
    boolean
    rmLocGenSetObject(int locID, int objectID, boolean placeAsNature)
    Simon TODO.
    boolean
    rmLocGenSetRadiusRandomizerRadius(int radiusRandomizerID, float minRadius, float maxRadius)
    Sets the min/max radius in meters for a radius randomizer.
    rmMetersToFraction(Vector meters, boolean clamp, boolean warn)
    Converts vector of in meters to a vector in fractions.
    rmMetersToTileIndex(Vector meters, boolean warn)
    Converts a vector of meters to a vector of a tile position (rounded to the closest tile).
    int
    rmMetersToTiles(float meters)
    Converts a length in meters to a number of tiles.
    boolean
    rmMultiplyPlayerResource(int playerID, int resourceID, float factor)
    Multiplys a player's amount of the specified resource by the given factor.
    boolean
    rmObjectAddConstraint(int objectID, int constraintID, float bufferDist)
    Adds the specified constraint to the given object.
    int
    rmObjectAddItem(int objectID, int protoID, int count, float minClusterDist, float maxClusterDist)
    Adds an item by proto ID to the object.
    boolean
    rmObjectAddToClass(int objectID, int classID)
    Adds an object to the given class.
    int
    Creates a new object.
    boolean
    rmObjectDefAddConstraint(int objectDefID, int constraintID, float bufferDist)
    Adds the specified constraint to the given object definition.
    int
    rmObjectDefAddItem(int objectDefID, int protoID, int count, float minClusterDist, float maxClusterDist)
    Adds an item by proto ID to the object definition.
    int
    rmObjectDefAddItemRange(int objectDefID, int protoID, int minCount, int maxCount, float minClusterDist, float maxClusterDist)
    Adds an item by proto ID to the object definition, randomizing between min/max when deriving an object from this definition.
    boolean
    rmObjectDefAddToClass(int objectDefID, int classID)
    Add objects created from an object definition to the given class.
    int
    Creates a new object definition.
    int
    rmObjectDefCreateObject(int objectDef, String name)
    Creates a new object from an object definition.
    int[]
    rmObjectDefCreateObjects(int objectDefID, int numObjects, String nameOverride)
    Creates multiple objects from an object definiton; If a name override is provided that name is used incrementally, otherwise the name of the object definition followed by the number of objects created with the definition so far is used.
    int
    rmObjectDefGetConstraint(int objectDefID, int idx)
    Get the constraint ID at a given index for an object def.
    int
    rmObjectDefGetCreatedObject(int objectDefID, int index)
    Gets the ID of the ith object created by this object definition.
    int[]
    Gets all object IDs created by this object definition.
    int
    Gets the object definition ID for a given object definition name.
    rmObjectDefGetName(int defID)
    Gets the name for a given object definition ID.
    int
    Get the number of constraints that have been added to an object def.
    int
    Returns the number of objects created (not necessarily placed successfully) by this object definition.
    int[]
    rmObjectDefPlaceAnywhere(int objectID, int playerID, int count, boolean ignoreConstraints)
    Place object def anywhere on the map for given player.
    int[]
    rmObjectDefPlaceAtArea(int objectDefID, int playerID, int areaID, float minDist, float maxDist, int count, boolean squareRadius, boolean ignoreConstraints)
    Place object def for the player at the given areas location.
    int[]
    rmObjectDefPlaceAtLoc(int objectDefID, int playerID, Vector loc, float minDist, float maxDist, int count, boolean squareRadius, boolean ignoreConstraints)
    Place object def at specific location for given player.
    int[]
    rmObjectDefPlaceInArea(int objectDefID, int playerID, int areaID, int count, boolean ignoreConstraints)
    Place object def for the player in the given area.
    int[]
    rmObjectDefPlaceNearLoc(int objectDefID, int playerID, Vector loc, float maxDistMeters, int count)
    Place object def at specific location for given player, flooding outwards until the given distance (or all objects have been placed).
    boolean
    rmObjectDefSetItemPlaceAnywhere(int objectID, int itemIdx, boolean placeAnywhere)
    Ignores placement restrictions when placing the item at the given index for an object def.
    boolean
    rmObjectDefSetItemRotation(int objectDefID, int itemIdex, int rotationType, float rotationAngle)
    Sets the rotation type and angle (only for the custom angle rotation type) for the item at the given index for an object def.
    boolean
    rmObjectDefSetItemVariation(int objectDefID, int itemIdex, int variation)
    Sets variation type (0 being the first variation) for the item at the given index for an object def.
    rmObjectGetCentroidLoc(int objectID)
    Gets the centroid of all units placed for an object and its items.
    int
    rmObjectGetConstraint(int objectID, int idx)
    Get the constraint ID at a given index for an object.
    int
    Gets the object ID for a given object name.
    rmObjectGetLoc(int objectID)
    Gets the location of an object (after it has been placed).
    rmObjectGetName(int defID)
    Gets the name for a given object ID.
    int
    Get the number of constraints that have been added to an object.
    int
    rmObjectiveAdd(String nameStr, String textStr, String hintStr, boolean isPrimary, boolean isVisible)
    Adds a map objective.
    void
    rmObjectiveSetPlayer(int objID, int playerID)
    Restricts the objective to the given player.
    void
    rmObjectiveSetTeam(int objID, int teamID)
    Restricts the objective to the given team.
    boolean
    rmObjectPlaceAnywhere(int objectID, int playerID, boolean ignoreConstraints)
    Place object anywhere on the map for given player.
    boolean
    rmObjectPlaceAtArea(int objectID, int playerID, int areaID, float minDist, float maxDist, boolean squareRadius, boolean ignoreConstraints)
    Place object for the player at the given areas location.
    boolean
    rmObjectPlaceAtLoc(int objectID, int playerID, Vector loc, float minDist, float maxDist, boolean squareRadius, boolean ignoreConstraints)
    Place object at specific location for given player.
    boolean
    rmObjectPlaceInArea(int objectID, int playerID, int areaID, boolean ignoreConstraints)
    Place object for the player in the given area.
    boolean
    rmObjectPlaceNearLoc(int objectID, int playerID, Vector loc, float maxDistMeters)
    Place object at specific location for given player, flooding outwards until a valid tile has been found.
    boolean
    rmObjectSetItemPlaceAnywhere(int objectID, int itemIdx, boolean placeAnywhere)
    Ignores placement restrictions when placing the item at the given index for an object.
    boolean
    rmObjectSetItemRotation(int objectID, int itemIdex, int rotationType, float rotationAngle)
    Sets the rotation type and angle (only for the custom angle rotation type) for the item at the given index for an object.
    boolean
    rmObjectSetItemVariation(int objectID, int itemIdex, int variation)
    Sets variation type (0 being the first variation) for the item at the given index for an object.
    boolean
    rmPathAddConstraint(int pathID, int constraintID, float cost, float bufferDist)
    Adds a constraint which all tiles of this path have to respect.
    int
    rmPathAddRandomWaypoint(int pathID, float minDistFromPreviousMeters, float maxDistFromPreviousMeters)
    Adds a waypoint to a path, optionally randomizing from within the provided range in meters relative to the last waypoint.
    boolean
    rmPathAddToClass(int pathID, int classID)
    Adds a path to the given class.
    int
    rmPathAddWaypoint(int pathID, Vector loc, float minDistMeters, float maxDistMeters)
    Adds a waypoint (as a vector of fractions) to a path, optionally serving as origin to randomize a waypoint from within the provided range in meters.
    boolean
    rmPathAddWaypointConstraint(int pathID, int waypointID, int constraintID, float bufferDist)
    Adds a waypoint constraint to a path which a waypoint has to respect (useful if the waypoint is randomized one way or another).
    int
    rmPathAddWaypointInArea(int pathID, int areaID, float minOriginDistMeters, float maxOriginDistMeters)
    Adds a waypoint to a path, using the origin tile of an area, optionally randomizing from within the provided range in meters relative to the origin of the area (and still inside of the area).
    boolean
    rmPathBuild(int pathID)
    Builds a path.
    int
    Creates a new path.
    boolean
    rmPathDefAddConstraint(int pathDefID, int constraintID, float cost, float bufferDist)
    Adds a constraint which all tiles of a path derived from this path def have to respect.
    int
    rmPathDefAddRandomWaypoint(int pathDefID, float minDistFromPreviousMeters, float maxDistFromPreviousMeters)
    Adds a waypoint to a path def, optionally randomizing from within the provided range in meters relative to the last waypoint.
    boolean
    rmPathDefAddToClass(int pathDefID, int classID)
    Add paths created from a path definition to the given class.
    int
    rmPathDefAddWaypoint(int pathDefID, Vector loc, float minDistMeters, float maxDistMeters)
    Adds a waypoint (as a vector of fractions) to a path def, optionally serving as origin to randomize a waypoint from within the provided range in meters.
    boolean
    rmPathDefAddWaypointConstraint(int pathDefID, int waypointID, int constraintID, float bufferDist)
    Adds a waypoint constraint to a path def which a waypoint has to respect (useful if the waypoint is randomized one way or another).
    int
    rmPathDefAddWaypointInArea(int pathDefID, int areaID, float minOriginDistMeters, float maxOriginDistMeters)
    Adds a waypoint to a path, using the origin tile of an area def, optionally randomizing from within the provided range in meters relative to the origin of the area (and still inside of the area).
    int
    Creates a new path definition.
    int
    rmPathDefCreatePath(int pathDefID, String nameOverride)
    Creates an path from an path definiton; If a name override is provided that name is used, otherwise the name of the path definition followed by the number of paths created with the definition so far is used.
    int[]
    rmPathDefCreatePaths(int pathDefID, int numPaths, String nameOverride)
    Creates multiple paths from an path definiton; If a name override is provided that name is used incrementally, otherwise the name of the path definition followed by the number of paths created with the definition so far is used.
    int
    rmPathDefGetCreatedPath(int pathDefID, int index)
    Gets the ID of the ith path created by this path definition.
    int[]
    rmPathDefGetCreatedPaths(int pathDefID)
    Gets all path IDs created by this path definition.
    int
    Gets the path definition ID for a given path definiton name.
    rmPathDefGetName(int pathDefID)
    Gets the name for a given path definition ID.
    boolean
    rmPathDefSetAllowDiagonals(int pathDefID, boolean allowDiagonals)
    Specifies whether paths derived from a path def are allowed to go diagonally.
    boolean
    rmPathDefSetAllTerrainCosts(int pathDefID, float cost)
    Sets the cost for all terrains for a path def.
    boolean
    rmPathDefSetCostNoise(int pathDefID, float minNoise, float maxNoise)
    Adds a random value in the specified range for each tile for a path def, used in addition to terrain costs, distance costs, and constraint costs.
    boolean
    rmPathDefSetIgnoreStartEndConstraints(int pathDefID, boolean ignoreStartEndConstraints)
    Specifies whether the start and end tile of a path derived from a path def should ignore constraints or not.
    boolean
    rmPathDefSetTerrainCost(int pathDefID, int terrainID, float cost)
    Sets the cost for a terrain for a path def, used in addition to distance costs, constraint costs, and noise when building the path.
    int
    Gets the path ID for a given path name.
    rmPathGetName(int defID)
    Gets the name for a given path ID.
    int
    Returns the number of segments a path has.
    rmPathGetTiles(int pathID)
    Returns all tiles of a path as fractions.
    boolean
    rmPathSetAllowDiagonals(int pathID, boolean allowDiagonals)
    Specifies whether a path is allowed to go diagonally.
    boolean
    rmPathSetAllTerrainCosts(int pathID, float cost)
    Sets the cost for all terrains for a path.
    boolean
    rmPathSetCostNoise(int pathID, float minNoise, float maxNoise)
    Adds a random value in the specified range for each tile for a path, used in addition to terrain costs, distance costs, and constraint costs.
    boolean
    rmPathSetIgnoreStartEndConstraints(int pathID, boolean ignoreStartEndConstraints)
    Specifies whether the start and end tile of a path should ignore constraints or not.
    boolean
    rmPathSetTerrainCost(int pathID, int terrainID, float cost)
    Sets the cost for a terrain for a path, used in addition to distance costs, constraint costs, and noise when building the path.
    boolean
    rmPlacePlayer(int playerID, Vector loc)
    Sets the location for the provided player.
    boolean
    rmPlacePlayersOnCircle(float radius, float radiusMetersVar, float angleVar, float angle, float range, Vector originLoc)
    Places players in a circle; The location of the circle defaults to the map center if not provided.
    boolean
    rmPlacePlayersOnEllipse(float xRadius, float zRadius, float radiusMetersVar, float angleVar, float ellipseAngle, float angle, float range, Vector loc)
    Places players in an ellipse; The location of the ellipse defaults to the map center if not provided.
    boolean
    rmPlacePlayersOnSquare(float xRadiusFraction, float zRadiusFraction, float lineVarMeters, float distVarMeters, Vector loc)
    Places players in a square (or rectangle); The location of the square defaults to the map center if not provided.
    boolean
    rmPlacePlayersOnWaypointLine(boolean wrap, float lineVarMeters, float distVarMeters, boolean randomStart)
    Places players along a line defined by previously added points with rmAddWaypointLinePlacementPoints().
    float
    rmRadiusToAreaFraction(float meters, boolean clamp, boolean warn)
    Calculates the fraction an area with the given radius in meters covers of the entire map.
    int
    rmRemoveUnitType(int unitType)
    Removes all units with the given type from the map, returning the total number of removed units.
    void
    Restarts script execution; cNumberRestarts tracks the number of times the script has been restarted so far.
    boolean
    rmRevealLocToPlayer(int playerID, Vector loc, float revealRadiusMeters, boolean square)
    Reveals tiles around a location (square or circular).
    void
    rmSetLighting(String lightingSetName)
    Sets a lighting set.
    void
    rmSetMapRevealed(boolean reveal)
    Sets whether or not to reveal the entirety of the map.
    boolean
    rmSetMapSize(int xTiles, int zTiles)
    Sets the number of tiles for the x and z axis to use.
    void
    rmSetNatureCiv(int civID)
    Sets Mother Natures civilization, or randomizes from all civs if the civID is -1.
    void
    Randomizes Mother Natures civilization from the given culture, or from all civs if cultureID is -1.
    boolean
    rmSetPlacementTeam(int teamID)
    Sets the team to place.
    boolean
    rmSetPlayerArea(int playerID, int areaID)
    Sets a player's official area.
    boolean
    rmSetPlayerResource(int playerID, int resouceID, float amount)
    Sets one players amount of the specified resource.
    boolean
    rmSetPlayerResourcesInfinite(int playerID, boolean infinite)
    Grants a player infinite resources if set to true.
    void
    rmSetPostGenWaterBeautification(boolean beautifyWater, boolean beautifyWaterTerrain)
    Determines whether waterbodies will be expanded based on their height to fill gaps, and whether water body terrain will be repainted.
    void
    rmSetProgress(float progress)
    Sets the progress bar to the specified percentage in [0.0, 1.0].
    void
    rmSetShuffleTeams(boolean shuffle)
    Sets whether team placement order will be shuffled (ie, the order in which teams are placed) before placement with one of the placement functions.
    boolean
    Sets the ordering of players within teams for placement (sorted by ascending color index, random, or lobby order).
    void
    rmSetTeamSpacingModifier(float modifier)
    Sets the team spacing modifier, with values; Overrides team ally distance if set.
    void
    rmSetTOBConversion(boolean convert)
    Sets whether or not objects with the ConvertToTOB flag get automatically converted.
    boolean
    rmSplineAddLoc(int splineID, Vector loc)
    Adds a loc to the spline.
    int
    Creates a new spline with the given name, returning the ID of the created spline.
    rmSplineEvaluate(int splineID, int numPoints)
    Evaluates an initialzed spline in (numPoints - 1) equal intervals, resulting in numPoints interpolated points.
    rmSplineEvaluateAt(int splineID, float t)
    Evaluates an initialzed spline at time t in [0.0, 1.0].
    int
    Gets the spline ID for a given spline name.
    rmSplineGetName(int defID)
    Gets the name for a given spline ID.
    boolean
    rmSplineInitialize(int splineID)
    Initializes a spline with the points added so that it can be evaluated subsequently.
    int[]
    rmSplineToPaths(int splineID, int numPointsPerSplineSegment, boolean allowDiagonals)
    Creates paths from splines, one between each pair of waypoints, and returns the IDs of the created paths.
    float
    rmSquareMetersToAreaFraction(float squareMeters, boolean clamp, boolean warn)
    Converts an area of square meters to a fraction of the map.
    void
    Sets the goal text to be used in the objectives screen.
    void
    Sets the spotlight title to be used in the objectives/summary screen.
    void
    Sets the path for the spotlight image to be used in the objectives/summary screen.
    void
    Sets the spotlight text to be used in the objectives/summary screen.
    void
    Sets the title text to be used in the objectives screen.
    rmTileIndexToFraction(Vector tile, boolean warn)
    Converts a vector of a tile position to a vector infractions.
    rmTileIndexToMeters(Vector tile, boolean warn)
    Converts a vector of a tile position to a vector of meters.
    float
    rmTilesToAreaFraction(int tiles, boolean clamp, boolean warn)
    Converts an area tile count to a fraction of the entire map.
    float
    rmTilesToMeters(int tiles)
    Converts a number of tiles to a length in meters.
    boolean
    Adds an XS trigger script to include to the trigtemp.xs trigger script; The path is relative to the trigger folder (and NOT the RM folder).
    void
    Adds a single line of XS code to the trigtemp.xs trigger script.
    boolean
    rmTriggerAddUnitsToArmy(int playerID, int armyID, int objectDefID)
    Simon TODO.
    int
    rmTriggerCreateArmy(int playerID, String armyName)
    Simon TODO.
    boolean
    rmWallsPlace(int playerID, Vector[] waypoints)
    Simon TODO.
    boolean
    rmWallsPlaceAroundArea(int playerID, int areaID)
    Simon TODO.
    boolean
    rmWallsPlaceLine(int playerID, Vector startLoc, Vector endLoc)
    Simon TODO.
    boolean
    rmWallsPlaceSquare(int playerID, Vector loc, float radiusMeters)
    Simon TODO.
    boolean
    rmWaterTypeAddBeachLayer(int waterID, int terrainID, float distance, float variance)
    Adds a beach layer (towards land) when painting water edges for the provided water type; Distance should increase from layer to layer.
    boolean
    rmWaterTypeAddShoreLayer(int waterID, int terrainID, float distance, float variance)
    Adds a shore layer (towards water) when painting water edges for the provided water type; Distance should increase from layer to layer.
    boolean
    rmWaterTypeSetFloorTerrain(int waterID, int terrainID)
    Sets the floor terrain type to use for the water type with the given ID.
    float
    rmXFractionToMeters(float meters, boolean clamp, boolean warn)
    Converts a fraction of the x axis to a length in meters.
    int
    rmXFractionToTileIndex(float fraction, boolean warn)
    Converts a fraction of the x axis to the index of the closest tile on the x axis.
    int
    rmXFractionToTiles(float fraction, boolean clamp, boolean warn)
    Converts a fraction of the x axis to a length in tiles (rounded to the closest tile).
    float
    rmXMetersToFraction(float meters, boolean clamp, boolean warn)
    Converts a length in meters to a fraction of the x axis.
    int
    rmXMetersToTileIndex(float meters, boolean warn)
    Converts a length in meters to a tile index on the x axis (rounded to the closest tile).
    float
    rmXTileIndexToFraction(int tile, boolean warn)
    Converts a tile position on the x axis to a fraction of the x axis.
    float
    rmXTileIndexToMeters(int tile, boolean warn)
    Converts the index of a tile on the x axis to meters.
    float
    rmXTilesToFraction(int tiles, boolean clamp, boolean warn)
    Converts a length in tiles to a fraction of the x axis.
    float
    rmZFractionToMeters(float meters, boolean clamp, boolean warn)
    Converts a fraction of the z axis to a length in meters.
    int
    rmZFractionToTileIndex(float fraction, boolean warn)
    Converts a fraction of the z axis to the index of the closest tile on the z axis.
    int
    rmZFractionToTiles(float fraction, boolean clamp, boolean warn)
    Converts a fraction of the z axis to a length in tiles (rounded to the closest tile).
    float
    rmZMetersToFraction(float meters, boolean clamp, boolean warn)
    Converts a length in meters to a fraction of the z axis.
    int
    rmZMetersToTileIndex(float meters, boolean warn)
    Converts a length in meters to a tile index on the x axis (rounded to the closest tile).
    float
    rmZTileIndexToFraction(int tile, boolean warn)
    Converts a tile position on the z axis to a fraction of the z axis.
    float
    rmZTileIndexToMeters(int tile, boolean warn)
    Converts the index of a tile on the z axis to meters.
    float
    rmZTilesToFraction(int tiles, boolean clamp, boolean warn)
    Converts a length in tiles to a fraction of the z axis.
    float
    round(float x)
    Rounds x to the nearest integer and returns it as a float.
    void
    saveCamera(String filename)
    Save camera to file.
    void
    saveEditorScenario(String fname, boolean inGameAsset)
    Saves out a scenario file.
    void
    Saves out a scenario file to campaign/ingame asset folder.
    void
    Saves out a scenario file to local player folder.
    void
    saveGame(String fname, boolean throttleSaves)
    Saves out a game in progress.
    void
    Saves the current status of lighting values as a set.
    void
    Saves out a scenario file.
    void
    Causes score to update even if it isnt supposed to yet, time wise.
    void
    screenshot(int unused)
    Take a screen shot.
    void
    sendPromptType(int sendingPlayer, int promptType)
    Send AIChat to current player from sendingPlayer; specify desired.
    void
    setCurrentPlayerInReplay(int playerIndex)
    Sets the currently viewed player in playback.
    void
    Set mip levels to skip for default category textures.
    void
    Set mip levels to skip for terrain category textures.
    void
    Set Flare type.
    void
    setGameFadeIn(int r, int g, int b, int duration, int delay, boolean inOut)
    Turn fade in on/off, set color duration.
    void
    setGraphicDetail(int detailLevel)
    Sets the graphic detail; (0 = HIGH, 1 = MEDIUM, 2 = LOW).
    void
    setIgnoreAsserts(boolean ignore)
    Sets the system to ignore asserts, useful for automated scripts.
    void
    setMapVisibility(int indexChange)
    Change the current Map Visibility.
    void
    Sets the minimap filter for units.
    void
    setReplaySpeed(float val)
    Sets the replay playback rate, valid between [0.5f, 2.0f].
    void
    Sets the replay playback rate, valid between [0.5f, 2.0f] (Alternative version for hotkeys).
    void
    setRlinkMpMode(int rlinkMpMode)
    Set MP to online (0) or LAN (1).
    void
    setSceneLightParams(float sunIntensity, float fogColorR, float fogColorG, float fogColorB, float fogDensity)
    Sets scene light params.
    void
    setShadowBiasMul(float mul)
    Set the shadow buffer bias multipler (supaScreenshot only).
    void
    setShadowQuality(int level)
    Set the quality level of shadows.
    void
    setShadowRotationOp(int rotationOpFlag)
    Controls shadow projection rotation optimization.
    void
    setShadowSnapping(int snapFlag)
    Controls shadow matrix snapping.
    void
    setSquadMode(String squadModeName)
    Sets the mode for a squad.
    void
    setStance(String stanceName)
    Sets the stance for the selected units.
    void
    Enables Story Mode and adjusts world difficulty level accordingly.
    void
    setSunPosition(float inclination, float rotation, boolean relative)
    Sets the sun height above the horizon and position in the world; The bool tells if the changes are relative.
    void
    setTechStatus(String techName, boolean active)
    Debug only function that activates/deactivates a given tech.
    void
    setToneMapParams(float exposure, float displayGamma, float ditherNoiseIntensity)
    Sets tonemap params.
    void
    setUnitToRepair(int unitID)
    Find a nearby unit and set it to repair building.
    void
    Sets the currently viewed player in playback via the currently selected unit.
    void
    Sets the currently viewed player in playback via the currently selected unit; (alternative version for second hotkey).
    void
    SetVillagerToGather(int unitID, boolean isFish)
    Find a nearby villager and set it to gather resource.
    void
    Sets the world difficulty level.
    int
    sgn(float x)
    Returns the signum of x as an integer (1 if x > 0, -1 if x < 0, or 0 if x == 0).
    void
    showCampaignDialog(String nextCampaign, String String)
    UI used only.
    void
    Does what needs to be done.
    void
    Show the ingame menu.
    void
    Show/hide the mods screen.
    void
    showSPCNote(String title, String text)
    Displays the SPC Note Dialog with the specified title and text.
    float
    sin(float x)
    Returns the sine of x.
    void
    Skips the immediately subsequent scenario within the current campaign.
    void
    spawnUnitsSafe(int cmdID, int puID, int count, int playerID, int unitID)
    Spawn Units from building.
    void
    spectateRate(float rate)
    0 = stopped, 1 = realtime, other = realtime multiplier (if not CPU / GPU limited).
    void
    Flip player sides in spectator UI.
    float
    sqrt(float x)
    Returns the square root of x.
    void
    squadMode(int squadModeID)
    Sets the mode for a squad.
    void
    squadWheel(float angle, int squadID)
    Wheels the squad.
    void
    startBlankGame(int numberPlayers)
    Initializes a blank map with the given parms.
    void
    Starts the given campaign.
    void
    startMoviePlayback(String filename, int sizing, float fadeIn, float fadeOut)
    Start fullscreen playback of a movie.
    void
    startRandomGame(boolean editorMode)
    Begins a new random game.
    void
    startRandomGame2(String filename, int numberPlayers, int teamCount, int seed, int size)
    Begins a new random game with the given parms.
    void
    startRandomGameAgeAndMapCode(int startAge, boolean nomad, String mapcode)
    Generates a random map game with the given starting age, nomad start(true/false), and map code.
    void
    Generates a random map game with the given map code.
    void
    startRandomGameMapCodeAI(String mapcode, boolean enableAI)
    Generates a random map game with the given map code; Specify true/false if you want.
    void
    Stops updating all channels of debug data for the specified simulation output.
    void
    stopTrackingDebugUIState(int debugUIType, int playerID, int referenceID)
    Stops updating debug data for the specified simulation output.
    void
    sunColor(int r, int g, int b)
    Set sun color to given RGB (0-255).
    void
    sunDecreaseInclination(int keyState)
    Intended for ui use only; Indicates that the decrease sun inclination key has gone up/down.
    void
    sunDecreaseRotation(int keyState)
    Intended for ui use only; Indicates that the decrease sun rotation key has gone up/down.
    void
    Get sun color.
    void
    sunIncreaseInclination(int keyState)
    Intended for ui use only; Indicates that the increase sun inclination key has gone up/down.
    void
    sunIncreaseRotation(int keyState)
    Intended for ui use only; Indicates that the increase sun rotation key has gone up/down.
    void
    supaScreenshot(int xRes, boolean singleImage)
    Take a supascreen of the entire map.
    float
    tan(float x)
    Returns the tangent of x.
    void
    Adjusts (raise/lower) the terrain height by the specified meters.
    void
    Brings up the terrain edge density dialog.
    void
    Sets the texture repeat frequency on the terrain edge.
    void
    Filters the entire terrain.
    void
    terrainFilterArea(int c1, int c2, int c3, int c4)
    Filters a subarea of the terrain.
    void
    terrainFlatten(float height)
    Flattens the entire terrain.
    void
    terrainFlattenArea(int c1, int c2, int c3, int c4)
    Flattens a subarea of the terrain.
    void
    Paint whole terrain with given texture.
    void
    Paint whole terrain with given mix.
    void
    terrainSetMix(int mixID)
    Sets the terrain mix to paint.
    void
    terrainSetSubtype(int subtype)
    Sets the terrain subtype to paint.
    void
    terrainSetType(int type)
    Sets the terrain type to paint.
    void
    Updates the system grass length, preventing grass from growing in gameplay critical areas (ie, traderoutes).
    void
    tis(String protoName, int count, boolean each)
    Just like train in selected, but more abbreviated.
    void
    Toggle The Boids Tweaker Gui redo.
    void
    Handles the time display toggling.
    void
    With no argument, toggles state of Easy Drag Military setting; Otherwise, sets it.
    void
    Toggle the extended minimap.
    void
    Enable the free camera mode, W A S D Q E For movement + Right click drag to rotate.
    void
    Toggle the ingame menu.
    void
    togglePushToTalk(int keyState)
    Push to talk for multiplayer voice chat.
    void
    Show/hide the RM visualizer.
    void
    Handles the score toggling.
    void
    Toggle shadows on/off.
    void
    Toggles The Target Selector Tweaker Gui.
    void
    Handles the time display toggling.
    void
    Toggle the replay timeline.
    void
    Show/hide the TR echo log.
    void
    Toggle UI show state in the photo mode.
    void
    Show/hide the XS Debugger screen.
    void
    Adds the cameras current position and orientation to the current camera track.
    void
    trackAdvance(float lPosition)
    Advances the camera track to a specific location.
    void
    Clears all tracks.
    void
    Copies selected track.
    void
    Edits the currently selected camera track.
    void
    Moves the camera to the current event.
    void
    Moves the camera to the current waypoint.
    void
    Adds a new camera track.
    void
    Pauses the current camera track.
    void
    trackPlay(float lDuration, int eventID)
    Plays a track file (otherwise if "none" than plays the current track) with no arg uses current duration, otherwise sets duration.
    void
    Removes selected track.
    void
    Removes the most recently added track waypoint from the current camera track.
    void
    Sets the current waypoint to the button with the same index.
    void
    Steps the current camera track 1 step backward.
    void
    Steps the current camera track 1 step forward.
    void
    Stops the current camera track.
    void
    Toggles rendering of the camera track on and off.
    boolean
    trActivateCheat(int playerID, String command)
    Executes a cheat for the provided player.
    void
    trAddArmyToPlan(String armyName, String planName)
    Adds the units in the specified army to the specified plan.
    void
    trainByID(int protoUnitID, int number, int unitID, int playerID, float trainPoints)
    Start the training of a unit of ProtoUnitID from TrainingUnitID for the current player (if no player is specified).
    void
    trainInSelected(String protoName, int count, boolean each)
    Tries to train the selected unit type in any valid selected unit.
    void
    trainInSelectedByID(int protoType, int count, boolean each)
    Just like train in selected, but fastAr because it takes a protoID click.
    void
    trainReinforcement(int armyID)
    Trains a reinforcement.
    void
    trAISetAttackResponseDistance(int playerID, float attackResponseDistance)
    Sets the attack response distance for the provided playerIDs AI if it has one; This distance controls from what within distance the AI will call other units to help if one of its units gets attacked.
    boolean
    Returns true if any unit is selected.
    void
    Clears the given army, removing all unit IDs from army data.
    boolean
    trArmyDispatch(String army, String protoname, int count, float x, float y, float z, int heading, boolean clearExisting, boolean skipBirth)
    Creates the units in the army specified.
    boolean
    trArmyDispatchAtUnit(String army, String protoname, int count, int trgUnitID, int heading, boolean clearExisting, boolean skipBirth)
    Creates the units in the army specified at the location of the target unit.
    boolean
    trArmyDoWorkOnArmy(String srcArmy, String trgArmy, int eventID)
    Tasks the selected army to perform work on the first valid unit within the given arny.
    void
    trArmySelect(String parameters)
    Selects the units in the army specified.
    void
    trArmySelectInt(int playerID, int armyID)
    Selects the units in the army specified.
    void
    trArmyUnitChangeName(String newName, String protoUnitName)
    Set an override name for a specific unit in an army.
    void
    Blocks all ambient sounds from this point forward.
    void
    trBlockAllSounds(boolean dialog)
    Blocks all sounds from playing from this point forward.
    boolean
    Returns true if the proto unit specified is on the cursor and is a building.
    boolean
    trBuildingTimeShiftAtPos(int unitID, float x, float y, float z)
    Cast timeshift on this unit at this position.
    void
    trCameraCut(Vector pos, Vector dir, Vector up, Vector right)
    Puts the camera in the specified location.
    void
    trCameraCutPlayer(int playerID, Vector pos, Vector dir, Vector up, Vector right)
    Puts the camera in the specified location for the given player.
    void
    trCameraLock(boolean lock)
    Toggles camera movement locking over the current position.
    void
    trCameraLockOnUnit(boolean bEnable, int timer, int eventID)
    Orients the camera to the selected unit, and keeps it locked on that unit.
    void
    trCameraPanWithUnit(boolean bEnable, int eventID)
    Moves the camera in the same direction that a particular unit moves.
    void
    trCameraShake(float shakeDuration, float shakeStrength)
    Makes the camera shake.
    void
    trCameraStateView(int id, int playerID)
    Puts the camera in the location of a saved camera state, for the given player, or for all players, if no player is set.
    int
    trCameraTrackAddWaypoint(int trackIdx, Vector position, Vector dir, Vector up, Vector right, float fov)
    Adds the provided camera position as a waypoint to the given track index.
    int
    trCameraTrackCreate(String trackName, float durationMs)
    Adds a camera track.
    void
    Loads a camera track.
    void
    trCameraTrackPlay(float fDuration, int eventID, boolean blendWithGameCamera, float blendDurationMS)
    Plays the current camera track, if blend with game camera is true, it will best fit the strategy camera location at the last waypoint and smooth transition to it.
    void
    trCameraTrackPlayPlayer(String camTrackName, int playerID, boolean blendWithGameCamera, float blendDurationMS)
    Loads and plays a camera track for a given player, if blend with game camera is true, it will best fit the strategy camera location at the last waypoint and smooth transition to it.
    (package private) void
    trCameraTrackWaypointSetBias(int trackIdx, int waypointIdx, float bias)
    Sets the bias for a provided waypoint index in the given track index.
    (package private) void
    trCameraTrackWaypointSetContinuity(int trackIdx, int waypointIdx, float continuity)
    Sets the continuity for a provided waypoint index in the given track index.
    (package private) void
    trCameraTrackWaypointSetTension(int trackIdx, int waypointIdx, float tension)
    Sets the tension for a provided waypoint index in the given track index.
    (package private) void
    trCameraTrackWaypointSetTime(int trackIdx, int waypointIdx, float timeMs)
    Sets the time for a provided waypoint index in the given track index.
    void
    trCampaignBranchChoice(String message, boolean displayPrompt)
    Pop up a dialog allowing choice to load a scenario.
    void
    Sets player as defeated within a campaign mission and displays defeat dialog.
    void
    Completes current scenario within campaign, and advances to next scenario or cinematic.
    void
    Completes current scenario within campaign, and displays prompt to progress to next scenario or return to campaign menu.
    void
    trCampaignStartNew(String message, String campaignPath)
    Shows dialog for advancing to the given campaign.
    void
    trChangeProtoUnitInArea(int playerID, String unitTypeName, float range, String dstProtoName, boolean skipBirth)
    All units within dist of the selected ref object are changed into the given protoUnit.
    void
    trChangeTerrainHeight(float x0, float z0, float x1, float z1, float height, boolean removeWater)
    Sets the terrain elevation for the provided rectangular region.
    void
    trChangeTerrainHeightCircular(Vector center, float radius, float height, boolean removeWater)
    Sets the terrain elevation for the provided circular region.
    void
    Clears the messages visible on screen.
    void
    Forces the chat history to reset.
    boolean
    trChatHistoryContains(String text, int playerID)
    Checks whether or not any of the last sent chat messages by a player contain the given text.
    void
    Sets whether the last messages should always remain visible.
    void
    trChatSend(int playerID, String message)
    Changes the chat status.
    void
    trChatSendSpoofed(int playerID, String message)
    Changes the chat status, but does not append player.
    void
    trChatSendSpoofedToPlayer(int playerID, int toPlayer, String message)
    Changes the chat status, but does not append player; Goes to specific player.
    void
    trChatSendToPlayer(int playerID, int toPlayer, String message)
    Changes the chat status for one specific player.
    void
    trChatSetStatus(boolean status)
    Changes the chat status.
    void
    Aborts the cinematic.
    boolean
    Returns the abort cinematic status.
    void
    TODO.
    void
    trConvertUnitsInArea(int srcPlayer, int trgPlayer, String unitTypeName, float range)
    All units within dist of the selected ref object that match type are converted to the target player.
    void
    Abort a counter.
    void
    trCounterAddGenericXS(String name, String msg, String appendMsg, String xsCall, int eventID, int intialVal, int finalVal, boolean finalAsMin, boolean showFinal, boolean reverseCount, boolean startAtZero)
    Start an XSbased counter, that may or may not fire an event; The name of this counter is also a QV under the hood that can be adjusted at will; If you attached an xsCall to this counter the QV variable will be updated each frame so doing custom things to it wont have an effect.
    boolean
    trCounterAddPlayerName(String name, String message, int playerID)
    Displays a player name as a counter.
    boolean
    Displays a string as a counter.
    void
    trCounterAddTime(String name, int start, int stop, String message, int eventID)
    Start a counter that may or may not fire an event.
    void
    trCounterAddTimeMs(String name, int start, int stop, String message, int eventID)
    Start a counter that may or may not fire an event.
    boolean
    trCounterDecrementManual(String name, int amount)
    Decrement the current value of the counter.
    int
    Returns the current value of the given counter.
    boolean
    trCounterIncrementManual(String name, int amount)
    Increment the current value of the counter.
    void
    trCounterPause(String name, boolean pause)
    Pause a counter.
    void
    trCounterPersistent(String name, boolean persistent)
    Enables or disables persistency for a counter; Persistent counters arent deleted even after reaching their maximum value.
    void
    trCounterPlayerSpecific(String name, boolean playerSpecific, int playerID)
    Sets whether or not a given counter should be restricted to specific players, and, if so, assigns the given player to the counter.
    boolean
    trCounterSetManual(String name, int val)
    Sets the current value of the given manual counter.
    boolean
    Changes the string to be displayed on a given string pseudocounter.
    boolean
    trCounterSetPlayerName(String name, int playerID)
    Changes the player name to be displayed on a given player name pseudocounter.
    void
    trCounterSetVisibility(String name, boolean visible)
    Hides or displays a counter.
    void
    trCounterTimeDecrement(String name, int value)
    Decrements the current value of a given time counter by the provided value.
    void
    trCounterTimeIncrement(String name, int value)
    Increments the current value of a given time counter by the provided value.
    void
    trCounterTimeSetValue(String name, int value)
    Forcibly sets the current value of a given counter.
    void
    trCreateRevealer(int playerID, String revealerName, Vector position, float revealerLOS, boolean blackmapOnly)
    Creates a revealer with the given attributes.
    int
    Returns the current player.
    void
    trDamageUnit(float damageAmt)
    Does a specific amount of damage to HP in instant typeless damage.
    void
    trDamageUnitPercent(float damagePercent)
    Does percent of a unit's total HP in instant typeless damage.
    void
    trDamageUnitsInArea(int playerID, String unitTypeName, float range, float dmg)
    All units within dist of the selected ref object that match type take dmg.
    void
    trDamageUnitsPercentInArea(int playerID, String unitTypeName, float range, float healPercent)
    All units within dist of the selected ref object are damaged by the given factor.
    void
    Defakifies the army.
    void
    Sets the selected unit as not having a fake player trDefakifySelection.
    void
    Resets all submodels back to using the player colour of the parent model.
    void
    trDelayedRuleActivation(String name, boolean checkForTrigger)
    Adds a rule to the runtime to be activated on the next update.
    void
    trDisableConquestCheck(boolean disable)
    Temporarily disables or reenables conquest victory check in a scenario that supports it.
    void
    trDisableNotificationSounds(boolean disable)
    Sets whether or not notification sounds should be disabled for this scenario.
    void
    Sets whether or not persistent popcap notifications should be disabled for this scenario.
    void
    trDisablePowerNotifications(boolean disable)
    Sets whether or not power casting notifications should be disabled for this scenario.
    void
    trDisablePowerTimers(boolean disable)
    Sets whether or not displaying timers for active powers should be disabled for this scenario.
    void
    Tells the challenge system this rule was activated.
    void
    trDisableTrigger(int eventID)
    Disables (sets active = false) the trigger specified by the given eventID.
    void
    trDisableUnitDeletion(boolean disable)
    Sets whether or not unit and building deletion should be disabled for this scenario.
    void
    trEcho(String text)
    Trigger echo.
    void
    trEchoStatValue(int playerID, int statIndex)
    Fetch a stat value from the KB and echo to chat trEchoStatValue maintext.
    void
    trEndChallenge(boolean bAchievedVictory)
    Player completed the challenge; If achieved victory is true, player completed all objectives before the timer elapsed.
    void
    Signal that the game has ended.
    void
    trEnforceAIAssist(boolean enable)
    Sets whether or not AI assist support should be enforced for this scenario.
    void
    trEventFire(int eventID)
    Cause an event to occur.
    boolean
    trEventSetHandler(int eventID, String functionName)
    Sets a handler function for an event id.
    (package private) void
    Executes the given console command.
    boolean
    trExecuteOnAI(int playerID, String command)
    Executes a command on the AI player.
    void
    trFadeOutAllSounds(float duration)
    Fades out all sounds over a given duration.
    void
    trFadeOutMusic(float duration)
    Fades out current music over a given duration.
    void
    trFakifyArmy(String armyName, int fakePlayerIndex)
    Fakifies the army to the specified fake player index.
    void
    trFakifySelection(int fakePlayerIndex)
    Sets the selected unit as having the fake player with the specified index (07).
    void
    trFakifySelectionSubModelByOverrideName(String overrideName, int fakePlayerIndex)
    Sets named submodels of the selection to fake player with the specified index (07).
    boolean
    trForbidProtounit(int player, String protoname)
    Adds protounit to the forbidden list.
    void
    Forces the objective panel to always display.
    void
    trFormationScale(float scale)
    Scales the formation size of formations in the game.
    trFormatString(String format, String[] inserts)
    Inserts (loc)strings into (loc)strings.
    void
    Start a game using scenario.
    void
    trGamePause(boolean pause)
    Pause or unpause the game.
    void
    Generates lush for all selected buildings, if owning player supports lush generation.
    int
    Returns the unit ID for the current skybox, if applicable.
    int
    Returns the ID for the next unit to be allocated.
    int[]
    Returns an array containing recently created units; If autoresetting is set, returns units created on the last frame.
    int
    trGetScenarioUserData(int index, int fallback, String scenarioName)
    *** NOTE: This function is DEPRECATED *** Gets the scenario user data and returns the default value when it is not present yet.
    int
    Returns the variation ID for the given skybox.
    float
    Returns the terrain height at the given map position.
    int
    Fetches the terrain subtype ID for the given map position.
    int
    Fetches the terrain type ID for the given map position.
    int
    Fetches the water type ID for the given map position.
    int
    Returns the world difficulty.
    void
    Cancels all active god powers; You have to be in an active game to use this.
    void
    trGodPowerEnableBlocking(boolean bEnable)
    Sets whether or not God Power blocking is enabled; Default=ON.
    void
    trGodPowerGrant(int playerID, String protoPowerName, int numUses, int cooldown, boolean useCost, boolean repeatAtEnd)
    Grants X uses of the specified God Power to the player.
    void
    trGodPowerGrantAtSlot(int playerID, String protoPowerName, int numUses, int position, int cooldown, boolean useCost, boolean repeatAtEnd)
    Grants X uses of the specified god power in a specific God Power UI slot.
    void
    trGodPowerInvoke(int playerID, String protoPowerName, Vector pos1, Vector pos2, boolean ignoreCooldown, boolean setAsQueued)
    Invokes the specified God Power.
    boolean
    trGodPowerInvokeAtArmy(int powerPlayerID, String army, String protoPowerName, boolean ignoreCooldown, boolean setAsQueued)
    Invokes the specified God Power at the specified army.
    boolean
    trGodPowerPrePurchase(int playerID, String protoPowerName, int numUses)
    Prepurchases X uses of the specified God Power to the player, if applicable.
    void
    trGodPowerRedefine(int playerID, String protoPowerName, String iconPath, String displayName, String rollover)
    Replaces the icon, and display name and rollover strings of a power for the given player.
    void
    trGodPowerSetCooldown(int playerID, String protoPowerName, int cooldown)
    Sets the cooldown of the specified God Power for the given player.
    void
    trGodPowerSetCost(int playerID, String protoPowerName, float initialCost, float repeatCost)
    Sets the cost of the specified God Power for the given player.
    void
    trGodPowerSetUseCount(int playerID, String protoPowerName, int numUses)
    Sets the number of charges of the specified God Power for the given player.
    void
    trGodPowerSetUsedTimes(int playerID, String protoPowerName, int numUses)
    Overrides the number of timesthe specified God Power has been used.
    void
    trHealUnit(float healAmt)
    Adjust the units hitpoints by the given value.
    void
    trHealUnitPercent(float healPercent)
    Heals the selected units by a percentage of their total HP.
    void
    trHealUnitsInArea(int playerID, String unitTypeName, float range, float healAmt)
    All units within dist of the selected ref object have their HPs adjusted by the given value.
    void
    trHealUnitsPercentInArea(int playerID, String unitTypeName, float range, float healPercent)
    All units within dist of the selected ref object have their HPs adjusted by the given factor.
    void
    Hides the users Scoreboard.
    boolean
    Instantly garrisons units inside another unit without considering distance.
    boolean
    Returns true if were currently in gamepad mode.
    boolean
    trInInputContext(String inputContext)
    Returns true if were in the given input context.
    boolean
    trInRadialMenuPage(int radialMenuPageID)
    Returns true if the given radial menu page is open.
    boolean
    Returns false if dialogue is currently playing.
    boolean
    Returns true if the minimap is expanded.
    void
    trKillAIPlan(int playerID, String planName)
    No help.
    void
    trKillUnitsInArea(int playerID, String unitTypeName, float range)
    All units within dist of the selected ref object that match type are killed.
    void
    Leaves the current game; Most often that means going to the main menu but while in editor playtest it means you go back to the editor.
    void
    trLetterBox(boolean on, boolean letterbox)
    Turns letter box mode on or off; Letterbox toggles the black border around the screen while in cinematic mode.
    (package private) void
    trLightingSetParamBool(int paramID, boolean value)
    TODO
    (package private) void
    trLightingSetParamColor(int paramID, int r, int g, int b)
    TODO
    (package private) void
    trLightingSetParamColorAttr(int paramID, float attrRed, float attrGreen, float attrBlue)
    TODO
    (package private) void
    trLightingSetParamFloat(int paramID, float value)
    Sets the given floating point lighting set parameter to the provided value for this scenario only.
    (package private) void
    trLightingSetParamInt(int paramID, int value)
    Sets the given integer lighting set parameter to the provided value for this scenario only.
    void
    trMapMutateUnits(String srcUnitType, String trgProtoName, boolean fullHitpoints)
    Transforms all units on the map belonging to the given unit type into the set protoUnit through PU mutation, maintaining original BUnit pointer.
    void
    Resets Market buy and sell prices to default values.
    void
    trMessageSetText(String text, int timeout)
    Displays the message text.
    void
    trMinimapFlare(int playerID, float duration, Vector pPosition, boolean unused)
    Sends a Minimap flare to a certain player.
    void
    trModifyProtounitAction(String unitTypeName, String protoUnitActionName, int playerID, int puField, float delta, int relativity)
    Modifies proto unit action data for this scenario only.
    void
    trModifyProtounitActionUnitType(String unitTypeName, String actionName, String unitType, int playerID, int puField, float delta, int relativity)
    Modifies proto unit action data taking a unittype parameter for this scenario only.
    void
    trModifyProtounitData(String unitTypeName, int playerID, int puField, float delta, int relativity)
    Modifies proto unit data for this scenario only.
    void
    trModifyProtounitResource(String unitTypeName, String resource, int playerID, int puField, float delta, int relativity)
    Modifies proto unit data taking a resource parameter for this scenario only.
    (package private) void
    trModifyProtounitUnitType(String unitTypeName, String trgUnitType, int playerID, int puField, float delta, int puRelativity)
    Modifies proto unit data taking a unit type parameter for this scenario only.
    void
    trMusicPlay(String filename, float duration)
    Plays the music file.
    void
    Plays the current music.
    void
    Sets the current music set.
    void
    trMusicSetMood(int moodID, float fadeTimeSeconds)
    Changes the music to mood associated with mood id.
    void
    Stops the current music.
    boolean
    Returns true if the object is currently being worked.
    void
    trObjectiveComplete(int objectiveID, boolean forceComplete, boolean playSound)
    Completes the specified objective; Forces a reoccurring objective complete if forceComplete is true.
    void
    trObjectiveCreateMarker(int objectiveID, String name, Vector markerPos)
    Instantiates an objective marker and binds it to the given objective.
    void
    trObjectiveFailed(int objectiveID, boolean playSound)
    Sets the specified objective as failed.
    void
    trObjectiveHide(int objectiveID)
    Hides the specified objective on the UI.
    void
    trObjectiveIncomplete(int objectiveID, boolean playSound)
    Marks a specified objective as incomplete.
    void
    trObjectiveRemoveMarker(int objectiveID, String name)
    Removes the specified objective marker from the given objective.
    void
    trObjectiveShow(int objectiveID, boolean playSound)
    Shows the specified objective on the UI.
    void
    trObjectivesTracker(String title, String text, String soundfile, int timeout)
    Displays the objectives tracker text.
    void
    trOverlayText(String rawText, float time, float textSize, int colorR, int colorG, int colorB)
    Puts up a big moviecredits style text overlay.
    void
    trPaintTerrain(int terrainType, int terrainSubtype, float minX, float minZ, float maxX, float maxZ, boolean updateObstructions)
    Paints a rectangular area by the given terrain type and subtype.
    void
    trPaintTerrainBySubtypeName(String subtypeName, float x0, float z0, float x1, float z1, boolean updateObstructions)
    Paints a rectangular area by the terrain identified by the given terrain subtype UI name.
    void
    trPaintTerrainCircular(int terrainType, int terrainSubtype, Vector center, float radius, boolean updateObstructions)
    Paints a circular area by the given terrain type and subtype.
    void
    trPaintTerrainCircularBySubtypeName(String subtypeName, Vector center, float radius, boolean updateObstructions)
    Paints a circular area by the terrain identified by the given terrain subtype UI name.
    void
    trPaintWater(int waterID, float minX, float minZ, float maxX, float maxZ, boolean circular, boolean updateObstructions)
    Paints an area by the water entry identified by the given ID.
    void
    trPaintWaterCircular(String waterName, Vector center, float radius, boolean updateObstructions)
    Paints a circular area by the water entry identified by the given name.
    void
    trPaintWaterRectangular(String waterName, float x0, float z0, float x1, float z1, boolean updateObstructions)
    Paints a rectangular area by the water entry identified by the given name.
    int
    trPlaceFoundation(String protoName, float x, float y, float z, int heading, int playerID, float pctComplete)
    Places a foundation for the given building and returns the ID of the foundation.
    void
    trPlayerAdjustScore(int playerID, int delta)
    Adjust the overridden score value for a player by the given delta.
    void
    trPlayerAllowAgeUpSpawning(int playerID, boolean allowSpawning)
    Sets whether or not units will be spawned through ageup techs.
    void
    trPlayerAllowShades(int playerID, boolean allow)
    Sets whether or not the given player will be allowed to spawn shades.
    void
    trPlayerAllowStartingUnitsSpawning(int playerID, boolean allowSpawning)
    Sets whether or not starting units will be spawned for the given player.
    boolean
    trPlayerAtPopCap(int playerID)
    Returns true if player is at pop cap.
    void
    trPlayerChangeProtoUnit(int playerID, String srcUnitType, String trgProtoName, boolean skipBirth, boolean forceFoundation)
    Transforms all units for a player belonging to the given unit type into the set protoUnit; Does not use PU mutation, and does not maintain original BUnit data.
    boolean
    trPlayerControlsSocket(int playerID, int unitID)
    Returns true if the specified player is built on the specified socket.
    void
    trPlayerEnablePartisans(int playerID, boolean allow)
    Sets whether or not partisan spawning will be enabled for the given player.
    void
    trPlayerEnableTimeshift(int playerID, boolean allow)
    Sets whether or not timeshifting will be enabled for the given player.
    boolean
    trPlayerGetCivilization(int playerID, String civilization)
    Returns true/false if the player civilization matches the given parameter.
    trPlayerGetDiplomacy(int player1, int player2)
    Gets the diplomacy status between players.
    int
    trPlayerGetType(int playerID)
    Returns whether the given player is a human or a computer/AI player.
    int
    Gets the villager priority preset for player.
    void
    trPlayerGrantResources(int playerID, String resource, int amount)
    Advances the campaign.
    boolean
    trPlayerIsActive(int playerID)
    Returns true/false if the player is active.
    boolean
    trPlayerIsDefeated(int playerID)
    Returns true/false if the player has been defeated.
    boolean
    Returns true/false if the player has resigned or has been defeated.
    void
    Kills all of the buildings of a given player.
    void
    Kills all of the current God Powers of a player.
    void
    trPlayerModifyData(int playerID, int dataField, int attribute, float delta, int relativity)
    Modifies player data for this scenario only.
    void
    trPlayerModifyLOS(int destPlayer, boolean canSee, int srcPlayer)
    Adds/removes LOS between players.
    void
    trPlayerModifyResourceData(int playerID, int dataField, int resourceID, float delta, int relativity)
    Modifies player data for this scenario only.
    void
    trPlayerMutateUnits(int playerID, String srcUnitType, String trgProtoName, boolean fullHitpoints)
    Transforms all units for a player belonging to the given unit type into the set protoUnit through PU mutation, maintaining original BUnit pointer.
    void
    trPlayerOverrideArtCulture(int playerID, String culture)
    Overrides the culture used for choosing the players art.
    void
    trPlayerOverrideCivName(int playerID, String StringID)
    Overrides the string used for the displayed civilization name.
    void
    trPlayerRemoveAllUnits(int playerID)
    Removes all of the units of a given player without affecting Player Stats.
    void
    trPlayerResetBlackMap(int playerID)
    Resets the black map for a given HUMAN player.
    void
    TrPlayerResetBlackMapForAllPlayers(Resets the black map for all HUMAN players.
    void
    trPlayerSetActive(int playerID)
    Sets the active player.
    void
    trPlayerSetCiv(int playerID, String civName)
    Replaces the civilization for the given player.
    void
    trPlayerSetColor(int playerID, int playerColorID, int r, int g, int b)
    Sets the player color for the given player.
    void
    Call this when a player is defeated on the local machine (meaning that this func must be called synchronously on all machines, it will not pass around a command).
    void
    trPlayerSetDiplomacy(int player1, int player2, String status, boolean mutual)
    Sets the diplomacy status between players.
    void
    trPlayerSetName(int playerID, String name)
    Sets the displayed name for the given player.
    void
    trPlayerSetScore(int playerID, int score)
    Overrides the score for a player by the given value.
    void
    trPlayerSetVictorious(int playerID)
    Sets the given player as victorious for the current game.
    void
    trPlayerSetWon(int i, boolean endGame)
    Call this when a player has won on the local machine (meaning that this func must be called synchronously on all machines, it will not pass around a command).
    void
    trPlayerTechTreeEnabledGodPowers(int playerID, boolean bEnable)
    Enables/Disables the Tech Tree from granting God Powers to a player; Default=ON.
    void
    trPlayerTimeshiftAddEntry(int playerID, String protoName, float costRatio, float timeRatio)
    Adds a timeshifting entry towards the given protoUnit to a player for this scenario only.
    void
    trPlayerTimeshiftModifyCost(int playerID, String protoName, float delta, int relativity)
    Modifies timeshifting cost ratio for a given protoUnit for this scenario only.
    void
    trPlayerTribute(int playerID, String resource, int amount, int toPlayerID)
    Tributes resources to a player.
    void
    Plays the next song in the music play list.
    void
    trProtoUnitActionSetEnabled(String protoUnitName, int playerID, String actionName, boolean enable)
    Enables or disables an action for a proto unit.
    void
    trProtounitActionSpecialEffect(String unitTypeName, String actionName, int playerID, int effectField, String targetType, int dmgType, float duration, float value)
    Modifies proto unit action data by adding a new or adjusting an existing onHitEffect for this scenario only.
    void
    trProtounitActionSpecialEffectActive(String unitTypeName, String actionName, int playerID, int effectField, String targetType, int dmgType, boolean active)
    Modifies proto unit action data by setting a specified existing onHitEffect as active or inactive.
    void
    trProtounitActionSpecialEffectDuration(String unitTypeName, String protoUnitActionName, int playerID, int efectType, String targetType, int damageType, float delta, int relativity)
    Modifies the duration of an existing onHitEffect within the given protoAction for this scenario only.
    void
    trProtounitActionSpecialEffectModifier(String unitTypeName, String actionName, int playerID, int effectField, String targetType, float value, int modifyType, int dmgType)
    Modifies proto unit action data by adding a new or adjusting an existing onHitEffect and assigning a new stat modifier to it for this scenario only.
    void
    trProtounitActionSpecialEffectProtoUnit(String unitTypeName, String actionName, int playerID, int effectField, String targetType, String protoUnit, float duration, float value)
    Modifies proto unit action data by adding a new or adjusting an existing onHitEffect taking a protoUnit parameter for this scenario only.
    void
    trProtounitAddCommand(String protoUnitName, int playerID, String puCmdName, int row, int column)
    Assigns a protoUnitCommand entry towards the given protoUnit for this scenario only.
    void
    trProtounitAddTech(String protoUnitName, int playerID, int techID, int row, int column)
    Assigns a tech entry towards the given protoUnit for this scenario only.
    void
    trProtounitAddTrain(String protoUnitName, int playerID, String trainPUName, int row, int column)
    Assigns a train entry towards the given protoUnit for this scenario only.
    (package private) void
    trProtounitAssignAction(String unitTypeName, String protoUnitName, String protoUnitActionName, int playerID)
    Assigns an action from the provided proto unit to all units belonging to the given unittype for this scenario only.
    void
    trProtoUnitChangeName(String protoUnitName, int playerID, String nameStrId, String rolloverStrId, String shortRolloverStrId)
    Modify the name and rollover text of a proto unit.
    void
    trProtoUnitHighlight(int playerID, String protoName, float duration, boolean flash)
    Highlights all units belonging to the given protounit for a player.
    void
    trProtoUnitMovementType(String unitTypeName, int playerID, String movementType)
    Modifies proto unit movement type for this scenario only.
    void
    trProtounitRemoveCommand(String protoUnitName, int playerID, String puCmdName)
    Removes a protoUnitCommand entry from the given protoUnit for this scenario only.
    void
    trProtounitRemoveTech(String protoUnitName, int playerID, int techID)
    Removes a tech entry from the given protoUnit for this scenario only.
    void
    trProtounitRemoveTrain(String protoUnitName, int playerID, String trainPUName)
    Removes a train entry from the given protoUnit for this scenario only.
    void
    trProtoUnitSetFlag(int playerID, String srcUnitTypeName, String unitTypeName, boolean set)
    Sets or unsets the given flag within the given protounit.
    void
    trProtoUnitSetIcon(String protoUnitName, int playerID, String iconPath, String minimapIconPath)
    Modify the icon of a proto unit.
    void
    trProtoUnitSetUnitType(int playerID, String protoUnit, String unitTypeName, boolean set)
    Sets or unsets the given unit type within the given protounit.
    void
    trQuestVarCopy(String destName, String fromName)
    Copies value of one of the trigger scratch variables.
    void
    Chats out the value of one of the trigger scratch variables.
    float
    Retrieve value of a trigger scratch variable, returns zero if unset.
    void
    trQuestVarSet(String varName, float val)
    Sets one of the trigger scratch variables.
    void
    trQuestVarSetFromRand(String varName, float minVal, float maxVal, boolean round)
    Sets one of the trigger scratch variables within a random range.
    void
    trQuestVarSetFromRandUnique(String varName, float minVal, float maxVal, boolean round)
    Sets one of the trigger scratch variables within a random range, while avoiding repeating consecutive values.
    void
    trQueueStartingUnits(int playerID)
    Queues starting units for player if they have a starting TC.
    void
    trRateConstruction(float rate)
    Modify construction rate.
    void
    trRateResearch(float rate)
    Modify research rate.
    void
    Resets all the rates to normal (1.0f).
    void
    trRateTrain(float rate)
    Modify training rate.
    boolean
    trRelicCreate(float x, float y, float z, int heading, String relicname)
    Creates a new relic from defined relic name.
    boolean
    trRelicForce(int unitID, String relicname)
    Changes type of selected relic to the given relic name.
    void
    trRemoveUnitsInArea(int playerID, String unitTypeName, float range, boolean ejectContained)
    All units within dist of the selected ref object that match type are killed.
    void
    trRenderRain(float percent)
    Controls rain rendering.
    void
    trRenderSky(boolean val, String skyName, int orientation, float height, boolean terrainHeight)
    Turn sky rendering on/off and set which sky to use.
    void
    trRenderSnow(float percent)
    Controls snow rendering.
    void
    Resets list of recentlycreated units.
    void
    Restarts the scenario.
    void
    Shows whole map, similar to how revealed mode works (SP modes only).
    int
    Returns how many units you currently have selected.
    int
    Returns the ID of the selected unit.
    void
    trSetAutoResetRecentUnits(boolean enable)
    Sets whether or not the list of recentlycreated units should be reset at each frame; Set to true by default.
    void
    TODO.
    void
    trSetCurrentPlayerStatus(boolean active)
    Sets the current player as active or inactive.
    void
    trSetCurrentScenarioUserData(int index, int value)
    *** NOTE: This function is DEPRECATED *** Sets the current scenario user data.
    void
    trSetFogAndBlackmap(boolean fog, boolean black)
    Turn fog and black map on/off; (SP modes only).
    void
    trSetFogAndBlackmapMultiplayer(boolean fog, boolean black)
    Turn fog and black map on/off, affecting all players; (no SP check).
    void
    trSetLighting(String setName, float fadeTime)
    Fades to the specified lighting set over fadetime.
    void
    trSetObscuredUnits(boolean v)
    Sets whether or not units can be drawn obscured or not.
    void
    TODO.
    void
    TODO.
    void
    trSetRevealerActiveState(String revealerName, boolean active)
    Finds the specified revealer and sets it to active or inactive.
    void
    trSetShadowFarClip(boolean enabled, float distance)
    Enable or disables the shadow far clippping plane.
    void
    trSetShowCursor(boolean show)
    Forces the cursor (mouse pointer) to be shown/hidden.
    void
    Sets whether or not units can do their idle processing.
    void
    trSetUserControls(boolean active)
    Sets the player controls on or off.
    void
    trShowChoiceDialog(String maintext, String text1, int event1, String text2, int event2)
    Displays dialog with 2 choices, and activates a trigger in response.
    void
    trShowChoiceDialogForPlayer(int playerID, String maintext, String text1, int event1, String text2, int event2)
    Displays dialog with 2 choices for a given player, and activates a trigger in response.
    void
    trShowHidePopup(int type, boolean display)
    Toggles a popup.
    void
    trShowImageDialog(String imagePath, String subtitle)
    Displays a custom image in a dialog, with a subtitle text2 text1.
    void
    trShowLosePopup(String text, String soundfile, boolean ignoreUserControlsState)
    Message and sound.
    void
    trShowTextMessage(String noteTitle, String noteText)
    Displays a text box with the specified title and text.
    void
    trShowWinLose(String text, String soundfile, boolean ignoreUserControlsState)
    Message and sound.
    void
    trShowWinPopup(String text, String soundfile, boolean ignoreUserControlsState)
    Message and sound.
    void
    trSocketBuild(int playerID, int socketID, String protoName)
    Autoconstructs a building over a given socket unit.
    boolean
    trSocketIsEmpty(int unitID)
    Returns true if there isnt a fullybuilt building occupying the specified socket.
    int
    trSocketPlaceFoundation(int playerID, int socketID, String protoName)
    Places a foundation into this socket unit.
    void
    trSoundPlayDialogue(int playerID, String msgStrID, String speakerStrID, String portraitStrID, String sound, int eventID, boolean ignoreOnAbort, int timeoutMs, boolean overrideSoundLength)
    Plays the sound associated with the dialogue.
    void
    trSoundPlayDialogueTalkingHeads(int playerID, String msgStrID, String speakerStrID, String portraitLeftSideStrID, String portraitRightSideStrID, boolean speakerIsLeftSide, String sound, int eventID, boolean ignoreEventOnAbort, int eventDelaySeconds)
    Plays the sound associated with the dialogue, using the talking heads version of the UI.
    void
    trSoundPlayFN(String filename, int eventID, String subtitle, String portrait)
    Plays the sound associated with the filename.
    void
    trSoundPlayPaused(String filename, String seconds, int eventID, String subtitle, String portrait)
    Plays the sound associated with the filename.
    void
    trSoundsetPlay(String soundsetName)
    Plays the sound associated with the given soundset.
    void
    trSoundsetPlayPlayer(int playerID, String soundsetName)
    Plays the sound associated with the given soundset for the given player.
    void
    trSoundTimer(int ms, int eventID)
    TrSoundTimer(int32 milliseconds, int32 eventID) creates a high performance sound timer and passes the eventID as data.
    void
    trTechHideEffects(int techID, int playerID, boolean display)
    Sets whether or not effects should be hidden in the rollover for the given technology for this scenario only.
    void
    trTechModifyCost(int techID, int playerID, int resourceID, float delta, int techRelativity)
    Modifies the cost of the given technology for this scenario only.
    void
    trTechModifyResearchPoints(int techID, int playerID, float delta, int techRelativity)
    Modifies the reseach points of the given technology for this scenario only.
    void
    trTechRemove(int playerID, String protoUnitName, int techID)
    Disables the given tech for the player, and removes it from the UI of the given protoUnit.
    void
    trTechReplaceIconByTech(int techID, int playerID, int iconTechID)
    Replaces the icon of a technology for this scenario only.
    void
    trTechSetIconPath(int techID, int playerID, String iconPath)
    Replaces the icon of a technology for this scenario only.
    void
    trTechSetStatus(int playerID, int techID, int status)
    Sets the tech status for the player.
    void
    trTechSetStringID(int techID, int playerID, String StringID, int techStringFieldIdx)
    Sets a given string field of a technology to the given string ID for this scenario only.
    boolean
    trTechStatusActive(int playerID, int techID)
    Returns true if tech is active for player.
    boolean
    trTechStatusCheck(int playerID, int techID, int status)
    Returns true if techs status is techStatus.
    boolean
    trTechStatusResearching(int playerID, int techID)
    Returns true if tech is being researched for player.
    boolean
    trTerrainAtPosition(String subTypeName, Vector position)
    Checks if the terrain at the given map position matches the expected terrain subtype.
    boolean
    trTownBellRung(int unitID)
    Returns true if town bell has been recently rung on the given unit.
    boolean
    trTownBellUnrung(int unitID)
    Returns true if town bell has been recently unrung on the given unit.
    void
    Completes tutorial, and displays prompt to progress to next campaign or return to main menu.
    void
    trUIBlockRadialMenu(int menuIndex, boolean display)
    Blocks a given radial menu.
    void
    trUIFadeToColor(int r, int g, int b, int duration, int delay, boolean inout, int eventID)
    Fade in/out using color specified.
    void
    trUIFlashAbility(String puCmdName, boolean flash)
    Flashes the button of a given unit ability in command panel UI.
    void
    trUIFlashAgeUp(boolean flash)
    Flashes the ageup button in command panel UI, if applicable.
    void
    trUIFlashCommand(String puCmdName, boolean flash)
    Flashes the button of a given protoUnitCommand in command panel UI.
    void
    trUIFlashGodPowerAtSlot(int slotIdx, boolean flash)
    Flashes the god power at a given gp slot.
    void
    trUIFlashTech(int techID, boolean flash)
    Flashes the button of a given technology in command panel UI.
    void
    trUIFlashTrain(String protoName, boolean flash)
    Flashes the button of a given protoUnit in command panel UI.
    void
    trUIGamepadPromptFlash(int promptIndex, boolean flash)
    Toggles flashing state for a given gamepad prompt.
    void
    trUIGamepadPromptVisibility(int promptIndex, boolean display)
    Toggles visibility for a given gamepad prompt.
    void
    Hides the radial menu prompt panel.
    void
    trUIIdleBannerFlash(int bannerIndex, boolean flash)
    Toggles flashing state on Minimap gadget.
    void
    trUIMinimapFlash(boolean flash)
    Toggles flashing state on Minimap gadget.
    void
    trUIPanelFlash(int panelIndex, boolean flash)
    Toggles flashing state for a given HUD panel.
    void
    trUIPanelVisibility(int panelIndex, boolean display)
    Toggles visibility for a given HUD panel.
    void
    trUIResourceEntryFlash(int entryIndex, boolean flash)
    Toggles flashing state for a given resource entry in the HUD resoruces panel.
    void
    trUIVillagerPriorityButtonFlash(int buttonIndex, boolean flash)
    Toggles flashing state on a given Villager Priority Dialog button.
    void
    Toggles flashing state on HUD Villager Priority Dialog button.
    void
    Unblocks all ambient sounds that were previously blocked from playing.
    void
    Unblocks all sounds that were previously blocked from playing.
    boolean
    trUnforbidProtounit(int player, String protoname)
    Removes protounit from the forbidden list.
    void
    trUnitAddModifier(int modifyType, int dmgType, float amount, float duration)
    Adds modifier for given modify type and parameter, when applicable, to selected units.
    void
    trUnitAdjustModifier(int modifyType, int dmgType, float delta, int relativity)
    Adjust existing modifier for given modify type and parameter, when applicable, to selected units.
    boolean
    Returns true if all selected units are alive.
    void
    trUnitApplyEffect(int effectID, float duration)
    Applys a given effect towards the selected units.
    void
    trUnitApplyEffectDamage(int effectID, float duration, float damage, int dmgType)
    Applys a given effect with a damage value towards the selected units.
    void
    trUnitApplyEffectProtoUnit(int effectID, float duration, int playerID, String protoName)
    Applys a given effect towards the selected units.
    boolean
    trUnitBuildUnit(String protoName, Vector position, Vector forward)
    Selects units and makes the build a unit at specified location.
    void
    Cancels all queued items for the unit.
    void
    Set an override name for a specific unit.
    void
    trUnitChangeProtoUnit(String protoName, boolean skipBirth, boolean forceFoundation)
    Changes the proto unit for a given set of units.
    void
    trUnitConvert(int playerID)
    Converts the selected units to player.
    int
    trUnitCreate(String protoName, float x, float y, float z, int heading, int playerID, boolean skipBirth)
    Creates a new unit.
    int
    trUnitCreateForced(String protoName, float x, float y, float z, int heading, int playerID, boolean skipBirth)
    Creates a new unit, ignoring placement rules.
    boolean
    trUnitCreateFromSource(String protoName, int srcUnitID, int trgUnitID, int playerID)
    Creates a new unit.
    boolean
    trUnitCreateFromSourceMulti(String protoName, int srcUnitID, int trgUnitID, int playerID, int count)
    Creates multiple units from a source object.
    boolean
    Returns true if all selected units are dead.
    void
    Activates delayed transform (eg as used for Roc state change) action within selected units, whenever applicable.
    boolean
    trUnitDelete(boolean remove)
    Removes or kills the selected unit(s).
    boolean
    trUnitDestroy(boolean ejectContained)
    Destroys the selected unit(s).
    float
    trUnitDistanceToPoint(float x, float y, float z)
    Returns the shortest distance between the trRT units and the point.
    float
    Returns the shortest distance between the trRT units and the given unit.
    boolean
    trUnitDoWorkOnUnit(int unitID, int eventID)
    Tasks the selected unit(s) to perform work on the given unit.
    boolean
    trUnitFaceUnit(int unitID, int eventID)
    Moves the selected unit(s) to face the given unit.
    boolean
    Returns true if all selected units are fully built.
    void
    trUnitGameSelect(boolean clear)
    Selects the given units for the current player.
    boolean
    trUnitGarrison(int unitID, int eventID)
    Tasks the selected unit(s) to garrision into another unit.
    int
    trUnitGetHeading(int unitID)
    Returns the unit's heading.
    int
    Fetches number of selected units.
    trUnitGetPosition(int unitID)
    Returns the unit's position.
    int
    trUnitGetTargetID(int srcUnit, boolean actionOnly)
    Returns the attack target for the given unit.
    boolean
    trUnitHasLOS(int playerID)
    Returns true if the player can see the selected unit, otherwise returns false.
    boolean
    trUnitHasTarget(boolean actionOnly)
    Returns true if all selected units have an attack target or are attacking.
    void
    trUnitHighlight(float duration, boolean flash)
    Does something to highlight the units selected.
    boolean
    Returns true if all selected units are immobilized by a Freeze Action.
    boolean
    trUnitInLush(int playerID)
    Returns true if all selected units are within terrain lush belonging to the given player.
    boolean
    Returns true if all selected units are attacking.
    boolean
    trUnitIsNotOwnedBy(int playerID)
    Determines if the selected units are not owned by the player specified.
    boolean
    trUnitIsOwnedBy(int playerID)
    Determines if the selected units are owned by the player specified.
    boolean
    Returns if the specified unit is selected.
    void
    trUnitMakeInvulnerable(boolean bEnable)
    Makes a unit invulnerable to damage; Turn it off to return the unit to normal.
    void
    trUnitModifyResourceInventory(int resourceID, float delta, int relativity)
    Modifies resource inventory for the selected units.
    boolean
    trUnitMoveFromArea(float x, float y, float z, int eventID, boolean bAttackMove, int playerID, String unitType, float radius)
    Moves all matching units near the selected unit(s) to the given position.
    boolean
    trUnitMoveFromAreaToUnit(int unitID, boolean bAttackMove, int playerID, String unitType, float radius)
    Moves all matching units near the selected unit(s) to the given target unit.
    boolean
    trUnitMoveToPoint(float x, float y, float z, int eventID, boolean bAttackMove, boolean bUnitRun, float runSpeedMultiplier)
    Moves the selected unit(s) to the given position.
    boolean
    trUnitMoveToUnit(int unitID, int eventID, boolean bAttackMove, boolean bUnitRun, float runSpeedMultiplier)
    Moves the selected unit(s) to the spot occupied by the given unit.
    void
    trUnitMutate(String protoName, boolean fullHitpoints)
    Transforms selected units into the given protoUnit through PU mutation, maintaining original BUnit pointer.
    boolean
    trUnitPatrolToPoint(float x, float y, float z, boolean bUnitRun, float runSpeedMultiplier)
    Moves the selected unit(s) to the given position.
    int
    Returns the percent complete as 0 to 100.
    float
    Returns the percent damaged as 0 to 100.
    void
    trUnitPerformAction(String actionName, int targetID, Vector targetPos, boolean bypassCharge)
    Performs a given protoAction through the selected units.
    void
    trUnitPlayerFakifyInArea(int fakePlayerIndex, int srcPlayerID, String unitTypeName, float range)
    Sets all units within dist of the selected ref object as having the fake player with the specified index (07).
    void
    Removes the current control action so the next thing can take effect immediately.
    boolean
    trUnitReposition(float x, float y, float z, boolean disableTying, boolean immediate)
    Sets the position for the selected units to the given absolute coordinates.
    boolean
    trUnitRepositionToUnit(int unitID, boolean disableTying, boolean immediate)
    Sets the position for the selected units to the coordinates of the given unit.
    void
    trUnitReveal(int playerID, boolean reveal)
    Reveals the currently selected units to the given player.
    boolean
    trUnitRotateX(int degrees, boolean disableTying)
    Rotates the selected units around the X axis by the given amount of degrees.
    boolean
    trUnitRotateY(int degrees, boolean disableTying)
    Rotates the selected units around the Y axis by the given amount of degrees.
    boolean
    trUnitRotateZ(int degrees, boolean disableTying)
    Rotates the selected units around the Z axis by the given amount of degrees.
    void
    trUnitSelectByID(int unitID)
    Selects the unit in the trigger selection system.
    void
    Clears the units in the trigger selection system.
    boolean
    trUnitSetAnimation(String animName, int versionIndex, boolean loop, int eventID, boolean destroyOnNextControlAction)
    Sets the cinematic animation version for the selected unit(s).
    boolean
    trUnitSetAnimationPath(String animName, String animPath, boolean loop, int eventID, boolean destroyOnNextControlAction)
    Sets the cinematic animation version for the selected unit(s).
    void
    trUnitSetConvertible(int playerID, boolean forbid)
    Sets forbid conversion accordingly for the selected units towards the given player.
    void
    trUnitSetGatherPointPosForPlayer(int playerID, int sourceID, float x, float y, float z)
    Sets the gather point of the unit on this position.
    void
    trUnitSetGatherPointUnitForPlayer(int playerID, int sourceID, int targetID)
    Sets the gather point of the unit on this unit.
    boolean
    trUnitSetHeading(int degrees)
    Sets the units heading.
    void
    trUnitSetHitpoints(float value)
    Set the units hitpoints to the given value, respecting maximum hitpoints.
    boolean
    trUnitSetOrientationForward(int degrees, boolean disableTying)
    Rotates the selected units around the Y axis by the given amount of degrees.
    boolean
    trUnitSetOrientationRight(int degrees, boolean disableTying)
    Rotates the selected units around the Z axis by the given amount of degrees.
    boolean
    trUnitSetOrientationUp(int degrees, boolean disableTying)
    Rotates the selected units around the X axis by the given amount of degrees.
    boolean
    trUnitSetPassiveMode(boolean enable)
    Enables or disables Passive Mode for selected Units.
    void
    trUnitSetScale(float x, float y, float z)
    Sets the scale for the given set of units.
    void
    trUnitSetShading(int shadingType, float opacity)
    Assign the given shading type with the set opacity to the selected units.
    void
    Set the stance for the given set of units.
    boolean
    trUnitSetVariation(int variation)
    Sets the variation for the selected units to the given value.
    void
    Sets the veterancy level for the selected units to the given rank, whenever applicable.
    boolean
    trUnitTeleport(float x, float y, float z)
    Moves units from current position to position specified.
    boolean
    Teleport the selected unit(s) to the spot occupied by the given unit.
    void
    trUnitThrow(int direction, float distance, int numBounces, float maxHeight, float maxVelocity, float spinPeriod)
    Throws the selected units with the provided parameters.
    void
    Performs the transformation defined by the units transform command (eg heroization, etc) immediately, whenever applicable.
    boolean
    Returns if the cursor is hovering over the given unit type.
    boolean
    trUnitTypeIsSelected(String proto, boolean checkIdle)
    Returns if at least one unit of the specified unit type is selected.
    void
    Ungarrisons all contained units.
    boolean
    Returns true if the player can see the selected unit, and it is on screen; Desync sensitive.
    boolean
    trWaterAtPosition(String waterTypeName, Vector position)
    Checks if the water at the given map position matches the expected water type.
    void
    Adds the waypoint into the trigger selection system.
    void
    Adds the units position as a waypoint in the trigger selection system.
    void
    Clears the waypoints in the trigger selection system.
    void
    trWorldSpacePrompt(String id, int unitID, boolean showColor, String StringID, Vector offset, String attachPoint)
    Show a world space prompt over a selected unit.
    void
    trWorldSpacePromptArea(String id, Vector location, String StringID, Vector offset)
    Show a world space prompt in selected location.
    void
    trWorldSpacePromptArmy(String id, String armyName, boolean showColor, String StringID, Vector offset)
    Show a world space prompt over a selected army.
    void
    Hide a world space prompt.
    boolean
    trWPFDialogOpen(int wpdDialogID)
    Returns true if the given WPF dialog is currently open.
    void
    Intended for ui use only; Hotkey for 3rd choice in the 3 choice popup.
    void
    Intended for ui use only; Close and accept the currently set options.
    void
    uiAddChatNotification(int fromPlayerID, int toPlayerID, String StringID, int soundSetID)
    Adds a notification to the games chat output, can play a sound too.
    void
    Intended for ui use only; Hotkey for executing search in add friend popup.
    void
    uiAddSelectionButtonDown(boolean allowToggle)
    Intended for ui use only; Indicates that the add selection button has been pressed.
    void
    Intended for ui use only; Indicates that the add selection button has been released.
    void
    Adds the units in the given number group to current selection.
    void
    Open age up popup from anywhere.
    void
    Intended for UI use only; Applies a Lighting Set.
    void
    uiAutoScoutSelectedUnit(int unitID, boolean enable)
    Enables/disables auto scout on selected unit.
    void
    Intended for ui use only; Indicates that clickdrag button has been pressed.
    void
    Intended for ui use only; Indicates that clickrotate button has been pressed.
    void
    Instructs the currently selected unit(s) to build the current proto unit cursor building type at the pointer location.
    void
    Intended for UI use only; Selects nearest worker and opens the gamepad build menu.
    void
    uiBuildMode(int protoID)
    Does and editMode and setProtoID, after verifying sufficient resources for the current player.
    void
    uiBuildWallAtPointer(boolean addWaypoint)
    Instructs the currently selected unit(s) to build the current proto unit cursor building type at the pointer location, with walllike endpoint behavior.
    void
    uiCameraControl(float x, float y)
    Controls camera with gamepad stick.
    void
    Intended for ui use only; Cancels radial menu selected entry.
    void
    Intended for ui use only; Cancels radial menu selected entry.
    void
    Intended for ui use only; Cancels radial menu selected entry.
    void
    Cancels currently built unit.
    void
    Centers mouse pointer.
    void
    uiChangeBrushSize(float p1, float p2, float p3, float p4)
    Changes the size of the current brush.
    void
    Changes the brush to the named type.
    void
    Intended for ui use only; Indicates that the change elevation to sample button has gone up/down.
    void
    uiChangeGizmoType(int keyState)
    Changes the guizmo to the parameter type.
    void
    Toggles the chat display mode.
    void
    Toggles the chat display mode to history mode.
    void
    Toggles the chat display mode to recent mode.
    void
    uiChatScrollBack(int keyState)
    Scrolls chat back one.
    void
    uiChatScrollForward(int keyState)
    Scrolls chat forward one.
    void
    uiClearChat(boolean clearOnly)
    Clears the chat and resets to recent mode; clearOnly == true if you dont want it to populate the chat, but only clear it.
    void
    Resets the cursor to the basic pointer.
    void
    Clears the gather point for the selected unit(s), returning it to a default state.
    void
    Removes any dangling child menus off of the given gadget.
    void
    uiClearNumberGroup(int group)
    Erases the given number group.
    void
    Deselects all selected units.
    void
    Clears tribute in the diplomacy menu.
    void
    Closes the controls popup.
    void
    Closes (as if clicked on the close button) any active dialog.
    void
    Closes (as if clicked on the close button) any active field set.
    void
    Intended for ui use only; Conducts the cancel command on the radial menu (whatever that does for the specific context).
    void
    Opens a yes no popup to and loads save game if player confirms.
    void
    Intended for ui use only; Opens the control group gamepad menu menu.
    void
    Intended for ui use only; Opens the control group gamepad menu menu.
    void
    Intended for ui use only; Handles control+selection button pressing.
    void
    Intended for ui use only; Indicates control+selection button has been released.
    void
    uiConvertUnits(int keyState)
    Intended for ui use only; Indicates that the convert units button has gone up/down.
    void
    Copies the brush selection to the clipboard.
    void
    uiCoverTerrainWithWater(float waterHeight, float depth, String name)
    Flattens terrain and paints water over the entire map.
    void
    Creates a number group with the currently selected units.
    void
    Acts like the current cycle gadget has been pressed.
    void
    uiCycleGadget(int delta)
    Cycles through the active child gadget of a deluxe gadget.
    void
    Decrements the variation to place.
    void
    Deletes all selected unit.
    void
    TODO.
    void
    uiDeleteSelectedUnit(boolean ignoreConfirmation)
    Deletes selected unit.
    void
    uiDeleteUnits(int keyState)
    Intended for ui use only; Indicates that the delete units button has gone up/down.
    void
    Used to deselect all units that match the type of the unit under the cursor.
    void
    Used to deselect the unit under the cursor.
    void
    Intended for ui use only; Double click deselect at pointer location.
    void
    uiDoubleClickSelect(int add, boolean checkAction)
    Intended for ui use only; Double click select at pointer location.
    void
    Spews all hot key mappings that create units to the console.
    void
    Spews all key mappings out to the console.
    void
    Spews all empty keys out to the console.
    void
    Intended for UI use only; Sends an ejection command with waypoint for the selected unit.
    void
    Intended for UI use only; Sends an ejection command for the selected unit, tasking ungarrisoned units back to work.
    void
    Intended for UI use only; Ejects all units from all Map Control Buildings.
    void
    Intended for UI use only; Sends an ejection command for the selected unit.
    void
    Commands the selected unit(s) to Empower the target building at the pointer position.
    void
    Enters the specified UI context.
    void
    Wrapper that enters GameMenu mode if the player isnt resigned.
    void
    uiErase(boolean keyState)
    Intended for ui use only; Indicates that the erase button has gone up/down.
    void
    Save a group.
    void
    Save some triggers.
    void
    Filter the current terrain selection.
    void
    Finds all units of the same type as the selected unit.
    void
    Finds all units belonging to any of the two provided types.
    void
    Finds all units belonging to both of the two provided types.
    void
    uiFindAllOfTwoTypesOnScreen(String name, String secondName, boolean isBuilding)
    Finds all units of either of the two types currently on screen.
    void
    uiFindAllOfTwoTypesOnScreenAnd(String name, String secondName, boolean isBuilding)
    Finds all units of both of the two types currently on screen.
    void
    Finds all units of the same type.
    void
    Finds all idle units of the same type.
    void
    Finds all idle units of the same type.
    void
    uiFindAllOfTypeOnScreen(String name, boolean isBuilding)
    Finds all units of the same type currently on screen.
    void
    uiFindAllOfTypeOnScreenIdle(String name, boolean isBuilding)
    Finds all units of the same type currently on screen.
    void
    Finds all units of the same types.
    void
    uiFindAnyOfTypes(String nameListString)
    Finds the next unit of any of the given types (separated by commas or spaces) in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    Finds the gatherer unit that's not gathering in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    uiFindIdleOrAnyType(String name, boolean shiftSelectsAll, boolean controlModifier)
    Finds the next idle unit of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle; If none are found, finds the next unit even if it's not idle.
    void
    uiFindIdleType(String name, boolean shiftSelectsAll, boolean controlModifier, boolean groupByType)
    Finds the next idle unit of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    uiFindIdleType2(String name, boolean shiftSelectsAll, boolean controlModifier, boolean groupByType)
    Finds the next idle unit of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    Finds all key mappings for a given key.
    void
    Intended for ui use only; Opens the find buildings/units menu.
    void
    Intended for ui use only; Opens the find buildings/units menu.
    void
    uiFindNextIdleGroupOfType(String name, boolean groupByPUID)
    Finds the next contiguous group of idle units of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    uiFindNextIdleGroupOfType2(String name, boolean groupByPUID)
    Finds the next contiguous group of idle units of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    Finds the next resource gatherer unit of the given resource type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    Finds the next town center that has the town bell active, so that it can be called repeatedly to cycle.
    void
    uiFindTwoTypes(String name1, String name2)
    Finds the next unit of the given two types in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    Finds the next unit of both of the given two types in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    Finds the next unit (idle or not) of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    void
    Sends out a flare at the pointer position.
    void
    uiFlareAtUnit(int unitID)
    Sends out a flare at the unit's position.
    void
    Flatten the current terrain selection.
    void
    Intended for ui use only; Hotkey for focusing the difficulty selector for AotG.
    void
    Intended for ui use only; Toggle visibility of rewards details in AotG.
    void
    Intended for ui use only; Hotkey for confirming blessings selection in the blessings picker UI.
    void
    Intended for ui use only; Closes frontend chat browser.
    void
    Intended for ui use only; Sends message in the frontend chat browser.
    void
    Intended for ui use only; Toggle room options dropdown in the frontend chat browser.
    void
    Intended for ui use only; Hotkey for confirming creation of a clan in the clan create popup.
    void
    uiFrontendClanJoinChangePage(boolean pageForward, boolean goToEnd)
    Intended for ui use only; Hotkey for switching clan join pages.
    void
    Intended for ui use only; Hotkey for cycling focus between page subsections.
    void
    uiFrontendGenericCycleFocusForward(boolean allowLooping)
    Intended for ui use only; Hotkey for cycling focus between page subsections.
    void
    Intended for ui use only; Hotkey for sending generic horizontal scrolling command to WPFG.
    void
    Intended for ui use only; Held hotkey for sending generic horizontal scrolling command to WPFG.
    void
    Intended for ui use only; Held hotkey for sending generic horizontal scrolling command to WPFG.
    void
    Intended for ui use only; Hotkey for sending generic vertical scrolling command to WPFG.
    void
    Intended for ui use only; Held hotkey for sending generic vertical scrolling command to WPFG.
    void
    Intended for ui use only; Held hotkey for sending generic vertical scrolling command to WPFG.
    void
    Intended for ui use only; Hotkey for confirming god selection in the god picker UI.
    void
    uiFrontendGodPickerCycleGod(boolean nextGod)
    Intended for ui use only; Hotkey for cycling between selected gods in the god picker UI.
    void
    Intended for ui use only; Hotkey for toggling the legend open/closed in the god picker.
    void
    Intended for ui use only; Hotkey for confirming mission selection in the labyrinth UI.
    void
    Intended for ui use only; Hotkey for navigating between main menu tabs.
    void
    Intended for ui use only; Hotkey for navigating between main menu tabs.
    void
    Intended for ui use only; Hotkey for navigating to a specific main menu tab.
    void
    uiFrontendMatchHistoryChangePage(boolean pageForward)
    Intended for ui use only; Hotkey for switching match history pages.
    void
    uiFrontendModBrowserChangePage(boolean pageForward)
    Intended for ui use only; Hotkey for swapping pages in the mod browser.
    void
    Intended for ui use only; Hotkey for toggling selected mod in the mod manager.
    void
    Intended for ui use only; Hotkey for repairing/updating all mods in the mod manager.
    void
    Intended for ui use only; Hotkey for opening the filters popup in the MP browse screen.
    void
    Intended for ui use only; Hotkey for refreshing game list in the MP browse screen.
    void
    Intended for ui use only; Hotkey for cancelling search (if searching), otherwise navigating back.
    void
    Intended for ui use only; Hotkey for starting search in Ranked setup screen.
    void
    Intended for ui use only; Hotkey for cancelling ranked search.
    void
    Intended for ui use only; Hotkey for navigating to previous main menu page.
    void
    Intended for ui use only; Dismiss all notifications in the notifications sidebar.
    void
    uiFrontendOpenNotificationPanel(boolean allowToggle)
    Intended for ui use only; Toggle notifications panel open/closed.
    void
    Intended for ui use only; Hotkey for publishing a mod in the publish popup.
    void
    Intended for ui use only; Hotkey for attaching thumbnail to a mod in the mod popup.
    void
    Intended for ui use only; Hotkey for reporting selected clan.
    void
    Intended for ui use only; Hotkey for refreshing game list in the MP browse screen.
    void
    Intended for ui use only; Hotkey for submitting a report.
    void
    Intended for ui use only; Hotkey for navigating back to a multiplayer lobby.
    void
    Intended for ui use only; Hotkey for cancelling skirmish lobby countdown.
    void
    Intended for ui use only; Hotkey for leaving a skirmish lobby.
    void
    Intended for ui use only; Hotkey for readying up in a skirmish lobby.
    void
    uiFrontendToggleChatBrowser(boolean allowToggle)
    Intended for ui use only; Hotkey for toggling chat browser.
    void
    uiFrontendToggleHamburgerDropdown(boolean allowToggle)
    Intended for ui use only; Hotkey for toggling hamburger dropdown menu.
    void
    uiFrontendToggleMinimisedMPLobby(boolean allowToggle)
    Intended for ui use only; Hotkey for toggling display of the minimised MP lobby.
    void
    uiFrontendToggleSocialDropdown(boolean allowToggle)
    Intended for ui use only; Hotkey for toggling social dropdown menu.
    void
    uiFrontendToggleSocialSidebar(boolean allowToggle)
    Intended for ui use only; Hotkey for toggling social sidebar.
    void
    Intended for ui use only; Go back to the previous FTUE page.
    void
    uiFtueContinue(boolean onlyOnFirstScreen)
    Intended for ui use only; Continue to next FTUE page.
    void
    Cycle scoreboard view.
    void
    Used to indicate the LB was pressed, since it's contextual it needs to feed into the gamepad input state manager.
    void
    Used to indicate the LB was released, since it's contextual it needs to feed into the gamepad input state manager.
    void
    Used to indicate the RB was pressed, since it's contextual it needs to feed into the gamepad input state manager.
    void
    Used to indicate the RB was released, since it's contextual it needs to feed into the gamepad input state manager.
    void
    Replay functions Cycle Map Visibility.
    void
    Replay functions Pause.
    void
    Replay function Slowed Playback.
    void
    Replay function Fast Playback.
    void
    Replay functions Play.
    void
    Opens replay player view ring menu.
    void
    Closes replay player view ring menu.
    void
    Replay function Restart.
    void
    Swap between power bar and resource view in replay mode.
    void
    Commands the selected unit(s) to garrison in a building at the pointer position.
    void
    Intended for ui use only; Activates the alternative press functionality for the highlighted button.
    void
    Intended for ui use only; Hotkey for confirming input in the generic input popup.
    void
    Intended for ui use only; Opens the god powers menu.
    void
    Intended for ui use only; Opens the god powers menu.
    void
    Intended for UI use only; Sends an guard order.
    void
    uiHandleIdleBanner(String name, boolean groupByType)
    Does the right thing.
    void
    uiHandleTrainingPanelAction(int unitID, int actionType, int actionID, int actionIdx)
    Handles clicking over an item in the global queue/training panel.
    void
    uiHandleUserTab(int parent)
    Handles toggle of user textures.
    void
    uiHideCursor(boolean hide)
    Testing only.
    void
    TODO.
    void
    Used when activating a text box with a key to avoid having that key go into the text box too.
    void
    Load some triggers.
    void
    Increments the variation to place.
    void
    Leaves the specified UI context.
    void
    Causes game to return to editMode none when shift hotkey is released.
    void
    Intended for ui use only; Hotkey for deleting the selected save file.
    void
    Intended for ui use only; Hotkey for opening the save/load directory (PC Only).
    void
    Intended for ui use only; Hotkey for creating a new save file.
    void
    Load some triggers.
    void
    Moves the camera to see the specified unit and selects it.
    void
    uiLookAtBattle(int bID)
    Moves the camera to see the specified battle.
    void
    uiLookAtNumberGroup(int number)
    Moves the camera to see the given number group.
    void
    uiLookAtProto(String protoname)
    Moves the camera to see the first instance of proto unit X owned by the current player.
    void
    Moves the camera to see the first selected unit.
    void
    uiLookAtUnit(int lID)
    Moves the camera to see the specified Unit.
    void
    uiLowerElevation(int keyState)
    Intended for ui use only; Indicates that the lower elevation button has gone up/down.
    void
    Intended for ui use only; Indicates that the lower terrain selection button has gone up/down.
    void
    Intended for ui use only; Select the currently highlighted option in the radial menu.
    void
    uiMessageBox(String text, String command)
    Pops up a message box with text that activated the cmd when the ok button is hit.
    void
    Intended for ui use only; DPad Down function while minimap is enlarged.
    void
    Intended for ui use only; DPad Left function while minimap is enlarged.
    void
    Intended for ui use only; DPad Right function while minimap is enlarged.
    void
    Intended for ui use only; DPad Up function while minimap is enlarged.
    void
    Intended for ui use only; Enlarges the minimap for minimap navigation.
    void
    uiMinorGodUI(int techID, int tcID, int playerID, boolean PreQueue)
    Used to activate the minor god UI.
    void
    uiMinorGodUIInSelected(boolean PreQueue)
    Used to activate the minor god UI in current selection.
    void
    Moves all military units to the pointer position.
    void
    uiMoveAllUnitOfTypeToUnitLocation(int targetUnitID, String typeNames)
    Find units of a certain type, and tell them to walk over.
    void
    Intended for ui use only; Indicates that selection button has been pressed.
    void
    Intended for ui use only; Indicates that selection button has been released.
    void
    Intended for ui use only; Indicates that selection button has been pressed.
    void
    Intended for ui use only; Indicates that selection button has been released.
    void
    uiMoveUnitBackward(int keyState)
    Intended for ui use only; Indicates that the move unit backward key has gone up/down.
    void
    uiMoveUnitDown(int keyState)
    Intended for ui use only; Indicates that the move unit down key has gone up/down.
    void
    uiMoveUnitForward(int keyState)
    Intended for ui use only; Indicates that the move unit forward key has gone up/down.
    void
    uiMoveUnitLeft(int keyState)
    Intended for ui use only; Indicates that the move unit left key has gone up/down.
    void
    uiMoveUnitOfNameToUnitLocation(int targetUnitID, String unitNames, float minDist)
    Find the unit of a certain protounit name nearest to the target unit, and tell them to walk over.
    void
    uiMoveUnitOfTypeToUnitLocation(int targetUnitID, String typeNames, float minDist, boolean doWorkOnUnit)
    Find the unit of a certain type nearest to the target unit, and tell them to walk over.
    void
    uiMoveUnitRight(int keyState)
    Intended for ui use only; Indicates that the move unit right key has gone up/down.
    void
    uiMoveUnitsToPointer(int number, String type)
    Intended for UI use only; Moves a number of units of the type given to the location of the pointer.
    void
    uiMoveUnitUp(int keyState)
    Intended for ui use only; Indicates that the move unit up key has gone up/down.
    void
    Inteneded for ui use only; Hotkey for applying filters in the MP filters popup.
    void
    Intended for ui use only; Hotkey for resetting filters in the MP filters popup.
    void
    Intended for ui use only; Hotkey for opening a lobby in the MP Host popup.
    void
    Intended for ui use only; Hotkey for searching for a user in the MP Host popup.
    void
    Intended for ui use only; Hotkey for Viewing Xbl profile in the MP Host popup.
    void
    Creates a new blank scenario.
    void
    Intended for UI use only; Selects nearest infantry and opens the gamepad build menu.
    void
    uiObjectivesPopupChangeTab(boolean nextTab)
    Intended for ui use only; Hotkey for changing tabs in the objectives popup.
    void
    Intended for ui use only; Hotkey for toggling hints in the objectives popup.
    void
    Intended for ui use only; Hotkey for toggling objectives panel display in the objectives popup.
    void
    Opens the chat menu.
    void
    Intended for ui use only; Opens the code of conduct.
    void
    Opens the diplomacy menu.
    void
    Opens the game settings dialog.
    void
    Open a record game from the replays directory.
    void
    Open a scenario from the scenario directory.
    void
    uiPaint(boolean keyState, boolean offset)
    Intended for ui use only; Indicates that the paint button has gone up/down.
    void
    uiPaintCliff(int keyState)
    Intended for ui use only; Indicates that the paint cliff button has gone up/down.
    void
    uiPaintForest(boolean keyState, boolean offset)
    Intended for ui use only; Indicates that the paint button has gone up/down.
    void
    uiPaintTerrainOverlay(int keyState)
    Intended for ui use only; Indicates that the paint terrain overlay button has gone up/down.
    void
    uiPaintTerrainToSample(int keyState)
    Intended for ui use only; Indicates that the sample terrain button has gone up/down.
    void
    uiPaintWater(int keyState)
    Intended for ui use only; Indicates that the paint water button has gone up/down.
    void
    uiPaintWaterArea(int keyState)
    Intended for ui use only; Painting water area.
    void
    Paint objects on the currently selected water.
    void
    Pastes the contents of the clipboard to the brush selection.
    void
    Intended for UI use only; Sends an patrol order.
    void
    uiPayFoundation(int unitID)
    Pays for the given foundation.
    void
    uiPitchUnitDown(int keyState)
    Intended for ui use only; Indicates that the pitch unit down key has gone up/down.
    void
    uiPitchUnitUp(int keyState)
    Intended for ui use only; Indicates that the pitch unit up key has gone up/down.
    void
    uiPlaceAtPointer(boolean changeVariation)
    Intended for ui use only; Places unit at pointer location.
    void
    Intended for ui use only; Generic Accept hotkey for currently displaying popups.
    void
    Intended for ui use only; Generic Cancel hotkey for currently displaying popup.
    void
    Intended for ui use only; Hotkey for sending a GG from the postgame highlights screen.
    void
    Intended for ui use only; Hotkey for skipping postgame highlights.
    void
    uiPostgameChangeTab(boolean tabRight)
    Intended for ui use only; Hotkey for changing top level tabs in the postgame screen.
    void
    Intended for use only; Catchall Hotkey for closing popups throughout the postgame screen.
    void
    Intended for ui use only; Hotkey for returning to main menu from the postgame screen.
    void
    Intended for ui use only; Hotkey for changing tabs in the postgame stats screen.
    void
    Intended for ui use only; Hotkey for returning to map view from the postgame screen.
    void
    Used to call the primary gamepad contextual button double press.
    void
    Used to call the primary gamepad contextual button down.
    void
    Used to call the primary gamepad contextual button up.
    void
    Used to change the quick action to the default.
    void
    Used to cycle the quick action to the left.
    void
    Used to cycle the quick action to the right.
    void
    Used to prevent calls to uiReleaseQuickSelectLeftUp causing a change in input context and breaking quick actions.
    void
    Used to toggle auto building.
    void
    uiQuickSelectDown(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
    Intended for ui use only; Quick selects certain units.
    void
    uiQuickSelectLeft(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
    Intended for ui use only; quick selects certain units.
    void
    uiQuickSelectRight(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
    Intended for ui use only; quick selects certain units.
    void
    uiQuickSelectUp(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
    Intended for ui use only; Quick selects certain units.
    void
    Used to enter the gamepad quick action mode.
    void
    uiQuickTopButtonActionUp(boolean allowQuickActionAction)
    Used to exit the gamepad quick action mode, or execute the command; Using this with a false parameter will allow you to disable trying a quick action if it was closed fast.
    void
    Intended for ui use only; Activates the page specific action.
    void
    Intended for ui use only; Changes radial menu page.
    void
    Intended for ui use only; Activates the page specific thumb action.
    void
    Intended for ui use only; Activates the page specific view action.
    void
    uiRadialMenuXAxis(float axisValue)
    Intended for ui use only; Indicates the X position of the radial menu selector.
    void
    uiRadialMenuYAxis(float axisValue)
    Intended for ui use only; Indicates the Y position of the radial menu selector.
    void
    uiRaiseElevation(int keyState)
    Intended for ui use only; Indicates that the raise elevation button has gone up/down.
    void
    Intended for ui use only; Indicates that the raise terrain selection button has gone up/down.
    void
    uiRecalcVariation(int keyState)
    Intended for ui use only; Indicates that the recalc variation button has gone up/down.
    void
    Forces a refresh on the command panel.
    void
    Reconstitutes the entire editor menu.
    void
    Pops up all downed keys.
    void
    Intended for ui use only; Releases down in the quick select manager.
    void
    Intended for ui use only; Releases left in the quick select manager.
    void
    Intended for ui use only; Releases right in the quick select manager.
    void
    Intended for ui use only; Releases up in the quick select manager.
    void
    Intended for ui use only; Releases the page specific action (mainly for hold triggers).
    void
    Intended for ui use only; Release the currently highlighted option in the radial menu.
    void
    Removes current selection from any army.
    void
    Removes specified unit, or selected unit if not ID is specified.
    void
    uiRemoveSelectionButtonDown(boolean isModified)
    Intended for ui use only; Indicates that the remove selection button has been pressed.
    void
    Intended for ui use only; Indicates that the remove selection button has been released.
    void
    Commands the selected unit(s) to repair the target building at the pointer position.
    void
    Intended for ui use only; Hotkey for resetting all hotkeys in the settings screen.
    void
    Intended for ui use only; Reset the rotation and zoom of the camera to default.
    void
    Intended for ui use only; Hotkey for resetting the currently selected hotkey in the settings screen.
    void
    Intended for ui use only; Reset the Rotation of the ingame (strategy) camera to default.
    void
    Intended for ui use only; Reset the Zoom of the ingame (strategy) camera to default.
    void
    Intended for ui use only; Hotkey for resetting current options page.
    void
    uiRollUnitLeft(int keyState)
    Intended for ui use only; Indicates that the roll unit left key has gone up/down.
    void
    uiRollUnitRight(int keyState)
    Intended for ui use only; Indicates that the roll unit right key has gone up/down.
    void
    uiRotateClipboard(int amount)
    Rotate the clipboard by amount.
    void
    uiRotateSelection(int amount)
    Intended for ui use only; rotates the selected UNIT.
    void
    uiRotateWaterLeft(int keyState)
    Intended for ui use only; Indicates that the rotate water left button has gone up/down.
    void
    uiRotateWaterRight(int keyState)
    Intended for ui use only; Indicates that the rotate water right button has gone up/down.
    void
    uiRoughen(int keyState)
    Intended for ui use only; Indicates that the roughen button has gone up/down.
    void
    Intended for ui use only; Samples Cliff elevation height at pointer.
    void
    Intended for ui use only; Samples elevation height at pointer.
    void
    Intended for ui use only; Samples terrain type at pointer.
    void
    Save a scenario to the scenario directory.
    void
    Save some groups.
    void
    Save a scenario to the scenario directory.
    void
    uiSaveScenarioPrompt(boolean saveAs)
    Checks for currentlyset active player and triggers prompt to user, if it's not set to player 1, before opening save dialog.
    void
    Save some triggers.
    void
    Save some groups.
    void
    Load a scenario, checking dirty bit on world.
    void
    Test a scenario into main menu screen.
    void
    uiScrollBrushSize(int amount)
    Intended for ui use only; Increament the size of the current brush up/down.
    void
    uiScrollChatPanelAxis(float axisValue)
    Intended for ui use only; Scroll the chat panel.
    void
    uiScrollCliffHeight(int amount)
    Intended for ui use only; Increment the height of the cliff brush up/down.
    void
    Used to call the secondary gamepad contextual button down.
    void
    Used to call the secondary gamepad contextual button up.
    void
    Intended for UI use only; Tasks all valid Town Bell targets to garrison within the nearest building.
    void
    uiSelectAgeUpGod(boolean left)
    Select the left god when input; bool is true, the right god when it is false.
    void
    Intended for ui use only; Indicates that selection button has been pressed.
    void
    Intended for ui use only; Indicates that selection button has been released.
    void
    Pans the camera to the location.
    void
    uiSelectNextUnitStack(boolean reverse)
    Selects the next unit stack.
    void
    Selects the units in the given number group.
    void
    Intended for ui use only; Select the currently highlighted option in the radial menu.
    void
    TODO.
    void
    uiSelectType(String nameListString, boolean selectAll, boolean snapTo, boolean forbidSnap)
    Selects units of the same type.
    void
    Intended for ui use only; Selects water at pointer location.
    void
    uiSendInGameChatMessage(boolean closeChat)
    Intended for ui only; Hotkey for sending chat message ingame.
    void
    Send tribute in the diplomacy menu.
    void
    uiSetBrushType(String brushType, float p1, float p2, float p3, float p4)
    Makes the current brush based on the name and parameters.
    void
    uiSetBuildingPlacementRender(int placeID, boolean set)
    Controls rendering of the building placement info for the given ID.
    void
    TODO.
    void
    uiSetClickDragParams(float deadZoneSize, float maxZoneSize, float exponent, float maxSpeed)
    Set the parameters for clickdrag movement.
    void
    Sets the cliff type by name.
    void
    Sets the cliff type by index.
    void
    uiSetClipboardRotation(float degrees)
    Sets the clipboard rotation amount.
    void
    Sets the forest type by name.
    void
    Sets the forest type by index.
    void
    Sets the gather points for the selected unit(s) to the pointer position.
    void
    uiSetGatherPointAtGamepadPointerOfNearbyUnitTypes(String targetTypes, float distance, boolean waterSpawnPoint, boolean isEconomicGatherPoint)
    Updates the gather point of all nearby units of specified type(s) closest to the currently selected unit.
    void
    uiSetGatherPointAtPointer(boolean waterSpawnPoint)
    Sets the gather points for the selected unit(s) to the pointer position.
    void
    uiSetGatherPointAtPointerOfNearbyUnitTypes(String targetTypes, float distance, boolean waterSpawnPoint, boolean isEconomicGatherPoint)
    Updates the gather point of all nearby units of specified type(s) closest to the currently selected unit.
    void
    uiSetGatherPointAtPointerOfNearbyUnitTypesToUnit(int targetUnitID, String targetTypes, float distance, boolean waterSpawnPoint, boolean isEconomicGatherPoint)
    Updates the gather point of all nearby units of specified type(s) closest to the currently selected unit, to the position of the selected unit.
    void
    uiSetKBArmyRender(int id, boolean set)
    Render the kbArmy info for the given ID; If not set given, will not render the army.
    void
    uiSetKBAttackRouteRender(int routeID, boolean set)
    Render the attackRoute info for the given ID.
    void
    uiSetKBResourceRender(int resID, boolean set)
    Render the kbResource info for the given ID; If not set given, will not render the resource.
    void
    uiSetNearestUnitNamedToBuild(int unitID, String unitNames)
    Find the nearest unit to the specified target unit with one of the specified names, and have it start building.
    void
    uiSetPlacementPlayer(int playerID)
    Sets current placement player to the given player ID.
    void
    uiSetProtoCursor(String proto, boolean setPlacement)
    Sets the cursor to a protounit.
    void
    uiSetProtoCursorID(int protoID)
    Sets the cursor to a protounit.
    void
    uiSetProtoID(int id)
    Sets the proto ID to place.
    void
    Sets the terrain detail paint mode (0) paint overlay (1) paint wetness (2) smooth.
    void
    Sets the water type by name.
    void
    Sets the water type by index.
    void
    uiShowAIDebugInfoArea(int areaID, int renderOn)
    Brings up the area info for the given ID.
    void
    uiShowAIDebugInfoAreaGroup(int areaGroupID, int renderOn)
    Brings up the area info for the given ID.
    void
    Brings up the attackRoute info for the given ID.
    void
    uiShowAIDebugInfoBase(int playerID, int baseID)
    Brings up the base info for the given ID.
    void
    Brings up the escrow info for the given ID.
    void
    Brings up the kbArmy info for the given ID.
    void
    Brings up the kbResource info for the given ID.
    void
    Brings up the kbunit info for the given ID.
    void
    Brings up the kbUnitPick info for the given ID.
    void
    Brings up the building placement info for the given ID.
    void
    Brings up the plan debug text for the given plan ID.
    void
    TODO.
    void
    TODO.
    void
    Displays Economic UI on command panel, if applicable.
    void
    Opens the help popup with selected history topic.
    void
    Displays Military UI on command panel, if applicable.
    void
    uiSmooth(int keyState)
    Intended for ui use only; Indicates that the smooth button has gone up/down.
    void
    Intended for gamepad ui use only, snaps the camera to a currently selected unit.
    void
    uiSocketBuild(int unitID)
    Performs autobuilding for the given socket, if it has valid socket building data.
    void
    Intended for ui use only; Use a special power at targeted location.
    void
    Spews all down keys.
    void
    Intended for ui use only; Progress from splash screen.
    void
    Test a scenario.
    void
    Intended for ui use only; Rotate placed unit with gamepad stick, ie, intended to be mapped to gamepad stick.
    void
    Test a scenario.
    void
    Stop selected units.
    void
    uiSwitchControlsPopup(boolean moveNext)
    Switches pages in the controls popup.
    void
    Closes the chat menu and opens the diplomacy menu.
    void
    Closes the diplomacy menu and opens the chat menu.
    void
    Switch the user input into gamepad mode.
    void
    uiSwitchToMouseMode(boolean useKeyboard)
    Switch the user input into mouse mode; Param sets last input type to either keyboard or mouse.
    void
    uiTerrainSelection(int keyState)
    Intended for ui use only; Indicates that the terrain selection button has gone up/down.
    void
    uiToggleBrushMask(int classID)
    This is not what you are looking for.
    void
    Toggles the diplomacy dialog.
    void
    Turns off and on the game UI.
    void
    Intended for UI use only; Sends a toggle garrison mode command for the selected unit.
    void
    Toggles guizmo snapping.
    void
    Intended for ui use only.
    void
    This is not what you are looking for.
    void
    Toggles visibility of main game UI.
    void
    uiTransformSelectedUnit(String protoName, boolean forceFullyBuilt, int unitID, boolean placementPlayer)
    Transforms the selected unit into the specified proto unit.
    void
    TODO.
    void
    TODO.
    void
    Pans the camera to the location.
    void
    Intended for ui use only; Hotkey for unbinding the currently selected hotkey in the settings screen.
    void
    Enter unbuild mode with selected building.
    void
    Actually unbuild selected building.
    void
    UiUniformLowerElevation lowers the terrain height uniformly in the brush region.
    void
    UiUniformRaiseElevation raises the terrain height uniformly in the brush region.
    void
    Intended for ui use only; Opens the unit commands gamepad menu menu.
    void
    Intended for ui use only; Opens the unit commands gamepad menu menu.
    void
    Intended for ui use only; Unselects currently selected water.
    void
    Intended for ui use only; Opens the villager priorities gamepad menu menu.
    void
    Intended for ui use only; Opens the villager priorities gamepad menu menu.
    void
    uiVillagerReturnResources(int targetUnitID, float range)
    Tell villagers in a defined area to return currently held resources.
    void
    uiWheelRotate(int amount)
    Intended for ui use only; Rotate with wheel, ie, intended to be mapped to wheel.
    void
    uiWheelRotateCamera(int amount)
    Intended for ui use only; Rotate with wheel, ie, intended to be mapped to wheel.
    void
    Intended for ui use only; Rotate placed unit with wheel, ie, intended to be mapped to.
    void
    uiWorkAtPointer(int mode)
    Intended for ui use only; Issues "work" at pointer location; mode 1 - ignore when clickdrag is enabled, mode 2 - ignore when clickdrag is disabled.
    void
    uiYawUnitLeft(int keyState)
    Intended for ui use only; Indicates that the yaw unit left key has gone up/down.
    void
    uiYawUnitRight(int keyState)
    Intended for ui use only; Indicates that the yaw unit right key has gone up/down.
    void
    Zooms to the most recent minimap event.
    void
    Zooms to the most recent minimap event.
    void
    uiZoomToProto(String protoname)
    Zooms to the first instance of proto unit X owned by the current player.
    void
    Undoes the last editing operation.
    void
    unitData(int unitID)
    Spews database values on the specified unit or the selected unit (if no argument).
    void
    unitDecVariation(int unitID)
    Decrements the current variation of the given UnitID (current selected unit(s) if UnitID is -1).
    void
    unitIncVariation(int unitID)
    Increments the current variation of the given UnitID (current selected unit(s) if UnitID is -1).
    void
    Sets the selected units to stop using a fake player.
    void
    unitPlayerFakify(int fakePlayerIndex)
    Sets the selected units to use the fake player indicated.
    void
    Issues a return to work for the selected unit(s).
    void
    unitSetStance(int stanceID)
    Sets the unit stance for all selected units to the given AI stance ID.
    void
    Sets internal unit AI stance for all selected villagers to the given AI stance.
    void
    Sets the tactic for this unit.
    void
    unitSetVariation(int variation, int unitID)
    Sets the current variation of the given UnitID (current selected unit(s) if UnitID is -1).
    void
    Issues a town bell for the selected unit(s).
    void
    Forces the game to unpause.
    void
    Sets the camera to cover the entire terrain; Only in the editor.
    void
    vsync(int state)
    Set vertical syncing (-1 toggles, 0 is off, 1 is on).
    void
    Block user prompt for app rating.
    void
    Hide user prompt for app rating.
    void
    Show user prompt for app rating.
    void
    Prompt user for app rating if they pass prerequisites.
    void
    Open the windows store to rate this game.
    void
    wpfNavigateFrame(String pageUri, String frameName)
    In the current WPF UI screen, change the page of the named Frame to the given URI.
    void
    Triggers the XBL sign in out dialog.
    float
    xsBoolToFloat(boolean b)
    Casts a bool to a float (1.0 if true, 0.0 if false).
    int
    xsBoolToInt(boolean b)
    Casts a bool to an int (1 if true, 0 if false).
    xsBoolToString(boolean b)
    Casts a bool to a string.
    void
    Disables the given rule.
    void
    xsDisableRuleGroup(String ruleGroupName)
    Disables all rules in the given rule group.
    void
    Disables the current rule.
    void
    Prints the time in milliseconds that elapsed since the timer was last started.
    void
    xsEnableRule(String ruleName)
    Enables the given rule.
    void
    xsEnableRuleGroup(String ruleGroupName)
    Enables all rule in the given rule group.
    boolean
    xsFloatToBool(float f)
    Casts a float to a bool (false if == 0.0, true otherwise).
    int
    xsFloatToInt(float f)
    Casts a float to an int, truncating the fractional part.
    xsFloatToString(float f)
    Casts a float to a string.
    int
    Returns the current context player ID.
    int
    Returns the current gametime (in seconds).
    int
    Returns the current gametime (in milliseconds).
    boolean
    xsIntToBool(int i)
    Casts an int to a bool (false if == 0, true otherwise).
    float
    xsIntToFloat(int i)
    Casts an int to a float.
    Casts an int to a string.
    boolean
    Returns true if the rule is enabled.
    boolean
    Returns true if any rule in the group is enabled.
    boolean
    xsRandBool(float chanceTrue)
    Returns true with a probability of trueChance in [0.0, 1.0], and false otherwise.
    float
    xsRandFloat(float min, float max)
    Returns a random floating point number in the range (inclusive).
    int
    Gets the current seed of the random number generator.
    int
    xsRandInt(int min, int max)
    Returns a random integer number in the range (inclusive).
    void
    xsRandSetSeed(int seed)
    Sets the seed of the random number generator.
    void
    Ignores the next interval and updates as soon as possible.
    void
    Ignores the next interval and updates as soon as possible.
    void
    xsSetContextPlayer(int playerID)
    Sets the current context player ID (DO NOT DO THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING).
    void
    xsSetRuleMaxInterval(String ruleName, int interval)
    Sets the max interval of the given rule.
    void
    Sets the max interval of the current rule.
    void
    xsSetRuleMinInterval(String ruleName, int interval)
    Sets the min interval of the given rule.
    void
    Sets the min interval of the current rule.
    void
    xsSetRulePriority(String ruleName, int priority)
    Sets the priority of the given rule.
    void
    xsSetRulePrioritySelf(int priority)
    Sets the priority of the current rule.
    void
    Starts the timer.
    xsStringCharAt(String s, int index)
    Returns the character at the given index of a string as a string(or an empty string on invalid index).
    boolean
    xsStringContains(String s, String sub, boolean caseSensitive)
    Returns true if the given substring is present in the string, and false otherwise.
    boolean
    xsStringEndsWith(String s, String sub, boolean caseSensitive)
    Returns true if the string ends with the given substring, and false otherwise.
    int
    xsStringFindFirst(String s, String sub, int startIdx, boolean caseSensitive)
    Returns the index of the first occurrence of a string in another string, searching from the given index; Returns1 if the substring is not found.
    int
    xsStringFindLast(String s, String sub, int startIdx, boolean caseSensitive)
    Returns the index of the last occurrence of a string in another string, searching backwards from the given index; Returns1 if the substring is not found.
    int
    Returns the length of a string.
    boolean
    xsStringStartsWith(String s, String sub, boolean caseSensitive)
    Returns true if the string starts with the given substring, and false otherwise.
    xsStringSubString(String s, int startIdx, int endIdx)
    Returns a substring in the range of the given indices (inclusive) for a string.
    boolean
    Parses a bool from a string(returning false on invalid input).
    float
    Parses a float from a string(returning 0.0 on invalid input).
    int
    Parses an integer from a string(returning 0 on invalid input).
    Returns a string in lower case.
    Returns a string in upper case.
    float
    Returns the angle of a vector around the Y axis in radians; If provided, the offset is used as the center (instead of 0.0/0.0).
    float
    Returns the (smaller) angle between two vectors in radians.
    xsVectorCreate(float x, float y, float z)
    Set the 3 components into a vector, returns the new vector.
    Returns the cross product of two vectors.
    float
    Returns the distance between two vectors.
    float
    Returns the squared distance between two vectors.
    float
    xsVectorDistanceToLine(Vector v, Vector pointOnLine, Vector dir)
    Returns the distance between a point and a line defined by a point on the line and a direction.
    float
    Returns the distance between a point and a line defined by two points.
    float
    Returns the distance between two vectors without considering the Y dimension.
    float
    Returns the squared distance between two vectors without considering the Y dimension.
    float
    Returns the dot product of two vectors.
    float
    Returns the length of the given vector.
    Returns a normalized copy of the given vector.
    xsVectorRotateXZ(Vector v, float theta, Vector offset)
    Returns a rotated copy of the vector on the XZ plane by a given angle; If provided, the offset is used as the center (instead of 0.0/0.0).
    xsVectorTranslateXZ(Vector v, float radius, float theta)
    Returns a translated copy of the vector on the XZ plane by the given radius and angle.

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RetoldFunctions

      public RetoldFunctions()
  • Method Details

    • echoNum

      public void echoNum(int num)
      Sends a number to the console output.
    • IMEEnable

      public void IMEEnable(boolean enable)
      Enables or disables IME.
    • echo

      public void echo(String text)
      Sends a message to the console output echoLocalized Syscall config error.
    • echoLocalized

      public void echoLocalized(int StringID)
      Sets the game status text from a string in the string resource.
    • imguiconsole

      public void imguiconsole()
      Toggles the ImGui version of the console.
    • pause

      public void pause(int val, boolean checkForAllowPause)
      With no arg, toggles pause state on/off; Otherwise, sets pause state.
    • hideUI

      public void hideUI()
      Hides the UI and closes the console; Press enter to reveal UI again.
    • console

      public void console()
      Toggles the state of the console dialog.
    • map

      public void map(String eventName, String context, String command, boolean allowInGamepadMode)
      Maps input event to command, in that context; See input mapper design.doc for more details.
    • benchmark

      public void benchmark()
      Enters the benchmark.
    • leaveBenchmark

      public void leaveBenchmark()
      Leaves the currently running benchmark.
    • unitData

      public void unitData(int unitID)
      Spews database values on the specified unit or the selected unit (if no argument).
    • unitSetVariation

      public void unitSetVariation(int variation, int unitID)
      Sets the current variation of the given UnitID (current selected unit(s) if UnitID is -1).
    • alignSelectedUnits

      public void alignSelectedUnits()
      Realigns all selected units to tile boundaries.
    • resourceMarket

      public void resourceMarket(int playerID, String toResourceName, float resourceAmount, String fromResourceName, boolean shiftGivesMultiple)
      Sends out a market use command for the given player, resource and amount; Negative means selling.
    • unitSetStance

      public void unitSetStance(int stanceID)
      Sets the unit stance for all selected units to the given AI stance ID.
    • unitSetStanceVillager

      public void unitSetStanceVillager(String name)
      Sets internal unit AI stance for all selected villagers to the given AI stance.
    • unitIncVariation

      public void unitIncVariation(int unitID)
      Increments the current variation of the given UnitID (current selected unit(s) if UnitID is -1).
    • unitDecVariation

      public void unitDecVariation(int unitID)
      Decrements the current variation of the given UnitID (current selected unit(s) if UnitID is -1).
    • supaScreenshot

      public void supaScreenshot(int xRes, boolean singleImage)
      Take a supascreen of the entire map.
    • viewEntireWorld

      public void viewEntireWorld()
      Sets the camera to cover the entire terrain; Only in the editor.
    • pause2

      public void pause2(int val, boolean checkForAllowPause)
      With no arg, toggles pause state on/off - otherwise, sets pause state.
    • unpauseNoChecks

      public void unpauseNoChecks()
      Forces the game to unpause.
    • res

      public void res(int xRes, int yRes)
      Changes screen resolution.
    • alignResources

      public void alignResources()
      Realigns all resources in the world to tile boundaries.
    • exit

      public void exit(boolean confirmation)
      Exits the game screenshot.
    • screenshot

      public void screenshot(int unused)
      Take a screen shot.
    • configSetFloat

      public void configSetFloat(String name, float value)
      Sets a config var to a floating point value.
    • configDef

      public void configDef(String name)
      Defines a config variable.
    • configSet

      public void configSet(String name, String value)
      Sets a particular config var to a string value.
    • configSetInt

      public void configSetInt(String name, int value)
      Sets a config var to an integer value.
    • config

      public void config(String token)
      Changes config state just like a .cfg line.
    • saveGame

      public void saveGame(String fname, boolean throttleSaves)
      Saves out a game in progress.
    • configUndef

      public void configUndef(String name)
      Undefines a config variable.
    • configToggle

      public void configToggle(String name)
      Defined var becomes undefined, and vice versa.
    • setSquadMode

      public void setSquadMode(String squadModeName)
      Sets the mode for a squad.
    • squadWheel

      public void squadWheel(float angle, int squadID)
      Wheels the squad.
    • unitSetTactic

      public void unitSetTactic(String name)
      Sets the tactic for this unit.
    • squadMode

      public void squadMode(int squadModeID)
      Sets the mode for a squad.
    • unitReturnToWork

      public void unitReturnToWork()
      Issues a return to work for the selected unit(s).
    • obscuredUnitToggle

      public void obscuredUnitToggle()
      Toggles between different ways obscured units are shown.
    • setStance

      public void setStance(String stanceName)
      Sets the stance for the selected units.
    • unitTownBell

      public void unitTownBell()
      Issues a town bell for the selected unit(s).
    • skipNextCampaignScenario

      public void skipNextCampaignScenario()
      Skips the immediately subsequent scenario within the current campaign.
    • loadRecentFile

      public void loadRecentFile(String filename)
      Loads the file named, interpreting whether it is a scenario, savegame, etc dynamically.
    • loadCampaignScenario

      public void loadCampaignScenario(String scenarioName)
      Loads in a campaign scenario file.
    • loadNextCampaignScenario

      public void loadNextCampaignScenario()
      Loads campaign scenario file within the next campaign node in campaign manager.
    • restart

      public void restart()
      Relaunch current scenario.
    • cameraHome

      public void cameraHome()
      Returns the camera to the home position.
    • saveCamera

      public void saveCamera(String filename)
      Save camera to file.
    • loadCamera

      public void loadCamera(String filename)
      Load camera from file.
    • saveScenario

      public void saveScenario(String fname)
      Saves out a scenario file.
    • loadGame

      public void loadGame(String fname)
      Loads in a saved game.
    • autoSave

      public void autoSave(String fname)
      Saves out autosave file - specifies that file write step should be done async.
    • quickSave

      public void quickSave()
      Create a save file named QuickSaveGame and close the pause pop up if its opened.
    • loadTutorial

      public void loadTutorial(String tutorialName, int nLoadMode, String loadingScreen, int nTextID)
      Loads in a tutorial scenario file.
    • loadTutorialWpf

      public void loadTutorialWpf(String tutorialName, int nLoadMode, String wpfLoadImage, int nTextID)
      Loads in a tutorial scenario file, specifying wpf compliant load screen image.
    • loadScenario

      public void loadScenario(String scenarioName)
      Loads in a scenario file.
    • loadBackgroundScenario

      public void loadBackgroundScenario(String scenarioName)
      Sets the main menu background scenario file.
    • cameraSetRotationAngle

      public void cameraSetRotationAngle(float degrees)
      Rotates the current world camera, without affecting zoom or pitch.
    • fov

      public void fov(float newFov)
      Sets camera and renderer field of view.
    • cameraRotationReset

      public void cameraRotationReset()
      Resets current world camera rotation to defaults, without affecting zoom or pitch.
    • cameraPitchReset

      public void cameraPitchReset()
      Resets current world camera pitch to defaults, without affecting zoom or rotation.
    • handleCameraBackward

      public void handleCameraBackward(int keyState)
      Handle the Editor and Game UI; Indicates that camera forward key has gone up or down.
    • cameraWorldForward

      public void cameraWorldForward(int keyState)
      Intended for ui use only; Indicates that camera world forward key has gone up or down.
    • cameraForward

      public void cameraForward(int keyState)
      Intended for ui use only; Indicates that camera forward key has gone up or down.
    • handleCameraForward

      public void handleCameraForward(int keyState)
      Handles the Editor and Game UI; Indicates that camera forward key has gone up or down.
    • cameraNice

      public void cameraNice()
      Puts the camera in a reasonable orientation.
    • cameraStart

      public void cameraStart(int playerID)
      If applicable, sets the camera to the starting view of the given player, or the active player, in case no player ID is given.
    • cameraLimit

      public void cameraLimit(int arg)
      Sets whether camera limiting is on.
    • cameraRotate

      public void cameraRotate(int arg)
      Sets whether camera limiting is on.
    • cameraMinZoomSet

      public void cameraMinZoomSet(float zoom)
      Sets the current world camera minimum Zoom to the given value.
    • cameraPitchAngle

      public void cameraPitchAngle(float angle)
      Resets world camera orientation and sets pitch to the given angle.
    • cameraZoomReset

      public void cameraZoomReset()
      Resets current world camera Zoom to defaults.
    • cameraMaxZoomSet

      public void cameraMaxZoomSet(float zoom)
      Sets the current world camera Zoom to the given value.
    • cameraXAxis

      public void cameraXAxis(float axisValue)
      Intended for ui use only; Indicates the X position of the axis that controls the camera.
    • cameraYAxis

      public void cameraYAxis(float axisValue)
      Intended for ui use only; Indicates the Y position of the axis that controls the camera.
    • gamepadCameraRotate

      public void gamepadCameraRotate(float axisValue)
      Intended for ui use only; Indicates the position of the axis that controls camera rotation.
    • cameraUp

      public void cameraUp(int keyState)
      Intended for ui use only; Indicates that camera up key has gone up or down.
    • cameraDown

      public void cameraDown(int keyState)
      Intended for ui use only; Indicates that camera down key has gone up or down.
    • cameraPitchBackward

      public void cameraPitchBackward(int keyState)
      Intended for ui use only; Indicates that camera pitch backward key has gone up or down.
    • cameraRollLeft

      public void cameraRollLeft(int keyState)
      Intended for ui use only; Indicates that camera roll left key has gone up or down.
    • cameraZoomAxis

      public void cameraZoomAxis(float axisValue)
      Intended for ui use only; Indicates the position of the axis that controls zoom level.
    • cameraPitchForward

      public void cameraPitchForward(int keyState)
      Intended for ui use only; Indicates that camera pitch forward key has gone up or down.
    • cameraBackward

      public void cameraBackward(int keyState)
      Intended for ui use only; Indicates that camera backward key has gone up or down.
    • cameraWorldBackward

      public void cameraWorldBackward(int keyState)
      Intended for ui use only; Indicates that camera world backward key has gone up or down.
    • cameraWorldForwardLeft

      public void cameraWorldForwardLeft(int keyState)
      Intended for ui use only; Indicates that camera world forward left key has gone up or down.
    • cameraWorldForwardRight

      public void cameraWorldForwardRight(int keyState)
      Intended for ui use only; Indicates that camera world forward right key has gone up or down.
    • cameraRight

      public void cameraRight(int keyState)
      Intended for ui use only; Indicates that camera right key has gone up or down.
    • cameraLeft

      public void cameraLeft(int keyState)
      Intended for ui use only; Indicates that camera left key has gone up or down.
    • cameraWorldBackwardLeft

      public void cameraWorldBackwardLeft(int keyState)
      Intended for ui use only; Indicates that camera world backward left key has gone up or down.
    • cameraWorldBackwardRight

      public void cameraWorldBackwardRight(int keyState)
      Intended for ui use only; Indicates that camera world backward right key has gone up or down.
    • trackToggleShow

      public void trackToggleShow()
      Toggles rendering of the camera track on and off.
    • trackAddWaypoint

      public void trackAddWaypoint()
      Adds the cameras current position and orientation to the current camera track.
    • trackStepForward

      public void trackStepForward()
      Steps the current camera track 1 step forward.
    • trackStepBackward

      public void trackStepBackward()
      Steps the current camera track 1 step backward.
    • trackGotoSelectedWaypoint

      public void trackGotoSelectedWaypoint(int index)
      Moves the camera to the current waypoint.
    • trackRemoveWaypoint

      public void trackRemoveWaypoint()
      Removes the most recently added track waypoint from the current camera track.
    • trackEditWaypoint

      public void trackEditWaypoint()
      Edits the currently selected camera track.
    • trackSetSelectedWaypoint

      public void trackSetSelectedWaypoint(int index)
      Sets the current waypoint to the button with the same index.
    • cameraYawLeft

      public void cameraYawLeft(int keyState)
      Intended for ui use only; Indicates that camera yaw left key has gone up or down.
    • cameraLocalYawRight

      public void cameraLocalYawRight(int keyState)
      Intended for ui use only; Indicates that camera Local Yaw right key has gone up or down.
    • cameraRollRight

      public void cameraRollRight(int keyState)
      Intended for ui use only; Indicates that camera roll right key has gone up or down.
    • cameraYawRight

      public void cameraYawRight(int keyState)
      Intended for ui use only; Indicates that camera yaw right key has gone up or down.
    • cameraMove

      public void cameraMove(int keyState)
      Intended for ui use only; Indicates that camera move key has gone up or down.
    • trackClear

      public void trackClear()
      Clears all tracks.
    • cameraLocalYawLeft

      public void cameraLocalYawLeft(int keyState)
      Intended for ui use only; Indicates that camera Local Yaw left key has gone up or down.
    • cameraDump

      public void cameraDump()
      Debug command to spew info about the current state of the game camera.
    • setShadowBiasMul

      public void setShadowBiasMul(float mul)
      Set the shadow buffer bias multipler (supaScreenshot only).
    • setShadowSnapping

      public void setShadowSnapping(int snapFlag)
      Controls shadow matrix snapping.
    • toggleShadows

      public void toggleShadows()
      Toggle shadows on/off.
    • setShadowQuality

      public void setShadowQuality(int level)
      Set the quality level of shadows.
    • renderBaseID

      public void renderBaseID(int playerID, int basePlayerID, int areaID, int state)
      Sets the render state of the given base.
    • renderPlanID

      public void renderPlanID(int playerID, int planID, int state)
      Sets the render state of the given plan.
    • setShadowRotationOp

      public void setShadowRotationOp(int rotationOpFlag)
      Controls shadow projection rotation optimization.
    • renderWindow

      public void renderWindow(int val)
      With no arg, toggles window/fullscreen; Otherwise, sets mode to window(1)/fullscreen(0).
    • trackCopy

      public void trackCopy()
      Copies selected track.
    • trackPlay

      public void trackPlay(float lDuration, int eventID)
      Plays a track file (otherwise if "none" than plays the current track) with no arg uses current duration, otherwise sets duration.
    • trackInsert

      public void trackInsert()
      Adds a new camera track.
    • trackRemove

      public void trackRemove()
      Removes selected track.
    • trackAdvance

      public void trackAdvance(float lPosition)
      Advances the camera track to a specific location.
    • trackGotoSelectedEvent

      public void trackGotoSelectedEvent(int index)
      Moves the camera to the current event.
    • trackPause

      public void trackPause()
      Pauses the current camera track.
    • trackStop

      public void trackStop()
      Stops the current camera track.
    • startCampaign

      public void startCampaign(String filename)
      Starts the given campaign.
    • uiEnterGameMenuModeIfNotResigned

      public void uiEnterGameMenuModeIfNotResigned()
      Wrapper that enters GameMenu mode if the player isnt resigned.
    • observingCycleCurrentPlayer

      public void observingCycleCurrentPlayer()
      Increments the current player.
    • modeEnter

      public void modeEnter(String modeName)
      Enters the named mode.
    • setMinimapUnitFilter

      public void setMinimapUnitFilter(int id)
      Sets the minimap filter for units.
    • setGraphicDetail

      public void setGraphicDetail(int detailLevel)
      Sets the graphic detail; (0 = HIGH, 1 = MEDIUM, 2 = LOW).
    • modeToggleBetweenIfNotMP

      public void modeToggleBetweenIfNotMP(String modeName1, String modeName2)
      Toggles between the two modes only if were not in a BMultiplayer game.
    • resetDefaultPlayerColors

      public void resetDefaultPlayerColors()
      Reloads the player colors from the XML file.
    • stopTrackingAllOfDebugUIState

      public void stopTrackingAllOfDebugUIState(int debugUIType)
      Stops updating all channels of debug data for the specified simulation output.
    • musicStop

      public void musicStop()
      Stop playing music.
    • renderFriendOrFoe

      public void renderFriendOrFoe(int val)
      With no arg, toggles friend or foe colors; Otherwise, sets it.
    • stopTrackingDebugUIState

      public void stopTrackingDebugUIState(int debugUIType, int playerID, int referenceID)
      Stops updating debug data for the specified simulation output.
    • musicToggleBattleMode

      public void musicToggleBattleMode()
      Toggles between battle mode and normal mode.
    • displayType

      public void displayType(int val)
      With no arg, cycles through the various status display modes; Otherwise sets display type.
    • musicSetVolume

      public void musicSetVolume(float fv)
      Set the current music volume.
    • musicPlaySong

      public void musicPlaySong(String szName, float fFade)
      Play a sound as if it were a music track.
    • castGodPowerAtSlot

      public void castGodPowerAtSlot(int slotID)
      Casts the god power at the given UI slot.
    • repairUnit

      public void repairUnit(int unitID)
      Starts the auto repair on the specified unit.
    • openPrefabsDialog

      public void openPrefabsDialog()
      Opens load dialog for prefabs/groupings.
    • castGodPower

      public void castGodPower(String godPower)
      Casts a power.
    • ability

      public void ability(int abilityID, int unitID)
      Abilities use.
    • autoAbility

      public void autoAbility(int abilityID, boolean isAutoCasted)
      Abilities use.
    • cancelRepairUnit

      public void cancelRepairUnit(int unitID)
      Cancels the auto repair on the specified unit.
    • spawnUnitsSafe

      public void spawnUnitsSafe(int cmdID, int puID, int count, int playerID, int unitID)
      Spawn Units from building.
    • playMovie

      public void playMovie(String fileName)
      Plays movies from a playlist in the AVI directory.
    • setWorldDifficulty

      public void setWorldDifficulty(int v)
      Sets the world difficulty level.
    • setStoryMode

      public void setStoryMode()
      Enables Story Mode and adjusts world difficulty level accordingly.
    • EconomyVictory

      public void EconomyVictory()
      Starts the Economy victory if valid.
    • commandResearch

      public void commandResearch(int commandID, int unitID)
      Researches the given command from the given unit.
    • relicCapture

      public void relicCapture()
      Starts the Relic Capture victory if valid.
    • kothVictory

      public void kothVictory()
      Starts the King of the Hill victory if valid.
    • setDropDefaultMips

      public void setDropDefaultMips(int num)
      Set mip levels to skip for default category textures.
    • setDropTerrainMips

      public void setDropTerrainMips(int num)
      Set mip levels to skip for terrain category textures.
    • trainReinforcement

      public void trainReinforcement(int armyID)
      Trains a reinforcement.
    • cancelTrainReinforcement

      public void cancelTrainReinforcement(int armyID)
      Cancel training of a reinforcement.
    • observingToggleFogOfWar

      public void observingToggleFogOfWar()
      Togglee Fog of War without effecting simulation.
    • spectateRate

      public void spectateRate(float rate)
      0 = stopped, 1 = realtime, other = realtime multiplier (if not CPU / GPU limited).
    • showSPCNote

      public void showSPCNote(String title, String text)
      Displays the SPC Note Dialog with the specified title and text.
    • renderForceReset

      public void renderForceReset()
      Forces the renderer to reset.
    • doCommandInSelected

      public void doCommandInSelected(String commandName, int unitID)
      Use command in current unit selection.
    • doCommandInSelected2

      public void doCommandInSelected2(String commandName, int unitID)
      Use command in current unit selection.
    • doAbilityInType

      public void doAbilityInType(String protoPowerName, String protoUnitName)
      Use ability in proto unit type if the player has one.
    • doAbilityInSelected

      public void doAbilityInSelected(String protoPowerName)
      Use ability in current unit selection.
    • vsync

      public void vsync(int state)
      Set vertical syncing (-1 toggles, 0 is off, 1 is on).
    • startMoviePlayback

      public void startMoviePlayback(String filename, int sizing, float fadeIn, float fadeOut)
      Start fullscreen playback of a movie.
    • executeCommandOnButtonPos

      public void executeCommandOnButtonPos(int row, int column, boolean isSecondaryCommand)
      Use command in current unit selection.
    • executeCommandOnButtonPosAlt

      public void executeCommandOnButtonPosAlt(int row, int column, boolean isSecondaryCommand)
      Use command in current unit selection.
    • togglePushToTalk

      public void togglePushToTalk(int keyState)
      Push to talk for multiplayer voice chat.
    • toggleEasyDragMilitary

      public void toggleEasyDragMilitary(int val)
      With no argument, toggles state of Easy Drag Military setting; Otherwise, sets it.
    • deleteUnit

      public void deleteUnit(int unitID)
      Deletes the given unit.
    • ejectAll

      public void ejectAll(int unitID)
      Ejectsall units from the given unit.
    • continueToScenario

      public void continueToScenario()
      Cheap hack to allow loading of a file one frame after logic.
    • researchByID

      public void researchByID(int techID, int unitID, int playerID, boolean playClick)
      Start the research of TechID from ResearchingUnitID for the current player (if no player is specified).
    • researchTechInSelected

      public void researchTechInSelected(String techName)
      Research a tech in current unit selection.
    • click

      public void click()
      Plays the default UI click sound.
    • cancelAllQueuedInSelected

      public void cancelAllQueuedInSelected()
      Cancel all queued units and researches in all valid selected units.
    • tis

      public void tis(String protoName, int count, boolean each)
      Just like train in selected, but more abbreviated.
    • trainInSelectedByID

      public void trainInSelectedByID(int protoType, int count, boolean each)
      Just like train in selected, but fastAr because it takes a protoID click.
    • cancelAutoTrainInSelected

      public void cancelAutoTrainInSelected()
      Switches off all autotrain entries in all valid selected units.
    • cancelAutoTrainInAllOfType

      public void cancelAutoTrainInAllOfType(String unitType, boolean checkOnScreen)
      Switches off all autotrain entries in all valid buildings of the given.
    • autoTrainInSelected

      public void autoTrainInSelected(String protoName)
      Tries to auto train the selected unit type in any valid selected unit.
    • autoTrainInSelectedByID

      public void autoTrainInSelectedByID(int protoType)
      Just like autoTrainInSelected, but faster because it takes a.
    • commandTransformVillager

      public void commandTransformVillager()
      Researches the transform command set in protoUnit data for each civilian in current unit selection, when applicable.
    • commandTransformVillagerLimited

      public void commandTransformVillagerLimited(int numberToTransform)
      Researches the transform command set in protoUnit data for a number of civilians set by the integer parameter, or all of them if the parameter is -1.
    • commandResearchInSelected

      public void commandResearchInSelected(String cmdName)
      Researches a protounit command associated with a tech in current unit selection.
    • commandTransformInSelected

      public void commandTransformInSelected()
      Researches the transform command set in protoUnit data for each unit in current unit selection.
    • cancelTrainInSelected

      public void cancelTrainInSelected(int protoID, boolean all)
      Cancel training of a unit type in any valid selected unit.
    • cancelResearchInSelected

      public void cancelResearchInSelected(int techID)
      Cancel researching of a tech in any valid selected unit.
    • trainByID

      public void trainByID(int protoUnitID, int number, int unitID, int playerID, float trainPoints)
      Start the training of a unit of ProtoUnitID from TrainingUnitID for the current player (if no player is specified).
    • trainInSelected

      public void trainInSelected(String protoName, int count, boolean each)
      Tries to train the selected unit type in any valid selected unit.
    • preQueueInSelected

      public void preQueueInSelected(String Name, boolean Tech)
      Tries to preQueue the selected unit type or tech in any valid selected unit.
    • preQueueInSelectedByID

      public void preQueueInSelectedByID(int Id, boolean Tech)
      Just like preQueueInSelected, but faster because it takes an ID.
    • uiSetGatherPointAtGamepadPointerOfNearbyUnitTypes

      public void uiSetGatherPointAtGamepadPointerOfNearbyUnitTypes(String targetTypes, float distance, boolean waterSpawnPoint, boolean isEconomicGatherPoint)
      Updates the gather point of all nearby units of specified type(s) closest to the currently selected unit.
    • uiSetGatherPointAtPointerOfNearbyUnitTypesToUnit

      public void uiSetGatherPointAtPointerOfNearbyUnitTypesToUnit(int targetUnitID, String targetTypes, float distance, boolean waterSpawnPoint, boolean isEconomicGatherPoint)
      Updates the gather point of all nearby units of specified type(s) closest to the currently selected unit, to the position of the selected unit.
    • uiSetGatherPointAtGamepadPointer

      public void uiSetGatherPointAtGamepadPointer()
      Sets the gather points for the selected unit(s) to the pointer position.
    • uiSetGatherPointAtPointerOfNearbyUnitTypes

      public void uiSetGatherPointAtPointerOfNearbyUnitTypes(String targetTypes, float distance, boolean waterSpawnPoint, boolean isEconomicGatherPoint)
      Updates the gather point of all nearby units of specified type(s) closest to the currently selected unit.
    • uiFlareAtPointer

      public void uiFlareAtPointer()
      Sends out a flare at the pointer position.
    • uiFlareAtUnit

      public void uiFlareAtUnit(int unitID)
      Sends out a flare at the unit's position.
    • uiClearGatherPoint

      public void uiClearGatherPoint()
      Clears the gather point for the selected unit(s), returning it to a default state.
    • uiTransformSelectedUnit

      public void uiTransformSelectedUnit(String protoName, boolean forceFullyBuilt, int unitID, boolean placementPlayer)
      Transforms the selected unit into the specified proto unit.
    • uiBuildWallAtPointer

      public void uiBuildWallAtPointer(boolean addWaypoint)
      Instructs the currently selected unit(s) to build the current proto unit cursor building type at the pointer location, with walllike endpoint behavior.
    • uiSetGatherPointAtPointer

      public void uiSetGatherPointAtPointer(boolean waterSpawnPoint)
      Sets the gather points for the selected unit(s) to the pointer position.
    • editMode

      public void editMode(String modename)
      Changes the edit mode.
    • uiBuildAtPointer

      public void uiBuildAtPointer()
      Instructs the currently selected unit(s) to build the current proto unit cursor building type at the pointer location.
    • uiClearCursor

      public void uiClearCursor()
      Resets the cursor to the basic pointer.
    • uiWheelRotatePlacedUnit

      public void uiWheelRotatePlacedUnit(int amount)
      Intended for ui use only; Rotate placed unit with wheel, ie, intended to be mapped to.
    • uiStickRotatePlacedUnit

      public void uiStickRotatePlacedUnit(float amount)
      Intended for ui use only; Rotate placed unit with gamepad stick, ie, intended to be mapped to gamepad stick.
    • uiEnterContext

      public void uiEnterContext(String context)
      Enters the specified UI context.
    • uiLeaveContext

      public void uiLeaveContext(String context)
      Leaves the specified UI context.
    • uiCreateNumberGroup

      public void uiCreateNumberGroup(int group)
      Creates a number group with the currently selected units.
    • uiClearNumberGroup

      public void uiClearNumberGroup(int group)
      Erases the given number group.
    • uiSelectionButtonDown

      public void uiSelectionButtonDown()
      Intended for ui use only; Indicates that selection button has been pressed.
    • uiSelectionButtonUp

      public void uiSelectionButtonUp()
      Intended for ui use only; Indicates that selection button has been released.
    • setFlareType

      public void setFlareType()
      Set Flare type.
    • uiGarrisonToPointer

      public void uiGarrisonToPointer()
      Commands the selected unit(s) to garrison in a building at the pointer position.
    • openFlareType

      public void openFlareType()
      Open menu to change Flare Type.
    • closeFlareType

      public void closeFlareType(int keystate)
      Close menu to change Flare Type.
    • uiSetProtoCursor

      public void uiSetProtoCursor(String proto, boolean setPlacement)
      Sets the cursor to a protounit.
    • uiSetProtoCursorID

      public void uiSetProtoCursorID(int protoID)
      Sets the cursor to a protounit.
    • uiRepairAtPointer

      public void uiRepairAtPointer()
      Commands the selected unit(s) to repair the target building at the pointer position.
    • uiEmpowerAtPointer

      public void uiEmpowerAtPointer()
      Commands the selected unit(s) to Empower the target building at the pointer position.
    • uiControlSelectionButtonUp

      public void uiControlSelectionButtonUp()
      Intended for ui use only; Indicates control+selection button has been released.
    • uiToggleSelectionButton

      public void uiToggleSelectionButton()
      Intended for ui use only.
    • uiRemoveSelectionButtonUp

      public void uiRemoveSelectionButtonUp()
      Intended for ui use only; Indicates that the remove selection button has been released.
    • uiControlSelectionButtonDown

      public void uiControlSelectionButtonDown()
      Intended for ui use only; Handles control+selection button pressing.
    • uiBeginClickRotate

      public void uiBeginClickRotate()
      Intended for ui use only; Indicates that clickrotate button has been pressed.
    • toggleFreeCamera

      public void toggleFreeCamera()
      Enable the free camera mode, W A S D Q E For movement + Right click drag to rotate.
    • uiWorkAtPointer

      public void uiWorkAtPointer(int mode)
      Intended for ui use only; Issues "work" at pointer location; mode 1 - ignore when clickdrag is enabled, mode 2 - ignore when clickdrag is disabled.
    • uiBeginClickDrag

      public void uiBeginClickDrag()
      Intended for ui use only; Indicates that clickdrag button has been pressed.
    • uiRemoveFromAnyNumberGroup

      public void uiRemoveFromAnyNumberGroup()
      Removes current selection from any army.
    • uiDoubleClickSelect

      public void uiDoubleClickSelect(int add, boolean checkAction)
      Intended for ui use only; Double click select at pointer location.
    • uiSelectNumberGroup

      public void uiSelectNumberGroup(int group)
      Selects the units in the given number group.
    • uiAddSelectNumberGroup

      public void uiAddSelectNumberGroup(int group)
      Adds the units in the given number group to current selection.
    • uiAddSelectionButtonUp

      public void uiAddSelectionButtonUp()
      Intended for ui use only; Indicates that the add selection button has been released.
    • uiRemoveSelectionButtonDown

      public void uiRemoveSelectionButtonDown(boolean isModified)
      Intended for ui use only; Indicates that the remove selection button has been pressed.
    • uiDoubleClickDeselect

      public void uiDoubleClickDeselect()
      Intended for ui use only; Double click deselect at pointer location.
    • uiAddSelectionButtonDown

      public void uiAddSelectionButtonDown(boolean allowToggle)
      Intended for ui use only; Indicates that the add selection button has been pressed.
    • uiOpenScenarioBrowser

      public void uiOpenScenarioBrowser(String fileName)
      Open a scenario from the scenario directory.
    • uiSaveScenarioBrowser

      public void uiSaveScenarioBrowser()
      Save a scenario to the scenario directory.
    • uiSaveAsScenarioBrowser

      public void uiSaveAsScenarioBrowser()
      Save a scenario to the scenario directory.
    • uiCancelSelectedBuilding

      public void uiCancelSelectedBuilding()
      Cancels currently built unit.
    • uiStopSelectedUnits

      public void uiStopSelectedUnits()
      Stop selected units.
    • uiStartScenarioTest

      public void uiStartScenarioTest()
      Test a scenario.
    • uiStopScenarioTest

      public void uiStopScenarioTest()
      Test a scenario.
    • uiSaveScenarioPrompt

      public void uiSaveScenarioPrompt(boolean saveAs)
      Checks for currentlyset active player and triggers prompt to user, if it's not set to player 1, before opening save dialog.
    • uiScenarioLoad

      public void uiScenarioLoad()
      Load a scenario, checking dirty bit on world.
    • uiWheelRotateCamera

      public void uiWheelRotateCamera(int amount)
      Intended for ui use only; Rotate with wheel, ie, intended to be mapped to wheel.
    • uiResetCameraOrientation

      public void uiResetCameraOrientation()
      Intended for ui use only; Reset the rotation and zoom of the camera to default.
    • uiSetClickDragParams

      public void uiSetClickDragParams(float deadZoneSize, float maxZoneSize, float exponent, float maxSpeed)
      Set the parameters for clickdrag movement.
    • uiWheelRotate

      public void uiWheelRotate(int amount)
      Intended for ui use only; Rotate with wheel, ie, intended to be mapped to wheel.
    • uiDeleteSelectedUnit

      public void uiDeleteSelectedUnit(boolean ignoreConfirmation)
      Deletes selected unit.
    • uiDeleteAllSelectedUnits

      public void uiDeleteAllSelectedUnits()
      Deletes all selected unit.
    • uiResetInGameCameraZoom

      public void uiResetInGameCameraZoom()
      Intended for ui use only; Reset the Zoom of the ingame (strategy) camera to default.
    • uiResetInGameCameraRotation

      public void uiResetInGameCameraRotation()
      Intended for ui use only; Reset the Rotation of the ingame (strategy) camera to default.
    • uiSetProtoID

      public void uiSetProtoID(int id)
      Sets the proto ID to place.
    • uiBuildMode

      public void uiBuildMode(int protoID)
      Does and editMode and setProtoID, after verifying sufficient resources for the current player.
    • uiLookAtProto

      public void uiLookAtProto(String protoname)
      Moves the camera to see the first instance of proto unit X owned by the current player.
    • uiLookAtNumberGroup

      public void uiLookAtNumberGroup(int number)
      Moves the camera to see the given number group.
    • uiFindIdleOrAnyType

      public void uiFindIdleOrAnyType(String name, boolean shiftSelectsAll, boolean controlModifier)
      Finds the next idle unit of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle; If none are found, finds the next unit even if it's not idle.
    • uiFindNextIdleGroupOfType

      public void uiFindNextIdleGroupOfType(String name, boolean groupByPUID)
      Finds the next contiguous group of idle units of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiFindIdleType

      public void uiFindIdleType(String name, boolean shiftSelectsAll, boolean controlModifier, boolean groupByType)
      Finds the next idle unit of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiFindIdleType2

      public void uiFindIdleType2(String name, boolean shiftSelectsAll, boolean controlModifier, boolean groupByType)
      Finds the next idle unit of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiZoomToProto

      public void uiZoomToProto(String protoname)
      Zooms to the first instance of proto unit X owned by the current player.
    • uiOpenRecordGameBrowser

      public void uiOpenRecordGameBrowser()
      Open a record game from the replays directory.
    • uiScenarioTestMainMenu

      public void uiScenarioTestMainMenu()
      Test a scenario into main menu screen.
    • uiOpenGameSettings

      public void uiOpenGameSettings()
      Opens the game settings dialog.
    • uiLookAtBattle

      public void uiLookAtBattle(int bID)
      Moves the camera to see the specified battle.
    • uiLookAtAndSelectUnit

      public void uiLookAtAndSelectUnit(int lID)
      Moves the camera to see the specified unit and selects it.
    • uiLookAtSelection

      public void uiLookAtSelection()
      Moves the camera to see the first selected unit.
    • uiLookAtUnit

      public void uiLookAtUnit(int lID)
      Moves the camera to see the specified Unit.
    • uiFindAllOfTwoTypesOnScreen

      public void uiFindAllOfTwoTypesOnScreen(String name, String secondName, boolean isBuilding)
      Finds all units of either of the two types currently on screen.
    • uiFindAllOfTwoTypesOnScreenAnd

      public void uiFindAllOfTwoTypesOnScreenAnd(String name, String secondName, boolean isBuilding)
      Finds all units of both of the two types currently on screen.
    • uiFindAllOfTypeOnScreen

      public void uiFindAllOfTypeOnScreen(String name, boolean isBuilding)
      Finds all units of the same type currently on screen.
    • uiFindAllOfTypeOnScreenIdle

      public void uiFindAllOfTypeOnScreenIdle(String name, boolean isBuilding)
      Finds all units of the same type currently on screen.
    • uiFindType

      public void uiFindType(String name)
      Finds the next unit (idle or not) of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiFindTwoTypes

      public void uiFindTwoTypes(String name1, String name2)
      Finds the next unit of the given two types in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiHandleIdleBanner

      public void uiHandleIdleBanner(String name, boolean groupByType)
      Does the right thing.
    • uiFindTownBellTC

      public void uiFindTownBellTC()
      Finds the next town center that has the town bell active, so that it can be called repeatedly to cycle.
    • uiFindAllOfType

      public void uiFindAllOfType(String name)
      Finds all units of the same type.
    • uiFindAllOfTwoTypes

      public void uiFindAllOfTwoTypes(String name1, String name2)
      Finds all units belonging to any of the two provided types.
    • uiFindNextIdleGroupOfType2

      public void uiFindNextIdleGroupOfType2(String name, boolean groupByPUID)
      Finds the next contiguous group of idle units of the given type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiFindAllOfSelectedType

      public void uiFindAllOfSelectedType()
      Finds all units of the same type as the selected unit.
    • uiFindAllOfTypeIdle

      public void uiFindAllOfTypeIdle(String name)
      Finds all idle units of the same type.
    • uiFindAllOfTypeIdle2

      public void uiFindAllOfTypeIdle2(String name)
      Finds all idle units of the same type.
    • uiFindAllOfTwoTypesAnd

      public void uiFindAllOfTwoTypesAnd(String name1, String name2)
      Finds all units belonging to both of the two provided types.
    • uiFindAllOfTypes

      public void uiFindAllOfTypes(String name)
      Finds all units of the same types.
    • uiEjectBackToWork

      public void uiEjectBackToWork()
      Intended for UI use only; Sends an ejection command for the selected unit, tasking ungarrisoned units back to work.
    • uiSeekShelter

      public void uiSeekShelter()
      Intended for UI use only; Tasks all valid Town Bell targets to garrison within the nearest building.
    • uiEjectGarrisonedUnits

      public void uiEjectGarrisonedUnits()
      Intended for UI use only; Sends an ejection command for the selected unit.
    • uiEjectAtPointer

      public void uiEjectAtPointer()
      Intended for UI use only; Sends an ejection command with waypoint for the selected unit.
    • uiMoveUnitsToPointer

      public void uiMoveUnitsToPointer(int number, String type)
      Intended for UI use only; Moves a number of units of the type given to the location of the pointer.
    • uiPatrolAtPointer

      public void uiPatrolAtPointer()
      Intended for UI use only; Sends an patrol order.
    • uiBuildAtSite

      public void uiBuildAtSite()
      Intended for UI use only; Selects nearest worker and opens the gamepad build menu.
    • uiNorseBuildAtSite

      public void uiNorseBuildAtSite()
      Intended for UI use only; Selects nearest infantry and opens the gamepad build menu.
    • uiSelectType

      public void uiSelectType(String nameListString, boolean selectAll, boolean snapTo, boolean forbidSnap)
      Selects units of the same type.
    • uiCycleGadget

      public void uiCycleGadget(int delta)
      Cycles through the active child gadget of a deluxe gadget.
    • uiFindTwoTypesAnd

      public void uiFindTwoTypesAnd(String name1, String name2)
      Finds the next unit of both of the given two types in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiFindAnyOfTypes

      public void uiFindAnyOfTypes(String nameListString)
      Finds the next unit of any of the given types (separated by commas or spaces) in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiMessageBox

      public void uiMessageBox(String text, String command)
      Pops up a message box with text that activated the cmd when the ok button is hit.
    • uiSetTerrainDetailPaintMode

      public void uiSetTerrainDetailPaintMode(int mode)
      Sets the terrain detail paint mode (0) paint overlay (1) paint wetness (2) smooth.
    • uiCloseFieldSet

      public void uiCloseFieldSet()
      Closes (as if clicked on the close button) any active field set.
    • uiCloseDialog

      public void uiCloseDialog()
      Closes (as if clicked on the close button) any active dialog.
    • uiDumpKeyMappings

      public void uiDumpKeyMappings(String context)
      Spews all key mappings out to the console.
    • uiDumpAllUnitHotKeyMappings

      public void uiDumpAllUnitHotKeyMappings()
      Spews all hot key mappings that create units to the console.
    • uiClearMenu

      public void uiClearMenu(String name)
      Removes any dangling child menus off of the given gadget.
    • uiClearSelection

      public void uiClearSelection()
      Deselects all selected units.
    • uiHandleUserTab

      public void uiHandleUserTab(int parent)
      Handles toggle of user textures.
    • uiHandleTrainingPanelAction

      public void uiHandleTrainingPanelAction(int unitID, int actionType, int actionID, int actionIdx)
      Handles clicking over an item in the global queue/training panel.
    • uiDumpUnmappedKeys

      public void uiDumpUnmappedKeys(String context)
      Spews all empty keys out to the console.
    • uiFindKeyMapping

      public void uiFindKeyMapping(String keyname)
      Finds all key mappings for a given key.
    • uiMoveUnitOfNameToUnitLocation

      public void uiMoveUnitOfNameToUnitLocation(int targetUnitID, String unitNames, float minDist)
      Find the unit of a certain protounit name nearest to the target unit, and tell them to walk over.
    • uiMoveAllUnitOfTypeToUnitLocation

      public void uiMoveAllUnitOfTypeToUnitLocation(int targetUnitID, String typeNames)
      Find units of a certain type, and tell them to walk over.
    • uiGuardAtPointer

      public void uiGuardAtPointer()
      Intended for UI use only; Sends an guard order.
    • uiMoveUnitOfTypeToUnitLocation

      public void uiMoveUnitOfTypeToUnitLocation(int targetUnitID, String typeNames, float minDist, boolean doWorkOnUnit)
      Find the unit of a certain type nearest to the target unit, and tell them to walk over.
    • uiIgnoreNextKey

      public void uiIgnoreNextKey()
      Used when activating a text box with a key to avoid having that key go into the text box too.
    • uiCycleCurrentActivate

      public void uiCycleCurrentActivate()
      Acts like the current cycle gadget has been pressed.
    • uiVillagerReturnResources

      public void uiVillagerReturnResources(int targetUnitID, float range)
      Tell villagers in a defined area to return currently held resources.
    • uiApplyLightingSet

      public void uiApplyLightingSet(int n)
      Intended for UI use only; Applies a Lighting Set.
    • gadgetRealIfNotMP

      public void gadgetRealIfNotMP(String name)
      Makes real the named gadget.
    • gadgetToggle

      public void gadgetToggle(String name)
      Toggles the reality of the named gadget.
    • gadgetReal

      public void gadgetReal(String name)
      Makes real the named gadget.
    • gadgetUnreal

      public void gadgetUnreal(String name)
      Makes unreal the named gadget.
    • gadgetFlash

      public void gadgetFlash(String name, boolean flash)
      Turns gadget flashing on/off.
    • fadeToColor

      public void fadeToColor(int r, int g, int b, int duration, int delay, boolean inOut)
      Fade in/out using color specified.
    • gadgetToggleIfNotMP

      public void gadgetToggleIfNotMP(String name)
      Toggles the reality of the named gadget.
    • gadgetRefresh

      public void gadgetRefresh(String name)
      Refresh the contents of the named gadget.
    • uiPayFoundation

      public void uiPayFoundation(int unitID)
      Pays for the given foundation.
    • uiSocketBuild

      public void uiSocketBuild(int unitID)
      Performs autobuilding for the given socket, if it has valid socket building data.
    • uiToggleGarrisonMode

      public void uiToggleGarrisonMode()
      Intended for UI use only; Sends a toggle garrison mode command for the selected unit.
    • uiEjectFromAllMapControlBuildings

      public void uiEjectFromAllMapControlBuildings()
      Intended for UI use only; Ejects all units from all Map Control Buildings.
    • gadgetScrollLeft

      public boolean gadgetScrollLeft(String gadget)
      Scrolls the gadget to the left one unit.
    • gadgetScrollRight

      public boolean gadgetScrollRight(String gadget)
      Scrolls the gadget to the Right one unit.
    • gadgetScrollUp

      public boolean gadgetScrollUp(String gadget)
      Scrolls the gadget up one unit.
    • gadgetScrollDown

      public boolean gadgetScrollDown(String gadget)
      Scrolls the gadget up one unit.
    • uiHideCursor

      public void uiHideCursor(boolean hide)
      Testing only.
    • uiLeaveModeOnUnshift

      public void uiLeaveModeOnUnshift()
      Causes game to return to editMode none when shift hotkey is released.
    • uiTriggerResetSounds

      public void uiTriggerResetSounds()
      TODO.
    • uiExportGrouping

      public void uiExportGrouping()
      Save a group.
    • AIDebugOutputToggle

      public void AIDebugOutputToggle()
      Toggles whether the ai output window is up, refreshing if first showing.
    • AIDebugGathererToggle

      public void AIDebugGathererToggle()
      Toggles whether the ai gatherer distribution window is up, refreshing if first showing.
    • AIDebugInfoRefresh

      public void AIDebugInfoRefresh()
      Shows the ai debug menu with new data.
    • AIDebugInfoToggle

      public void AIDebugInfoToggle()
      Toggles whether the ai debug menu is up, refreshing if first showing.
    • uiSaveTriggers

      public void uiSaveTriggers(String filename)
      Save some triggers.
    • uiImportTriggers

      public void uiImportTriggers()
      Load some triggers.
    • setGameFadeIn

      public void setGameFadeIn(int r, int g, int b, int duration, int delay, boolean inOut)
      Turn fade in on/off, set color duration.
    • uiLoadTriggers

      public void uiLoadTriggers(String filename)
      Load some triggers.
    • uiTriggerSelectLocation

      public void uiTriggerSelectLocation()
      Pans the camera to the location.
    • uiTriggerResetParameters

      public void uiTriggerResetParameters()
      TODO.
    • doTriggerImport

      public void doTriggerImport(String filename)
      Load some triggers.
    • uiExportTriggers

      public void uiExportTriggers()
      Save some triggers.
    • uiShowAIDebugInfoPlan

      public void uiShowAIDebugInfoPlan(int planID)
      Brings up the plan debug text for the given plan ID.
    • uiShowAIDebugInfoPlacement

      public void uiShowAIDebugInfoPlacement(int placeID)
      Brings up the building placement info for the given ID.
    • AIDebugToggleWarningEchoes

      public void AIDebugToggleWarningEchoes()
      Toggles the showing of warning echoes.
    • AIDebugToggleEngineInfoEchoes

      public void AIDebugToggleEngineInfoEchoes()
      Toggles the showing of engine info echoes.
    • uiShowAIDebugInfoArea

      public void uiShowAIDebugInfoArea(int areaID, int renderOn)
      Brings up the area info for the given ID.
    • uiShowAIDebugInfoAreaGroup

      public void uiShowAIDebugInfoAreaGroup(int areaGroupID, int renderOn)
      Brings up the area info for the given ID.
    • uiShowAIDebugInfoKBUnit

      public void uiShowAIDebugInfoKBUnit(int state)
      Brings up the kbunit info for the given ID.
    • uiShowAIDebugInfoBase

      public void uiShowAIDebugInfoBase(int playerID, int baseID)
      Brings up the base info for the given ID.
    • AIDebugShowBasesToggle

      public void AIDebugShowBasesToggle()
      Toggles the display of bases.
    • AIDebugShowPlansToggleAll

      public void AIDebugShowPlansToggleAll()
      Toggles the display of all plans.
    • AIDebugPopToggle

      public void AIDebugPopToggle()
      Toggles whether the ai pop distribution window is up, refreshing if first showing.
    • AIDebugTimedStatsToggle

      public void AIDebugTimedStatsToggle()
      Toggles whether the kb timed stats window is up, refreshing if first showing.
    • AIDebugShowAreaDangerRatingsToggle

      public void AIDebugShowAreaDangerRatingsToggle()
      Toggles the showing of area danger ratings.
    • AIDebugToggleBPText

      public void AIDebugToggleBPText()
      Toggles the showing of Building placement value text.
    • AIDebugShowPlansToggle

      public void AIDebugShowPlansToggle()
      Toggles the display of selected plans.
    • AIDebugShowExtendedAreaInformationToggle

      public void AIDebugShowExtendedAreaInformationToggle()
      Toggles the display of extra area debug information.
    • uiChatScrollForward

      public void uiChatScrollForward(int keyState)
      Scrolls chat forward one.
    • uiChatDisplayModeToggle

      public void uiChatDisplayModeToggle()
      Toggles the chat display mode.
    • uiSetBuildingPlacementRender

      public void uiSetBuildingPlacementRender(int placeID, boolean set)
      Controls rendering of the building placement info for the given ID.
    • uiChatScrollBack

      public void uiChatScrollBack(int keyState)
      Scrolls chat back one.
    • uiClearChat

      public void uiClearChat(boolean clearOnly)
      Clears the chat and resets to recent mode; clearOnly == true if you dont want it to populate the chat, but only clear it.
    • uiCloseControlsPopup

      public void uiCloseControlsPopup()
      Closes the controls popup.
    • uiChatDisplayModeToRecent

      public void uiChatDisplayModeToRecent()
      Toggles the chat display mode to recent mode.
    • uiChatDisplayModeToHistory

      public void uiChatDisplayModeToHistory()
      Toggles the chat display mode to history mode.
    • uiSetKBResourceRender

      public void uiSetKBResourceRender(int resID, boolean set)
      Render the kbResource info for the given ID; If not set given, will not render the resource.
    • uiShowAIDebugInfoKBResource

      public void uiShowAIDebugInfoKBResource(int resID)
      Brings up the kbResource info for the given ID.
    • uiSetKBAttackRouteRender

      public void uiSetKBAttackRouteRender(int routeID, boolean set)
      Render the attackRoute info for the given ID.
    • uiShowAIDebugInfoAttackRoute

      public void uiShowAIDebugInfoAttackRoute(int routeID)
      Brings up the attackRoute info for the given ID.
    • uiShowAIDebugInfoKBUnitPick

      public void uiShowAIDebugInfoKBUnitPick(int id)
      Brings up the kbUnitPick info for the given ID.
    • uiShowAIDebugInfoEscrow

      public void uiShowAIDebugInfoEscrow(int id)
      Brings up the escrow info for the given ID.
    • uiSetKBArmyRender

      public void uiSetKBArmyRender(int id, boolean set)
      Render the kbArmy info for the given ID; If not set given, will not render the army.
    • uiShowAIDebugInfoKBArmy

      public void uiShowAIDebugInfoKBArmy(int id)
      Brings up the kbArmy info for the given ID.
    • uiReleaseDownKeys

      public void uiReleaseDownKeys()
      Pops up all downed keys.
    • uiSpewDownKeys

      public void uiSpewDownKeys()
      Spews all down keys.
    • uiAddChatNotification

      public void uiAddChatNotification(int fromPlayerID, int toPlayerID, String StringID, int soundSetID)
      Adds a notification to the games chat output, can play a sound too.
    • uiShowChatWindow

      public void uiShowChatWindow()
      TODO.
    • enterAttackMoveMode

      public void enterAttackMoveMode()
      TODO.
    • uiHotkeyToggleObjectivesDialog

      public void uiHotkeyToggleObjectivesDialog()
      TODO.
    • uiMinorGodUI

      public void uiMinorGodUI(int techID, int tcID, int playerID, boolean PreQueue)
      Used to activate the minor god UI.
    • uiMinorGodUIInSelected

      public void uiMinorGodUIInSelected(boolean PreQueue)
      Used to activate the minor god UI in current selection.
    • uiAgeUpFromAnywhere

      public void uiAgeUpFromAnywhere()
      Open age up popup from anywhere.
    • uiOpenChatMenu

      public void uiOpenChatMenu()
      Opens the chat menu.
    • uiSwitchFromDiplomacyToChat

      public void uiSwitchFromDiplomacyToChat()
      Closes the diplomacy menu and opens the chat menu.
    • uiSwitchControlsPopup

      public void uiSwitchControlsPopup(boolean moveNext)
      Switches pages in the controls popup.
    • uiOpenDiplomacyMenu

      public void uiOpenDiplomacyMenu()
      Opens the diplomacy menu.
    • uiSendTribute

      public void uiSendTribute()
      Send tribute in the diplomacy menu.
    • uiConfirmAndLoadQuickSave

      public void uiConfirmAndLoadQuickSave()
      Opens a yes no popup to and loads save game if player confirms.
    • uiSwitchFromChatToDiplomacy

      public void uiSwitchFromChatToDiplomacy()
      Closes the chat menu and opens the diplomacy menu.
    • uiClearTribute

      public void uiClearTribute()
      Clears tribute in the diplomacy menu.
    • showModsScreen

      public void showModsScreen()
      Show/hide the mods screen.
    • toggleXSDebugger

      public void toggleXSDebugger()
      Show/hide the XS Debugger screen.
    • uiMoveAllMilitaryAtPointer

      public void uiMoveAllMilitaryAtPointer()
      Moves all military units to the pointer position.
    • wpfNavigateFrame

      public void wpfNavigateFrame(String pageUri, String frameName)
      In the current WPF UI screen, change the page of the named Frame to the given URI.
    • toggleExtendedMinimap

      public void toggleExtendedMinimap()
      Toggle the extended minimap.
    • uiShowMilitaryUI

      public void uiShowMilitaryUI()
      Displays Military UI on command panel, if applicable.
    • toggleRMVisualizer

      public void toggleRMVisualizer()
      Show/hide the RM visualizer.
    • toggleTREchoLog

      public void toggleTREchoLog()
      Show/hide the TR echo log.
    • uiFindGatherersNotGathering

      public void uiFindGatherersNotGathering()
      Finds the gatherer unit that's not gathering in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiSetCameraStartLoc

      public void uiSetCameraStartLoc()
      TODO.
    • uiSelectTransportUnit

      public void uiSelectTransportUnit()
      TODO.
    • uiFindResourceGatherers

      public void uiFindResourceGatherers(String resourceName)
      Finds the next resource gatherer unit of the given resource type in the arbitrary order of unit ID, so that it can be called repeatedly to cycle.
    • uiCameraControl

      public void uiCameraControl(float x, float y)
      Controls camera with gamepad stick.
    • uiCenterPointer

      public void uiCenterPointer()
      Centers mouse pointer.
    • uiShowCameraStartLoc

      public void uiShowCameraStartLoc()
      TODO.
    • uiDeleteCameraStartLoc

      public void uiDeleteCameraStartLoc()
      TODO.
    • uiShowHelpPopupHistoryTopic

      public void uiShowHelpPopupHistoryTopic(String topicName)
      Opens the help popup with selected history topic.
    • uiRefreshCommandPanel

      public void uiRefreshCommandPanel()
      Forces a refresh on the command panel.
    • uiUnbuildSelectedUnit

      public void uiUnbuildSelectedUnit()
      Enter unbuild mode with selected building.
    • uiUnbuildSelectedUnitAtPointer

      public void uiUnbuildSelectedUnitAtPointer()
      Actually unbuild selected building.
    • uiQuickSelectDown

      public void uiQuickSelectDown(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
      Intended for ui use only; Quick selects certain units.
    • uiReleaseQuickSelectDown

      public void uiReleaseQuickSelectDown()
      Intended for ui use only; Releases down in the quick select manager.
    • uiQuickSelectUp

      public void uiQuickSelectUp(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
      Intended for ui use only; Quick selects certain units.
    • uiReleaseQuickSelectUp

      public void uiReleaseQuickSelectUp()
      Intended for ui use only; Releases up in the quick select manager.
    • uiSelectNextUnitStack

      public void uiSelectNextUnitStack(boolean reverse)
      Selects the next unit stack.
    • uiAutoScoutSelectedUnit

      public void uiAutoScoutSelectedUnit(int unitID, boolean enable)
      Enables/disables auto scout on selected unit.
    • uiShowEconomicUI

      public void uiShowEconomicUI()
      Displays Economic UI on command panel, if applicable.
    • uiToggleUI

      public void uiToggleUI()
      Toggles visibility of main game UI.
    • setUnitToRepair

      public void setUnitToRepair(int unitID)
      Find a nearby unit and set it to repair building.
    • resourceUnitConstructBuilding

      public void resourceUnitConstructBuilding(int unitID, String unitName)
      Find a nearby villager and construct a specified unit.
    • uiSetNearestUnitNamedToBuild

      public void uiSetNearestUnitNamedToBuild(int unitID, String unitNames)
      Find the nearest unit to the specified target unit with one of the specified names, and have it start building.
    • SetVillagerToGather

      public void SetVillagerToGather(int unitID, boolean isFish)
      Find a nearby villager and set it to gather resource.
    • uiGamepadReplayPlayerViewMenuPress

      public void uiGamepadReplayPlayerViewMenuPress()
      Opens replay player view ring menu.
    • uiGamepadReplayPlayerViewMenuRelease

      public void uiGamepadReplayPlayerViewMenuRelease()
      Closes replay player view ring menu.
    • uiGamepadReplayRestart

      public void uiGamepadReplayRestart()
      Replay function Restart.
    • uiGamepadReplayCycleMapVis

      public void uiGamepadReplayCycleMapVis()
      Replay functions Cycle Map Visibility.
    • uiMinimapEnlarge

      public void uiMinimapEnlarge()
      Intended for ui use only; Enlarges the minimap for minimap navigation.
    • uiMinimapDPadUp

      public void uiMinimapDPadUp()
      Intended for ui use only; DPad Up function while minimap is enlarged.
    • uiGamepadReplaySwitchResourceView

      public void uiGamepadReplaySwitchResourceView()
      Swap between power bar and resource view in replay mode.
    • uiGamepadCycleScoreboardView

      public void uiGamepadCycleScoreboardView()
      Cycle scoreboard view.
    • uiQuickSelectRight

      public void uiQuickSelectRight(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
      Intended for ui use only; quick selects certain units.
    • uiReleaseQuickSelectRight

      public void uiReleaseQuickSelectRight()
      Intended for ui use only; Releases right in the quick select manager.
    • uiQuickSelectLeft

      public void uiQuickSelectLeft(boolean leftTrigger, boolean rightTrigger, boolean leftBumper, boolean rightBumper)
      Intended for ui use only; quick selects certain units.
    • uiReleaseQuickSelectLeft

      public void uiReleaseQuickSelectLeft()
      Intended for ui use only; Releases left in the quick select manager.
    • uiGamepadReplayDPadLeft

      public void uiGamepadReplayDPadLeft()
      Replay function Slowed Playback.
    • uiGamepadReplayDPadRight

      public void uiGamepadReplayDPadRight()
      Replay function Fast Playback.
    • uiGamepadReplayDPadUp

      public void uiGamepadReplayDPadUp()
      Replay functions Play.
    • uiGamepadReplayDPadDown

      public void uiGamepadReplayDPadDown()
      Replay functions Pause.
    • uiFindMenuPress

      public void uiFindMenuPress()
      Intended for ui use only; Opens the find buildings/units menu.
    • uiFindMenuRelease

      public void uiFindMenuRelease()
      Intended for ui use only; Opens the find buildings/units menu.
    • uiUnitCommandsMenuPress

      public void uiUnitCommandsMenuPress()
      Intended for ui use only; Opens the unit commands gamepad menu menu.
    • uiUnitCommandsMenuRelease

      public void uiUnitCommandsMenuRelease()
      Intended for ui use only; Opens the unit commands gamepad menu menu.
    • uiControlGroupsPress

      public void uiControlGroupsPress()
      Intended for ui use only; Opens the control group gamepad menu menu.
    • uiControlGroupsRelease

      public void uiControlGroupsRelease()
      Intended for ui use only; Opens the control group gamepad menu menu.
    • uiGodPowersPress

      public void uiGodPowersPress()
      Intended for ui use only; Opens the god powers menu.
    • uiGodPowersRelease

      public void uiGodPowersRelease()
      Intended for ui use only; Opens the god powers menu.
    • uiMinimapDPadRight

      public void uiMinimapDPadRight()
      Intended for ui use only; DPad Right function while minimap is enlarged.
    • uiSwitchToGamepadMode

      public void uiSwitchToGamepadMode()
      Switch the user input into gamepad mode.
    • uiMinimapDPadDown

      public void uiMinimapDPadDown()
      Intended for ui use only; DPad Down function while minimap is enlarged.
    • uiMinimapDPadLeft

      public void uiMinimapDPadLeft()
      Intended for ui use only; DPad Left function while minimap is enlarged.
    • uiVillagerPrioritiesPress

      public void uiVillagerPrioritiesPress()
      Intended for ui use only; Opens the villager priorities gamepad menu menu.
    • uiVillagerPrioritiesRelease

      public void uiVillagerPrioritiesRelease()
      Intended for ui use only; Opens the villager priorities gamepad menu menu.
    • uiSwitchToMouseMode

      public void uiSwitchToMouseMode(boolean useKeyboard)
      Switch the user input into mouse mode; Param sets last input type to either keyboard or mouse.
    • uiSelectAgeUpGod

      public void uiSelectAgeUpGod(boolean left)
      Select the left god when input; bool is true, the right god when it is false.
    • uiRadialMenuXAxis

      public void uiRadialMenuXAxis(float axisValue)
      Intended for ui use only; Indicates the X position of the radial menu selector.
    • uiRadialMenuYAxis

      public void uiRadialMenuYAxis(float axisValue)
      Intended for ui use only; Indicates the Y position of the radial menu selector.
    • uiRadialMenuThumbAction

      public void uiRadialMenuThumbAction()
      Intended for ui use only; Activates the page specific thumb action.
    • uiRadialMenuViewAction

      public void uiRadialMenuViewAction()
      Intended for ui use only; Activates the page specific view action.
    • mapQuickAction

      public void mapQuickAction(String exactUnitName, String action)
      TODO.
    • uiQuickActionCycleRight

      public void uiQuickActionCycleRight()
      Used to cycle the quick action to the right.
    • uiQuickTopButtonActionDown

      public void uiQuickTopButtonActionDown()
      Used to enter the gamepad quick action mode.
    • uiQuickTopButtonActionUp

      public void uiQuickTopButtonActionUp(boolean allowQuickActionAction)
      Used to exit the gamepad quick action mode, or execute the command; Using this with a false parameter will allow you to disable trying a quick action if it was closed fast.
    • uiReleaseRadialMenuEntry

      public void uiReleaseRadialMenuEntry()
      Intended for ui use only; Release the currently highlighted option in the radial menu.
    • uiCloseRadialMenu

      public void uiCloseRadialMenu()
      Intended for ui use only; Conducts the cancel command on the radial menu (whatever that does for the specific context).
    • uiRadialMenuChangePage

      public void uiRadialMenuChangePage()
      Intended for ui use only; Changes radial menu page.
    • uiSelectRadialMenuEntry

      public void uiSelectRadialMenuEntry()
      Intended for ui use only; Select the currently highlighted option in the radial menu.
    • uiLTSelectRadialMenuEntry

      public void uiLTSelectRadialMenuEntry()
      Intended for ui use only; Select the currently highlighted option in the radial menu.
    • uiCancelRadialMenuReleased

      public void uiCancelRadialMenuReleased()
      Intended for ui use only; Cancels radial menu selected entry.
    • uiRadialMenuAltAction

      public void uiRadialMenuAltAction()
      Intended for ui use only; Activates the page specific action.
    • uiReleaseRadialMenuAltAction

      public void uiReleaseRadialMenuAltAction()
      Intended for ui use only; Releases the page specific action (mainly for hold triggers).
    • uiCancelRadialMenu

      public void uiCancelRadialMenu()
      Intended for ui use only; Cancels radial menu selected entry.
    • uiCancelRadialMenuLT

      public void uiCancelRadialMenuLT()
      Intended for ui use only; Cancels radial menu selected entry.
    • uiSecondaryContextualButtonUp

      public void uiSecondaryContextualButtonUp()
      Used to call the secondary gamepad contextual button up.
    • uiScrollChatPanelAxis

      public void uiScrollChatPanelAxis(float axisValue)
      Intended for ui use only; Scroll the chat panel.
    • uiPrimaryContextualButtonUp

      public void uiPrimaryContextualButtonUp()
      Used to call the primary gamepad contextual button up.
    • uiSecondaryContextualButtonDown

      public void uiSecondaryContextualButtonDown()
      Used to call the secondary gamepad contextual button down.
    • uiGamepadLBDown

      public void uiGamepadLBDown()
      Used to indicate the LB was pressed, since it's contextual it needs to feed into the gamepad input state manager.
    • uiGamepadLBUp

      public void uiGamepadLBUp()
      Used to indicate the LB was released, since it's contextual it needs to feed into the gamepad input state manager.
    • uiSendInGameChatMessage

      public void uiSendInGameChatMessage(boolean closeChat)
      Intended for ui only; Hotkey for sending chat message ingame.
    • uiFrontendToggleSocialSidebar

      public void uiFrontendToggleSocialSidebar(boolean allowToggle)
      Intended for ui use only; Hotkey for toggling social sidebar.
    • uiQuickActionChangeToDefault

      public void uiQuickActionChangeToDefault()
      Used to change the quick action to the default.
    • uiQuickActionNullOp

      public void uiQuickActionNullOp()
      Used to prevent calls to uiReleaseQuickSelectLeftUp causing a change in input context and breaking quick actions.
    • uiQuickActionCycleLeft

      public void uiQuickActionCycleLeft()
      Used to cycle the quick action to the left.
    • uiQuickActionToggleAutoBuild

      public void uiQuickActionToggleAutoBuild()
      Used to toggle auto building.
    • uiPrimaryContextualButtonDown

      public void uiPrimaryContextualButtonDown()
      Used to call the primary gamepad contextual button down.
    • uiPrimaryContextualButtonDoublePress

      public void uiPrimaryContextualButtonDoublePress(boolean add)
      Used to call the primary gamepad contextual button double press.
    • uiDeselectTarget

      public void uiDeselectTarget()
      Used to deselect the unit under the cursor.
    • uiDeselectAllOfTarget

      public void uiDeselectAllOfTarget()
      Used to deselect all units that match the type of the unit under the cursor.
    • uiFrontendNavigateBack

      public void uiFrontendNavigateBack()
      Intended for ui use only; Hotkey for navigating to previous main menu page.
    • uiSnapCameraToSelected

      public void uiSnapCameraToSelected()
      Intended for gamepad ui use only, snaps the camera to a currently selected unit.
    • uiFrontendReturnToMPLobby

      public void uiFrontendReturnToMPLobby()
      Intended for ui use only; Hotkey for navigating back to a multiplayer lobby.
    • uiFrontendToggleMinimisedMPLobby

      public void uiFrontendToggleMinimisedMPLobby(boolean allowToggle)
      Intended for ui use only; Hotkey for toggling display of the minimised MP lobby.
    • uiFrontendGenericHorizontalScrollLeft

      public void uiFrontendGenericHorizontalScrollLeft(int keyState)
      Intended for ui use only; Held hotkey for sending generic horizontal scrolling command to WPFG.
    • uiFrontendGenericVerticalScroll

      public void uiFrontendGenericVerticalScroll(float axisValue)
      Intended for ui use only; Hotkey for sending generic vertical scrolling command to WPFG.
    • uiFrontendGenericHorizontalScroll

      public void uiFrontendGenericHorizontalScroll(float axisValue)
      Intended for ui use only; Hotkey for sending generic horizontal scrolling command to WPFG.
    • uiFrontendGenericHorizontalScrollRight

      public void uiFrontendGenericHorizontalScrollRight(int keyState)
      Intended for ui use only; Held hotkey for sending generic horizontal scrolling command to WPFG.
    • uiFrontendToggleChatBrowser

      public void uiFrontendToggleChatBrowser(boolean allowToggle)
      Intended for ui use only; Hotkey for toggling chat browser.
    • uiFrontendToggleSocialDropdown

      public void uiFrontendToggleSocialDropdown(boolean allowToggle)
      Intended for ui use only; Hotkey for toggling social dropdown menu.
    • uiGamepadRBDown

      public void uiGamepadRBDown()
      Used to indicate the RB was pressed, since it's contextual it needs to feed into the gamepad input state manager.
    • uiGamepadRBUp

      public void uiGamepadRBUp()
      Used to indicate the RB was released, since it's contextual it needs to feed into the gamepad input state manager.
    • uiFrontendMainMenuNextTab

      public void uiFrontendMainMenuNextTab()
      Intended for ui use only; Hotkey for navigating between main menu tabs.
    • uiFrontEndMainMenuTab

      public void uiFrontEndMainMenuTab(int tab)
      Intended for ui use only; Hotkey for navigating to a specific main menu tab.
    • uiFrontendToggleHamburgerDropdown

      public void uiFrontendToggleHamburgerDropdown(boolean allowToggle)
      Intended for ui use only; Hotkey for toggling hamburger dropdown menu.
    • uiFrontendMainMenuPreviousTab

      public void uiFrontendMainMenuPreviousTab()
      Intended for ui use only; Hotkey for navigating between main menu tabs.
    • uiFrontendNotificationsDismissAll

      public void uiFrontendNotificationsDismissAll()
      Intended for ui use only; Dismiss all notifications in the notifications sidebar.
    • uiAcceptOptions

      public void uiAcceptOptions()
      Intended for ui use only; Close and accept the currently set options.
    • uiFrontendChatBrowserClose

      public void uiFrontendChatBrowserClose()
      Intended for ui use only; Closes frontend chat browser.
    • uiFrontendOpenNotificationPanel

      public void uiFrontendOpenNotificationPanel(boolean allowToggle)
      Intended for ui use only; Toggle notifications panel open/closed.
    • uiResetAllBindings

      public void uiResetAllBindings()
      Intended for ui use only; Hotkey for resetting all hotkeys in the settings screen.
    • uiUnbindCurrentBinding

      public void uiUnbindCurrentBinding()
      Intended for ui use only; Hotkey for unbinding the currently selected hotkey in the settings screen.
    • uiResetPageOptions

      public void uiResetPageOptions()
      Intended for ui use only; Hotkey for resetting current options page.
    • uiResetCurrentBinding

      public void uiResetCurrentBinding()
      Intended for ui use only; Hotkey for resetting the currently selected hotkey in the settings screen.
    • uiFrontendGenericCycleFocusForward

      public void uiFrontendGenericCycleFocusForward(boolean allowLooping)
      Intended for ui use only; Hotkey for cycling focus between page subsections.
    • uiFrontendGenericCycleFocusBackward

      public void uiFrontendGenericCycleFocusBackward(boolean allowLooping)
      Intended for ui use only; Hotkey for cycling focus between page subsections.
    • uiFrontendGenericVerticalScrollUp

      public void uiFrontendGenericVerticalScrollUp(int keyState)
      Intended for ui use only; Held hotkey for sending generic vertical scrolling command to WPFG.
    • uiFrontendGenericVerticalScrollDown

      public void uiFrontendGenericVerticalScrollDown(int keyState)
      Intended for ui use only; Held hotkey for sending generic vertical scrolling command to WPFG.
    • uiFrontendChatBrowserSendMessage

      public void uiFrontendChatBrowserSendMessage()
      Intended for ui use only; Sends message in the frontend chat browser.
    • uiFrontendChatBrowserToggleRoomOptions

      public void uiFrontendChatBrowserToggleRoomOptions()
      Intended for ui use only; Toggle room options dropdown in the frontend chat browser.
    • uiGenericAltPress

      public void uiGenericAltPress()
      Intended for ui use only; Activates the alternative press functionality for the highlighted button.
    • uiOpenCodeOfConduct

      public void uiOpenCodeOfConduct()
      Intended for ui use only; Opens the code of conduct.
    • uiFrontEndReportSelectedGame

      public void uiFrontEndReportSelectedGame()
      Intended for ui use only; Hotkey for refreshing game list in the MP browse screen.
    • uiFrontendMPRankedSetupBeginSearch

      public void uiFrontendMPRankedSetupBeginSearch(boolean allowToggle)
      Intended for ui use only; Hotkey for starting search in Ranked setup screen.
    • uiFrontendMPBrowseOpenFilters

      public void uiFrontendMPBrowseOpenFilters()
      Intended for ui use only; Hotkey for opening the filters popup in the MP browse screen.
    • uiFrontendMPBrowseRefreshGames

      public void uiFrontendMPBrowseRefreshGames()
      Intended for ui use only; Hotkey for refreshing game list in the MP browse screen.
    • uiFrontendModBrowserChangePage

      public void uiFrontendModBrowserChangePage(boolean pageForward)
      Intended for ui use only; Hotkey for swapping pages in the mod browser.
    • uiFrontendModManagerToggleSelectedMod

      public void uiFrontendModManagerToggleSelectedMod()
      Intended for ui use only; Hotkey for toggling selected mod in the mod manager.
    • uiFrontendMPRankedSetupCancel

      public void uiFrontendMPRankedSetupCancel()
      Intended for ui use only; Hotkey for cancelling ranked search.
    • uiFrontendMPRankedSetupBack

      public void uiFrontendMPRankedSetupBack()
      Intended for ui use only; Hotkey for cancelling search (if searching), otherwise navigating back.
    • uiFrontendGodPickerConfirmSelection

      public void uiFrontendGodPickerConfirmSelection()
      Intended for ui use only; Hotkey for confirming god selection in the god picker UI.
    • uiFrontendGodPickerCycleGod

      public void uiFrontendGodPickerCycleGod(boolean nextGod)
      Intended for ui use only; Hotkey for cycling between selected gods in the god picker UI.
    • uiFtueContinue

      public void uiFtueContinue(boolean onlyOnFirstScreen)
      Intended for ui use only; Continue to next FTUE page.
    • uiFtueBack

      public void uiFtueBack()
      Intended for ui use only; Go back to the previous FTUE page.
    • uiFrontendSkirmishLeaveLobby

      public void uiFrontendSkirmishLeaveLobby()
      Intended for ui use only; Hotkey for leaving a skirmish lobby.
    • uiFrontendSkirmishCancelCountdown

      public void uiFrontendSkirmishCancelCountdown()
      Intended for ui use only; Hotkey for cancelling skirmish lobby countdown.
    • uiFrontendGodsPageToggleLegend

      public void uiFrontendGodsPageToggleLegend()
      Intended for ui use only; Hotkey for toggling the legend open/closed in the god picker.
    • uiFrontendSkirmishReadyToggle

      public void uiFrontendSkirmishReadyToggle()
      Intended for ui use only; Hotkey for readying up in a skirmish lobby.
    • uiFrontendLabyrinthConfirmSelection

      public void uiFrontendLabyrinthConfirmSelection()
      Intended for ui use only; Hotkey for confirming mission selection in the labyrinth UI.
    • uiFrontendAotgFocusDifficulty

      public void uiFrontendAotgFocusDifficulty()
      Intended for ui use only; Hotkey for focusing the difficulty selector for AotG.
    • uiSplashScreenPressAnyKey

      public void uiSplashScreenPressAnyKey()
      Intended for ui use only; Progress from splash screen.
    • uiFrontendBlessingsPickerConfirmSelection

      public void uiFrontendBlessingsPickerConfirmSelection()
      Intended for ui use only; Hotkey for confirming blessings selection in the blessings picker UI.
    • uiPopupCancel

      public void uiPopupCancel()
      Intended for ui use only; Generic Cancel hotkey for currently displaying popup.
    • ui3ChoicePopupReject

      public void ui3ChoicePopupReject()
      Intended for ui use only; Hotkey for 3rd choice in the 3 choice popup.
    • uiFrontendAotgLabyrinthToggleRewardsDetailsVisibility

      public void uiFrontendAotgLabyrinthToggleRewardsDetailsVisibility()
      Intended for ui use only; Toggle visibility of rewards details in AotG.
    • uiPopupAccept

      public void uiPopupAccept()
      Intended for ui use only; Generic Accept hotkey for currently displaying popups.
    • uiPostgameViewMap

      public void uiPostgameViewMap()
      Intended for ui use only; Hotkey for returning to map view from the postgame screen.
    • uiPostgameLeave

      public void uiPostgameLeave()
      Intended for ui use only; Hotkey for returning to main menu from the postgame screen.
    • uiFrontendModManagerUpdateAll

      public void uiFrontendModManagerUpdateAll()
      Intended for ui use only; Hotkey for repairing/updating all mods in the mod manager.
    • uiPostgameChangeTab

      public void uiPostgameChangeTab(boolean tabRight)
      Intended for ui use only; Hotkey for changing top level tabs in the postgame screen.
    • uiPostgameStatisticsChangeTab

      public void uiPostgameStatisticsChangeTab(boolean tabRight)
      Intended for ui use only; Hotkey for changing tabs in the postgame stats screen.
    • uiPostgameClosePopups

      public void uiPostgameClosePopups()
      Intended for use only; Catchall Hotkey for closing popups throughout the postgame screen.
    • uiPostgameAchievementsGoodGame

      public void uiPostgameAchievementsGoodGame()
      Intended for ui use only; Hotkey for sending a GG from the postgame highlights screen.
    • uiPostgameAchievementsSkipToOverview

      public void uiPostgameAchievementsSkipToOverview()
      Intended for ui use only; Hotkey for skipping postgame highlights.
    • uiFrontendClanCreate

      public void uiFrontendClanCreate()
      Intended for ui use only; Hotkey for confirming creation of a clan in the clan create popup.
    • uiFrontendClanJoinChangePage

      public void uiFrontendClanJoinChangePage(boolean pageForward, boolean goToEnd)
      Intended for ui use only; Hotkey for switching clan join pages.
    • uiLoadSavePopupDelete

      public void uiLoadSavePopupDelete()
      Intended for ui use only; Hotkey for deleting the selected save file.
    • uiLoadSavePopupOpenDirectory

      public void uiLoadSavePopupOpenDirectory()
      Intended for ui use only; Hotkey for opening the save/load directory (PC Only).
    • uiFrontendPublishModChangeThumbnail

      public void uiFrontendPublishModChangeThumbnail()
      Intended for ui use only; Hotkey for attaching thumbnail to a mod in the mod popup.
    • uiFrontendMatchHistoryChangePage

      public void uiFrontendMatchHistoryChangePage(boolean pageForward)
      Intended for ui use only; Hotkey for switching match history pages.
    • uiFrontEndReportClan

      public void uiFrontEndReportClan()
      Intended for ui use only; Hotkey for reporting selected clan.
    • uiFrontendPublishMod

      public void uiFrontendPublishMod()
      Intended for ui use only; Hotkey for publishing a mod in the publish popup.
    • uiMPFilterPopupApply

      public void uiMPFilterPopupApply()
      Inteneded for ui use only; Hotkey for applying filters in the MP filters popup.
    • uiMPHostPopupHostGame

      public void uiMPHostPopupHostGame()
      Intended for ui use only; Hotkey for opening a lobby in the MP Host popup.
    • uiGenericInputPopupConfirm

      public void uiGenericInputPopupConfirm()
      Intended for ui use only; Hotkey for confirming input in the generic input popup.
    • uiMPFilterPopupReset

      public void uiMPFilterPopupReset()
      Intended for ui use only; Hotkey for resetting filters in the MP filters popup.
    • uiAddFriendPopupSearch

      public void uiAddFriendPopupSearch()
      Intended for ui use only; Hotkey for executing search in add friend popup.
    • uiLoadSavePopupSave

      public void uiLoadSavePopupSave()
      Intended for ui use only; Hotkey for creating a new save file.
    • uiMPPartyViewXBLProfile

      public void uiMPPartyViewXBLProfile()
      Intended for ui use only; Hotkey for Viewing Xbl profile in the MP Host popup.
    • uiMPPartySearch

      public void uiMPPartySearch()
      Intended for ui use only; Hotkey for searching for a user in the MP Host popup.
    • uiObjectivesPopupToggleHints

      public void uiObjectivesPopupToggleHints()
      Intended for ui use only; Hotkey for toggling hints in the objectives popup.
    • uiObjectivesPopupToggleObjectivesDisplay

      public void uiObjectivesPopupToggleObjectivesDisplay()
      Intended for ui use only; Hotkey for toggling objectives panel display in the objectives popup.
    • uiFrontendReportSend

      public void uiFrontendReportSend()
      Intended for ui use only; Hotkey for submitting a report.
    • uiObjectivesPopupChangeTab

      public void uiObjectivesPopupChangeTab(boolean nextTab)
      Intended for ui use only; Hotkey for changing tabs in the objectives popup.
    • spectatorFlipPlayers

      public void spectatorFlipPlayers()
      Flip player sides in spectator UI.
    • startRandomGame2

      public void startRandomGame2(String filename, int numberPlayers, int teamCount, int seed, int size)
      Begins a new random game with the given parms.
    • startRandomGameMapCode

      public void startRandomGameMapCode(String mapcode)
      Generates a random map game with the given map code.
    • sendPromptType

      public void sendPromptType(int sendingPlayer, int promptType)
      Send AIChat to current player from sendingPlayer; specify desired.
    • startRandomGame

      public void startRandomGame(boolean editorMode)
      Begins a new random game.
    • startBlankGame

      public void startBlankGame(int numberPlayers)
      Initializes a blank map with the given parms.
    • restartCurrentGame

      public void restartCurrentGame()
      Restarts the current game with the same seed.
    • startRandomGameMapCodeAI

      public void startRandomGameMapCodeAI(String mapcode, boolean enableAI)
      Generates a random map game with the given map code; Specify true/false if you want.
    • startRandomGameAgeAndMapCode

      public void startRandomGameAgeAndMapCode(int startAge, boolean nomad, String mapcode)
      Generates a random map game with the given starting age, nomad start(true/false), and map code.
    • uiSpecialPowerAtPointer

      public void uiSpecialPowerAtPointer()
      Intended for ui use only; Use a special power at targeted location.
    • uiToggleGame

      public void uiToggleGame()
      Turns off and on the game UI.
    • minimapRotateMode

      public void minimapRotateMode(int mode)
      Changes the minimap rotation mode; No arg means toggle.
    • chat

      public void chat(String text, int playernum)
      Adds a line of chat text from the given player (current if not provided).
    • uiToggleDiplomacyDialog

      public void uiToggleDiplomacyDialog()
      Toggles the diplomacy dialog.
    • uiNewScenario

      public void uiNewScenario()
      Creates a new blank scenario.
    • uiZoomToMinimapEvent

      public void uiZoomToMinimapEvent()
      Zooms to the most recent minimap event.
    • uiRefreshEditorMenu

      public void uiRefreshEditorMenu()
      Reconstitutes the entire editor menu.
    • uiZoomToMinimapEvent2

      public void uiZoomToMinimapEvent2()
      Zooms to the most recent minimap event.
    • leaveGame

      public void leaveGame(int fromMode, int reason)
      Destroys the world and returns to main menu.
    • postGame

      public void postGame()
      Procedes to the post game report.
    • retellCurrentGame

      public void retellCurrentGame()
      Retell the current game with the same seed.
    • restartCurrentGameWithSeed

      public void restartCurrentGameWithSeed(int seed)
      Restarts the current game with the specified seed (1 to randomize).
    • minimapZoomDelta

      public void minimapZoomDelta(float delta)
      Changes the zoom factor of the minimap up or down by that amount (remaining centered on the current view).
    • minimapZoom

      public void minimapZoom(float delta)
      Sets the zoom factor of the minimap.
    • showGameFromPostGame

      public void showGameFromPostGame()
      Does what needs to be done.
    • postGamePlayAgain

      public void postGamePlayAgain()
      Does what needs to be done.
    • toggleScore

      public void toggleScore()
      Handles the score toggling.
    • toggleTime

      public void toggleTime()
      Handles the time display toggling.
    • holdToAbortCinematic

      public void holdToAbortCinematic(int keystate)
      Increment the timer that the main game screen maintains to skip the current cinematic.
    • scoreUpdate

      public void scoreUpdate()
      Causes score to update even if it isnt supposed to yet, time wise.
    • doSPDeathMatchSetup

      public void doSPDeathMatchSetup()
      Enter Single player setup for deathmatch.
    • doMPSetup

      public boolean doMPSetup(boolean useESO, boolean useRelicLink)
      Enter BMultiplayer setup.
    • toggleDebugTime

      public void toggleDebugTime()
      Handles the time display toggling.
    • doSPSupremacySetup

      public void doSPSupremacySetup()
      Enter Single player setup for skirmish.
    • sunIncreaseRotation

      public void sunIncreaseRotation(int keyState)
      Intended for ui use only; Indicates that the increase sun rotation key has gone up/down.
    • sunDecreaseRotation

      public void sunDecreaseRotation(int keyState)
      Intended for ui use only; Indicates that the decrease sun rotation key has gone up/down.
    • sunIncreaseInclination

      public void sunIncreaseInclination(int keyState)
      Intended for ui use only; Indicates that the increase sun inclination key has gone up/down.
    • sunDecreaseInclination

      public void sunDecreaseInclination(int keyState)
      Intended for ui use only; Indicates that the decrease sun inclination key has gone up/down.
    • abortCinematic

      public void abortCinematic()
      Abort the current cinematic.
    • abortCinematicFade

      public void abortCinematicFade()
      Abort the current cinematic.
    • setSunPosition

      public void setSunPosition(float inclination, float rotation, boolean relative)
      Sets the sun height above the horizon and position in the world; The bool tells if the changes are relative.
    • setIgnoreAsserts

      public void setIgnoreAsserts(boolean ignore)
      Sets the system to ignore asserts, useful for automated scripts.
    • hideGameMenu

      public void hideGameMenu(boolean playSound)
      Hide the ingame menu.
    • dropToMainMenu

      public void dropToMainMenu()
      Drop back to the main menu.
    • toggleUIPhotoScreen

      public void toggleUIPhotoScreen()
      Toggle UI show state in the photo mode.
    • activatePhotoScreen

      public void activatePhotoScreen()
      Set the photo screen window as current active window.
    • windowsStore_TryShowRatingPrompt

      public void windowsStore_TryShowRatingPrompt()
      Prompt user for app rating if they pass prerequisites.
    • windowsStore_HideRatingPrompt

      public void windowsStore_HideRatingPrompt()
      Hide user prompt for app rating.
    • windowsStore_ShowRatingPrompt

      public void windowsStore_ShowRatingPrompt()
      Show user prompt for app rating.
    • setRlinkMpMode

      public void setRlinkMpMode(int rlinkMpMode)
      Set MP to online (0) or LAN (1).
    • XBLSignInOut

      public void XBLSignInOut()
      Triggers the XBL sign in out dialog.
    • showCampaignDialog

      public void showCampaignDialog(String nextCampaign, String String)
      UI used only.
    • playerResign

      public void playerResign()
      Resigns the currently controlled player.
    • exitMPSetupSubScreen

      public void exitMPSetupSubScreen()
      Leave the current MP screen and return to the MP setup menu.
    • enterRecordGameMode

      public void enterRecordGameMode(String ansiName)
      Loads a recorded game.
    • openPhotoScreen

      public void openPhotoScreen()
      Open screen shot screen.
    • resetCameraPhotoScreen

      public void resetCameraPhotoScreen()
      Reset camera in the photo mode.
    • showGameMenu

      public void showGameMenu()
      Show the ingame menu.
    • toggleGameMenu

      public void toggleGameMenu()
      Toggle the ingame menu.
    • setMapVisibility

      public void setMapVisibility(int indexChange)
      Change the current Map Visibility.
    • setReplaySpeedAlt

      public void setReplaySpeedAlt(int val)
      Sets the replay playback rate, valid between [0.5f, 2.0f] (Alternative version for hotkeys).
    • restartReplay

      public void restartReplay()
      Restarts the playback of the current recorded game playback.
    • windowStore_LaunchRatingURI

      public void windowStore_LaunchRatingURI()
      Open the windows store to rate this game.
    • windowsStore_BlockRatingPrompt

      public void windowsStore_BlockRatingPrompt()
      Block user prompt for app rating.
    • setReplaySpeed

      public void setReplaySpeed(float val)
      Sets the replay playback rate, valid between [0.5f, 2.0f].
    • setViewToSelectedUnitPlayerAlt

      public void setViewToSelectedUnitPlayerAlt()
      Sets the currently viewed player in playback via the currently selected unit; (alternative version for second hotkey).
    • toggleTimeline

      public void toggleTimeline()
      Toggle the replay timeline.
    • setCurrentPlayerInReplay

      public void setCurrentPlayerInReplay(int playerIndex)
      Sets the currently viewed player in playback.
    • setViewToSelectedUnitPlayer

      public void setViewToSelectedUnitPlayer()
      Sets the currently viewed player in playback via the currently selected unit.
    • loadBuiltInPrefab

      public void loadBuiltInPrefab(String fname)
      For UI use only.
    • loadUserPrefab

      public void loadUserPrefab(String fname)
      For UI use only.
    • uiRotateSelection

      public void uiRotateSelection(int amount)
      Intended for ui use only; rotates the selected UNIT.
    • uiMoveSelectionButtonDown

      public void uiMoveSelectionButtonDown()
      Intended for ui use only; Indicates that selection button has been pressed.
    • uiRotateWaterLeft

      public void uiRotateWaterLeft(int keyState)
      Intended for ui use only; Indicates that the rotate water left button has gone up/down.
    • uiRotateWaterRight

      public void uiRotateWaterRight(int keyState)
      Intended for ui use only; Indicates that the rotate water right button has gone up/down.
    • uiMoveSelectionAddButtonUp

      public void uiMoveSelectionAddButtonUp()
      Intended for ui use only; Indicates that selection button has been released.
    • uiChangeElevationToSample

      public void uiChangeElevationToSample(int keyState)
      Intended for ui use only; Indicates that the change elevation to sample button has gone up/down.
    • uiMoveSelectionButtonUp

      public void uiMoveSelectionButtonUp()
      Intended for ui use only; Indicates that selection button has been released.
    • uiMoveSelectionAddButtonDown

      public void uiMoveSelectionAddButtonDown()
      Intended for ui use only; Indicates that selection button has been pressed.
    • saveEditorScenarioCampaign

      public void saveEditorScenarioCampaign(String fname)
      Saves out a scenario file to campaign/ingame asset folder.
    • saveEditorScenario

      public void saveEditorScenario(String fname, boolean inGameAsset)
      Saves out a scenario file.
    • saveEditorScenarioLocal

      public void saveEditorScenarioLocal(String fname)
      Saves out a scenario file to local player folder.
    • uiUnSelectWater

      public void uiUnSelectWater()
      Intended for ui use only; Unselects currently selected water.
    • uiPaintWaterObjects

      public void uiPaintWaterObjects()
      Paint objects on the currently selected water.
    • uiCoverTerrainWithWater

      public void uiCoverTerrainWithWater(float waterHeight, float depth, String name)
      Flattens terrain and paints water over the entire map.
    • uiSelectWaterAtPointer

      public void uiSelectWaterAtPointer()
      Intended for ui use only; Selects water at pointer location.
    • uiPaintWater

      public void uiPaintWater(int keyState)
      Intended for ui use only; Indicates that the paint water button has gone up/down.
    • uiPaintWaterArea

      public void uiPaintWaterArea(int keyState)
      Intended for ui use only; Painting water area.
    • uiUniformLowerElevation

      public void uiUniformLowerElevation(int delta)
      UiUniformLowerElevation lowers the terrain height uniformly in the brush region.
    • uiSmooth

      public void uiSmooth(int keyState)
      Intended for ui use only; Indicates that the smooth button has gone up/down.
    • uiToggleGizmoSnapping

      public void uiToggleGizmoSnapping()
      Toggles guizmo snapping.
    • uiTerrainSelection

      public void uiTerrainSelection(int keyState)
      Intended for ui use only; Indicates that the terrain selection button has gone up/down.
    • uiPaintCliff

      public void uiPaintCliff(int keyState)
      Intended for ui use only; Indicates that the paint cliff button has gone up/down.
    • uiChangeGizmoType

      public void uiChangeGizmoType(int keyState)
      Changes the guizmo to the parameter type.
    • uiPaintTerrainToSample

      public void uiPaintTerrainToSample(int keyState)
      Intended for ui use only; Indicates that the sample terrain button has gone up/down.
    • uiSampleTerrainAtPointer

      public void uiSampleTerrainAtPointer()
      Intended for ui use only; Samples terrain type at pointer.
    • uiSampleElevationAtPointer

      public void uiSampleElevationAtPointer()
      Intended for ui use only; Samples elevation height at pointer.
    • uiSampleCliffElevationAtPointer

      public void uiSampleCliffElevationAtPointer()
      Intended for ui use only; Samples Cliff elevation height at pointer.
    • uiLowerElevation

      public void uiLowerElevation(int keyState)
      Intended for ui use only; Indicates that the lower elevation button has gone up/down.
    • uiUniformRaiseElevation

      public void uiUniformRaiseElevation(int delta)
      UiUniformRaiseElevation raises the terrain height uniformly in the brush region.
    • uiRemoveSelectedUnit

      public void uiRemoveSelectedUnit(int id)
      Removes specified unit, or selected unit if not ID is specified.
    • uiRaiseElevation

      public void uiRaiseElevation(int keyState)
      Intended for ui use only; Indicates that the raise elevation button has gone up/down.
    • uiPaintForest

      public void uiPaintForest(boolean keyState, boolean offset)
      Intended for ui use only; Indicates that the paint button has gone up/down.
    • uiPaintTerrainOverlay

      public void uiPaintTerrainOverlay(int keyState)
      Intended for ui use only; Indicates that the paint terrain overlay button has gone up/down.
    • uiPaint

      public void uiPaint(boolean keyState, boolean offset)
      Intended for ui use only; Indicates that the paint button has gone up/down.
    • uiErase

      public void uiErase(boolean keyState)
      Intended for ui use only; Indicates that the erase button has gone up/down.
    • openCinematicViewDebugger

      public void openCinematicViewDebugger()
      Opens The Cinematic View Debugger.
    • openConfigEditor

      public void openConfigEditor()
      Opens The Config Editor.
    • uiScrollCliffHeight

      public void uiScrollCliffHeight(int amount)
      Intended for ui use only; Increment the height of the cliff brush up/down.
    • openLightingEditorGui

      public void openLightingEditorGui()
      Opens The Lighting Editor Gui.
    • uiFlattenTerrainSelection

      public void uiFlattenTerrainSelection()
      Flatten the current terrain selection.
    • uiFilterTerrainSelection

      public void uiFilterTerrainSelection()
      Filter the current terrain selection.
    • uiRaiseTerrainSelection

      public void uiRaiseTerrainSelection(int keyState)
      Intended for ui use only; Indicates that the raise terrain selection button has gone up/down.
    • uiLowerTerrainSelection

      public void uiLowerTerrainSelection(int keyState)
      Intended for ui use only; Indicates that the lower terrain selection button has gone up/down.
    • uiConvertUnits

      public void uiConvertUnits(int keyState)
      Intended for ui use only; Indicates that the convert units button has gone up/down.
    • uiRecalcVariation

      public void uiRecalcVariation(int keyState)
      Intended for ui use only; Indicates that the recalc variation button has gone up/down.
    • uiRoughen

      public void uiRoughen(int keyState)
      Intended for ui use only; Indicates that the roughen button has gone up/down.
    • uiDeleteUnits

      public void uiDeleteUnits(int keyState)
      Intended for ui use only; Indicates that the delete units button has gone up/down.
    • toggleBoidsTweakerGui

      public void toggleBoidsTweakerGui()
      Toggle The Boids Tweaker Gui redo.
    • undo

      public void undo()
      Undoes the last editing operation.
    • openSaveLoadFileBrowserGui

      public void openSaveLoadFileBrowserGui()
      Opens The File Browser Gui.
    • toggleTargetSelectorEditorGui

      public void toggleTargetSelectorEditorGui()
      Toggles The Target Selector Tweaker Gui.
    • terrainEdgeDensity

      public void terrainEdgeDensity()
      Brings up the terrain edge density dialog.
    • terrainFilter

      public void terrainFilter()
      Filters the entire terrain.
    • redo

      public void redo()
      Redoes the last undone operation.
    • terrainEdgeRepeatFrequency

      public void terrainEdgeRepeatFrequency(float freq)
      Sets the texture repeat frequency on the terrain edge.
    • openTerrainTextureEditor

      public void openTerrainTextureEditor()
      Opens The terrain texture Editor.
    • openTerrainMiniMapColorGui

      public void openTerrainMiniMapColorGui()
      Opens The minimap color guide Gui.
    • openTerrainTextureBrowserGui

      public void openTerrainTextureBrowserGui()
      Opens The terrain texture browser.
    • openModelSystemDiagnosticsGui

      public void openModelSystemDiagnosticsGui()
      Opens The Model System Diagnostics window.
    • openGrassTypeEditorGui

      public void openGrassTypeEditorGui()
      Opens The Grass Type Editor Gui.
    • openWeatheringTypeEditorGui

      public void openWeatheringTypeEditorGui()
      Opens The Weathering Type Editor Gui.
    • openWaterEditorGui

      public void openWaterEditorGui()
      Opens The Water Editor Gui.
    • openWaterBrowserGui

      public void openWaterBrowserGui()
      Opens The Water Browser Gui.
    • sunColor

      public void sunColor(int r, int g, int b)
      Set sun color to given RGB (0-255).
    • sunGetColor

      public void sunGetColor()
      Get sun color.
    • terrainAdjustGlobalHeight

      public void terrainAdjustGlobalHeight(float meters)
      Adjusts (raise/lower) the terrain height by the specified meters.
    • terrainUpdateSystemGrassMask

      public void terrainUpdateSystemGrassMask()
      Updates the system grass length, preventing grass from growing in gameplay critical areas (ie, traderoutes).
    • unitPlayerFakify

      public void unitPlayerFakify(int fakePlayerIndex)
      Sets the selected units to use the fake player indicated.
    • unitPlayerDefakify

      public void unitPlayerDefakify()
      Sets the selected units to stop using a fake player.
    • resetSunColor

      public void resetSunColor()
      Reset the sun color to full.
    • setSceneLightParams

      public void setSceneLightParams(float sunIntensity, float fogColorR, float fogColorG, float fogColorB, float fogDensity)
      Sets scene light params.
    • terrainFlattenArea

      public void terrainFlattenArea(int c1, int c2, int c3, int c4)
      Flattens a subarea of the terrain.
    • terrainSetType

      public void terrainSetType(int type)
      Sets the terrain type to paint.
    • terrainFilterArea

      public void terrainFilterArea(int c1, int c2, int c3, int c4)
      Filters a subarea of the terrain.
    • terrainFlatten

      public void terrainFlatten(float height)
      Flattens the entire terrain.
    • terrainPaint

      public void terrainPaint(String name)
      Paint whole terrain with given texture.
    • terrainPaintMix

      public void terrainPaintMix(String name)
      Paint whole terrain with given mix.
    • terrainSetSubtype

      public void terrainSetSubtype(int subtype)
      Sets the terrain subtype to paint.
    • terrainSetMix

      public void terrainSetMix(int mixID)
      Sets the terrain mix to paint.
    • uiYawUnitLeft

      public void uiYawUnitLeft(int keyState)
      Intended for ui use only; Indicates that the yaw unit left key has gone up/down.
    • uiPitchUnitUp

      public void uiPitchUnitUp(int keyState)
      Intended for ui use only; Indicates that the pitch unit up key has gone up/down.
    • setTechStatus

      public void setTechStatus(String techName, boolean active)
      Debug only function that activates/deactivates a given tech.
    • uiYawUnitRight

      public void uiYawUnitRight(int keyState)
      Intended for ui use only; Indicates that the yaw unit right key has gone up/down.
    • uiRollUnitLeft

      public void uiRollUnitLeft(int keyState)
      Intended for ui use only; Indicates that the roll unit left key has gone up/down.
    • uiMoveUnitForward

      public void uiMoveUnitForward(int keyState)
      Intended for ui use only; Indicates that the move unit forward key has gone up/down.
    • uiPitchUnitDown

      public void uiPitchUnitDown(int keyState)
      Intended for ui use only; Indicates that the pitch unit down key has gone up/down.
    • uiRollUnitRight

      public void uiRollUnitRight(int keyState)
      Intended for ui use only; Indicates that the roll unit right key has gone up/down.
    • saveLightingSet

      public void saveLightingSet(String set)
      Saves the current status of lighting values as a set.
    • loadLightingSet

      public void loadLightingSet(String set, boolean apply)
      Loads the specified lighting set.
    • setToneMapParams

      public void setToneMapParams(float exposure, float displayGamma, float ditherNoiseIntensity)
      Sets tonemap params.
    • applyLightingSet

      public void applyLightingSet(String set)
      Applies a Lighting set.
    • editorSetTechStatus

      public void editorSetTechStatus(String techName, boolean active)
      Editor only function that activates/deactivates a given tech.
    • editorUpdateUnitVisuals

      public void editorUpdateUnitVisuals()
      Editor only functions; goes thru all the units and updates thier visuals.
    • brushSize

      public void brushSize(int size)
      Sets brush size.
    • brushCircularSize

      public void brushCircularSize(float newSize)
      Sets the circular brush size.
    • uiPasteFromClipboard

      public void uiPasteFromClipboard()
      Pastes the contents of the clipboard to the brush selection.
    • uiSetClipboardRotation

      public void uiSetClipboardRotation(float degrees)
      Sets the clipboard rotation amount.
    • uiSetPlacementPlayer

      public void uiSetPlacementPlayer(int playerID)
      Sets current placement player to the given player ID.
    • uiCopyToClipboard

      public void uiCopyToClipboard()
      Copies the brush selection to the clipboard.
    • uiChangeBrushType

      public void uiChangeBrushType(String brushType)
      Changes the brush to the named type.
    • uiChangeBrushSize

      public void uiChangeBrushSize(float p1, float p2, float p3, float p4)
      Changes the size of the current brush.
    • uiRotateClipboard

      public void uiRotateClipboard(int amount)
      Rotate the clipboard by amount.
    • uiSetBrushType

      public void uiSetBrushType(String brushType, float p1, float p2, float p3, float p4)
      Makes the current brush based on the name and parameters.
    • uiMoveUnitLeft

      public void uiMoveUnitLeft(int keyState)
      Intended for ui use only; Indicates that the move unit left key has gone up/down.
    • uiMoveUnitUp

      public void uiMoveUnitUp(int keyState)
      Intended for ui use only; Indicates that the move unit up key has gone up/down.
    • uiMoveUnitBackward

      public void uiMoveUnitBackward(int keyState)
      Intended for ui use only; Indicates that the move unit backward key has gone up/down.
    • uiMoveUnitRight

      public void uiMoveUnitRight(int keyState)
      Intended for ui use only; Indicates that the move unit right key has gone up/down.
    • uiIncPlaceVariation

      public void uiIncPlaceVariation()
      Increments the variation to place.
    • uiDecPlaceVariation

      public void uiDecPlaceVariation()
      Decrements the variation to place.
    • uiMoveUnitDown

      public void uiMoveUnitDown(int keyState)
      Intended for ui use only; Indicates that the move unit down key has gone up/down.
    • uiPlaceAtPointer

      public void uiPlaceAtPointer(boolean changeVariation)
      Intended for ui use only; Places unit at pointer location.
    • uiToggleBrushMask

      public void uiToggleBrushMask(int classID)
      This is not what you are looking for.
    • uiToggleTerrainPasteMode

      public void uiToggleTerrainPasteMode(int mode)
      This is not what you are looking for.
    • uiSaveUserPrefab

      public void uiSaveUserPrefab(String filename)
      Save some groups.
    • uiSaveBuiltInPrefab

      public void uiSaveBuiltInPrefab(String filename)
      Save some groups.
    • uiSetCliffTypeNum

      public void uiSetCliffTypeNum(int num)
      Sets the cliff type by index.
    • uiSetWaterType

      public void uiSetWaterType(String name)
      Sets the water type by name.
    • uiScrollBrushSize

      public void uiScrollBrushSize(int amount)
      Intended for ui use only; Increament the size of the current brush up/down.
    • uiSetCliffType

      public void uiSetCliffType(String name)
      Sets the cliff type by name.
    • uiSetForestTypeNum

      public void uiSetForestTypeNum(int num)
      Sets the forest type by index.
    • uiSelectLocation

      public void uiSelectLocation()
      Pans the camera to the location.
    • uiSetWaterTypeNum

      public void uiSetWaterTypeNum(int num)
      Sets the water type by index.
    • uiSetForestType

      public void uiSetForestType(String name)
      Sets the forest type by name.
    • kbPlayerGetName

      public String kbPlayerGetName(int playerID)
      Returns the players name.
    • kbPlayerGetTeam

      public int kbPlayerGetTeam(int playerID)
      Returns the players team number.
    • kbPlayerIsNeutral

      public boolean kbPlayerIsNeutral(int playerID)
      Returns true if the given player is a neutral player.
    • kbPlayerIsEnemy

      public boolean kbPlayerIsEnemy(int playerID)
      Returns true if the given player is an enemy.
    • kbPlayerGetBuildingEfficiency

      public float kbPlayerGetBuildingEfficiency(int playerID)
      Returns the building efficiency for the given player.
    • kbCivGetName

      public String kbCivGetName(int civID)
      Returns the civilization (major god) name for the given civID.
    • kbPlayerHasLost

      public boolean kbPlayerHasLost(int playerID)
      Returns true if the player has either resigned or has been defeated.
    • kbPlayerIsResigned

      public boolean kbPlayerIsResigned(int playerID)
      Returns the players resigned status.
    • kbPlayerGetCulture

      public int kbPlayerGetCulture(int playerID)
      Returns the culture for the given player.
    • kbPlayerGetAge

      public int kbPlayerGetAge(int playerID)
      Returns the current age for the given player.
    • kbPlayerGetCiv

      public int kbPlayerGetCiv(int playerID)
      Returns the civilization (major god) for the given player.
    • kbCultureGetName

      public String kbCultureGetName(int cultureID)
      Returns the culture name for the given culture.
    • kbPlayerGetPop

      public int kbPlayerGetPop(int playerID)
      Returns the current population for the player, means cheating if used by AI for other players.
    • kbPlayerGetMaxPop

      public int kbPlayerGetMaxPop(int playerID)
      Returns the maximum population for the given player.
    • kbPlayerGetPopCap

      public int kbPlayerGetPopCap(int playerID)
      Returns the current population cap for the given player, means cheating if used by AI for other players.
    • kbUnitQuerySetMaxCreationTime

      public void kbUnitQuerySetMaxCreationTime(int queryID, int time, boolean inclusive)
      Query Data - Sets maximum creation time, in game time milisseconds, for unit to be considered valid for the query and whether or not the check for creation time should be inclusive. Default value: -1 (not filtered by maximum creation time), true (check is inclusive).
    • kbUnitQuerySetMinCreationTime

      public void kbUnitQuerySetMinCreationTime(int queryID, int time, boolean inclusive)
      Query Data - Sets minimum creation time, in game time milisseconds, for unit to be considered valid for the query and whether or not the check for creation time should be inclusive. Default value: -1 (not filtered by minimum creation time), true (check is inclusive).
    • kbUnitQuerySetVisibleState

      public void kbUnitQuerySetVisibleState(int queryID, int state)
      Query Data - sets the state in relation to LOS for what units are considered valid for this queryID; A unit can have different visiblity states in the KB that you can uniquely search for: cUnitQuerySeeableStateAllValid: no filtering. cUnitQuerySeeableStateVisible: requires active LOS of the unit. cUnitQuerySeeableStateUnderFog: doppled units, like gold mines and buildings. cUnitQuerySeeableStateNotVisible: units that we once saw but are not visible to us anymore. cUnitQuerySeeableStateSeeable: combination of Visible and UnderFog, so both are valid. cUnitQueryVisibleStateRecentPositionKnown: excludes all units that we know no valid position off. cUnitQueryVisibleStateNoRecentPositionKnown: excludes all units that we have a valid position off.
    • kbUnitQuerySetAreaID

      public void kbUnitQuerySetAreaID(int queryID, int areaID)
      Query Data - Sets what areaID the unit must be in to be valid for the query; Default value: -1 (not filtered on areas).
    • kbUnitQuerySetBaseID

      public void kbUnitQuerySetBaseID(int queryID, int baseID)
      Query Data - Sets what base the unit must be in to be valid for the query; Main use for this is with AI scripting where the AI bases can be analyzed; Default value: -1 (not filtered on bases).
    • kbUnitQuerySetArmyID

      public void kbUnitQuerySetArmyID(int queryID, int armyID)
      Query Data - Sets what armyID the unit must be in to be valid for the query; Default value: -1 (not filtered on armies).
    • kbUnitQuerySetAreaGroupID

      public void kbUnitQuerySetAreaGroupID(int queryID, int areaGroupID)
      Query Data - Sets what areaGroupID the unit must be in to be valid for the query; Default value: -1 (not filtered on areas groups).
    • kbUnitQuerySetMaximumDistance

      public void kbUnitQuerySetMaximumDistance(int queryID, float distance)
      Query Data - Sets the maximum distance from the position the query will search, in a circular radius; You MUST combine this with kbUnitQuerySetPosition(int, java.util.Vector) or it has no effect; Default value: -1.0 (no distance and thus entire map).
    • kbUnitQuerySetPosition

      public void kbUnitQuerySetPosition(int queryID, Vector position)
      Query Data - Sets from what position the query will start searching; You MUST combine this with kbUnitQuerySetMaximumDistance or it has no effect; Default value: cInvalidVector (not filtered by position).
    • kbUnitQuerySetAscendingSort

      public void kbUnitQuerySetAscendingSort(int queryID, boolean value)
      Query Data - Sets if the query results will be sorted from closest to furthest in relation to the position; You MUST combine this with kbUnitQuerySetPosition(int, java.util.Vector) or it has no effect; Default value: false (randomly sorted).
    • kbUnitQuerySetIgnoreKnockedOutUnits

      public void kbUnitQuerySetIgnoreKnockedOutUnits(int queryID, boolean value)
      Query Data - Sets if the query will count knocked out units or not; If for example this is set to true then a knocked out Arkantos will not be picked up by the query; Default value: true.
    • kbUnitQuerySetUnitType

      public void kbUnitQuerySetUnitType(int queryID, int unitType)
      Query Data - Set what units the query will search for; This can be all cUnitType constants; You MUST set this for every query, or it has no idea what to search for; Default value: -1 (finds no units).
    • kbUnitQuerySetPlayerRelation

      public void kbUnitQuerySetPlayerRelation(int queryID, int relation)
      Query Data - Sets the player relation the query will search for. Valid inputs here are the relation constants which are prefixed by cPlayerRelation. If you for example provide cPlayerRelationEnemy in here the query will only find units that are your enemy. Use either this function or kbUnitQuerySetPlayerID(int, int, boolean), you must have either one of these two. Default value: invalid (finds no units).
    • kbUnitQuerySetState

      public void kbUnitQuerySetState(int queryID, int v)
      Query Data - Sets what unit state the queries will search for; Valid inputs here are the unit state constants which are prefixed by cUnitState; If you for example provide cUnitStateAlive inhere the query will only find units that are alive; Default value: cUnitStateAny (be mindful here that this state will also find dead units).
    • kbUnitQuerySetActionType

      public void kbUnitQuerySetActionType(int queryID, int actionTypeID)
      Query Data - Sets what action type the units must be performing to be picked up by the query; This can be all cActionType constants; If you call this on enemy units and dont have the cUnitQuerySeeableStateVisible state (requires active LOS of the unit) set then it will cheat!!! Default value: -1 (not filtered on actions).
    • kbUnitQueryGetResult

      public int kbUnitQueryGetResult(int queryID, int index)
      Returns the UnitID of the index-th result in the current query.
    • kbUnitQueryNumberResults

      public int kbUnitQueryNumberResults(int queryID)
      Returns the number of results in the current query.
    • kbUnitQuerySetPlayerID

      public void kbUnitQuerySetPlayerID(int queryID, int playerID, boolean resetQueryData)
      Query Data - Sets the player whose units we will search for. If you for example provide 3 in here, the query will only return units belonging to player 3; resetQueryData can be used to instantly completely reset a query when using this syscall, so use it BEFORE you set any other data; Use either this function or kbUnitQuerySetPlayerRelation(int, int), you must have either one of these two; Default value: -1 (finds no units).
    • kbUnitQueryGetResults

      public int[] kbUnitQueryGetResults(int queryID)
      Returns all unit IDs in the current query.
    • kbUnitQueryResetData

      public void kbUnitQueryResetData(int queryID)
      Resets the given unit query data AND results.
    • kbUnitQueryCreate

      public int kbUnitQueryCreate(String name)
      Creates a unit query, returns the query ID.
    • kbUnitQueryDestroy

      public void kbUnitQueryDestroy(int queryID)
      Destroys the given unit query.
    • kbUnitQueryResetResults

      public void kbUnitQueryResetResults(int queryID)
      Resets the given unit query results.
    • kbPlayerSetHandicap

      public void kbPlayerSetHandicap(int playerID, float handicap)
      Sets the indicated players handicap multiplier (ie, 1.0 = no handicap).
    • kbPlayerGetHandicap

      public float kbPlayerGetHandicap(int playerID)
      Returns the players handicap multiplier (ie, 1.0 = no handicap).
    • kbPlayerGetStartingPosition

      public Vector kbPlayerGetStartingPosition(int playerID)
      Gets the player starting position.
    • kbPlayerIsMutualAlly

      public boolean kbPlayerIsMutualAlly(int playerID)
      Returns true if the given player is a mutual ally.
    • kbPlayerIsAlly

      public boolean kbPlayerIsAlly(int playerID)
      Returns true if the given player is an ally.
    • kbPlayerIsHuman

      public boolean kbPlayerIsHuman(int playerID)
      Returns true if the given player is a a human player.
    • kbGetNumberMutualAllies

      public int kbGetNumberMutualAllies()
      Returns the number of mutual allies.
    • kbUnitIsInLush

      public boolean kbUnitIsInLush(int unitID, int playerID)
      Returns true if unit is within terrain lush belonging to the given player.
    • kbUnitGetCarryCapacity

      public float kbUnitGetCarryCapacity(int unitID, int resourceID)
      Returns the resource carry capacity of the unit.
    • kbUnitIsContainedBy

      public boolean kbUnitIsContainedBy(int unitID, int unitTypeID)
      Returns true, if unit is contained by a container belonging to the given unitType.
    • kbUnitGetContainer

      public int kbUnitGetContainer(int unitID)
      Returns the container for the given unit, or -1, if it's not being currently contained.
    • kbUnitGetWorkerID

      public int kbUnitGetWorkerID(int unitID, int index)
      Returns the index-th worker unit ID.
    • kbUnitGetNumberWorkers

      public int kbUnitGetNumberWorkers(int unitID)
      Returns the number of units currently working on the given unit.
    • kbUnitGetResourceAmount

      public float kbUnitGetResourceAmount(int unitID, int resourceID)
      Returns the resource amount of the unit.
    • kbUnitGetProtoUnitID

      public int kbUnitGetProtoUnitID(int unitID)
      Returns the unit's protounit ID.
    • kbUnitIsEmpowered

      public boolean kbUnitIsEmpowered(int unitID)
      Returns true if this unit is empowered.
    • kbUnitIsTrainingOrResearching

      public boolean kbUnitIsTrainingOrResearching(int unitID)
      Returns true if this unit is Training or Researching.
    • kbUnitGetTargetUnitID

      public int kbUnitGetTargetUnitID(int unitID)
      Returns the target unit ID of the given unit.
    • kbUnitGetActionType

      public int kbUnitGetActionType(int unitID)
      Returns the actionTypeID of the unit.
    • kbUnitGetHeading

      public int kbUnitGetHeading(int unitID)
      Returns the heading for this unit ID.
    • kbUnitGetPosition

      public Vector kbUnitGetPosition(int unitID)
      Returns the position for this unit ID; If we dont know a recent position of this unit it reports back as cNoRecentPositionKnown; Any unit that isnt visible under fog of war will be set to cNoRecentPositionKnown after 2526 seconds of losing line of sight of the unit.
    • kbUnitIsType

      public boolean kbUnitIsType(int unitID, int unitTypeID)
      Returns true if the unit is of the unitTypeID.
    • kbUnitGetIdleTime

      public int kbUnitGetIdleTime(int unitID)
      Returns the idle time for this unit ID.
    • kbUnitGetMovementType

      public int kbUnitGetMovementType(int unitTypeID)
      Returns the movementType for this unitTypeID.
    • kbUnitGetArmyID

      public int kbUnitGetArmyID(int unitID)
      Returns the army ID for this unit ID.
    • kbUnitGetMaximumAICost

      public float kbUnitGetMaximumAICost(int unitID)
      Returns the maximum AI cost (worth) for this unit ID.
    • kbUnitGetCurrentAICost

      public float kbUnitGetCurrentAICost(int unitID)
      Returns the current AI cost (worth) for this unit ID.
    • kbUnitGetPlanID

      public int kbUnitGetPlanID(int unitID)
      Returns the plan ID for this unit ID.
    • kbUnitGetPlayerID

      public int kbUnitGetPlayerID(int unitID)
      Returns the player ID for this unit ID.
    • kbUnitGetAreaID

      public int kbUnitGetAreaID(int unitID)
      Returns the area ID for this unit ID.
    • kbUnitGetBaseID

      public int kbUnitGetBaseID(int unitID)
      Returns the base ID for this unit ID.
    • kbUnitQueryGetPopulationSlots

      public int kbUnitQueryGetPopulationSlots(int queryID)
      Returns the number of pop slots currently occupied by the results in the given query; If this is called on a query that uses a player relation instead of a playerID it will calculate using default population values.
    • kbUnitQueryGetUnitHitpoints

      public float kbUnitQueryGetUnitHitpoints(int queryID, boolean considerHealth)
      Returns the total maximum hitpoints of the found units; If considerHealth is true it will instead return the total of current hitpoints.
    • kbUnitGetActionDamageForType

      public float kbUnitGetActionDamageForType(int unitID, String ActionName, int XSDamageType, boolean addBuffs)
      Returns total damage stat for this unit action for this unit.
    • kbUnitGetIsIDValid

      public boolean kbUnitGetIsIDValid(int unitID, boolean deadIsValid)
      Returns if the unitID corresponds to a unit that is currently in the game; Dead units remain valid for some time after their death, which is why deadIsValid variable exists; If deadIsValid is false then dead units are considered not valid.
    • kbUnitQueryExecute

      public int kbUnitQueryExecute(int queryID)
      Executes the query (using the query data) and returns the number of units found; ATTENTION
    • kbUnitQuerySetExcludeTypes

      public void kbUnitQuerySetExcludeTypes(int queryID, int[] types)
      Query Data - if a unit is any of the types in the types array it will be skipped; This array accepts proto units as well as abstract types.
    • kbUnitQueryGetUnitCost

      public float kbUnitQueryGetUnitCost(int queryID, boolean considerHealth)
      Returns the total aiCost of the found units, uses values set by kbSetAICostWeight to calculate multipliers; If considerHealth is true it will take the current hitpoints of the unit into account; For example, if your Hoplite is half hp then only half the cost of the Hoplite is added to the total.
    • kbUnitQueryExecuteOnQuery

      public int kbUnitQueryExecuteOnQuery(int currentQueryID, int previousQueryID)
      Executes the query (using the query data) on the other query and returns the number of units found; For example, your previousQueryID searches for enemy units and finds 20 of them of which 5 are myth units; Then your currentQueryID looks only for myth units; If you now execute your currentQueryID on your previousQueryID you will get back the 5 myth units you originally found in your previousQueryID.
    • kbUnitGetStatFloat

      public float kbUnitGetStatFloat(int unitID, int statEnumID)
      Returns the value for the provided float stat of a unit.
    • kbUnitTypeGetName

      public String kbUnitTypeGetName(int unitTypeID)
      Returns the name of the unit type.
    • kbPlayerGetProtoStatFloat

      public float kbPlayerGetProtoStatFloat(int playerID, int protoID, int stat)
      Returns the value for the provided float stat of a player's proto unit.
    • kbUnitGetActionStatFloat

      public float kbUnitGetActionStatFloat(int unitID, String actionName, int statEnumID)
      Returns the value for the provided float stat of a provided unit action.
    • kbProtoUnitCanResearch

      public boolean kbProtoUnitCanResearch(int protoUnitID, int techID)
      Checks whether the proto unit can research the specific technology.
    • kbProtoUnitCanTrain

      public boolean kbProtoUnitCanTrain(int protoUnitID, int trainPUID)
      Checks whether the proto unit can train the specified unit.
    • kbProtoUnitGetName

      public String kbProtoUnitGetName(int protoUnitTypeID)
      Returns the name of the protounit ID.
    • kbProtoUnitGetTrainers

      public int[] kbProtoUnitGetTrainers(int protoUnitID)
      Returns an array of all accessible PUIDs that can train this protoUnitID.
    • kbProtoUnitGetCost

      public float[] kbProtoUnitGetCost(int protoUnitID)
      Returns the cost of the protounit.
    • kbProtoUnitCostPerResource

      public float kbProtoUnitCostPerResource(int protoUnitID, int resourceID)
      Returns the cost of the protounit for the given resource.
    • kbProtoUnitGetGatherRate

      public float kbProtoUnitGetGatherRate(int puid, int resourcePUID)
      Gets the unit gather rate.
    • kbProtoUnitGetCostTotal

      public float kbProtoUnitGetCostTotal(int protoUnitID)
      Returns the total cost of the protounit with AI cost weight factored in.
    • kbProtoUnitIsType

      public boolean kbProtoUnitIsType(int protoUnitID, int unitType)
      Returns true if the protoUnit has the given unitType set.
    • kbProtoUnitGetIsValidID

      public boolean kbProtoUnitGetIsValidID(int protoUnitID)
      Returns true if the protoUnitID is valid.
    • kbProtoUnitInitialResource

      public boolean kbProtoUnitInitialResource(int protoUnitID, int resourceID)
      Returns the initial resource amount of the protounit for the given rsource.
    • kbProtoUnitAvailable

      public boolean kbProtoUnitAvailable(int protoUnitID)
      Returns true if the protoUnit is currently available.
    • kbUnitGetDistanceToPoint

      public float kbUnitGetDistanceToPoint(int unitID, Vector p)
      Returns the distance from the given unit to the point including the unit's radius.
    • kbUnitGetCurAnimationID

      public int kbUnitGetCurAnimationID(int unitID)
      Returns the ID of the current animation for the given unit.
    • kbUnitGetResourceAutoGatherRate

      public float kbUnitGetResourceAutoGatherRate(int unitID, int resourceID)
      Returns the autogather rate value for the provided resource of a unit.
    • kbUnitGetDistanceToUnit

      public float kbUnitGetDistanceToUnit(int unitID, int otherUnitID)
      Returns the distance from the given unit to other unit including the unit's radii.
    • kbUnitGetMaintainActionPausedByIndex

      public boolean kbUnitGetMaintainActionPausedByIndex(int unitID, int index)
      Returns action is paused or not at the index of the unit.
    • kbUnitGetActionTypeByIndex

      public int kbUnitGetActionTypeByIndex(int unitID, int index)
      Returns action type at the index of the unit.
    • kbUnitGetKBResourceID

      public int kbUnitGetKBResourceID(int unitID)
      Returns what KB resource this unit is in.
    • kbUnitGetActionMaximumRange

      public float kbUnitGetActionMaximumRange(int unitID, String action)
      Returns the maximum range of the action for the unit.
    • kbUnitGetNumberActions

      public int kbUnitGetNumberActions(int unitID)
      Returns number of actions of the unit.
    • kbRelicGetTechID

      public int kbRelicGetTechID(int unitID)
      Returns the tech ID for the given relic unit ID, or -1, if it's invalid.
    • kbUnitGetActionIDByIndex

      public int kbUnitGetActionIDByIndex(int unitID, int index)
      Returns action ID at the index of the unit.
    • kbUnitGetActionID

      public int kbUnitGetActionID(int unitID)
      Returns action ID of the unit.
    • kbUnitGetNumberContainedOfType

      public int kbUnitGetNumberContainedOfType(int unitID, int unitTypeID)
      Returns the number of units contained of a particular unitType within the given unit.
    • kbUnitGetNumberContained

      public int kbUnitGetNumberContained(int unitID)
      Returns the number of units contained within the given unit.
    • kbUnitGetIsAffectedByStatusEffect

      public boolean kbUnitGetIsAffectedByStatusEffect(int unitID, int statusEffectID)
      Returns true if the selected unit is affected by the given status effect.
    • kbUnitGetContainedUnitByIndex

      public int kbUnitGetContainedUnitByIndex(int unitID, int unitTypeID)
      Returns the ID for the unit contained at the given index, or -1, if it's invalid; Use in combination with the constants in the BKBData::BKBStatusEffect enum.
    • kbAreaBordersAreaID

      public boolean kbAreaBordersAreaID(int areaID, int borderAreaID)
      Returns true of the provided areaID borders the provided borderAreaID.
    • kbAreaGetBorderAreaID

      public int kbAreaGetBorderAreaID(int areaID, int index)
      Returns the areaID of the index-th border area in the given areaID.
    • kbAreaGetType

      public int kbAreaGetType(int areaID)
      Returns the type of the given areaID, cAreaType constants.
    • kbAreaGetClosestAreaID

      public int kbAreaGetClosestAreaID(Vector position, int areaType, float minDistance)
      Scans from the given position for areas of the given type; Returnsthe areaID of the closest matching area; minDistance can be left undefined to set no distance at all, if defined the found areas must be within that distance; areaType MUST be defined.
    • kbAreaGetNumberUnits

      public int kbAreaGetNumberUnits(int areaID)
      Returns the number of units in the given areaID.
    • kbAreaGetPercentExplored

      public float kbAreaGetPercentExplored(int areaID)
      Returns what percentage of tiles are either in fog or visible.
    • kbAreaGetNumberBorderAreas

      public int kbAreaGetNumberBorderAreas(int areaID)
      Returns the number of border areas for the given areaID.
    • kbAreaGetUnitID

      public int kbAreaGetUnitID(int areaID, int index)
      Returns the unitID of the index-th unit in the given areaID.
    • kbAreaGetNumberVisibleTiles

      public int kbAreaGetNumberVisibleTiles(int areaID)
      Returns the number of visible tiles in the given areaID.
    • kbAreaGetNumberBlackTiles

      public int kbAreaGetNumberBlackTiles(int areaID)
      Returns the number of black tiles in the given areaID.
    • kbAreaGetVisibilityChangeTime

      public int kbAreaGetVisibilityChangeTime(int areaID)
      Returns the gametime in milliseconds of the last visibility change for the given areaID; If any of the tiles change their visibility status this timer is updated.
    • kbAreaGetNumberFogTiles

      public int kbAreaGetNumberFogTiles(int areaID)
      Returns the number of fog tiles in the given areaID.
    • kbAreaGetGroupID

      public int kbAreaGetGroupID(int areaID)
      Returns the areaGroupID of the given areaID.
    • kbAreaGetIDByPosition

      public int kbAreaGetIDByPosition(Vector position)
      Returns the areaID that is located at the given position.
    • kbAreaGetNumberTiles

      public int kbAreaGetNumberTiles(int areaID)
      Returns the number of tiles in the given areaID.
    • kbAreaGetCenter

      public Vector kbAreaGetCenter(int areaID)
      Returns the center of the given areaID.
    • kbGetIsLocationOnMap

      public boolean kbGetIsLocationOnMap(Vector location)
      Returns if the provided location is on the map.
    • kbGetMapZSize

      public float kbGetMapZSize()
      Returns the Z size of the map.
    • kbAreaGetNumber

      public int kbAreaGetNumber()
      Returns the number of areas the KB has generated.
    • kbAreaGetIsIDValid

      public boolean kbAreaGetIsIDValid(int areaID)
      Returns if the areaID is valid.
    • kbDefaultGetProtoStatString

      public String kbDefaultGetProtoStatString(int protoID, int statEnumID)
      Returns the value for the provided string stat of a base proto unit.
    • kbPlayerGetProtoStatString

      public String kbPlayerGetProtoStatString(int playerID, int protoID, int statEnumID)
      Returns the value for the provided string stat of a player's proto unit.
    • kbGetMapXSize

      public float kbGetMapXSize()
      Returns the X size of the map.
    • kbGetMapCenter

      public Vector kbGetMapCenter()
      Returns the center vector of the map.
    • kbPlayerGetProtoStatBool

      public boolean kbPlayerGetProtoStatBool(int playerID, int protoID, int statEnumID)
      Returns the value for the provided bool stat of a player's proto unit.
    • kbUnitGetStatBool

      public boolean kbUnitGetStatBool(int unitID, int statEnumID)
      Returns the value for the provided bool stat of a unit.
    • kbUnitGetStatString

      public String kbUnitGetStatString(int unitID, int statEnumID)
      Returns the value for the provided string stat of a unit.
    • kbDefaultGetProtoStatBool

      public boolean kbDefaultGetProtoStatBool(int protoID, int statEnumID)
      Returns the value for the provided bool stat of a unit's proto unit.
    • kbUnitGetStatInt

      public int kbUnitGetStatInt(int unitID, int statEnumID)
      Returns the value for the provided integer stat of a unit.
    • kbDefaultGetProtoStatFloat

      public float kbDefaultGetProtoStatFloat(int protoID, int statEnumID)
      Returns the value for the provided float stat of a proto unit.
    • kbDefaultGetProtoStatInt

      public int kbDefaultGetProtoStatInt(int protoID, int statEnumID)
      Returns the value for the provided integer stat of a unit's proto unit.
    • kbPlayerGetProtoStatInt

      public int kbPlayerGetProtoStatInt(int playerID, int protoID, int statEnumID)
      Returns the value for the provided integer stat of a player's proto unit.
    • kbAttackRouteGetIsIDValid

      public boolean kbAttackRouteGetIsIDValid(int routeID)
      Returns if the provided routeID is valid.
    • kbCanAreaPath

      public boolean kbCanAreaPath(Vector pointA, Vector pointB, int movementType, float dangerThreshold, boolean allowPartialPath, int[] ignoreAreas)
      Returns true if the given area path can be made.
    • kbCreateAttackRouteWithPath

      public int kbCreateAttackRouteWithPath(String name, Vector startPoint, Vector targetPoint, int numInitialSectors)
      Returns the Route ID if successful; Creates an attack route and automatically adds some random attack sectors based on numInitialSectors; The startPoint/targetPoint/numInitialSectors only comes into play if you call kbAttackRouteCreatePaths as well; If you just need a route to add paths to manually then you need not worry about these 3 parameters; You can give attack routes that dont have kbAttackRouteCreatePaths called to attack plans directly, as long as you added valid paths yourself.
    • kbPathGetWaypoint

      public Vector kbPathGetWaypoint(int pathID, int wpIndex)
      Returns the appropriate waypoint from the given path.
    • kbPathAddWaypointAfter

      public void kbPathAddWaypointAfter(int pathID, int waypointIndex, Vector waypoint)
      Adds the waypoint to the given path.
    • kbCanPath

      public boolean kbCanPath(Vector pointA, Vector pointB, int protoUnitTypeID, float range)
      Returns true if the given unit type can path from pointA to pointB; Only performs high level pathing (ignores moveable obstructions like units).
    • kbPathCreateAreaPath

      public boolean kbPathCreateAreaPath(int pathID, int startAreaID, int goalAreaID, int movementType, float dangerThreshold, boolean allowPartialPath)
      TODO.
    • kbPathCalculateLength

      public float kbPathCalculateLength(int pathID, boolean ignoreY)
      Returns the length of the given path after calculating it.
    • kbPathGetLength

      public float kbPathGetLength(int pathID)
      Returns the length of the given path.
    • kbPathAddWaypoint

      public void kbPathAddWaypoint(int pathID, Vector waypoint)
      Adds the waypoint to the given path.
    • kbPathGetNumberWaypoints

      public int kbPathGetNumberWaypoints(int pathID)
      Returns the number of waypoints in the given path.
    • kbPathGetIDByIndex

      public int kbPathGetIDByIndex(int index)
      Returns the index-th pathID, use in combination with kbPathGetNumber.
    • kbPathGetNumber

      public int kbPathGetNumber()
      Returns the number of paths the KB has.
    • kbPathGetName

      public String kbPathGetName(int pathID)
      Returns the name of the given path.
    • kbPathGetIDByName

      public int kbPathGetIDByName(String name)
      Returns the pathID of the given name.
    • kbPathGetIsIDValid

      public boolean kbPathGetIsIDValid(int pathID)
      Returns if the provided pathID is valid.
    • kbAreaGroupGetSurfaceArea

      public float kbAreaGroupGetSurfaceArea(int areaGroupID)
      Returns the surface area of the given areaGroupID.
    • kbPathDestroy

      public void kbPathDestroy(int pathID)
      Destroys the given path.
    • kbPathCreate

      public int kbPathCreate(String name)
      Creates a path with the given name.
    • kbAreaGroupGetNumberBorderAreaGroups

      public int kbAreaGroupGetNumberBorderAreaGroups(int areaGroupID)
      Returns the amount of border area groups this areaGroupID has.
    • kbAreaGroupGetCenter

      public Vector kbAreaGroupGetCenter(int areaGroupID)
      Returns the center of the given areaGroupID.
    • kbAreaGroupsBordersAreaGroupID

      public int kbAreaGroupsBordersAreaGroupID(int areaGroupID, int borderAreaGroupID)
      Returns true of the provided areaGroupID borders the provided borderAreaGroupID.
    • kbAreaGroupGetBorderAreaGroupID

      public int kbAreaGroupGetBorderAreaGroupID(int areaGroupID, int index)
      Returns the areaGroupID of the index-th border area group in the given areaGroupID.
    • kbAreaGroupGetType

      public int kbAreaGroupGetType(int areaGroupID)
      Returns the type of the given areaGroupID, cAreaGroupType constants.
    • kbAreaGroupGetAreaID

      public int kbAreaGroupGetAreaID(int areaGroupID, int index)
      Returns the areaID at the given index of the given areaGroupID.
    • kbAreaGroupGetIDByPosition

      public int kbAreaGroupGetIDByPosition(Vector position)
      Returns the areaGroupID that is located at the given position.
    • kbAreaGroupGetNumberAreas

      public int kbAreaGroupGetNumberAreas(int areaGroupID)
      Returns the number of areas of the given areaGroupID.
    • kbAreaUpdateAllAreas

      public void kbAreaUpdateAllAreas()
      Force updates all the areas, use with caution due to performance concerns.
    • kbAreaGetDangerLevel

      public float kbAreaGetDangerLevel(int areaID, boolean averageInBorderAreas)
      Returns the danger rating of the given areaID; If averageInBorderAreas is defined you will get the average rating of the provided area plus its border areas.
    • kbAreaGroupGetNumber

      public int kbAreaGroupGetNumber()
      Returns the number of area groups the KB has generated.
    • kbAreaGroupGetIsIDValid

      public boolean kbAreaGroupGetIsIDValid(int areaGroupID)
      Returns if the areaGroupID is valid.
    • kbGetAutoMyBaseCreationDistance

      public float kbGetAutoMyBaseCreationDistance()
      Returns the auto base creation distance.
    • kbSetAutoMyBaseCreation

      public void kbSetAutoMyBaseCreation(boolean v)
      Sets whether or not the KB automatically creates bases for its OWN units.
    • kbGetAutoMyBaseCreationDistanceTC

      public float kbGetAutoMyBaseCreationDistanceTC()
      Returns the auto base creation distance.
    • kbSetAutoMyBaseCreationDistance

      public void kbSetAutoMyBaseCreationDistance(float v)
      Sets the default distances for which OWN bases are made.
    • kbBaseGetIsIDValid

      public boolean kbBaseGetIsIDValid(int playerID, int baseID)
      Returns if the base exists for the player.
    • kbBaseSetFlag

      public void kbBaseSetFlag(int playerID, int baseID, int flag, boolean state)
      Sets the flag for the base to the state.
    • kbAICostGetTechCost

      public float kbAICostGetTechCost(int techID)
      Returns the AI cost for the given tech ID.
    • kbGetAutoMyBaseCreation

      public boolean kbGetAutoMyBaseCreation()
      Returns the auto base creation value.
    • kbBaseIsFlagSet

      public boolean kbBaseIsFlagSet(int playerID, int baseID, int flag)
      Gets if the flag for the base is set to true.
    • kbAICostGetWeight

      public float kbAICostGetWeight(int resourceID)
      Returns the AI cost weight for the given resource.
    • kbGetResourceSelectorFactor

      public float kbGetResourceSelectorFactor(int type, int resourceType)
      Gets the ResourceSelector Factor value.
    • kbAICostGetProtoUnitCost

      public float kbAICostGetProtoUnitCost(int protoUnitTypeID)
      Returns the AI cost for the given protoUnit type ID.
    • kbAICostSetWeight

      public boolean kbAICostSetWeight(int resourceID, float weight)
      Sets the weight this resource type is given during AI cost calculuations.
    • kbEscrowAllocateCurrentResources

      public boolean kbEscrowAllocateCurrentResources()
      Reallocates the current resource stockpile into the escrows.
    • kbEscrowFlush

      public boolean kbEscrowFlush(int escrowID, int resourceID, boolean flushChildren)
      Removes all credits (and puts them into the root escrow) of the given resource type from the given escrow.
    • kbSetResourceSelectorFactor

      public void kbSetResourceSelectorFactor(int type, int resourceType, float val)
      Sets the ResourceSelector Factor value.
    • kbCanAffordUnit

      public boolean kbCanAffordUnit(int protoUnitTypeID, int escrowID)
      Returns true if the player can afford the proto unit.
    • kbEscrowSetPercentage

      public boolean kbEscrowSetPercentage(int escrowID, int resourceID, float percentage)
      Sets the percentage of the escrow.
    • kbEscrowGetPercentage

      public float kbEscrowGetPercentage(int escrowID, int resourceID)
      Returns the percentage of the escrow.
    • kbEscrowGetAmount

      public float kbEscrowGetAmount(int escrowID, int resourceID)
      Returns the amount of credits in the given escrow for the given resource.
    • kbEscrowSetCap

      public boolean kbEscrowSetCap(int escrowID, int resourceID, float cap)
      Sets the cap of the escrow.
    • kbEscrowCreate

      public int kbEscrowCreate(String name, int resourceID, float percentage, int parentID)
      Creates an escrow.
    • kbAttackRouteRemovePathByID

      public void kbAttackRouteRemovePathByID(int routeID, int pathID)
      Removes the given pathID from the given routeID; ATTENTION: this does not delete the path, use kbPathDestroy for that.
    • kbEscrowGetID

      public int kbEscrowGetID(String name)
      Returns the ID of the named escrow.
    • kbEscrowDestroy

      public boolean kbEscrowDestroy(int escrowID, boolean promoteChildren)
      Destroys an escrow.
    • kbAttackRouteAddPath

      public void kbAttackRouteAddPath(int routeID, int pathID, boolean addRouteStartAndTargetPoints)
      Adds the given pathID to the given routeID; If addRouteStartAndTargetPoints is true the path will be adjusted so its first waypoint is the startPoint of the route and the last waypoint is the targetPoint of the route (if they arent already); Existing waypoints wont be altered, just new ones insterted potentially.
    • kbAttackRouteCreatePaths

      public boolean kbAttackRouteCreatePaths(int routeID)
      TODO DOESNT WORK ATM; Creates all the paths following the provided parameters; The number of sectors equals the amount of paths generated.
    • kbAttackRouteGetPathIDByIndex

      public int kbAttackRouteGetPathIDByIndex(int routeID, int index)
      Returns the index-th path ID of the routeID; Use in combination with kbAttackRouteGetNumberPaths to know how many indexes there are.
    • kbAttackRouteGetNumberPaths

      public int kbAttackRouteGetNumberPaths(int routeID)
      Returns how many paths the given routeID has.
    • kbAttackRouteDestroy

      public void kbAttackRouteDestroy(int routeID)
      Destroys the given routeID.
    • kbAttackRouteGetByName

      public int kbAttackRouteGetByName(String name)
      Returns the attack route ID with the matching name.
    • kbAttackRouteGetIDByIndex

      public int kbAttackRouteGetIDByIndex(int index)
      Returns the index-th attack route ID; Use in combination with kbAttackRouteGetNumber to know how many indexes there are; ATTENTION: this can often return -1 since destroyed attack routes are also fetched by this.
    • kbAttackRouteGetNumber

      public int kbAttackRouteGetNumber()
      Returns the number of attack routes the KB has saved; ATTENTION: this includes deleted attack routes.
    • kbUnitPickDestroy

      public boolean kbUnitPickDestroy(int upID)
      Destroys the given upID.
    • kbUnitPickCreate

      public int kbUnitPickCreate(String name)
      Creates a unit picker and return the ID of it.
    • kbUnitPickGetPreferenceWeight

      public float kbUnitPickGetPreferenceWeight(int upID)
      Gets the upID's preference weight.
    • kbUnitPickResetAll

      public void kbUnitPickResetAll(int upID)
      Resets all the upID's values.
    • kbBaseSetPositionAndDistance

      public void kbBaseSetPositionAndDistance(int playerID, int baseID, Vector position, float distance)
      Sets position and distance of the base.
    • kbBaseGetDistance

      public float kbBaseGetDistance(int playerID, int baseID)
      Gets distance of the base.
    • kbBaseGetNumberUnitsOfType

      public int kbBaseGetNumberUnitsOfType(int playerID, int baseID, int unitTypeID)
      Returns the number of units that match the unitTypeID.
    • kbBaseGetUnits

      public int[] kbBaseGetUnits(int playerID, int baseID)
      Returns the unitIDs of all the units that are in the base.
    • kbUnitPickGetIsIDValid

      public boolean kbUnitPickGetIsIDValid(int upID)
      Returns if the upID is valid.
    • kbBaseSetDistance

      public void kbBaseSetDistance(int playerID, int baseID, float newDistance)
      Sets distance of the base.
    • kbBaseGetMainID

      public int kbBaseGetMainID(int playerID)
      Gets the main base ID for the player.
    • kbBaseGetDefenseRating

      public float kbBaseGetDefenseRating(int playerID, int baseID)
      Returns the defense rating for the base.
    • kbBaseGetOffenseRating

      public float kbBaseGetOffenseRating(int playerID, int baseID)
      Returns the offense rating for the base.
    • kbBaseAddUnit

      public void kbBaseAddUnit(int playerID, int baseID, int unitID)
      Adds the given unit to the base.
    • kbBaseRemoveUnit

      public void kbBaseRemoveUnit(int playerID, int baseID, int unitID)
      Removes the given unit to the base.
    • kbBaseGetMilitaryGatherPoint

      public Vector kbBaseGetMilitaryGatherPoint(int playerID, int baseID)
      Gets the military gather point of the base.
    • kbBaseSetMilitaryGatherPoint

      public void kbBaseSetMilitaryGatherPoint(int playerID, int baseID, Vector gatherPoint)
      Sets the military gather point of the base.
    • kbBaseGetOwner

      public int kbBaseGetOwner(int baseID)
      Returns the player ID of the specified bases owner.
    • kbBaseSetFrontVector

      public void kbBaseSetFrontVector(int playerID, int baseID, Vector frontVector)
      Sets the front (and back) of the base.
    • kbBaseGetLastKnownDamageLocation

      public Vector kbBaseGetLastKnownDamageLocation(int playerID, int baseID)
      Gets the last known damage location of the base.
    • kbBaseGetTimeUnderAttack

      public int kbBaseGetTimeUnderAttack(int playerID, int baseID)
      Returns the number of continuous seconds the base has been under attack.
    • kbBaseGetLastUnderAttackTime

      public int kbBaseGetLastUnderAttackTime(int playerID, int baseID)
      Returns the time when the base was last attacked.
    • kbBaseGetFrontVector

      public Vector kbBaseGetFrontVector(int playerID, int baseID)
      Gets the front vector of the base.
    • kbBaseGetBackVector

      public Vector kbBaseGetBackVector(int playerID, int baseID)
      Gets the back vector of the base.
    • kbBaseFindOrCreateResourceBase

      public int kbBaseFindOrCreateResourceBase(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
      TODO.
    • kbBaseDestroy

      public boolean kbBaseDestroy(int playerID, int baseID)
      Destroys the given base.
    • kbBaseCreate

      public int kbBaseCreate(int playerID, String name, Vector position, float distance)
      Creates a base.
    • kbBaseGetLocation

      public Vector kbBaseGetLocation(int playerID, int baseID)
      Gets the location of the base.
    • kbBaseDestroyAll

      public void kbBaseDestroyAll(int playerID)
      Destroys all of the bases for the given player.
    • kbBaseGetNumber

      public int kbBaseGetNumber(int playerID)
      Returns the number of bases for the given player.
    • kbBaseGetNextID

      public int kbBaseGetNextID()
      Returns the ID of the next base that will be created, can be used for base names.
    • kbBaseGetIDByIndex

      public int kbBaseGetIDByIndex(int playerID, int index)
      Returns the BaseID for the given base.
    • kbBaseGetNameByID

      public String kbBaseGetNameByID(int playerID, int baseID)
      Returns the name for the given base.
    • kbGetAutoOtherBaseCreationDistanceTC

      public float kbGetAutoOtherBaseCreationDistanceTC()
      Returns the auto base creation distance.
    • kbSetAutoOtherBaseCreationDistance

      public void kbSetAutoOtherBaseCreationDistance(float distance)
      Sets the default distances for which OTHER players bases are made.
    • kbFindClosestBase

      public int kbFindClosestBase(int playerID, int playerRelation, Vector location, boolean militaryBasesOnly)
      Gets the nearest base belonging to playerID OR player relation from the location; Only returns bases with the military flag set if militaryBasesOnly is defined.
    • kbSetAutoOtherBaseCreationDistanceTC

      public void kbSetAutoOtherBaseCreationDistanceTC(float distance)
      Sets the default distances for which OTHER players bases are made.
    • kbGetAutoOtherBaseCreation

      public boolean kbGetAutoOtherBaseCreation()
      Returns the auto base detection value.
    • kbSetAutoMyBaseCreationDistanceTC

      public void kbSetAutoMyBaseCreationDistanceTC(float v)
      Sets the default distances for which OWN bases are made.
    • kbGetAutoOtherBaseCreationDistance

      public float kbGetAutoOtherBaseCreationDistance()
      Returns the auto base creation distance.
    • kbSetAutoOtherBaseCreation

      public void kbSetAutoOtherBaseCreation(boolean v)
      Sets whether or not the KB automatically creates bases for OTHER players units.
    • kbResourceGetSubType

      public int kbResourceGetSubType(int resourceID)
      Returns the resourceIDs subtype; A subtype here means the cAIResourceSubType constants, like cAIResourceSubTypeEasy.
    • kbResourceGetType

      public int kbResourceGetType(int resourceID)
      Returns the resourceIDs type; A type here means the cResource constants, like cResourceFood.
    • kbResourceGetUnit

      public int kbResourceGetUnit(int resourceID, int index)
      Returns the unitID found at the index of the resourceID; Use together with kbResourceGetNumberUnits to find out how many index there are; ATTENTION: you should always check if the unitID that is returned is valid for this specific function.
    • kbResourceGetNumberUnits

      public int kbResourceGetNumberUnits(int resourceID)
      Returns how many units are in the resourceID.
    • kbResourceGetNumber

      public int kbResourceGetNumber()
      Returns the number of KB resources that we currently have.
    • kbResourceGetIsIDValid

      public boolean kbResourceGetIsIDValid(int resourceID)
      Returns if the resourceID is valid.
    • kbResourceGetIDByUnitID

      public int kbResourceGetIDByUnitID(int unitID)
      Returns the resourceID of the given unitID.
    • kbResourceGetIDByIndex

      public int kbResourceGetIDByIndex(int index)
      Returns the resourceID at the index; Use kbResourceGetNumber to find out how many indexes there are.
    • kbGetNumberValidResourcesByPosition

      public int kbGetNumberValidResourcesByPosition(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
      Returns the number of valid KB resources matching the parameters.
    • kbGetAmountResourcesByAreaGroup

      public float[] kbGetAmountResourcesByAreaGroup(int areaGroupID)
      Returns the amount of resources for the given area group.
    • kbGetValidResourcesByPosition

      public int[] kbGetValidResourcesByPosition(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
      Returns the resourceIDs matching the parameters.
    • kbGetAmountValidResourcesByPosition

      public float kbGetAmountValidResourcesByPosition(Vector position, int resourceType, int resourceSubType, float distance, float dangerTreshold, boolean unclaimedOnly, boolean idleOnly, boolean areaGroupsNeedToMatch)
      Returns the combined resource amount of valid KB resources for the resource types.
    • kbUnitPickGetResultFactor

      public float kbUnitPickGetResultFactor(int upID, int index)
      Returns the index-th total factor, can only be used after kbUnitPickRun.
    • kbUnitPickGetResults

      public int[] kbUnitPickGetResults(int upID)
      Returns all the results, can only be used after kbUnitPickRun.
    • kbUnitPickGetCounterMode

      public boolean kbUnitPickGetCounterMode(int upID)
      Returns whether or not the unit picker actually went into counter mode, can only be used after kbUnitPickRun.
    • kbUnitPickGetResultFactors

      public float[] kbUnitPickGetResultFactors(int upID)
      Returns all the result factors, can only be used after kbUnitPickRun.
    • kbUnitPickRun

      public int kbUnitPickRun(int upID)
      Resets all the previous results and then runs the unit picker again. Returns how many results there are. Final results are calculated like this: Preference Factor * Preference Weight + Combat Efficiency value (determined via analysis) * Combat Efficiency Weight. Before you run a unit picker you should always do the entire setup of all the data again. This is because when you add preferences or combat efficiencies weights the code will look at the current state of the game to fill up its lists. So if you wanted to include AbstractInfantry in your own list of units and were Classical Zeus you only added Hoplites, Jason, and Heracles. But if in the meantime you're now Heroic the system won't have added Hypaspists to that list by itself. You need to set a preference weight for AbstractInfantry again to have Hypaspists added.
    • kbUnitPickSetMinimumCounterModePop

      public void kbUnitPickSetMinimumCounterModePop(int upID, int pop)
      Sets the minimum total pop count of enemy units that have to be visible (not seeable only) to turn on counter enemy mode; Can be used together with kbUnitPickSetMinimumCounterModeNumberUnits, if one of the two is true we will enter counter mode.
    • kbUnitPickGetResult

      public int kbUnitPickGetResult(int upID, int index)
      Returns the index-th ProtoUnitID, can only be used after kbUnitPickRun.
    • kbUnitPickGetNumberResults

      public int kbUnitPickGetNumberResults(int upID)
      Returns the number of results, can only be used after kbUnitPickRun.
    • kbUnitPickGetAttackUnitType

      public int kbUnitPickGetAttackUnitType(int upID)
      Gets the upID's attack unit type.
    • kbUnitPickSetAttackUnitType

      public void kbUnitPickSetAttackUnitType(int upID, int unitTypeID)
      Sets the upID's attack unit type; When were querying to see if we have enough enemies to go into counter mode, this is the unitTypeID we use to query for.
    • kbUnitPickSetMinimumCounterModeNumberUnits

      public void kbUnitPickSetMinimumCounterModeNumberUnits(int upID, int numberUnits)
      Sets the minimum number of enemy units that have to be visible (not seeable only) to turn on counter enemy mode; Can be used together with kbUnitPickSetMinimumCounterModePop, if one of the two is true we will enter counter mode.
    • kbUnitPickSetPreferenceFactor

      public boolean kbUnitPickSetPreferenceFactor(int upID, int unitTypeID, float preferenceFactor)
      Sets the upID's Preference Factor for that unitTypeID. A preference is a flat value that has two purposes: 1. Adding a unit to the list of our own valid units. If a unit has no preference set it won't be analyzed. 2. Artificially increasing the likelihood a unit does well in our analyzis (the preference is added to the total factor). If you add a preference for AbstractInfantry then all the units that are currently enabled for us with the AbstractInfantry tag will be added to our valid unit list. Setting a preference for a unit multiple times is supported, you just overwrite the previously set preference. Setting a preference of <= 0.0 will completely exclude those units from our valid list.
    • kbUnitPickRemoveCombatEfficiencyType

      public void kbUnitPickRemoveCombatEfficiencyType(int upID, int unitTypeID)
      Removes a unitTypeID from the upID's combat efficiency calculation.
    • kbUnitPickAddCombatEfficiencyType

      public boolean kbUnitPickAddCombatEfficiencyType(int upID, int unitTypeID, float weight)
      Adds an enemy unitTypeID to the upID's combat efficiency calculation. This ONLY works after having used kbUnitPickSetEnemyPlayerID! This is ONLY used when were NOT in counter mode and have to base our picks off default stats + weights; For example: We are NOT in counter mode and have only 1 combat efficiency set, against AbstractInfantry; We will now analyze all our valid units and test them against all enemy units that are AbstractInfantry; Which will results in our highest picks being units that do well against AbstractInfantry.
    • kbUnitPickResetMovementType

      public void kbUnitPickResetMovementType(int upID)
      Resets the unit pick movement type to cPassabilityNone.
    • kbUnitPickSetMovementType

      public void kbUnitPickSetMovementType(int upID, int movementType)
      Sets the upID's movement type, this is used to filter our own units; If any of our units dont have at least one of the specified movement types it's not valid; Use cPassability*** constants for this, you can stack multiple types on top of one another.
    • kbUnitPickSetEnemyPlayerID

      public void kbUnitPickSetEnemyPlayerID(int upID, int playerID)
      Sets the upID's enemy player ID, -1 is allowed to not take any player into account; When we query to decide if we can go to counter mode we search for units belonging to this playerID; When analyzing the strength of units we take the stats of the units belonging to this playerID.
    • kbUnitPickSetPreferenceWeight

      public void kbUnitPickSetPreferenceWeight(int upID, float weight)
      Sets the upID's Preference weight; We multiply the unit preferences by this amount for a final preference weight; Setting unit preference values is done via kbUnitPickSetPreferenceFactor.
    • kbUnitPickResetCombatEfficiencyTypes

      public void kbUnitPickResetCombatEfficiencyTypes(int upID)
      Resets the enemy unitTypeIDs for the upID's combat efficiency calculation.
    • kbUnitPickSetCombatEfficiencyWeight

      public void kbUnitPickSetCombatEfficiencyWeight(int upID, float weight)
      Sets the upID's Combat Efficiency weight; We multiply the unit combat efficiencies by this amount for a final combat efficiency weight; Setting combat efficiency values is done via kbUnitPickAddCombatEfficiencyType.
    • kbBuildingPlacementSetStepSize

      public void kbBuildingPlacementSetStepSize(int bpID, float stepSize)
      Sets how big the step sizes are with which the bpID goes through the grid assigned to analyze; Default is 2.0; This is used for every placement type apart from socket; Example: You use kbBuildingPlacementSetCenterPosition(X/Z = 10.0, 5.0); This means that we will analyze all the spots between X/Z = 5.0 and X/Z = 15.0; The stepSize is used to increment X and Z until weve analyzed all spots; If we for this example take a stepSize of 5.0 we get the following: X=5, X=10, X=15 with Z remaining 5 are analyzed in the first run (we analyze one X row at a time and then increment Z). After this first run we increment Z with 5.0 (stepSize) and go again like follows: X=5, X=10, X=15 with Z being 10. And then we do our last run and we get 9 total spots that we've analyzed. Big stepSizes means that we analyze fewer spots/less precise but the building placement goes faster. Because if you use kbBuildingPlacementSetBaseID(int, int, int) we need to analyze all the spots in a base, with a low stepSize that can take a while.
    • kbBuildingPlacementGetBufferSpace

      public float kbBuildingPlacementGetBufferSpace(int bpID)
      Returns the buffer space set for this bpID.
    • kbBuildingPlacementGetBuildingPUID

      public int kbBuildingPlacementGetBuildingPUID(int bpID)
      Gets the building set by kbBuildingPlacementSetBuildingPUID for the given bpID.
    • kbBuildingPlacementSetBuildingPUID

      public void kbBuildingPlacementSetBuildingPUID(int bpID, int buildingTypeID)
      Sets the building that will be used during all the analysis of the given bpID; This must be a protoUnit, it cant be an abstractType.
    • kbBuildingPlacementGetPlacementType

      public int kbBuildingPlacementGetPlacementType(int bpID)
      Returns the bpIDs placement type, cBuildingPlacementPlacementType constants.
    • kbBuildingPlacementGetState

      public int kbBuildingPlacementGetState(int bpID)
      Returns the bpIDs state, cBuildingPlacementPlacementState constants.
    • kbBuildingPlacementSetBufferSpace

      public void kbBuildingPlacementSetBufferSpace(int bpID, float bufferSpace)
      Sets the bpIDs buffer space, must be = 0.0; This control the minimum distance the building will be placed away from anything else that also has obstructionDefaults to 2.0.
    • kbBuildingPlacementGetBaseID

      public int kbBuildingPlacementGetBaseID(int bpID)
      Returns the bpIDs base ID, which is only set via kbBuildingPlacementSetBaseID(int, int, int).
    • kbBuildingPlacementCreate

      public int kbBuildingPlacementCreate(String name)
      Creates a building placement with the given name (no concurrent duplicates), returns the bpID.
    • kbSharedFunctionUnitGetByIndex

      public int kbSharedFunctionUnitGetByIndex(int function, int index)
      Gets the shared function unit with the given function at index.
    • kbBuildingPlacementGetIsIDValid

      public boolean kbBuildingPlacementGetIsIDValid(int bpID)
      Returns whether the bpID is valid or not.
    • kbBuildingPlacementDestroy

      public void kbBuildingPlacementDestroy(int bpID)
      Destroys the bpID, freeing up its name/potential existing lot too.
    • kbFunctionUnitGetNumber

      public int kbFunctionUnitGetNumber(int civ, int function)
      Gets the number of function units from the given civ and function.
    • kbLocationFogged

      public boolean kbLocationFogged(Vector location)
      Returns true if the location is currently fogged to the player.
    • kbSharedFunctionUnitGetNumber

      public int kbSharedFunctionUnitGetNumber(int function)
      Gets the number of shared function units from the given function.
    • kbFunctionUnitGetByIndex

      public int kbFunctionUnitGetByIndex(int civ, int function, int index)
      Gets the function unit from the given civ and function at index.
    • kbResourceGetIncome

      public float kbResourceGetIncome(int resourceID, float seconds, boolean relative)
      Returns the resource income over the last X seconds.
    • kbGetNumberResourceGatherers

      public int kbGetNumberResourceGatherers(int playerID, String resourceName)
      Gets the number of gatherers of a resource for the given player.
    • kbLocationVisible

      public boolean kbLocationVisible(Vector location)
      Returns true if the location is currently visible to the player.
    • kbUnitVisible

      public boolean kbUnitVisible(int unitID)
      Returns true if the unit is currently visible to the player.
    • kbGetResourceName

      public String kbGetResourceName(int id)
      Returns the resource name.
    • kbResourceSortTowardsPosition

      public void kbResourceSortTowardsPosition(int resourceID, Vector position)
      Sorts all the units in the resource towards to position.
    • kbMaximumResourceGet

      public float kbMaximumResourceGet(int resourceID)
      Returns the maximum amount of the given resource you can have.
    • kbResourceGet

      public float kbResourceGet(int resourceID)
      Returns the current amount of the given resource.
    • kbResourceGetClosestDropsiteID

      public int kbResourceGetClosestDropsiteID(int resourceID)
      Returns the unitID of the dropsite that is closest to the center of the resourceID.
    • kbResourceGetPlanID

      public int kbResourceGetPlanID(int resourceID)
      Returns the planID that may be associated with the resourceID; Each gather plan that goes to gather from a resource will attach its planID to said resourceID.
    • kbResourceCombineHerdableResourcesAroundUnit

      public void kbResourceCombineHerdableResourcesAroundUnit(int unitID, float distance)
      Combines all Herdable KB Resources around the provided unitID within the provided distance; If there is already an active gather plan harvesting from one of the resources then all others will be merged into that resource.
    • kbResourceGetFarmIDWithFurthestAwayDropsite

      public int kbResourceGetFarmIDWithFurthestAwayDropsite(int resourceID)
      Returns the unitID of the Farm that is furthest away from a dropsite of the resourceID.
    • kbResourceSetBlacklisted

      public void kbResourceSetBlacklisted(int resourceID, boolean toggle)
      Toggles whether or not the resourceID is blacklisted; A resource that is blacklisted cant be picked up by the automatic search for new KB resources that the gather plan does.
    • kbResourceGetPosition

      public Vector kbResourceGetPosition(int resourceID)
      Returns the position of the resourceID; This position is the center position of all units combined in the resourceID; ATTENTION: for Berry Bush resources this position isn't updated when certain Berry Bushes disappear. For forests it is updated when trees disappear.
    • kbResourceGetTotalResources

      public float kbResourceGetTotalResources(int resourceID)
      Returns the total amount of resources that are left in the resourceID; If for example 10 trees with each 150 wood remain in the resource this func will return 1500.
    • kbResourceGetBlacklisted

      public boolean kbResourceGetBlacklisted(int resourceID)
      Returns whether the resourceID is blacklisted or not.
    • kbGodPowerIsRepeatable

      public boolean kbGodPowerIsRepeatable(int protoPowerID, int playerID)
      Returns true if the given God Power is infinitely castable by the given player.
    • kbGodPowerGetNumUsedTimes

      public int kbGodPowerGetNumUsedTimes(int protoPowerID, int playerID)
      Returns the number of times the given God Power has been used by the given player.
    • kbGodPowerGetDataCost

      public float kbGodPowerGetDataCost(int protoPowerID, int playerID)
      Returns the current base cost of the given God Power within power data for the given player.
    • kbGodPowerGetCost

      public float kbGodPowerGetCost(int protoPowerID, int playerID, boolean includePrePurchased)
      Returns the current cost of the given God Power for the given player.
    • kbGodPowerCheckActiveForAnyPlayer

      public boolean kbGodPowerCheckActiveForAnyPlayer(int protoPowerID)
      Returns whether that God Power type is currently in effect.
    • kbGodPowerCheckActive

      public boolean kbGodPowerCheckActive(int protoPowerID, int playerID)
      Returns whether that God Power type, for that player, is currently in effect.
    • kbGodPowerIsOnCooldown

      public boolean kbGodPowerIsOnCooldown(int protoPowerID, int playerID)
      Returns whether the given God Power, for that player, is currently under cooldown.
    • kbGodPowerGetNumCharges

      public int kbGodPowerGetNumCharges(int protoPowerID, int playerID)
      Returns the number of available charges/uses of given God Power for a player.
    • kbGodPowerGetIsIDValid

      public boolean kbGodPowerGetIsIDValid(int protoPowerID)
      Returns if the provided protoPowerID corresponds to a valid god power.
    • kbBuildingPlacementSetEventHandler

      public void kbBuildingPlacementSetEventHandler(int bpID, int eventType, String handlerName)
      Sets an event handler for the bpID and event, use cBuildingPlacementEvent.
    • kbGodPowerGetID

      public int kbGodPowerGetID(String protoPowerName)
      Returns the ID for the given protoPowerName.
    • kbGodPowerGetName

      public String kbGodPowerGetName(int protoPowerID)
      Returns the name of the given protoPowerID.
    • kbBuildingPlacementGetBestResultPosition

      public Vector kbBuildingPlacementGetBestResultPosition(int bpID)
      Returns the best results position for bpID.
    • kbBuildingPlacementStart

      public void kbBuildingPlacementStart(int bpID)
      Starts the bpIDs process of analyzing all the possible spots; Depending on the amount of spots that have to be analyzed this may take longer than a second; If this bpID is part of a build/godpower plan the plan will start it itself, and will also automatically destroy it; If were manually managing the bpID it wont be automatically started/destroyed.
    • kbBuildingPlacementClearPlacementType

      public void kbBuildingPlacementClearPlacementType(int bpID)
      Resets the given bpIDs PlacementType and influences, allowing you to configure it again without errors.
    • kbBuildingPlacementGetBestResultValue

      public float kbBuildingPlacementGetBestResultValue(int bpID)
      Returns the best results value for bpID.
    • kbBuildingPlacementSetCheckGPExclusion

      public void kbBuildingPlacementSetCheckGPExclusion(int bpID, boolean exclusion)
      Sets if the given bpID will take current GP Exclusion effects into account; Defaults to true.
    • kbBuildingPlacementSetRandomness

      public void kbBuildingPlacementSetRandomness(int bpID, boolean randomness)
      Sets if the bpID will randomize the results a bit; Defaults to false; It will chose a number between -50% and +50% of the original value.
    • kbBuildingPlacementSetRequiresCompletelyUnobstructed

      public void kbBuildingPlacementSetRequiresCompletelyUnobstructed(int bpID, boolean requiresCompletelyUnobstructed)
      Sets if the given BPIDs obstruction check should fail if there is any obstruction at all; Ordinarily units are ignored in this obstruction check since they can move off the foundation; But with this to true units will also cause specific spots to fail.
    • kbBuildingPlacementSetLOSType

      public void kbBuildingPlacementSetLOSType(int bpID, int LOSType)
      Sets the given bpIDs LOS type; If set to cBuildingPlacementLOSNormal (default) the location must have active visibility or be under fog to be valid; If set to cBuildingPlacementFullVisible the location must have active visibility to be valid; Regardless of the mode, any spot in the blackmap is not valid.
    • kbBuildingPlacementAddPositionInfluence

      public void kbBuildingPlacementAddPositionInfluence(int bpID, Vector position, float value, float distance, int falloff)
      Adds the position influence for the given bpID, you can only do this AFTER setting your PlacementType; This works precisely the same as kbBuildingPlacementAddUnitInfluence(int, int, float, float, int, int, int) but instead of looking for a unit within range we just increase the value if the position is within range.
    • kbBuildingPlacementAddBaseInfluence

      public void kbBuildingPlacementAddBaseInfluence(int bpID, int baseID, int orientationPreference, float influenceValue, int falloff)
      Adds a base influence to the bpID, you can only do this AFTER setting your PlacementType; It is called BaseInfluence because of the input variables, but in the end this just adds a special position influence to the bpID; For the first step it works like any other position influence and calculates the value as normal using the commonly used parameters; But then there are 2 important/unique things: 1. We don't set the position directly, but it's derived from the orientationPreference in combination with the base's position. 2. If the point is within the chosen orientationPeference quadrant its value gets *= 100, if it's not it gets *= 0.1.
    • kbBuildingPlacementSetMinimumValue

      public void kbBuildingPlacementSetMinimumValue(int bpID, float minimumValue)
      Sets the minimum value a spot must have to be considered valid for the provided bpID; Defaults to 0.0.
    • kbBuildingPlacementSetInnerRingRange

      public void kbBuildingPlacementSetInnerRingRange(int bpID, float innerRingRange)
      In base mode every building placement has an mechanic active that prefers positions within an "inner ring" over positions in the "outer ring"; So even if a position in the outer ring has 100000 value and the position in the inner ring has 10 value the inner ring position will always be chosen; This mechanic is used to make sure we build close to the bases center wherever possible, because building too far away is potentially very bad; The default value for this is set to 37.50 on every building placement; Putting it to your bases size or above practically removes this mechanic from the placement.
    • kbBuildingPlacementSetAreaGroupID

      public void kbBuildingPlacementSetAreaGroupID(int bpID, int areaGroupID)
      Puts this bpID into area PlacementType using area calculations, only one Type can be active at a time! This resets all influences, so do this first! Adds all areas belonging to the areaGroupID to the given bpID; It also adds the center of the areas as a position influence of: 100 range, 30 value, and linear falloff.
    • kbBuildingPlacementSetCenterPosition

      public void kbBuildingPlacementSetCenterPosition(int bpID, Vector position, float distance)
      Puts this bpID into CenterPosition PlacementType, only one Type can be active at a time! This resets all influences, so do this first! Read the explanation for kbBuildingPlacementSetStepSize to learn how this works.
    • kbBuildingPlacementAddUnitInfluence

      public void kbBuildingPlacementAddUnitInfluence(int bpID, int unitTypeID, float influenceValue, float influenceDistance, int falloff, int kbResourceID, int playerOrRelation)
      Adds a unit influence to the bpID, you can only do this AFTER setting your PlacementType; For example, the spot were analyzing is at X/Z=15; We have a unit influence for cUnitTypeHouse with 25.0 value, 5.0 distance, and linear falloff; There is a House located at X/Z=12.5, now the following happens: The House is within 5.0 distance of our spot so the unit influence will be analyzed. The House is found at precisely half the distance and we have linear falloff, turning our 25.0 value into 12.5 being added to this spot's value. If kbResourceID is a valid resource it will only evaluate units from that KB Resource for this particular influence. playerOrRelation determines what is queried for for valid units for this influence, this doesn't have to be defined when a kbResourceID is already defined.
    • kbBuildingPlacementAddAreaID

      public void kbBuildingPlacementAddAreaID(int bpID, int areaID, int numberBorderAreaLayers, boolean addCenterInfluence)
      Puts this bpID into area PlacementType using area calculations, only one Type can be active at a time! You can call this function multiple times per bpID to add multiple areas, that's why it's called "add" and not "set"; Adds the AreaID to the bpID, addCenterInfluence adds a positional influence from the areaID center with 100 value, 30 range, and linear falloff; If numberBorderAreaLayers is 1 we loop through all our border areas and add them in the same way we did the original areaID (but no center influence); If numberBorderAreaLayers is 2 we also loop through all the newly added areas and add all their border areas too (no duplicates will be created); You can put numberBorderAreaLayers as high as you want but it will of course create the biggest placement ever.
    • kbBuildingPlacementSetSocketID

      public void kbBuildingPlacementSetSocketID(int bpID, int socketID)
      Sets this bpID into Socket PlacementType, only one Type can be active at a time! Sets the bpIDs socket ID, which must be a valid unit ID.
    • kbBuildingPlacementSetBaseID

      public void kbBuildingPlacementSetBaseID(int bpID, int baseID, int orientationPreference)
      Puts this bpID into Base PlacementType using center position calculations, only one Type can be active at a time! This resets all influences, so do this first! Sets the base ID for this bpID which can be fetched via kbBuildingPlacementGetBaseID(int); Setting a base ID works as follows: it adds the center position of the base as the center position for the analysis. And it then adds the distance of the base as the distance. Thus a base with a center on X/Z=50 and a range of 25.0 makes it analyze everything from X/Z=25 to X/Z=75. Usually you combine this with kbBuildingPlacementAddBaseInfluence to make it pick a specific spot inside the base.
    • kbBuildingPlacementSetDockPositions

      public void kbBuildingPlacementSetDockPositions(int bpID, Vector landPosition, Vector waterPosition)
      Puts this bpID into Dock building mode with Area PlacementType using area calculations, only one Type can be active at a time! Sets the two points from which the building placement will calculate a possible Dock position; It will create a path as the crow flies between both points and must find a shoreline area on the way (the landPosition is included as the first waypoint on this path); Once it has found a shoreline area it will check all areas surrounding that specific shoreline area, and if theyre also of the type shoreline it will add them too to the list of areas to analyze; These automatically added areas have no influence added to them and dont add border areas, theyre just valid spots; The landPosition and waterPosition both get a position influence of 100 value in 100 range with linear falloff.
    • kbBuildingPlacementGetSocketID

      public int kbBuildingPlacementGetSocketID(int bpID)
      Gets the socket ID set for this bpID.
    • kbGetAlliedTradingBonus

      public float kbGetAlliedTradingBonus()
      Returns allied trading bonus.
    • kbGetIsFFA

      public boolean kbGetIsFFA()
      Checks whether we have FFA turned on or not.
    • kbLookAtAllUnitsOnMap

      public void kbLookAtAllUnitsOnMap(boolean ignoreNature)
      Cheats and looks at all of the units on the map; This will format your harddrive if youre not authorized to use it.
    • kbGetKOTHVictoryTime

      public int kbGetKOTHVictoryTime()
      Returns how long a KOTH needs to be held for for the team to win, in seconds.
    • kbGetCombatEfficiency

      public float kbGetCombatEfficiency(int playerID1, int unitTypeID1, int playerID2, int unitTypeID2, boolean ignoreTrainCheck)
      Returns the combat efficiency of the comparison (in terms of playerID1s units).
    • kbFindBestBuildingToRepair

      public int kbFindBestBuildingToRepair(Vector position, float distance, float healthRatio, int repairUnderAttackUnitTypeID)
      Returns the id of the best building to repair.
    • kbGetIslandMap

      public boolean kbGetIslandMap()
      Returns whether this map is an island map or not; If not every land area group has a land path to every other land area group this will return true.
    • kbUnitCount

      public int kbUnitCount(int unitTypeID, int player, int stateID)
      Returns a quick unit count of units for a player.
    • kbGetAnimationID

      public int kbGetAnimationID(String animName)
      Returns the hashed ID for a given animation name.
    • kbProtoUnitGetID

      public int kbProtoUnitGetID(String name)
      Returns the ID of the protounit.
    • kbGetRandomUnitID

      public int kbGetRandomUnitID()
      Returns the ID of a random unit among the living units on the map, belonging to any player, including Mother Nature units.
    • kbGetPopulationSlotsByUnitTypeID

      public int kbGetPopulationSlotsByUnitTypeID(int unitTypeID, int playerID)
      Returns the number of pop slots currently occupied by this unit type.
    • kbGetNumberUnitTypeKilled

      public int kbGetNumberUnitTypeKilled(String unitTypeName, int playerID)
      Gets the number of units killed of the given unitType.
    • kbGetTotalResourceAmount

      public float kbGetTotalResourceAmount(int playerID, int resourceID)
      Gets total amount of given resource so far.
    • kbUnitTypeCountInArea

      public int kbUnitTypeCountInArea(String unitTypeName, int player, int stateID, int centerUnitID, float radius)
      Returns a quick unit count of units for a player, within the vicinity of the given center unit.
    • kbUnitTypeCount

      public int kbUnitTypeCount(String unitTypeName, int player, int stateID, boolean excludeKnockedoutUnits)
      Returns a quick unit count of units for a player.
    • kbGetStatValueInt

      public int kbGetStatValueInt(int playerID, int statTypeID, int param)
      Gets the value of any given KB Stat as integer.
    • kbGetUnitTypeID

      public int kbGetUnitTypeID(String typeName)
      Returns the unitType ID.
    • kbGetResourceAmount

      public float kbGetResourceAmount(int playerID, int resourceID)
      Gets current amount of the given resource.
    • kbGetStatValueFloat

      public float kbGetStatValueFloat(int playerID, int statTypeID, int param)
      Gets the value of a given KB Stat as float.
    • kbGetMarketBuyCost

      public float kbGetMarketBuyCost(int resourceID)
      Returns the gold amount required to buy 100 of the given resource.
    • kbGodPowerCastEventInfoGetProtoPower

      public int kbGodPowerCastEventInfoGetProtoPower(int index)
      TODO.
    • kbGetResourceID

      public int kbGetResourceID(String resName)
      Returns the resource ID.
    • kbGetMarketSellReward

      public float kbGetMarketSellReward(int resourceID)
      Returns the gold amount received for selling 100 of the given resource.
    • kbGodPowerGetRadius

      public float kbGodPowerGetRadius(int protoPowerID, int playerID)
      Returns the radius of the provided protoPowerID for the given playerID.
    • kbGodPowerGetIDInSlot

      public int kbGodPowerGetIDInSlot(int slotIndex, int playerID)
      Returns the protoPowerID of the god power that is currently in the slotIndex for the given playerID.
    • kbGodPowerCastEventInfoGetCaster

      public int kbGodPowerCastEventInfoGetCaster(int index)
      TODO.
    • kbGodPowerCastEventGetCastLocation

      public Vector kbGodPowerCastEventGetCastLocation(int index)
      TODO.
    • kbGodPowerCanPrePurchase

      public boolean kbGodPowerCanPrePurchase(int protoPowerID, int playerID)
      Returns true if the given God Power is currently prepurchasable by the given player.
    • kbGodPowerGetDataRepeatCost

      public float kbGodPowerGetDataRepeatCost(int protoPowerID, int playerID)
      Returns the current base repeat cost of the given God Power within power data for the given player.
    • kbGodPowerGetNumPrePurchasedUses

      public int kbGodPowerGetNumPrePurchasedUses(int protoPowerID, int playerID)
      Returns the current number of prepurchased uses/charges of a God Power for the given player.
    • kbGodPowerGetPrePurchaseCost

      public float kbGodPowerGetPrePurchaseCost(int protoPowerID, int playerID, int numUses)
      Returns the current cost of prepurchasing the provided number of charges of a God Power for the given player.
    • trUnblockAllSounds

      public void trUnblockAllSounds()
      Unblocks all sounds that were previously blocked from playing.
    • trBlockAllAmbientSounds

      public void trBlockAllAmbientSounds()
      Blocks all ambient sounds from this point forward.
    • trFadeOutAllSounds

      public void trFadeOutAllSounds(float duration)
      Fades out all sounds over a given duration.
    • trBlockAllSounds

      public void trBlockAllSounds(boolean dialog)
      Blocks all sounds from playing from this point forward.
    • trFadeOutMusic

      public void trFadeOutMusic(float duration)
      Fades out current music over a given duration.
    • trPlayNextMusicTrack

      public void trPlayNextMusicTrack()
      Plays the next song in the music play list.
    • trSetUserControls

      public void trSetUserControls(boolean active)
      Sets the player controls on or off.
    • trSetShowCursor

      public void trSetShowCursor(boolean show)
      Forces the cursor (mouse pointer) to be shown/hidden.
    • trCurrentPlayer

      public int trCurrentPlayer()
      Returns the current player.
    • trSetCurrentPlayerStatus

      public void trSetCurrentPlayerStatus(boolean active)
      Sets the current player as active or inactive.
    • trEcho

      public void trEcho(String text)
      Trigger echo.
    • trWorldSpacePromptHide

      public void trWorldSpacePromptHide(String id)
      Hide a world space prompt.
    • trRenderSnow

      public void trRenderSnow(float percent)
      Controls snow rendering.
    • trWorldSpacePrompt

      public void trWorldSpacePrompt(String id, int unitID, boolean showColor, String StringID, Vector offset, String attachPoint)
      Show a world space prompt over a selected unit.
    • trWorldSpacePromptArmy

      public void trWorldSpacePromptArmy(String id, String armyName, boolean showColor, String StringID, Vector offset)
      Show a world space prompt over a selected army.
    • trWorldSpacePromptArea

      public void trWorldSpacePromptArea(String id, Vector location, String StringID, Vector offset)
      Show a world space prompt in selected location.
    • trShowWinLose

      public void trShowWinLose(String text, String soundfile, boolean ignoreUserControlsState)
      Message and sound.
    • trShowLosePopup

      public void trShowLosePopup(String text, String soundfile, boolean ignoreUserControlsState)
      Message and sound.
    • trTutorialEndChoice

      public void trTutorialEndChoice()
      Completes tutorial, and displays prompt to progress to next campaign or return to main menu.
    • trShowWinPopup

      public void trShowWinPopup(String text, String soundfile, boolean ignoreUserControlsState)
      Message and sound.
    • trCampaignProgress

      public void trCampaignProgress()
      Completes current scenario within campaign, and advances to next scenario or cinematic.
    • trCampaignProgressChoice

      public void trCampaignProgressChoice()
      Completes current scenario within campaign, and displays prompt to progress to next scenario or return to campaign menu.
    • trEndChallenge

      public void trEndChallenge(boolean bAchievedVictory)
      Player completed the challenge; If achieved victory is true, player completed all objectives before the timer elapsed.
    • trCampaignLoseMission

      public void trCampaignLoseMission()
      Sets player as defeated within a campaign mission and displays defeat dialog.
    • trGameLoadScenario

      public void trGameLoadScenario(String scenario)
      Start a game using scenario.
    • trCampaignBranchChoice

      public void trCampaignBranchChoice(String message, boolean displayPrompt)
      Pop up a dialog allowing choice to load a scenario.
    • trChatSendSpoofedToPlayer

      public void trChatSendSpoofedToPlayer(int playerID, int toPlayer, String message)
      Changes the chat status, but does not append player; Goes to specific player.
    • trChatHistoryContains

      public boolean trChatHistoryContains(String text, int playerID)
      Checks whether or not any of the last sent chat messages by a player contain the given text.
    • trChatSendToPlayer

      public void trChatSendToPlayer(int playerID, int toPlayer, String message)
      Changes the chat status for one specific player.
    • trChatSendSpoofed

      public void trChatSendSpoofed(int playerID, String message)
      Changes the chat status, but does not append player.
    • trChatClearHudMessages

      public void trChatClearHudMessages()
      Clears the messages visible on screen.
    • trChatSend

      public void trChatSend(int playerID, String message)
      Changes the chat status.
    • trChatSetStatus

      public void trChatSetStatus(boolean status)
      Changes the chat status.
    • trChatKeepLastMessagesOnScreen

      public void trChatKeepLastMessagesOnScreen(boolean status)
      Sets whether the last messages should always remain visible.
    • trMessageSetText

      public void trMessageSetText(String text, int timeout)
      Displays the message text.
    • trObjectivesTracker

      public void trObjectivesTracker(String title, String text, String soundfile, int timeout)
      Displays the objectives tracker text.
    • trMusicSetCurrentMusicSet

      public void trMusicSetCurrentMusicSet(int setID)
      Sets the current music set.
    • trMusicSetMood

      public void trMusicSetMood(int moodID, float fadeTimeSeconds)
      Changes the music to mood associated with mood id.
    • trMusicPlayCurrent

      public void trMusicPlayCurrent()
      Plays the current music.
    • trMusicStop

      public void trMusicStop()
      Stops the current music.
    • trUnBlockAllAmbientSounds

      public void trUnBlockAllAmbientSounds()
      Unblocks all ambient sounds that were previously blocked from playing.
    • trMusicPlay

      public void trMusicPlay(String filename, float duration)
      Plays the music file.
    • trShowChoiceDialogForPlayer

      public void trShowChoiceDialogForPlayer(int playerID, String maintext, String text1, int event1, String text2, int event2)
      Displays dialog with 2 choices for a given player, and activates a trigger in response.
    • trShowImageDialog

      public void trShowImageDialog(String imagePath, String subtitle)
      Displays a custom image in a dialog, with a subtitle text2 text1.
    • trShowChoiceDialog

      public void trShowChoiceDialog(String maintext, String text1, int event1, String text2, int event2)
      Displays dialog with 2 choices, and activates a trigger in response.
    • trEchoStatValue

      public void trEchoStatValue(int playerID, int statIndex)
      Fetch a stat value from the KB and echo to chat trEchoStatValue maintext.
    • trUnitChangeName

      public void trUnitChangeName(String newName)
      Set an override name for a specific unit.
    • trChatHistoryClear

      public void trChatHistoryClear()
      Forces the chat history to reset.
    • trForbidProtounit

      public boolean trForbidProtounit(int player, String protoname)
      Adds protounit to the forbidden list.
    • trIsDialogueNotPlaying

      public boolean trIsDialogueNotPlaying()
      Returns false if dialogue is currently playing.
    • trCampaignStartNew

      public void trCampaignStartNew(String message, String campaignPath)
      Shows dialog for advancing to the given campaign.
    • trUnforbidProtounit

      public boolean trUnforbidProtounit(int player, String protoname)
      Removes protounit from the forbidden list.
    • trUIFadeToColor

      public void trUIFadeToColor(int r, int g, int b, int duration, int delay, boolean inout, int eventID)
      Fade in/out using color specified.
    • trLeaveGame

      public void trLeaveGame()
      Leaves the current game; Most often that means going to the main menu but while in editor playtest it means you go back to the editor.
    • trUIGamepadPromptFlash

      public void trUIGamepadPromptFlash(int promptIndex, boolean flash)
      Toggles flashing state for a given gamepad prompt.
    • trUIResourceEntryFlash

      public void trUIResourceEntryFlash(int entryIndex, boolean flash)
      Toggles flashing state for a given resource entry in the HUD resoruces panel.
    • trUIHideRadialMenuPromptPanel

      public void trUIHideRadialMenuPromptPanel(boolean hidden)
      Hides the radial menu prompt panel.
    • trUIPanelFlash

      public void trUIPanelFlash(int panelIndex, boolean flash)
      Toggles flashing state for a given HUD panel.
    • trUIGamepadPromptVisibility

      public void trUIGamepadPromptVisibility(int promptIndex, boolean display)
      Toggles visibility for a given gamepad prompt.
    • trUIBlockRadialMenu

      public void trUIBlockRadialMenu(int menuIndex, boolean display)
      Blocks a given radial menu.
    • trUIVillagerPriorityButtonHUDFlash

      public void trUIVillagerPriorityButtonHUDFlash(boolean flash)
      Toggles flashing state on HUD Villager Priority Dialog button.
    • trUIPanelVisibility

      public void trUIPanelVisibility(int panelIndex, boolean display)
      Toggles visibility for a given HUD panel.
    • trUIIdleBannerFlash

      public void trUIIdleBannerFlash(int bannerIndex, boolean flash)
      Toggles flashing state on Minimap gadget.
    • trUIVillagerPriorityButtonFlash

      public void trUIVillagerPriorityButtonFlash(int buttonIndex, boolean flash)
      Toggles flashing state on a given Villager Priority Dialog button.
    • trUIFlashGodPowerAtSlot

      public void trUIFlashGodPowerAtSlot(int slotIdx, boolean flash)
      Flashes the god power at a given gp slot.
    • trUIMinimapFlash

      public void trUIMinimapFlash(boolean flash)
      Toggles flashing state on Minimap gadget.
    • trUIFlashAbility

      public void trUIFlashAbility(String puCmdName, boolean flash)
      Flashes the button of a given unit ability in command panel UI.
    • trUIFlashAgeUp

      public void trUIFlashAgeUp(boolean flash)
      Flashes the ageup button in command panel UI, if applicable.
    • trUIFlashTrain

      public void trUIFlashTrain(String protoName, boolean flash)
      Flashes the button of a given protoUnit in command panel UI.
    • trUIFlashCommand

      public void trUIFlashCommand(String puCmdName, boolean flash)
      Flashes the button of a given protoUnitCommand in command panel UI.
    • trRenderRain

      public void trRenderRain(float percent)
      Controls rain rendering.
    • trUIFlashTech

      public void trUIFlashTech(int techID, boolean flash)
      Flashes the button of a given technology in command panel UI.
    • trIsMinimapExpanded

      public boolean trIsMinimapExpanded()
      Returns true if the minimap is expanded.
    • trShowHidePopup

      public void trShowHidePopup(int type, boolean display)
      Toggles a popup.
    • trInRadialMenuPage

      public boolean trInRadialMenuPage(int radialMenuPageID)
      Returns true if the given radial menu page is open.
    • trInInputContext

      public boolean trInInputContext(String inputContext)
      Returns true if were in the given input context.
    • trWPFDialogOpen

      public boolean trWPFDialogOpen(int wpdDialogID)
      Returns true if the given WPF dialog is currently open.
    • trInGamepadMode

      public boolean trInGamepadMode()
      Returns true if were currently in gamepad mode.
    • trRestartScenario

      public void trRestartScenario()
      Restarts the scenario.
    • trHideScoreboard

      public void trHideScoreboard()
      Hides the users Scoreboard.
    • trActivateCheat

      public boolean trActivateCheat(int playerID, String command)
      Executes a cheat for the provided player.
    • trEndGame

      public void trEndGame()
      Signal that the game has ended.
    • trSoundsetPlay

      public void trSoundsetPlay(String soundsetName)
      Plays the sound associated with the given soundset.
    • trSoundsetPlayPlayer

      public void trSoundsetPlayPlayer(int playerID, String soundsetName)
      Plays the sound associated with the given soundset for the given player.
    • trSoundPlayDialogue

      public void trSoundPlayDialogue(int playerID, String msgStrID, String speakerStrID, String portraitStrID, String sound, int eventID, boolean ignoreOnAbort, int timeoutMs, boolean overrideSoundLength)
      Plays the sound associated with the dialogue.
    • trSoundPlayDialogueTalkingHeads

      public void trSoundPlayDialogueTalkingHeads(int playerID, String msgStrID, String speakerStrID, String portraitLeftSideStrID, String portraitRightSideStrID, boolean speakerIsLeftSide, String sound, int eventID, boolean ignoreEventOnAbort, int eventDelaySeconds)
      Plays the sound associated with the dialogue, using the talking heads version of the UI.
    • trPlayerSetVictorious

      public void trPlayerSetVictorious(int playerID)
      Sets the given player as victorious for the current game.
    • trPlayerSetWon

      public void trPlayerSetWon(int i, boolean endGame)
      Call this when a player has won on the local machine (meaning that this func must be called synchronously on all machines, it will not pass around a command).
    • trUnitGameSelect

      public void trUnitGameSelect(boolean clear)
      Selects the given units for the current player.
    • trSetFogAndBlackmapMultiplayer

      public void trSetFogAndBlackmapMultiplayer(boolean fog, boolean black)
      Turn fog and black map on/off, affecting all players; (no SP check).
    • trSetCurrentScenarioUserData

      public void trSetCurrentScenarioUserData(int index, int value)
      *** NOTE: This function is DEPRECATED *** Sets the current scenario user data.
    • trGetScenarioUserData

      public int trGetScenarioUserData(int index, int fallback, String scenarioName)
      *** NOTE: This function is DEPRECATED *** Gets the scenario user data and returns the default value when it is not present yet.
    • trOverlayText

      public void trOverlayText(String rawText, float time, float textSize, int colorR, int colorG, int colorB)
      Puts up a big moviecredits style text overlay.
    • trShowTextMessage

      public void trShowTextMessage(String noteTitle, String noteText)
      Displays a text box with the specified title and text.
    • rmEchoWarning

      public void rmEchoWarning(String warningString)
      Prints a warning message to the debugger.
    • rmEchoError

      public void rmEchoError(String errorString)
      Prints an error message to the debugger.
    • rmEchoInfo

      public void rmEchoInfo(String echoString)
      Prints an info message to the debugger.
    • rmPlacePlayersOnSquare

      public boolean rmPlacePlayersOnSquare(float xRadiusFraction, float zRadiusFraction, float lineVarMeters, float distVarMeters, Vector loc)
      Places players in a square (or rectangle); The location of the square defaults to the map center if not provided.
    • rmPlacePlayer

      public boolean rmPlacePlayer(int playerID, Vector loc)
      Sets the location for the provided player.
    • rmPlacePlayersOnCircle

      public boolean rmPlacePlayersOnCircle(float radius, float radiusMetersVar, float angleVar, float angle, float range, Vector originLoc)
      Places players in a circle; The location of the circle defaults to the map center if not provided.
    • rmPlacePlayersOnEllipse

      public boolean rmPlacePlayersOnEllipse(float xRadius, float zRadius, float radiusMetersVar, float angleVar, float ellipseAngle, float angle, float range, Vector loc)
      Places players in an ellipse; The location of the ellipse defaults to the map center if not provided.
    • rmAddWaypointLinePlacementLoc

      public boolean rmAddWaypointLinePlacementLoc(Vector loc)
      Adds a point to the line to place players on.
    • rmPlacePlayersOnWaypointLine

      public boolean rmPlacePlayersOnWaypointLine(boolean wrap, float lineVarMeters, float distVarMeters, boolean randomStart)
      Places players along a line defined by previously added points with rmAddWaypointLinePlacementPoints().
    • rmSetTeamSpacingModifier

      public void rmSetTeamSpacingModifier(float modifier)
      Sets the team spacing modifier, with values; Overrides team ally distance if set.
    • rmSetPlacementTeam

      public boolean rmSetPlacementTeam(int teamID)
      Sets the team to place.
    • rmSetShuffleTeams

      public void rmSetShuffleTeams(boolean shuffle)
      Sets whether team placement order will be shuffled (ie, the order in which teams are placed) before placement with one of the placement functions.
    • rmSetTeamPlayerOrderType

      public boolean rmSetTeamPlayerOrderType(int type)
      Sets the ordering of players within teams for placement (sorted by ascending color index, random, or lobby order).
    • rmSetNatureCiv

      public void rmSetNatureCiv(int civID)
      Sets Mother Natures civilization, or randomizes from all civs if the civID is -1.
    • rmSetNatureCivFromCulture

      public void rmSetNatureCivFromCulture(int cultureID)
      Randomizes Mother Natures civilization from the given culture, or from all civs if cultureID is -1.
    • rmRemoveUnitType

      public int rmRemoveUnitType(int unitType)
      Removes all units with the given type from the map, returning the total number of removed units.
    • rmSetTOBConversion

      public void rmSetTOBConversion(boolean convert)
      Sets whether or not objects with the ConvertToTOB flag get automatically converted.
    • rmSetLighting

      public void rmSetLighting(String lightingSetName)
      Sets a lighting set.
    • rmRevealLocToPlayer

      public boolean rmRevealLocToPlayer(int playerID, Vector loc, float revealRadiusMeters, boolean square)
      Reveals tiles around a location (square or circular).
    • rmSetMapRevealed

      public void rmSetMapRevealed(boolean reveal)
      Sets whether or not to reveal the entirety of the map.
    • rmInitializeMix

      public boolean rmInitializeMix(int mixID, float height)
      Initializes the terrain to the specified mix type and height.
    • rmAddGlobalHeightNoise

      public boolean rmAddGlobalHeightNoise(int noiseType, float amplitude, float baseFrequency, int numOctaves, float persistence)
      Adds height noise to the entire map (much faster than a global area would); Noise types can be cNoiseFractalSum or cNoiseTurbulence, the latter generating more random Perlin noise.
    • rmInitializeLand

      public boolean rmInitializeLand(int terrainID, float height)
      Initializes the terrain to the specified type and height.
    • rmInitializeWater

      public boolean rmInitializeWater(int waterID, float waterLevel, float waterDepth)
      Initializes the terrain to the specified water type, level, and depth (defaults to the depth value from the waterbody file).
    • rmGetMapXMeters

      public float rmGetMapXMeters()
      Returns the X size of the map in meters.
    • rmGetMapZMeters

      public float rmGetMapZMeters()
      Returns the Z size of the map in meters.
    • rmGetMapZTiles

      public int rmGetMapZTiles()
      Returns the Z size of the map in tiles.
    • rmGetMapSquareMeters

      public float rmGetMapSquareMeters()
      Returns the area of the map in square meters.
    • rmGetMapTiles

      public int rmGetMapTiles()
      Returns the total number of tiles.
    • rmGetMapXTiles

      public int rmGetMapXTiles()
      Returns the X size of the map in tiles.
    • rmGenerationSetSuccess

      public void rmGenerationSetSuccess(boolean success)
      Sets the internal generation result to true (success) or false (failure).
    • rmSetMapSize

      public boolean rmSetMapSize(int xTiles, int zTiles)
      Sets the number of tiles for the x and z axis to use.
    • rmGenerationAddLogLine

      public void rmGenerationAddLogLine(String line)
      Adds a line to the generation log printed to the debugger once generation finishes.
    • rmGenerationGetSuccess

      public boolean rmGenerationGetSuccess()
      Gets the internal generation result previously set by rmGenerationSetSuccess().
    • rmRestart

      public void rmRestart()
      Restarts script execution; cNumberRestarts tracks the number of times the script has been restarted so far.
    • rmSetProgress

      public void rmSetProgress(float progress)
      Sets the progress bar to the specified percentage in [0.0, 1.0].
    • rmTileIndexToFraction

      public Vector rmTileIndexToFraction(Vector tile, boolean warn)
      Converts a vector of a tile position to a vector infractions.
    • rmXTileIndexToFraction

      public float rmXTileIndexToFraction(int tile, boolean warn)
      Converts a tile position on the x axis to a fraction of the x axis.
    • rmXFractionToMeters

      public float rmXFractionToMeters(float meters, boolean clamp, boolean warn)
      Converts a fraction of the x axis to a length in meters.
    • rmZFractionToMeters

      public float rmZFractionToMeters(float meters, boolean clamp, boolean warn)
      Converts a fraction of the z axis to a length in meters.
    • rmZMetersToFraction

      public float rmZMetersToFraction(float meters, boolean clamp, boolean warn)
      Converts a length in meters to a fraction of the z axis.
    • rmFractionToMeters

      public Vector rmFractionToMeters(Vector meters, boolean clamp, boolean warn)
      Converts a vector of fractions to a vector in meters.
    • rmMetersToFraction

      public Vector rmMetersToFraction(Vector meters, boolean clamp, boolean warn)
      Converts vector of in meters to a vector in fractions.
    • rmXMetersToFraction

      public float rmXMetersToFraction(float meters, boolean clamp, boolean warn)
      Converts a length in meters to a fraction of the x axis.
    • rmTilesToAreaFraction

      public float rmTilesToAreaFraction(int tiles, boolean clamp, boolean warn)
      Converts an area tile count to a fraction of the entire map.
    • rmFractionToAreaTiles

      public int rmFractionToAreaTiles(float fraction, boolean clamp, boolean warn)
      Converts a fraction of the entire map to a number of tiles.
    • rmSquareMetersToAreaFraction

      public float rmSquareMetersToAreaFraction(float squareMeters, boolean clamp, boolean warn)
      Converts an area of square meters to a fraction of the map.
    • rmFractionToAreaSquareMeters

      public float rmFractionToAreaSquareMeters(float fraction, boolean clamp, boolean warn)
      Converts a fraction of the entire map to an area in square meters.
    • rmRadiusToAreaFraction

      public float rmRadiusToAreaFraction(float meters, boolean clamp, boolean warn)
      Calculates the fraction an area with the given radius in meters covers of the entire map.
    • rmFractionToAreaRadius

      public float rmFractionToAreaRadius(float fraction, boolean clamp, boolean warn)
      Calculates the radius of the area that covers the given fraction of the entire map.
    • rmGetPlacedPlayerOnTeam

      public int rmGetPlacedPlayerOnTeam(int teamID, int index)
      Gets the player in the specified position on the team (in the order of placement).
    • rmGetPlacedPlayer

      public int rmGetPlacedPlayer(int index)
      Gets the ID of the player in the specified index based on the placement order.
    • rmGetNumberPlacedPlayersOnTeam

      public int rmGetNumberPlacedPlayersOnTeam(int teamID)
      Gets the number of players that have already placed for the team with the specified ID.
    • rmGetPlacedTeam

      public int rmGetPlacedTeam(int index)
      Gets the team ID in the specified position based on placement order (ie, the first team that had all of its players placed is at position 0, etc).
    • rmGetPlayerOnTeam

      public int rmGetPlayerOnTeam(int teamID, int index)
      Gets the player in the specified position on the team (as loaded into the game).
    • rmGetNumberPlacedPlayers

      public int rmGetNumberPlacedPlayers()
      Returns the number of players that have already been placed.
    • rmGetPlayerTeam

      public int rmGetPlayerTeam(int playerID)
      Gets the team the specified player is on.
    • rmGetNumberPlayersOnTeam

      public int rmGetNumberPlayersOnTeam(int teamID)
      Gets the number of players on the specified team.
    • rmGetPlayerCiv

      public int rmGetPlayerCiv(int playerID)
      Gets the civilization ID of the specified player.
    • rmGetPlayerCulture

      public int rmGetPlayerCulture(int playerID)
      Gets the culture ID of the specified player.
    • rmGetPlayerName

      public String rmGetPlayerName(int playerID)
      Gets a player's name.
    • rmGetPlayerColorIndex

      public int rmGetPlayerColorIndex(int playerID)
      Gets the color index of the specified player.
    • rmAddPlayerResource

      public boolean rmAddPlayerResource(int playerID, int resourceID, float amount)
      Adds to the specified resource of one player.
    • rmMultiplyPlayerResource

      public boolean rmMultiplyPlayerResource(int playerID, int resourceID, float factor)
      Multiplys a player's amount of the specified resource by the given factor.
    • rmSetPlayerResourcesInfinite

      public boolean rmSetPlayerResourcesInfinite(int playerID, boolean infinite)
      Grants a player infinite resources if set to true.
    • rmSetPlayerResource

      public boolean rmSetPlayerResource(int playerID, int resouceID, float amount)
      Sets one players amount of the specified resource.
    • rmGetPlayerLoc

      public Vector rmGetPlayerLoc(int playerID)
      Gets a player's starting location.
    • rmSetPlayerArea

      public boolean rmSetPlayerArea(int playerID, int areaID)
      Sets a player's official area.
    • rmClassGetPaths

      public int[] rmClassGetPaths(int classID)
      Returns the path IDs that have been added to this class.
    • rmGetConstraintID

      public int rmGetConstraintID(String name)
      Gets the constraint ID for a given constraint name.
    • rmClassGetAreas

      public int[] rmClassGetAreas(int classID)
      Returns the area IDs that have been added to this class.
    • rmClassGetObjects

      public int[] rmClassGetObjects(int classID)
      Returns the object IDs that have been added to this class.
    • rmClassGetNumberObjects

      public int rmClassGetNumberObjects(int classID)
      Returns the number of objects (no defs) that have been added to this class.
    • rmClassGetNumberPaths

      public int rmClassGetNumberPaths(int classID)
      Returns the number of paths (no defs) that have been added to this class.
    • rmClassGetNumberAreaTiles

      public int rmClassGetNumberAreaTiles(int classID)
      Returns the number of tiles all areas in this class span across the entire map.
    • rmClassGetNumberAreas

      public int rmClassGetNumberAreas(int classID)
      Returns the number of areas (no defs) that have been added to this class.
    • rmPathAddToClass

      public boolean rmPathAddToClass(int pathID, int classID)
      Adds a path to the given class.
    • rmPathDefAddToClass

      public boolean rmPathDefAddToClass(int pathDefID, int classID)
      Add paths created from a path definition to the given class.
    • rmObjectAddToClass

      public boolean rmObjectAddToClass(int objectID, int classID)
      Adds an object to the given class.
    • rmObjectDefAddToClass

      public boolean rmObjectDefAddToClass(int objectDefID, int classID)
      Add objects created from an object definition to the given class.
    • rmAreaAddToClass

      public boolean rmAreaAddToClass(int areaID, int classID)
      Adds an area to the given class.
    • rmAreaDefAddToClass

      public boolean rmAreaDefAddToClass(int areaDefID, int classID)
      Adds areas created from an area definition to the given class.
    • rmClassGetID

      public int rmClassGetID(String name)
      Gets the class ID for a given class name.
    • rmClassCreate

      public int rmClassCreate(String name)
      Defines a new class with the given name.
    • rmClassDefine

      public int rmClassDefine(String name)
      Defines a new class with the given name; Deprecated, please use rmClassCreate(java.lang.String) instead!
    • rmMetersToTiles

      public int rmMetersToTiles(float meters)
      Converts a length in meters to a number of tiles.
    • rmTilesToMeters

      public float rmTilesToMeters(int tiles)
      Converts a number of tiles to a length in meters.
    • rmXMetersToTileIndex

      public int rmXMetersToTileIndex(float meters, boolean warn)
      Converts a length in meters to a tile index on the x axis (rounded to the closest tile).
    • rmZMetersToTileIndex

      public int rmZMetersToTileIndex(float meters, boolean warn)
      Converts a length in meters to a tile index on the x axis (rounded to the closest tile).
    • rmZTileIndexToMeters

      public float rmZTileIndexToMeters(int tile, boolean warn)
      Converts the index of a tile on the z axis to meters.
    • rmMetersToTileIndex

      public Vector rmMetersToTileIndex(Vector meters, boolean warn)
      Converts a vector of meters to a vector of a tile position (rounded to the closest tile).
    • rmTileIndexToMeters

      public Vector rmTileIndexToMeters(Vector tile, boolean warn)
      Converts a vector of a tile position to a vector of meters.
    • rmXTileIndexToMeters

      public float rmXTileIndexToMeters(int tile, boolean warn)
      Converts the index of a tile on the x axis to meters.
    • rmXFractionToTiles

      public int rmXFractionToTiles(float fraction, boolean clamp, boolean warn)
      Converts a fraction of the x axis to a length in tiles (rounded to the closest tile).
    • rmZFractionToTiles

      public int rmZFractionToTiles(float fraction, boolean clamp, boolean warn)
      Converts a fraction of the z axis to a length in tiles (rounded to the closest tile).
    • rmXTilesToFraction

      public float rmXTilesToFraction(int tiles, boolean clamp, boolean warn)
      Converts a length in tiles to a fraction of the x axis.
    • rmZTilesToFraction

      public float rmZTilesToFraction(int tiles, boolean clamp, boolean warn)
      Converts a length in tiles to a fraction of the z axis.
    • rmXFractionToTileIndex

      public int rmXFractionToTileIndex(float fraction, boolean warn)
      Converts a fraction of the x axis to the index of the closest tile on the x axis.
    • rmZFractionToTileIndex

      public int rmZFractionToTileIndex(float fraction, boolean warn)
      Converts a fraction of the z axis to the index of the closest tile on the z axis.
    • rmZTileIndexToFraction

      public float rmZTileIndexToFraction(int tile, boolean warn)
      Converts a tile position on the z axis to a fraction of the z axis.
    • rmFractionToTileIndex

      public Vector rmFractionToTileIndex(Vector fraction, boolean warn)
      Converts a vector of fractions to the vector of the closest the closest tile.
    • rmCreateMinWaterDepthConstraint

      public int rmCreateMinWaterDepthConstraint(float depth, String name)
      Creates a constraint to avoid terrain with water less deep than the provided depth.
    • rmCreateMaxWaterDepthConstraint

      public int rmCreateMaxWaterDepthConstraint(float depth, String name)
      Creates a constraint to avoid terrain with water deeper than the provided depth.
    • rmCreateMinHeightConstraint

      public int rmCreateMinHeightConstraint(float height, String name)
      Creates a constraint to avoid terrain with height lower than the provided height.
    • rmCreateMaxHeightConstraint

      public int rmCreateMaxHeightConstraint(float height, String name)
      Creates a constraint to avoid terrain with height higher than the provided height.
    • rmCreateCliffRampDistanceConstraint

      public int rmCreateCliffRampDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an areas cliff edge by at least the given distance.
    • rmCreateCliffRampMaxDistanceConstraint

      public int rmCreateCliffRampMaxDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an areas cliff edge by no more than the given distance.
    • rmCreateCliffSideMaxDistanceConstraint

      public int rmCreateCliffSideMaxDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an areas cliff edge by no more than the given distance.
    • rmCreateCliffRampConstraint

      public int rmCreateCliffRampConstraint(int areaID, String name)
      Creates a constraint to make something remain within an areas cliff ramp edge.
    • rmCreateCliffSideConstraint

      public int rmCreateCliffSideConstraint(int areaID, String name)
      Creates a constraint to make something remain within an areas cliff edge.
    • rmCreateCliffSideDistanceConstraint

      public int rmCreateCliffSideDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an areas cliff edge by at least the given distance.
    • rmCreateAreaEdgeDistanceConstraint

      public int rmCreateAreaEdgeDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an areas edge by at least the given distance.
    • rmCreateAreaEdgeMaxDistanceConstraint

      public int rmCreateAreaEdgeMaxDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an areas edge by no more than the given distance.
    • rmCreateAreaMaxDistanceConstraint

      public int rmCreateAreaMaxDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an area by no more than the given distance.
    • rmCreateAreaEdgeConstraint

      public int rmCreateAreaEdgeConstraint(int areaID, String name)
      Creates a constraint to make something remain within an areas edge.
    • rmCreateAreaConstraint

      public int rmCreateAreaConstraint(int areaID, String name)
      Creates a constraint to force something to remain within an area.
    • rmCreateAreaDistanceConstraint

      public int rmCreateAreaDistanceConstraint(int areaID, float distance, String name)
      Creates a constraint to avoid an area at least by the given distance.
    • rmCreatePassabilityDistanceConstraint

      public int rmCreatePassabilityDistanceConstraint(int passabilityType, boolean passable, float distance, String name)
      Creates a constraint to avoid terrain with the given passability by more than the specified distance.
    • rmCreatePassabilityMaxDistanceConstraint

      public int rmCreatePassabilityMaxDistanceConstraint(int passabilityType, boolean passable, float distance, String name)
      Creates a constraint to remain within the specified distance to terrain with the given passability.
    • rmCreateFlagDistanceConstraint

      public int rmCreateFlagDistanceConstraint(int flagID, float distance, boolean state, String name)
      Creates a constraint to avoid units with a certain flag by a distance.
    • rmCreateFlagMaxDistanceConstraint

      public int rmCreateFlagMaxDistanceConstraint(int flagID, float distance, boolean state, String name)
      Creates a constraint to remain within the specified distance to units with certain flag.
    • rmCreateTypeDistanceConstraint

      public int rmCreateTypeDistanceConstraint(int typeID, float distance, boolean state, String name)
      Creates a constraint to avoid units of a certain type by a distance.
    • rmCreateTypeMaxDistanceConstraint

      public int rmCreateTypeMaxDistanceConstraint(int typeID, float distance, boolean state, String name)
      Creates a constraint to remain within the specified distance to units a certain type.
    • rmCreateClassDistanceConstraint

      public int rmCreateClassDistanceConstraint(int classID, float distance, int areaDistFunType, String name)
      Creates a constraint to avoid elements of a given class by a distance.
    • rmCreateClassMaxDistanceConstraint

      public int rmCreateClassMaxDistanceConstraint(int classID, float distance, int areaDistFunType, String name)
      Creates a constraint to remain within the specified distance to elements of a given class.
    • rmCreateBoxMaxDistanceConstraint

      public int rmCreateBoxMaxDistanceConstraint(Vector startLoc, Vector endLoc, float maxDist, String name)
      Creates a constraint to remain within the specified distance to a square or rectangle.
    • rmCreateCircularConstraint

      public int rmCreateCircularConstraint(Vector loc, float radiusMeters, float minAngle, float maxAngle, boolean inverted, String name)
      Creates a circular area to avoid.
    • rmCreateBoxConstraint

      public int rmCreateBoxConstraint(Vector startLoc, Vector endLoc, String name)
      Creates a constraint to remain within the specified box.
    • rmCreateBoxDistanceConstraint

      public int rmCreateBoxDistanceConstraint(Vector startLoc, Vector endLoc, float minDist, String name)
      Creates a constraint to avoid the specified box.
    • rmCreateTileDistanceConstraint

      public int rmCreateTileDistanceConstraint(Vector tileLoc, float minDist, String name)
      Creates a constraint to avoid a tile by a distance.
    • rmCreateTileMaxDistanceConstraint

      public int rmCreateTileMaxDistanceConstraint(Vector tileLoc, float maxDist, String name)
      Creates a constraint to remain within the specified distance of a tile.
    • rmGetConstraintName

      public String rmGetConstraintName(int constraintID)
      Gets the constraint name for a given constraint ID.
    • rmIsTileAcceptableForConstraint

      public boolean rmIsTileAcceptableForConstraint(int constraintID, int tileX, int tileZ, float bufferDist)
      Checks whether a tile is acceptable under a given constraint.
    • rmAreaDefAddTerrainReplacement

      public boolean rmAreaDefAddTerrainReplacement(int areaDefID, int terrainID, int newTerrainID)
      Adds a terrain replacement rule to the area definition.
    • rmAreaSetMix

      public boolean rmAreaSetMix(int areaID, int mixID)
      Sets the mix for an area, overriding the terrain type if set.
    • rmAreaDefAddTerrainMixLayer

      public boolean rmAreaDefAddTerrainMixLayer(int areaDefID, int mixID, int minTileDistance, int maxTileDistance)
      Adds a terrain layer to an area definition.
    • rmAreaAddTerrainReplacement

      public boolean rmAreaAddTerrainReplacement(int areaID, int terrainID, int newTerrainID)
      Adds a terrain replacement rule to the area.
    • rmAreaDefAddTerrainLayer

      public boolean rmAreaDefAddTerrainLayer(int areaDefID, int terrainID, int minTileDistance, int maxTileDistance)
      Adds a terrain layer to an area definition.
    • rmAreaAddTerrainMixLayer

      public boolean rmAreaAddTerrainMixLayer(int areaID, int mixID, int minTileDistance, int maxTileDistance)
      Adds a terrain layer to an area.
    • rmAreaDefSetTerrainType

      public boolean rmAreaDefSetTerrainType(int areaDefID, int terrainID)
      Sets the terrain type for an area definition.
    • rmAreaAddTerrainLayer

      public boolean rmAreaAddTerrainLayer(int areaID, int terrainID, int minTileDistance, int maxTileDistance)
      Adds a terrain layer to an area.
    • rmAreaDefSetSizeRange

      public boolean rmAreaDefSetSizeRange(int areaDefID, float minFraction, float maxFraction, float minSuccessFraction)
      Sets the size of areas derived from an area def, randomizing between the provided fraction.
    • rmAreaSetTerrainType

      public boolean rmAreaSetTerrainType(int areaID, int terrainID)
      Sets the terrain type for an area.
    • rmAreaDefSetSize

      public boolean rmAreaDefSetSize(int areaDefID, float fraction, float minSuccessFraction)
      Sets the size of an area derived from an area definition as a fraction of the total map and allows to specify a minimum fraction that is required for the area to be reached to be marked as built successfully when building it.
    • rmAreaSetSizeRange

      public boolean rmAreaSetSizeRange(int areaID, float minFraction, float maxFraction, float minSuccessFraction)
      Sets the size of an area as a fraction, randomizing between the provided fraction.
    • rmAreaDefSetLocTeam

      public boolean rmAreaDefSetLocTeam(int areaDefID, int teamID)
      Sets the area location to a teams location for an area definition.
    • rmAreaSetSize

      public boolean rmAreaSetSize(int areaID, float minFraction, float minSuccessFraction)
      Sets the size of an area as a fraction of the total map and allows to specify a minimum fraction that is required for the area to be reached to be marked as built successfully when building it.
    • rmAreaDefSetLocPlayer

      public boolean rmAreaDefSetLocPlayer(int areaDefID, int playerID)
      Sets the area location to a player's location for an area definition.
    • rmAreaSetLocTeam

      public boolean rmAreaSetLocTeam(int areaID, int teamID)
      Sets the area location to a teams location.
    • rmAreaDefSetLoc

      public boolean rmAreaDefSetLoc(int areaDefID, Vector loc)
      Sets the area location for an area definition.
    • rmAreaSetLocPlayer

      public boolean rmAreaSetLocPlayer(int areaID, int playerID)
      Sets the area location to a player's location.
    • rmAreaDefSetParent

      public boolean rmAreaDefSetParent(int areaDefID, int parentAreaID)
      Sets an areas parent area to which the areas from this def are restricted to; If you can, use this instead of an area constraint for performance.
    • rmAreaSetLoc

      public boolean rmAreaSetLoc(int areaID, Vector loc)
      Sets the area location.
    • rmAreaCreate

      public int rmAreaCreate(String name)
      Creates a new area.
    • rmAreaSetParent

      public boolean rmAreaSetParent(int areaID, int parentAreaID)
      Sets an areas parent area to which the area is restricted to; If you can, use this instead of an area constraint for performance.
    • rmAreaGetID

      public int rmAreaGetID(String name)
      Gets the area ID for a given area name.
    • rmAreaGetName

      public String rmAreaGetName(int areaID)
      Gets the name for a given area ID.
    • rmCreatePathDistanceConstraint

      public int rmCreatePathDistanceConstraint(int pathID, float minDist, String name)
      Creates a constraint to avoid a path by at least a given a distance (in meters).
    • rmCreatePathMaxDistanceConstraint

      public int rmCreatePathMaxDistanceConstraint(int pathID, float maxDist, String name)
      Creates a constraint to make something remain within a distance (in meters) of a path.
    • rmCreateWaterDistanceConstraint

      public int rmCreateWaterDistanceConstraint(boolean hasWater, float minDist, String name)
      Creates a constraint to avoid terrain that does (not) have water (shallow and impassable).
    • rmCreateWaterMaxDistanceConstraint

      public int rmCreateWaterMaxDistanceConstraint(boolean hasWater, float maxDist, String name)
      Creates a constraint to make something remain within a distance (in meters) of terrain that does (not) have water (shallow and impassable).
    • rmCreateTerrainTypeDistanceConstraint

      public int rmCreateTerrainTypeDistanceConstraint(int terrainID, float minDist, String name)
      Creates a constraint to avoid terrain of the specified type.
    • rmCreateTerrainTypeMaxDistanceConstraint

      public int rmCreateTerrainTypeMaxDistanceConstraint(int terrainID, float maxDist, String name)
      Creates a constraint to make something remain within a distance (in meters) of a terrain type.
    • rmCreateLocDistanceConstraint

      public int rmCreateLocDistanceConstraint(Vector loc, float minDist, String name)
      Creates a constraint that requires valid tiles to avoid a location by at least the given distance.
    • rmCreateLocMaxDistanceConstraint

      public int rmCreateLocMaxDistanceConstraint(Vector loc, float maxDist, String name)
      Creates a constraint that requires valid tiles to be within a given disance to the specified location.
    • rmAreaDefSetCliffSideSheernessThreshold

      public boolean rmAreaDefSetCliffSideSheernessThreshold(int areaDefID, float sheernessAngleThresh)
      Sets the minimum slope (angle in radians) a cliff side tile must have to be considered as a sheer tile instead (radians within [0, PI/2]).
    • rmAreaSetCliffSideRadius

      public boolean rmAreaSetCliffSideRadius(int areaID, int innerRadius, int outerRadius)
      Sets the inner and outer radius in tiles to consider as cliff edge for an area (extending the area outwards if necessary, ignoring any constraints).
    • rmAreaDefSetCliffType

      public boolean rmAreaDefSetCliffType(int areaDefID, int cliffID)
      Sets the cliff type for an area definition.
    • rmAreaSetCliffSideSheernessThreshold

      public boolean rmAreaSetCliffSideSheernessThreshold(int areaID, float sheernessAngleThresh)
      Sets the minimum slope (angle in radians) a cliff side tile must have to be considered as a sheer tile instead (radians within [0, PI/2]).
    • rmAreaDefAddCliffOuterLayerConstraint

      public boolean rmAreaDefAddCliffOuterLayerConstraint(int areaDefID, int constraintID, float bufferDist)
      Adds a constraint that the outer cliff layers have to satisfy to get painted; Useful when building cliffs into other cliffs.
    • rmAreaSetCliffType

      public boolean rmAreaSetCliffType(int areaID, int cliffID)
      Sets the cliff type for an area.
    • rmAreaDefAddCliffEdgeConstraint

      public boolean rmAreaDefAddCliffEdgeConstraint(int areaDefID, int typeID, int constraintID, float bufferDist)
      Converts a cliff edge tile to the provided type if all constraints for that type pass (otherwise the default type is used); Priority is none, ramp, side.
    • rmAreaAddCliffOuterLayerConstraint

      public boolean rmAreaAddCliffOuterLayerConstraint(int areaID, int constraintID, float bufferDist)
      Adds a constraint that the outer cliff layers have to satisfy to get painted; Useful when building cliffs into other cliffs.
    • rmAreaDefAddTerrainConstraint

      public boolean rmAreaDefAddTerrainConstraint(int areaDefID, int constraintID, float bufferDist)
      Adds a constraint that a tile must pass for terrain to be painted in this area.
    • rmAreaAddCliffEdgeConstraint

      public boolean rmAreaAddCliffEdgeConstraint(int areaID, int typeID, int constraintID, float bufferDist)
      Converts a cliff edge tile to the provided type if all constraints for that type pass (otherwise the default type is used); Priority is none, ramp, side.
    • rmAreaDefAddForestConstraint

      public boolean rmAreaDefAddForestConstraint(int areaDefID, int constraintID, float bufferDist)
      Adds a constraint that a tile must pass for terrain to be painted in this area.
    • rmAreaAddTerrainConstraint

      public boolean rmAreaAddTerrainConstraint(int areaID, int constraintID, float bufferDist)
      Adds a constraint that a tile must pass for forest to be painted in this area.
    • rmAreaDefSetForestUnderbrushDensity

      public boolean rmAreaDefSetForestUnderbrushDensity(int areaDefID, float frequency)
      Sets the probability to place underbrush on forest underbrush tiles in an area definition.
    • rmAreaAddForestConstraint

      public boolean rmAreaAddForestConstraint(int areaID, int constraintID, float bufferDist)
      Adds a constraint that a tile must pass for forest to be painted in this area.
    • rmAreaDefSetForestTreeDensity

      public boolean rmAreaDefSetForestTreeDensity(int areaDefID, float density)
      Sets the probability to place a tree on forest tree tiles in an area definition.
    • rmAreaSetForestUnderbrushDensity

      public boolean rmAreaSetForestUnderbrushDensity(int areaID, float frequency)
      Sets the probability to place underbrush on forest underbrush tiles in an area.
    • rmAreaDefSetForestType

      public boolean rmAreaDefSetForestType(int areaDefID, int forestID)
      Sets the forest type for an area definition.
    • rmAreaSetForestTreeDensity

      public boolean rmAreaSetForestTreeDensity(int areaID, float density)
      Sets the probability to place a tree on forest tree tiles in an area.
    • rmAreaDefSetWaterPaintTerrain

      public boolean rmAreaDefSetWaterPaintTerrain(int areaDefID, boolean paintEdges)
      If set to true, the water edge terrain (beaches/shores) will be painted for water painted by this area def.
    • rmAreaSetForestType

      public boolean rmAreaSetForestType(int areaID, int forestID)
      Sets the forest type for an area.
    • rmAreaDefSetWaterDepth

      public boolean rmAreaDefSetWaterDepth(int areaDefID, float depth)
      Sets the water depth to be used (0.0f) for the water painted by this area def.
    • rmAreaSetWaterPaintTerrain

      public boolean rmAreaSetWaterPaintTerrain(int areaID, boolean paintEdges)
      If set to true, the water edge terrain (beaches/shores) will be painted for water painted by this area.
    • rmAreaDefSetWaterEdgeHeight

      public boolean rmAreaDefSetWaterEdgeHeight(int areaDefID, float height, float bufferDistance)
      Sets the height of the land around the water painted by this area def (applied before the height blend); The buffer distance determines the width of the land around the water.
    • rmAreaSetWaterDepth

      public boolean rmAreaSetWaterDepth(int areaID, float depth)
      Sets the water depth to be used (0.0f) for the water painted by this area.
    • rmAreaDefSetWaterHeightBlend

      public boolean rmAreaDefSetWaterHeightBlend(int areaDefID, int filterID, float smoothDistance, int numPasses)
      Sets the height blend to be applied at the edge of the water painted by this area def up to a given distance away from the edge.
    • rmAreaSetWaterEdgeHeight

      public boolean rmAreaSetWaterEdgeHeight(int areaID, float height, float bufferDistance)
      Sets the height of the land around the water painted by this area (applied before the height blend); The buffer distance determines the width of the land around the water.
    • rmAreaDefSetWaterHeight

      public boolean rmAreaDefSetWaterHeight(int areaDefID, float height, int heightType)
      Sets the level up to which water will be painted for the area def; The type defines whether the provided value is absolute, or whether the minimum, average, or maximum height of the area should be used as an offset instead.
    • rmAreaSetWaterHeightBlend

      public boolean rmAreaSetWaterHeightBlend(int areaID, int filterID, float smoothDistance, int numPasses)
      Sets the height blend to be applied at the edge of the water painted by this area up to a given distance away from the edge.
    • rmAreaDefSetWaterType

      public boolean rmAreaDefSetWaterType(int areaDefID, int waterID)
      Sets the water type for an area definition.
    • rmAreaSetWaterHeight

      public boolean rmAreaSetWaterHeight(int areaID, float height, int heightType)
      Sets the level up to which water will be painted for the area; The type defines whether the provided value is absolute, or whether the minimum, average, or maximum height of the area should be used as an offset instead.
    • rmAreaDefSetMix

      public boolean rmAreaDefSetMix(int areaDefID, int mixID)
      Sets the mix for an area definition, overriding the terrain type if set.
    • rmAreaSetWaterType

      public boolean rmAreaSetWaterType(int areaID, int waterID)
      Sets the water type for an area.
    • rmAreaDefSetEdgeSmoothDistance

      public boolean rmAreaDefSetEdgeSmoothDistance(int areaDefID, int smoothDistance, boolean smoothOnMapEdge)
      Sets an area definitions edge smoothing distance.
    • rmAreaSetHeight

      public boolean rmAreaSetHeight(int areaID, float height)
      Sets the height for an area.
    • rmAreaDefSetCoherenceSquare

      public boolean rmAreaDefSetCoherenceSquare(int areaDefID, boolean useSquareCoherence)
      Uses square instead of circular coherence, making areas grow as a square instead of a circle.
    • rmAreaSetEdgeSmoothDistance

      public boolean rmAreaSetEdgeSmoothDistance(int areaID, int smoothDistance, boolean smoothOnMapEdge)
      Sets an areas edge smoothing distance.
    • rmAreaDefSetCoherence

      public boolean rmAreaDefSetCoherence(int areaDefID, float coherence, float minDistThresh)
      Sets the area definition coherence between 0.0 (randomly) and 1.0 (circular); If minDistThresh is set, coherence is only applied to tiles further away than the threshold (with 1.0 being used otherwise).
    • rmAreaSetCoherenceSquare

      public boolean rmAreaSetCoherenceSquare(int areaID, boolean useSquareCoherence)
      Uses square instead of circular coherence, making areas grow as a square instead of a circle.
    • rmAreaDefSetBlobDistance

      public boolean rmAreaDefSetBlobDistance(int areaDefID, float minDist, float maxDist)
      Sets the minimum and maximum distance blobs can be from the center of areas from a definition.
    • rmAreaSetCoherence

      public boolean rmAreaSetCoherence(int areaID, float coherence, float minDistThresh)
      Sets the area coherence between 0.0 (randomly) and 1.0 (circular); If minDistThresh is set, coherence is only applied to tiles further away than the threshold (with 1.0 being used otherwise).
    • rmAreaDefSetBlobs

      public boolean rmAreaDefSetBlobs(int areaDefID, int minBlobs, int maxBlobs)
      Sets the minimum and maximum number of blobs for an area definition.
    • rmAreaSetBlobDistance

      public boolean rmAreaSetBlobDistance(int areaID, float minDist, float maxDist)
      Sets the minimum and maximum distance blobs can be from the center of an area.
    • rmAreaDefAddInfluenceSegment

      public boolean rmAreaDefAddInfluenceSegment(int areaDefID, Vector startLoc, Vector endLoc)
      Adds an influence segment for an area definition to expand within/towards.
    • rmAreaSetBlobs

      public boolean rmAreaSetBlobs(int areaID, int minBlobs, int maxBlobs)
      Sets the minimum and maximum number of blobs for an area.
    • rmAreaDefAddInfluencePoint

      public boolean rmAreaDefAddInfluencePoint(int areaDefID, Vector loc)
      Adds an influence point for an area definition to grow towards.
    • rmAreaAddInfluenceSegment

      public boolean rmAreaAddInfluenceSegment(int areaID, Vector startLoc, Vector endLoc)
      Adds an influence segment for an area to expand within/towards.
    • rmAreaDefSetCliffPaintInsideAsSide

      public boolean rmAreaDefSetCliffPaintInsideAsSide(int areaDefID, boolean paintTopAsSide)
      If set, the inside of a cliff will be painted with side terrain instead.
    • rmAreaAddInfluencePoint

      public boolean rmAreaAddInfluencePoint(int areaID, Vector loc)
      Adds an influence point for an area to grow towards.
    • rmAreaDefSetCliffRampSteepness

      public boolean rmAreaDefSetCliffRampSteepness(int areaDefID, float rampSteepness)
      Sets an area definitions cliff ramp steepness.
    • rmAreaSetCliffPaintInsideAsSide

      public boolean rmAreaSetCliffPaintInsideAsSide(int areaID, boolean paintTopAsSide)
      If set, the inside of a cliff will be painted with side terrain instead.
    • rmAreaDefAddCliffRampAtAngle

      public boolean rmAreaDefAddCliffRampAtAngle(int areaDefID, float fraction, float angle)
      Adds a ramp to the cliff centered at the given angle with the given fraction of the cliff area circumference.
    • rmAreaSetCliffRampSteepness

      public boolean rmAreaSetCliffRampSteepness(int areaID, float rampSteepness)
      Sets an areas cliff ramp steepness.
    • rmAreaDefSetCliffRamps

      public boolean rmAreaDefSetCliffRamps(int areaDefID, int count, float size, float variance, float spacing, float angle)
      Adds ramps with the given size, variance, and spacing centering around the given angle to the cliff.
    • rmAreaAddCliffRampAtAngle

      public boolean rmAreaAddCliffRampAtAngle(int areaID, float fraction, float angle)
      Adds a ramp to the cliff centered at the given angle with the given fraction of the cliff area circumference.
    • rmAreaDefSetHeightFactors

      public boolean rmAreaDefSetHeightFactors(int areaDefID, float oneTileFactor, float twoTilesFactor, float threeTilesFactor, float fourTilesFactor)
      Defines the factor to apply to the height of each cliff tile vertex depending on how many cliff tiles the vertex is part of.
    • rmAreaSetCliffRamps

      public boolean rmAreaSetCliffRamps(int areaID, int count, float size, float variance, float spacing, float angle)
      Adds ramps with the given size, variance, and spacing centering around the given angle to the cliff.
    • rmAreaDefSetCliffEmbellishmentDensity

      public boolean rmAreaDefSetCliffEmbellishmentDensity(int areaDefID, float density)
      Sets the embellishment density for all cliff layers.
    • rmAreaSetHeightFactors

      public boolean rmAreaSetHeightFactors(int areaID, float oneTileFactor, float twoTilesFactor, float threeTilesFactor, float fourTilesFactor)
      Defines the factor to apply to the height of each tile vertex depending on how many tiles the vertex is part of.
    • rmAreaDefSetCliffLayerEmbellishmentDensity

      public boolean rmAreaDefSetCliffLayerEmbellishmentDensity(int areaDefID, int layer, float density)
      Sets the embellishment density for the specified cliff layer.
    • rmAreaSetCliffEmbellishmentDensity

      public boolean rmAreaSetCliffEmbellishmentDensity(int areaID, float density)
      Sets the embellishment density for all cliff layers.
    • rmAreaDefSetCliffLayerPaint

      public boolean rmAreaDefSetCliffLayerPaint(int areaDefID, int layer, boolean doPaint)
      Sets whether or not to paint the given cliff layer.
    • rmAreaSetCliffLayerEmbellishmentDensity

      public boolean rmAreaSetCliffLayerEmbellishmentDensity(int areaID, int layer, float density)
      Sets the embellishment density for the specified cliff layer.
    • rmAreaDefSetCliffSideRadius

      public boolean rmAreaDefSetCliffSideRadius(int areaDefID, int innerRadius, int outerRadius)
      Sets the inner and outer radius in tiles to consider as cliff edge for an area definition (extending the area outwards if necessary, ignoring any constraints).
    • rmAreaSetCliffLayerPaint

      public boolean rmAreaSetCliffLayerPaint(int areaID, int layer, boolean doPaint)
      Sets whether or not to paint the given cliff layer.
    • rmAreaDefSetOriginConstraintBuffer

      public boolean rmAreaDefSetOriginConstraintBuffer(int areaDefID, float minBufferDist, float maxBufferDist)
      Sets an override for the min/max origin constraint buffers in meters for the given area.
    • rmAreaAddHeightConstraint

      public boolean rmAreaAddHeightConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
      Adds the specified constraint to the areas height constraints, ignoring tiles that do not pass all constraints when setting the height.
    • rmAreaDefAddOriginConstraint

      public boolean rmAreaDefAddOriginConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
      Adds the specified constraint to the areas origin (the first tile the area grows from) for the given area definition.
    • rmAreaSetOriginConstraintBuffer

      public boolean rmAreaSetOriginConstraintBuffer(int areaID, float minBufferDist, float maxBufferDist)
      Sets an override for the min/max origin constraint buffers in meters for the given area.
    • rmAreaDefSetConstraintBuffer

      public boolean rmAreaDefSetConstraintBuffer(int areaDefID, float minBufferDist, float maxBufferDist)
      Sets an override for the min/max constraint buffers in meters for the given area definition.
    • rmAreaAddOriginConstraint

      public boolean rmAreaAddOriginConstraint(int areaID, int constraintID, float minBufferDist, float maxBufferDist)
      Adds the specified constraint to the areas origin (the first tile the area grows from).
    • rmAreaDefAddConstraint

      public boolean rmAreaDefAddConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
      Adds the specified constraint to the area definition.
    • rmAreaSetConstraintBuffer

      public boolean rmAreaSetConstraintBuffer(int areaID, float minBufferDist, float maxBufferDist)
      Sets an override for the min/max constraint buffers in meters for the given area.
    • rmAreaDefSetPathSegment

      public boolean rmAreaDefSetPathSegment(int areaDefID, int pathID, int segmentIdx, float minWidthMeters, float extraWidthMeters)
      Sets an area derived from an area def to follow a segment (between two waypoints) of a previously built path. Will perfectly expand the area along the path by minWidthMeters and randomly build extraWidthMeters on top of that.
    • rmAreaAddConstraint

      public boolean rmAreaAddConstraint(int areaID, int constraintID, float minBufferDist, float maxBufferDist)
      Adds the specified constraint to the area.
    • rmAreaDefSetPath

      public boolean rmAreaDefSetPath(int areaDefID, int pathID, float minWidthMeters, float extraWidthMeters)
      Sets an area derived from an area def to follow a previously built path. Will perfectly expand the area along the path by minWidthMeters and randomly build extraWidthMeters on top of that.
    • rmAreaSetPathSegment

      public boolean rmAreaSetPathSegment(int areaID, int pathID, int segmentIdx, float minWidthMeters, float extraWidthMeters)
      Sets an area to follow a segment (between two waypoints) of a previously built path. Will perfectly expand the area along the path by minWidthMeters and randomly build extraWidthMeters on top of that.
    • rmAreaDefAddRemoveType

      public boolean rmAreaDefAddRemoveType(int areaDefID, int typeID)
      Adds a unit type to remove from tiles that lie inside areas of the given definition.
    • rmAreaSetPath

      public boolean rmAreaSetPath(int areaID, int pathID, float minWidthMeters, float extraWidthMeters)
      Sets an area to follow a previously built path. Will perfectly expand the area along the path by minWidthMeters and randomly build extraWidthMeters on top of that.
    • rmAreaDefSetReveal

      public boolean rmAreaDefSetReveal(int areaDefID, int tiles)
      Sets areas created from the given area definition to be revealed (1 means dont reveal, 0 means reveal, 0 means reveal plus that number of extra tiles.
    • rmAreaAddRemoveType

      public boolean rmAreaAddRemoveType(int areaID, int typeID)
      Adds a unit type to remove from tiles that lie inside the area.
    • rmAreaDefSetHeightNoiseBias

      public boolean rmAreaDefSetHeightNoiseBias(int areaDefID, float bias)
      Sets the area definitions elevation variation noise bias (-1 means down only, 0 means down and up equally, 1 means up only).
    • rmAreaSetReveal

      public boolean rmAreaSetReveal(int areaID, int tiles)
      Sets the area to be revealed (1 means dont reveal, 0 means reveal, 0 means reveal plus that number of extra tiles.
    • rmAreaDefSetHeightNoiseEdgeFalloffDist

      public boolean rmAreaDefSetHeightNoiseEdgeFalloffDist(int areaDefID, float dist)
      Sets the area definitions elevation noise to falloff as it gets closer to the areas edge.
    • rmAreaSetHeightNoiseBias

      public boolean rmAreaSetHeightNoiseBias(int areaID, float bias)
      Sets the areas elevation variation noise bias (-1 means down only, 0 means down and up equally, 1 means up only).
    • rmAreaDefSetHeightNoise

      public boolean rmAreaDefSetHeightNoise(int areaID, int type, float amplitude, float baseFrequency, int octaves, float persistence)
      Adds height noise to the area; Noise types can be cNoiseFractalSum or cNoiseTurbulence, the latter generating more random Perlin noise.
    • rmAreaSetHeightNoiseEdgeFalloffDist

      public boolean rmAreaSetHeightNoiseEdgeFalloffDist(int areaID, float dist)
      Sets the areas elevation noise to falloff as it gets closer to the areas edge.
    • rmAreaDefAddHeightBlendExpansionConstraint

      public boolean rmAreaDefAddHeightBlendExpansionConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
      Adds a constraint to the height blend with the given index to an area that will be used when blending with tiles reached by expanding.
    • rmAreaSetHeightNoise

      public boolean rmAreaSetHeightNoise(int areaID, int type, float amplitude, float baseFrequency, int octaves, float persistence)
      Adds height noise to the area; Noise types can be cNoiseFractalSum or cNoiseTurbulence, the latter generating more random Perlin noise.
    • rmAreaDefAddHeightBlendConstraint

      public boolean rmAreaDefAddHeightBlendConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
      Adds a constraint to the height blend with the given index to an area def.
    • rmAreaAddHeightBlendExpansionConstraint

      public boolean rmAreaAddHeightBlendExpansionConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
      Adds a constraint to the height blend with the given index to an area that will be used when blending with tiles reached by expanding.
    • rmAreaDefAddHeightBlend

      public int rmAreaDefAddHeightBlend(int areaID, int blendType, int filterID, int expansionTiles, int numPasses, boolean incrementalExpansion, boolean blendBeforePaint)
      Adds blending parameters that define how smoothly area height blends into its surroundings; Multipleblending instances can be applied to an area.
    • rmAreaAddHeightBlendConstraint

      public boolean rmAreaAddHeightBlendConstraint(int areaID, int blendIdx, int constraintID, float bufferDist)
      Adds a constraint to the height blend with the given index to an area.
    • rmAreaDefSetHeightRelative

      public boolean rmAreaDefSetHeightRelative(int areaDefID, float height)
      Sets the relative height for an area definition.
    • rmAreaAddHeightBlend

      public int rmAreaAddHeightBlend(int areaID, int blendType, int filterID, int expansionTiles, int numPasses, boolean incrementalExpansion, boolean blendAfterPaint)
      Adds blending parameters that define how smoothly area height blends into its surroundings; Multipleblending instances can be applied to an area.
    • rmAreaDefSetHeight

      public boolean rmAreaDefSetHeight(int areaDefID, float height)
      Sets the height for an area definition.
    • rmAreaSetHeightRelative

      public boolean rmAreaSetHeightRelative(int areaID, float height)
      Sets the relative height for an area.
    • rmGetClosestLoc

      public Vector rmGetClosestLoc(Vector loc, float maxDistance, boolean additiveConstraints)
      Finds the closest loc to another loc, satisfying the previously added constraints; If additiveConstraints is set to false, only one constraint has to evaluate to true for a tile to be accepted.
    • rmClearClosestLocConstraints

      public void rmClearClosestLocConstraints()
      Clears the constraints for the closest loc finder.
    • rmAreaDefSetAvoidSelfDistance

      public boolean rmAreaDefSetAvoidSelfDistance(int areaDefID, float distance, float bufferDistance)
      Sets the distance that all areas created by this definition should avoid each other by.
    • rmAddClosestLocConstraint

      public boolean rmAddClosestLocConstraint(int constraintID, float bufferDist)
      Adds a constraint to the closest point finder, optionally extending (or shrinking) it by the given buffer.
    • rmAreaDefGetCreatedAreas

      public int[] rmAreaDefGetCreatedAreas(int areaDefID)
      Gets all area IDs created by this area definition.
    • rmAreaDefGetNumberCreatedAreas

      public int rmAreaDefGetNumberCreatedAreas(int areaDefID)
      Gets the number of areas created by this area definition.
    • rmAreaDefCreateAndBuildAreas

      public int[] rmAreaDefCreateAndBuildAreas(int areaDefID, int numAreas, boolean doPaint, boolean buildConcurrently)
      Creates multiple areas from an area definiton and builds them; If a name override is provided that name is used incrementally, otherwise the name of the area definition followed by the number of areas created with the definition so far is used.
    • rmAreaDefGetCreatedArea

      public int rmAreaDefGetCreatedArea(int areaDefID, int index)
      Gets the ID of the ith area created by this area definition.
    • rmAreaDefCreateArea

      public int rmAreaDefCreateArea(int areaDefID, String nameOverride)
      Creates an area from an area definiton; If a name override is provided that name is used, otherwise the name of the area definition followed by the number of areas created with the definition so far is used.
    • rmAreaDefCreateAreas

      public int[] rmAreaDefCreateAreas(int areaDefID, int numAreas, String nameOverride)
      Creates multiple areas from an area definiton; If a name override is provided that name is used incrementally, otherwise the name of the area definition followed by the number of areas created with the definition so far is used.
    • rmAreaDefGetID

      public int rmAreaDefGetID(String name)
      Gets the area definition ID for a given area definiton name.
    • rmAreaDefGetName

      public String rmAreaDefGetName(int areaDefID)
      Gets the name for a given area definition ID.
    • rmAreaGetClosestLoc

      public Vector rmAreaGetClosestLoc(int areaID, Vector loc, int[] constraintIDs)
      Returns the loc fraction of the tile of an area that's closest to the given loc, optionally requiring that it passes the given constraints.
    • rmAreaDefCreate

      public int rmAreaDefCreate(String name)
      Creates a new area definition.
    • rmAreaGetTiles

      public Vector[] rmAreaGetTiles(int areaID)
      Returns the tiles of an area as an array of vectors of tile coordinates (not meters).
    • rmAreaGetBuildState

      public int rmAreaGetBuildState(int areaID)
      Gets the build state of an area (not started, failed, incomplete, success).
    • rmAreaGetLoc

      public Vector rmAreaGetLoc(int areaID)
      Gets the fractions of a an areas (origin) location.
    • rmAreaGetTileCount

      public int rmAreaGetTileCount(int areaID)
      Gets the number of tiles of a built area.
    • rmAreaPaintMany

      public void rmAreaPaintMany(int[] areaIDs)
      Paints the given areas (must be built first).
    • rmAreaPaintAll

      public int[] rmAreaPaintAll()
      Paints all unpainted (but built) areas.
    • rmAreaBuildAll

      public int[] rmAreaBuildAll(boolean doPaint, boolean buildConcurrently)
      Builds all unbuilt areas, returning an array of the IDs of all areas processed.
    • rmAreaPaint

      public boolean rmAreaPaint(int areaID)
      Paints the specified area (must be built first).
    • rmAreaBuild

      public boolean rmAreaBuild(int areaID, boolean doPaint)
      Builds the specified area, returning true if the minimum number of tiles has been reached.
    • rmAreaBuildMany

      public void rmAreaBuildMany(int[] areaIDs, boolean doPaint, boolean buildConcurrently)
      Builds the given areas.
    • rmAreaSetFailed

      public boolean rmAreaSetFailed(int areaID)
      Marks an area as failed if building has not started yet, meaning it cannot be built anymore and will not be considered by rmAreaBuildAll().
    • rmAreaSetPainted

      public boolean rmAreaSetPainted(int areaID)
      Marks an area as painted, meaning it cannot be painted and will not be considered by rmAreaBuildAll() or rmAreaPaintAll().
    • rmAreaFindOriginLocClosestToLoc

      public boolean rmAreaFindOriginLocClosestToLoc(int areaID, Vector loc, float maxDistMeters)
      (Re)randomizes the areas origin tile, trying to find the tile that is closest to the provided location while still satisfying the (origin) constraints; Returnstrue if one has been found successfully and false otherwise.
    • rmAreaFindOriginLocFurthestFromLoc

      public boolean rmAreaFindOriginLocFurthestFromLoc(int areaID, Vector loc, float maxDistMeters)
      (Re)randomizes the areas origin tile, trying to find the tile that is furthest from the provided location while still satisfying the (origin) constraints; Returnstrue if one has been found successfully and false otherwise; Keep maxDist small or this may be very slow.
    • rmAreaDefSetWarnOnBuildFailure

      public boolean rmAreaDefSetWarnOnBuildFailure(int areaDefID, int minAcceptedState)
      Makes the debugger break with a warning if an area derived from this area def does not reach at least the specified build state (failed -> incomplete -> complete).
    • rmAreaFindOriginLoc

      public boolean rmAreaFindOriginLoc(int areaID)
      (Re)randomizes the areas origin tile, returning true if one has been found successfully and false otherwise; If not called previously, building the area will also call this.
    • rmAreaDefAddHeightConstraint

      public boolean rmAreaDefAddHeightConstraint(int areaDefID, int constraintID, float minBufferDist, float maxBufferDist)
      Adds the specified constraint to the areas height constraints, ignoring tiles that do not pass all constraints when setting the height.
    • rmAreaSetWarnOnBuildFailure

      public boolean rmAreaSetWarnOnBuildFailure(int areaID, int minAcceptedState)
      Makes the debugger break with a warning if the area does not reach at least the specified build state (failed -> incomplete -> complete).
    • rmObjectPlaceInArea

      public boolean rmObjectPlaceInArea(int objectID, int playerID, int areaID, boolean ignoreConstraints)
      Place object for the player in the given area.
    • rmObjectDefPlaceInArea

      public int[] rmObjectDefPlaceInArea(int objectDefID, int playerID, int areaID, int count, boolean ignoreConstraints)
      Place object def for the player in the given area.
    • rmObjectPlaceAtArea

      public boolean rmObjectPlaceAtArea(int objectID, int playerID, int areaID, float minDist, float maxDist, boolean squareRadius, boolean ignoreConstraints)
      Place object for the player at the given areas location.
    • rmObjectDefPlaceAtArea

      public int[] rmObjectDefPlaceAtArea(int objectDefID, int playerID, int areaID, float minDist, float maxDist, int count, boolean squareRadius, boolean ignoreConstraints)
      Place object def for the player at the given areas location.
    • rmObjectPlaceAtLoc

      public boolean rmObjectPlaceAtLoc(int objectID, int playerID, Vector loc, float minDist, float maxDist, boolean squareRadius, boolean ignoreConstraints)
      Place object at specific location for given player.
    • rmObjectDefPlaceAtLoc

      public int[] rmObjectDefPlaceAtLoc(int objectDefID, int playerID, Vector loc, float minDist, float maxDist, int count, boolean squareRadius, boolean ignoreConstraints)
      Place object def at specific location for given player.
    • rmObjectPlaceAnywhere

      public boolean rmObjectPlaceAnywhere(int objectID, int playerID, boolean ignoreConstraints)
      Place object anywhere on the map for given player.
    • rmObjectDefPlaceAnywhere

      public int[] rmObjectDefPlaceAnywhere(int objectID, int playerID, int count, boolean ignoreConstraints)
      Place object def anywhere on the map for given player.
    • rmObjectSetItemPlaceAnywhere

      public boolean rmObjectSetItemPlaceAnywhere(int objectID, int itemIdx, boolean placeAnywhere)
      Ignores placement restrictions when placing the item at the given index for an object.
    • rmObjectDefSetItemPlaceAnywhere

      public boolean rmObjectDefSetItemPlaceAnywhere(int objectID, int itemIdx, boolean placeAnywhere)
      Ignores placement restrictions when placing the item at the given index for an object def.
    • rmObjectPlaceNearLoc

      public boolean rmObjectPlaceNearLoc(int objectID, int playerID, Vector loc, float maxDistMeters)
      Place object at specific location for given player, flooding outwards until a valid tile has been found.
    • rmObjectDefPlaceNearLoc

      public int[] rmObjectDefPlaceNearLoc(int objectDefID, int playerID, Vector loc, float maxDistMeters, int count)
      Place object def at specific location for given player, flooding outwards until the given distance (or all objects have been placed).
    • rmObjectGetConstraint

      public int rmObjectGetConstraint(int objectID, int idx)
      Get the constraint ID at a given index for an object.
    • rmObjectDefGetConstraint

      public int rmObjectDefGetConstraint(int objectDefID, int idx)
      Get the constraint ID at a given index for an object def.
    • rmObjectGetNumberConstraints

      public int rmObjectGetNumberConstraints(int objectID)
      Get the number of constraints that have been added to an object.
    • rmObjectDefGetNumberConstraints

      public int rmObjectDefGetNumberConstraints(int objectDefID)
      Get the number of constraints that have been added to an object def.
    • rmObjectAddConstraint

      public boolean rmObjectAddConstraint(int objectID, int constraintID, float bufferDist)
      Adds the specified constraint to the given object.
    • rmObjectDefAddConstraint

      public boolean rmObjectDefAddConstraint(int objectDefID, int constraintID, float bufferDist)
      Adds the specified constraint to the given object definition.
    • rmObjectSetItemVariation

      public boolean rmObjectSetItemVariation(int objectID, int itemIdex, int variation)
      Sets variation type (0 being the first variation) for the item at the given index for an object.
    • rmObjectDefSetItemVariation

      public boolean rmObjectDefSetItemVariation(int objectDefID, int itemIdex, int variation)
      Sets variation type (0 being the first variation) for the item at the given index for an object def.
    • rmObjectSetItemRotation

      public boolean rmObjectSetItemRotation(int objectID, int itemIdex, int rotationType, float rotationAngle)
      Sets the rotation type and angle (only for the custom angle rotation type) for the item at the given index for an object.
    • rmObjectDefSetItemRotation

      public boolean rmObjectDefSetItemRotation(int objectDefID, int itemIdex, int rotationType, float rotationAngle)
      Sets the rotation type and angle (only for the custom angle rotation type) for the item at the given index for an object def.
    • rmObjectDefAddItem

      public int rmObjectDefAddItem(int objectDefID, int protoID, int count, float minClusterDist, float maxClusterDist)
      Adds an item by proto ID to the object definition.
    • rmObjectDefAddItemRange

      public int rmObjectDefAddItemRange(int objectDefID, int protoID, int minCount, int maxCount, float minClusterDist, float maxClusterDist)
      Adds an item by proto ID to the object definition, randomizing between min/max when deriving an object from this definition.
    • rmObjectDefGetNumberCreatedObjects

      public int rmObjectDefGetNumberCreatedObjects(int objectDefID)
      Returns the number of objects created (not necessarily placed successfully) by this object definition.
    • rmObjectAddItem

      public int rmObjectAddItem(int objectID, int protoID, int count, float minClusterDist, float maxClusterDist)
      Adds an item by proto ID to the object.
    • rmObjectDefGetCreatedObject

      public int rmObjectDefGetCreatedObject(int objectDefID, int index)
      Gets the ID of the ith object created by this object definition.
    • rmObjectDefGetCreatedObjects

      public int[] rmObjectDefGetCreatedObjects(int objectDefID)
      Gets all object IDs created by this object definition.
    • rmObjectDefCreateObject

      public int rmObjectDefCreateObject(int objectDef, String name)
      Creates a new object from an object definition.
    • rmObjectDefCreateObjects

      public int[] rmObjectDefCreateObjects(int objectDefID, int numObjects, String nameOverride)
      Creates multiple objects from an object definiton; If a name override is provided that name is used incrementally, otherwise the name of the object definition followed by the number of objects created with the definition so far is used.
    • rmObjectDefGetName

      public String rmObjectDefGetName(int defID)
      Gets the name for a given object definition ID.
    • rmObjectDefCreate

      public int rmObjectDefCreate(String name)
      Creates a new object definition.
    • rmObjectCreate

      public int rmObjectCreate(String name)
      Creates a new object.
    • rmObjectDefGetID

      public int rmObjectDefGetID(String name)
      Gets the object definition ID for a given object definition name.
    • rmObjectGetID

      public int rmObjectGetID(String name)
      Gets the object ID for a given object name.
    • rmObjectGetName

      public String rmObjectGetName(int defID)
      Gets the name for a given object ID.
    • rmPathDefGetCreatedPath

      public int rmPathDefGetCreatedPath(int pathDefID, int index)
      Gets the ID of the ith path created by this path definition.
    • rmPathDefGetCreatedPaths

      public int[] rmPathDefGetCreatedPaths(int pathDefID)
      Gets all path IDs created by this path definition.
    • rmPathDefCreatePath

      public int rmPathDefCreatePath(int pathDefID, String nameOverride)
      Creates an path from an path definiton; If a name override is provided that name is used, otherwise the name of the path definition followed by the number of paths created with the definition so far is used.
    • rmPathDefCreatePaths

      public int[] rmPathDefCreatePaths(int pathDefID, int numPaths, String nameOverride)
      Creates multiple paths from an path definiton; If a name override is provided that name is used incrementally, otherwise the name of the path definition followed by the number of paths created with the definition so far is used.
    • rmPathDefGetID

      public int rmPathDefGetID(String name)
      Gets the path definition ID for a given path definiton name.
    • rmPathDefGetName

      public String rmPathDefGetName(int pathDefID)
      Gets the name for a given path definition ID.
    • rmPathGetNumberSegments

      public int rmPathGetNumberSegments(int pathID)
      Returns the number of segments a path has.
    • rmPathDefCreate

      public int rmPathDefCreate(String name)
      Creates a new path definition.
    • rmPathBuild

      public boolean rmPathBuild(int pathID)
      Builds a path.
    • rmPathGetTiles

      public Vector[] rmPathGetTiles(int pathID)
      Returns all tiles of a path as fractions.
    • rmPathAddConstraint

      public boolean rmPathAddConstraint(int pathID, int constraintID, float cost, float bufferDist)
      Adds a constraint which all tiles of this path have to respect. If the cost is > 0, the constraint becomes soft and the cost is added to the path cost when crossing that tile instead of marking it as impassable if the constraint fails.
    • rmPathDefAddConstraint

      public boolean rmPathDefAddConstraint(int pathDefID, int constraintID, float cost, float bufferDist)
      Adds a constraint which all tiles of a path derived from this path def have to respect. If the cost is > 0, the constraint becomes soft and the cost is added to the path cost when crossing that tile instead of marking it as impassable if the constraint fails.
    • rmPathAddWaypointConstraint

      public boolean rmPathAddWaypointConstraint(int pathID, int waypointID, int constraintID, float bufferDist)
      Adds a waypoint constraint to a path which a waypoint has to respect (useful if the waypoint is randomized one way or another).
    • rmPathDefAddWaypointConstraint

      public boolean rmPathDefAddWaypointConstraint(int pathDefID, int waypointID, int constraintID, float bufferDist)
      Adds a waypoint constraint to a path def which a waypoint has to respect (useful if the waypoint is randomized one way or another).
    • rmPathSetIgnoreStartEndConstraints

      public boolean rmPathSetIgnoreStartEndConstraints(int pathID, boolean ignoreStartEndConstraints)
      Specifies whether the start and end tile of a path should ignore constraints or not.
    • rmPathDefSetIgnoreStartEndConstraints

      public boolean rmPathDefSetIgnoreStartEndConstraints(int pathDefID, boolean ignoreStartEndConstraints)
      Specifies whether the start and end tile of a path derived from a path def should ignore constraints or not.
    • rmPathSetAllowDiagonals

      public boolean rmPathSetAllowDiagonals(int pathID, boolean allowDiagonals)
      Specifies whether a path is allowed to go diagonally. Note that areas will still always fill the diagonals (L-shape), regardless of this setting.
    • rmPathDefSetAllowDiagonals

      public boolean rmPathDefSetAllowDiagonals(int pathDefID, boolean allowDiagonals)
      Specifies whether paths derived from a path def are allowed to go diagonally. Note that areas will still always fill the diagonals (L-shape), regardless of this setting.
    • rmPathSetCostNoise

      public boolean rmPathSetCostNoise(int pathID, float minNoise, float maxNoise)
      Adds a random value in the specified range for each tile for a path, used in addition to terrain costs, distance costs, and constraint costs.
    • rmPathDefSetCostNoise

      public boolean rmPathDefSetCostNoise(int pathDefID, float minNoise, float maxNoise)
      Adds a random value in the specified range for each tile for a path def, used in addition to terrain costs, distance costs, and constraint costs.
    • rmPathSetAllTerrainCosts

      public boolean rmPathSetAllTerrainCosts(int pathID, float cost)
      Sets the cost for all terrains for a path. Note that this overwrites the cost of other terrains and should thus be used before rmPathSetTerrainCost() if you need it.
    • rmPathDefSetAllTerrainCosts

      public boolean rmPathDefSetAllTerrainCosts(int pathDefID, float cost)
      Sets the cost for all terrains for a path def. Note that this overwrites the cost of other terrains and should thus be used before rmPathSetTerrainCost() if you need it.
    • rmPathSetTerrainCost

      public boolean rmPathSetTerrainCost(int pathID, int terrainID, float cost)
      Sets the cost for a terrain for a path, used in addition to distance costs, constraint costs, and noise when building the path.
    • rmPathDefSetTerrainCost

      public boolean rmPathDefSetTerrainCost(int pathDefID, int terrainID, float cost)
      Sets the cost for a terrain for a path def, used in addition to distance costs, constraint costs, and noise when building the path.
    • rmPathAddWaypointInArea

      public int rmPathAddWaypointInArea(int pathID, int areaID, float minOriginDistMeters, float maxOriginDistMeters)
      Adds a waypoint to a path, using the origin tile of an area, optionally randomizing from within the provided range in meters relative to the origin of the area (and still inside of the area).
    • rmPathDefAddWaypointInArea

      public int rmPathDefAddWaypointInArea(int pathDefID, int areaID, float minOriginDistMeters, float maxOriginDistMeters)
      Adds a waypoint to a path, using the origin tile of an area def, optionally randomizing from within the provided range in meters relative to the origin of the area (and still inside of the area).
    • rmPathAddWaypoint

      public int rmPathAddWaypoint(int pathID, Vector loc, float minDistMeters, float maxDistMeters)
      Adds a waypoint (as a vector of fractions) to a path, optionally serving as origin to randomize a waypoint from within the provided range in meters.
    • rmPathDefAddWaypoint

      public int rmPathDefAddWaypoint(int pathDefID, Vector loc, float minDistMeters, float maxDistMeters)
      Adds a waypoint (as a vector of fractions) to a path def, optionally serving as origin to randomize a waypoint from within the provided range in meters.
    • rmPathAddRandomWaypoint

      public int rmPathAddRandomWaypoint(int pathID, float minDistFromPreviousMeters, float maxDistFromPreviousMeters)
      Adds a waypoint to a path, optionally randomizing from within the provided range in meters relative to the last waypoint.
    • rmPathDefAddRandomWaypoint

      public int rmPathDefAddRandomWaypoint(int pathDefID, float minDistFromPreviousMeters, float maxDistFromPreviousMeters)
      Adds a waypoint to a path def, optionally randomizing from within the provided range in meters relative to the last waypoint.
    • rmPathGetName

      public String rmPathGetName(int defID)
      Gets the name for a given path ID.
    • rmPathCreate

      public int rmPathCreate(String name)
      Creates a new path.
    • rmObjectGetLoc

      public Vector rmObjectGetLoc(int objectID)
      Gets the location of an object (after it has been placed).
    • rmObjectGetCentroidLoc

      public Vector rmObjectGetCentroidLoc(int objectID)
      Gets the centroid of all units placed for an object and its items.
    • rmPathGetID

      public int rmPathGetID(String name)
      Gets the path ID for a given path name.
    • rmLocGenCreateRadiusRandomizer

      public int rmLocGenCreateRadiusRandomizer()
      Creates a new radius randomizer.
    • rmLocGenSetRadiusRandomizerRadius

      public boolean rmLocGenSetRadiusRandomizerRadius(int radiusRandomizerID, float minRadius, float maxRadius)
      Sets the min/max radius in meters for a radius randomizer.
    • rmLocGenSetMaxIterations

      public boolean rmLocGenSetMaxIterations(int maxIterations)
      Sets the maximum number of iterations the location generator will run for before giving up.
    • rmLocGenSetDistStrictness

      public boolean rmLocGenSetDistStrictness(float strictnessThresh)
      Sets a threshold (0-1) for a fraction of iterations after which the location generator will start to loosen the set distance for locs to avoid themselves (e.g., 0.1 -> after 10% of the iterations, the generator will start to linearly reduce the avoidance distances). Does NOT affect constraints.
    • rmCustomCliffAddObject

      public boolean rmCustomCliffAddObject(int cliffID, int layerID, int protoID, float weight)
      Adds a proto and assigns a weight when placing it for one layer of a custom cliff.
    • rmCustomCliffAddObjectToAllLayers

      public boolean rmCustomCliffAddObjectToAllLayers(int cliffID, int protoID, float weight)
      Adds a proto and assigns a weight when placing it for a custom cliff.
    • rmCustomCliffSetMix

      public boolean rmCustomCliffSetMix(int cliffID, int layerID, int mixID, float objectDensity)
      Sets the cliff mix and object density for one layer of a custom cliff.
    • rmCustomCliffSetTerrain

      public boolean rmCustomCliffSetTerrain(int cliffID, int layerID, int terrainID, float objectDensity)
      Sets the cliff terrain and object density for one layer of a custom cliff.
    • rmCustomForestAddUnderbrushType

      public boolean rmCustomForestAddUnderbrushType(int forestID, int protoID, float weight)
      Adds an underbrush type to randomize from with the given weight to a custom forest.
    • rmCustomCliffCreate

      public int rmCustomCliffCreate(String name)
      Creates a new custom cliff.
    • rmCustomForestSetParams

      public boolean rmCustomForestSetParams(int forestID, float treeDensity, float underbrushDensity)
      Sets the tree and underbrush density parameters for a custom forest.
    • rmCustomForestAddTreeType

      public boolean rmCustomForestAddTreeType(int forestID, int protoID, float weight)
      Adds a tree type to randomize from with the given weight to a custom forest.
    • rmCustomForestSetMix

      public boolean rmCustomForestSetMix(int forestID, int mixID)
      Sets the floor mix for a custom forest.
    • rmCustomForestSetTerrain

      public boolean rmCustomForestSetTerrain(int forestID, int terrainTypeID)
      Sets the terrain type for a custom forest.
    • rmCustomMixAddObjectEntry

      public boolean rmCustomMixAddObjectEntry(int mixID, int protoID, float weight, float scaleMin, float scaleMax)
      Adds a proto object entry for the custom mix with the given ID.
    • rmCustomForestCreate

      public int rmCustomForestCreate(String name)
      Creates a new custom forest.
    • rmCustomMixAddPaintEntry

      public boolean rmCustomMixAddPaintEntry(int mixID, int terrainID, float weight)
      Adds a terrain paint entry for the custom mix with the given ID.
    • rmCustomMixSetObjectParams

      public boolean rmCustomMixSetObjectParams(int mixID, float baseWeight)
      Sets the base weight (weight to not place anything) for a custom mix.
    • rmCustomMixCreate

      public int rmCustomMixCreate(String name)
      Creates a new custom mix.
    • rmCustomMixSetPaintParams

      public boolean rmCustomMixSetPaintParams(int mixID, int mode, float freq, int octaves, float persistence)
      Sets the terrain paint parameters for the custom mix with the given ID.
    • rmWaterTypeAddBeachLayer

      public boolean rmWaterTypeAddBeachLayer(int waterID, int terrainID, float distance, float variance)
      Adds a beach layer (towards land) when painting water edges for the provided water type; Distance should increase from layer to layer.
    • rmWaterTypeAddShoreLayer

      public boolean rmWaterTypeAddShoreLayer(int waterID, int terrainID, float distance, float variance)
      Adds a shore layer (towards water) when painting water edges for the provided water type; Distance should increase from layer to layer.
    • rmSetPostGenWaterBeautification

      public void rmSetPostGenWaterBeautification(boolean beautifyWater, boolean beautifyWaterTerrain)
      Determines whether waterbodies will be expanded based on their height to fill gaps, and whether water body terrain will be repainted.
    • rmWaterTypeSetFloorTerrain

      public boolean rmWaterTypeSetFloorTerrain(int waterID, int terrainID)
      Sets the floor terrain type to use for the water type with the given ID.
    • rmSplineEvaluate

      public Vector[] rmSplineEvaluate(int splineID, int numPoints)
      Evaluates an initialzed spline in (numPoints - 1) equal intervals, resulting in numPoints interpolated points.
    • rmSplineToPaths

      public int[] rmSplineToPaths(int splineID, int numPointsPerSplineSegment, boolean allowDiagonals)
      Creates paths from splines, one between each pair of waypoints, and returns the IDs of the created paths.
    • rmSplineInitialize

      public boolean rmSplineInitialize(int splineID)
      Initializes a spline with the points added so that it can be evaluated subsequently.
    • rmSplineEvaluateAt

      public Vector rmSplineEvaluateAt(int splineID, float t)
      Evaluates an initialzed spline at time t in [0.0, 1.0].
    • rmSplineCreate

      public int rmSplineCreate(String name)
      Creates a new spline with the given name, returning the ID of the created spline.
    • rmSplineAddLoc

      public boolean rmSplineAddLoc(int splineID, Vector loc)
      Adds a loc to the spline.
    • rmSplineGetID

      public int rmSplineGetID(String name)
      Gets the spline ID for a given spline name.
    • rmSplineGetName

      public String rmSplineGetName(int defID)
      Gets the name for a given spline ID.
    • rmWallsPlaceLine

      public boolean rmWallsPlaceLine(int playerID, Vector startLoc, Vector endLoc)
      Simon TODO.
    • rmWallsPlaceSquare

      public boolean rmWallsPlaceSquare(int playerID, Vector loc, float radiusMeters)
      Simon TODO.
    • rmWallsPlace

      public boolean rmWallsPlace(int playerID, Vector[] waypoints)
      Simon TODO.
    • rmLocGenGetLoc

      public Vector rmLocGenGetLoc(int locID)
      Simon TODO.
    • rmLocGenGetExhaustion

      public float rmLocGenGetExhaustion()
      Simon TODO.
    • rmLocGenGetLocIDByOwner

      public int rmLocGenGetLocIDByOwner(int ownerID, int idx)
      Simon TODO.
    • rmLocGenGetLocOwner

      public int rmLocGenGetLocOwner(int locID)
      Simon TODO.
    • rmLocGenGetNumberLocs

      public int rmLocGenGetNumberLocs()
      Simon TODO.
    • rmLocGenGetNumberLocsByOwner

      public int rmLocGenGetNumberLocsByOwner(int ownerID)
      Simon TODO.
    • rmLocGenReset

      public boolean rmLocGenReset()
      Simon TODO.
    • rmLocGenGetTime

      public float rmLocGenGetTime()
      Simon TODO.
    • rmLocGenGenerate

      public boolean rmLocGenGenerate()
      Simon TODO.
    • rmLocGenApply

      public boolean rmLocGenApply(boolean buildAreas, boolean paintAreas)
      Simon TODO.
    • rmLocGenSetArea

      public boolean rmLocGenSetArea(int locID, int areaID)
      Simon TODO.
    • rmLocGenSetInAreaID

      public boolean rmLocGenSetInAreaID(int locID, int areaID)
      Simon TODO.
    • rmLocGenAddLocBinding

      public boolean rmLocGenAddLocBinding(int locID, int otherLocID, float minDist, float maxDist, boolean mutual)
      Simon TODO.
    • rmLocGenSetObject

      public boolean rmLocGenSetObject(int locID, int objectID, boolean placeAsNature)
      Simon TODO.
    • rmLocGenSetLocAngleRandomizer

      public boolean rmLocGenSetLocAngleRandomizer(int locID, int radiusRandomizerID)
      Simon TODO.
    • rmLocGenAddLocConstraint

      public boolean rmLocGenAddLocConstraint(int locID, int constraintID, float bufferDist)
      Simon TODO.
    • rmLocGenSetLocSquarePlacement

      public boolean rmLocGenSetLocSquarePlacement(int locID, boolean squarePlacement)
      Simon TODO.
    • rmLocGenSetLocRadiusRandomizer

      public boolean rmLocGenSetLocRadiusRandomizer(int locID, int radiusRandomizerID)
      Simon TODO.
    • rmLocGenSetLocRadiusVariance

      public boolean rmLocGenSetLocRadiusVariance(int locID, float radiusVar, boolean isAbsolute)
      Simon TODO.
    • rmLocGenSetLocAngleVariance

      public boolean rmLocGenSetLocAngleVariance(int locID, float angleVar, boolean isAbsolute)
      Simon TODO.
    • rmLocGenSetLocAngleParams

      public boolean rmLocGenSetLocAngleParams(int locID, boolean randomizeSide, boolean rotateClockwise)
      Simon TODO.
    • rmLocGenSetLocAvoidDistance

      public boolean rmLocGenSetLocAvoidDistance(int locID, float avoidDist)
      Simon TODO.
    • rmLocGenSetLocOrigin

      public boolean rmLocGenSetLocOrigin(int locID, Vector loc)
      Simon TODO.
    • rmLocGenSetLocForwardAngle

      public boolean rmLocGenSetLocForwardAngle(int locID, float forwardAngle)
      Simon TODO.
    • rmLocGenCreateLoc

      public int rmLocGenCreateLoc()
      Simon TODO.
    • rmLocGenSetLocOwner

      public boolean rmLocGenSetLocOwner(int locID, int ownerID)
      Simon TODO.
    • rmLocGenCreateAngleRandomizer

      public int rmLocGenCreateAngleRandomizer()
      Simon TODO.
    • rmLocGenAddAngleRandomizerSectorPriority

      public boolean rmLocGenAddAngleRandomizerSectorPriority(int angleRandomizerID, int startIdx, int endIdx, int priority, int incrementType, boolean isAdditive)
      Simon TODO.
    • rmSummarySetSpotlightText

      public void rmSummarySetSpotlightText(String titleText)
      Sets the spotlight text to be used in the objectives/summary screen.
    • rmSummarySetSpotlightImage

      public void rmSummarySetSpotlightImage(String path)
      Sets the path for the spotlight image to be used in the objectives/summary screen.
    • rmSummarySetGoal

      public void rmSummarySetGoal(String goalText)
      Sets the goal text to be used in the objectives screen.
    • rmSummarySetSpotlightHeader

      public void rmSummarySetSpotlightHeader(String titleText)
      Sets the spotlight title to be used in the objectives/summary screen.
    • rmObjectiveSetPlayer

      public void rmObjectiveSetPlayer(int objID, int playerID)
      Restricts the objective to the given player.
    • rmSummarySetTitle

      public void rmSummarySetTitle(String titleText)
      Sets the title text to be used in the objectives screen.
    • rmObjectiveAdd

      public int rmObjectiveAdd(String nameStr, String textStr, String hintStr, boolean isPrimary, boolean isVisible)
      Adds a map objective.
    • rmObjectiveSetTeam

      public void rmObjectiveSetTeam(int objID, int teamID)
      Restricts the objective to the given team.
    • rmTriggerCreateArmy

      public int rmTriggerCreateArmy(int playerID, String armyName)
      Simon TODO.
    • rmTriggerAddUnitsToArmy

      public boolean rmTriggerAddUnitsToArmy(int playerID, int armyID, int objectDefID)
      Simon TODO.
    • rmWallsPlaceAroundArea

      public boolean rmWallsPlaceAroundArea(int playerID, int areaID)
      Simon TODO.
    • rmTriggerAddScriptInclude

      public boolean rmTriggerAddScriptInclude(String file)
      Adds an XS trigger script to include to the trigtemp.xs trigger script; The path is relative to the trigger folder (and NOT the RM folder).
    • rmTriggerAddScriptLine

      public void rmTriggerAddScriptLine(String line)
      Adds a single line of XS code to the trigtemp.xs trigger script.
    • aiPlanSetState

      public void aiPlanSetState(int planID, int planState)
      Sets the plan state, cPlanState constants.
    • aiPlanGetIDByName

      public int aiPlanGetIDByName(String searchStr, boolean subString)
      Returns the ID of the plan with the exact searchStr name; If subString is true it will return the first plan that has the searchStr in its name.
    • aiPlanDestroy

      public void aiPlanDestroy(int planID)
      Sets the destroy flag on the plan assigned to the planID; This wont notify any potential parent plans.
    • aiPlanDestroyByName

      public void aiPlanDestroyByName(String name)
      Sets the destroy flag on the plan assigned to the planID; This wont notify any potential parent plans.
    • aiErrorMessageID

      public void aiErrorMessageID(String StringID)
      Opens up an error window with the text belonging to the stringID.
    • aiPlanCreate

      public int aiPlanCreate(String planName, int type, int parentPlanID, int outputCategoryID)
      Creates a plan with the name and type, assigns it as a child of parentPlanID if provided; outputCategoryID sets the channel it outputs to.
    • aiEchoWarning

      public void aiEchoWarning(String text)
      Adds this text to the AI Debug Output window in the "All" and "Warnings" categories; Additionally prefixes the message with "WARNING:". Makes the XSDebugger break if DebugAIScript config is set.
    • aiErrorMessage

      public void aiErrorMessage(String text)
      Opens up an error window with the text.
    • aiEcho

      public void aiEcho(String text)
      Adds this text to the AI Debug Output window in the "All" category.
    • aiEchoCategory

      public void aiEchoCategory(String text)
      Adds this text to the AI Debug Output window in the "All" category and in the provided categoryIndex.
    • aiAddEchoCategory

      public int aiAddEchoCategory(String text)
      Adds a category with the provided categoryName to the AI Debug Output window, must be a unique name. The int it returns is the ID of the new category that can be used for category output + plan creates.
    • aiPlanGetInitialPosition

      public Vector aiPlanGetInitialPosition(int planID)
      Returns the initial positon that was set for this plan.
    • aiPlanGetUnitStance

      public int aiPlanGetUnitStance(int planID)
      Return the unit stance of the given plan.
    • aiPlanGetCurrentPopulation

      public int aiPlanGetCurrentPopulation(int planID, int unitTypeID, boolean countLoans)
      Returns how much population the units in the plan are currently taking up; If unitTypeID is set to -1 it will count all units; If countLoans is set to true it will also return loaned out units.
    • aiPlanGetLocation

      public Vector aiPlanGetLocation(int planID, boolean firstUnit)
      Returns the location for this plan, which is the average position of all units; If firstUnit is true it will return the position of the unit at index 0 instead.
    • aiPlanGetUnitIDByIndex

      public int aiPlanGetUnitIDByIndex(int planID, int index)
      Iterates over all the units in the plan and returns the unitID at the given index; Use in combination with an unfiltered aiPlanGetNumberUnits to know how many indexes there are.
    • aiPlanGetUnits

      public int[] aiPlanGetUnits(int planID, int unitTypeID, boolean countLoans)
      Returns the units of unitTypeID currently assigned to the given plan; If unitTypeID is set to -1 it will instead just return all units; If countLoans is set to true it will also return loaned out units.
    • aiPlanGetNumberMaxUnits

      public int aiPlanGetNumberMaxUnits(int planID, int unitTypeID)
      Returns the number of max units for the given plan.
    • aiPlanGetNumberUnits

      public int aiPlanGetNumberUnits(int planID, int unitTypeID, boolean countLoans)
      Returns the number of unitTypeID units currently assigned to the given plan; If unitTypeID is set to -1 it will instead just return an unfiltered total; If countLoans is set to true it will count loaned out units.
    • aiPlanGetNumberNeededUnits

      public int aiPlanGetNumberNeededUnits(int planID, int unitTypeID)
      Returns the number of needed units for the given plan.
    • aiPlanGetNumberWantedUnits

      public int aiPlanGetNumberWantedUnits(int planID, int unitTypeID)
      Returns the number of wanted units for the given plan.
    • aiPlanGetPriority

      public int aiPlanGetPriority(int planID)
      Returns the priority of the given plan.
    • aiPlanGetUnitTypes

      public int[] aiPlanGetUnitTypes(int planID)
      Returns the unit types assigned to the given plan.
    • aiPlanGetParentID

      public int aiPlanGetParentID(int planID)
      Returns the parentID of the given plan.
    • aiPlanGetState

      public int aiPlanGetState(int planID)
      Returns the state of the given plan.
    • aiPlanGetName

      public String aiPlanGetName(int planID)
      Returns the name of the given plan.
    • aiPlanGetType

      public int aiPlanGetType(int planID)
      Returns the type of the given plan.
    • aiPlanGetIDByActiveIndex

      public int aiPlanGetIDByActiveIndex(int activeIndex, boolean ignoreChildPlans)
      Iterates over all the active plans and returns the planID at the given index; Use in combination with aiPlanGetActiveCount to know how many indexes there are.
    • aiPlanGetIsIDValid

      public boolean aiPlanGetIsIDValid(int planID)
      Returns if the planID is valid.
    • aiPlanGetIDsByTypeAndVariableVectorValue

      public int[] aiPlanGetIDsByTypeAndVariableVectorValue(int planType, int varType, Vector variableValue)
      Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    • aiPlanGetActiveCount

      public int aiPlanGetActiveCount(boolean ignoreChildPlans)
      Returns the number of active plans.
    • aiPlanGetIDsByTypeAndVariableBoolValue

      public int[] aiPlanGetIDsByTypeAndVariableBoolValue(int planType, int varType, boolean variableValue)
      Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    • aiPlanGetIDsByTypeAndVariableStringValue

      public int[] aiPlanGetIDsByTypeAndVariableStringValue(int planType, int varType, String variableValue)
      Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    • aiPlanGetIDsByTypeAndVariableIntValue

      public int[] aiPlanGetIDsByTypeAndVariableIntValue(int planType, int varType, int variableValue)
      Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    • aiPlanGetIDsByTypeAndVariableFloatValue

      public int[] aiPlanGetIDsByTypeAndVariableFloatValue(int planType, int varType, float variableValue)
      Returns plan IDs with the given parameters; It searches through all the variableValue indexes to find the value.
    • aiPlanGetIDsByType

      public int[] aiPlanGetIDsByType(int planType)
      Returns plan IDs with the given parameters.
    • aiPlanGetIDsByTypeAndState

      public int[] aiPlanGetIDsByTypeAndState(int planType, int planState)
      Returns plan IDs with the given parameters.
    • aiPlanGetNumberByTypeAndVariableIntValue

      public int aiPlanGetNumberByTypeAndVariableIntValue(int planType, int varIndex, int variableValue)
      Returns the number of matching plans. Attention: this can only be used for varIndexes that hold integer type variableValues!
    • aiPlanGetIDByTypeAndVariableIntValue

      public int aiPlanGetIDByTypeAndVariableIntValue(int planType, int varIndex, int variableValue, int index)
      Iterates over all the plans matching the parameters and returns the planID at the given index. Use in combination with aiPlanGetNumberByTypeAndVariableIntValue to know how many indexes there are. ATTENTION: this can only be used for varIndexes that hold integer type variableValues!
    • aiPlanGetNumberByTypeAndState

      public int aiPlanGetNumberByTypeAndState(int planType, int planState)
      Returns the number of matching plans.
    • aiPlanGetIDByTypeAndState

      public int aiPlanGetIDByTypeAndState(int planType, int planState, int index)
      Iterates over all the plans matching the parameters and returns the planID at the given index; Use in combination with aiPlanGetNumberByTypeAndState to know how many indexes there are.
    • aiPlanGetNumberByType

      public int aiPlanGetNumberByType(int planType)
      Returns the number of matching plans.
    • aiPlanGetIDByTypeIndex

      public int aiPlanGetIDByTypeIndex(int planType, int index)
      Iterates over all the plans matching the parameters and returns the planID at the given index; Use in combination with aiPlanGetNumberByType to know how many indexes there are.
    • aiPlanSetNumberUserVariableValues

      public void aiPlanSetNumberUserVariableValues(int planID, int variableIndex, int numberValues, boolean clearCurrentValues)
      Sets the number of possible values for the variableIndex.
    • aiPlanRemoveUserVariables

      public void aiPlanRemoveUserVariables(int planID)
      Removes all of the user variables from the plan.
    • aiPlanGetVariableString

      public String aiPlanGetVariableString(int planID, int variableIndex, int valueIndex)
      Returns the string that is associated with the valueIndex of the variableIndex.
    • aiPlanGetNumberUserVariableValues

      public int aiPlanGetNumberUserVariableValues(int planID, int variableIndex)
      Returns the number of values that can be set for the variableIndex.
    • aiPlanGetVariableBool

      public boolean aiPlanGetVariableBool(int planID, int variableIndex, int valueIndex)
      Returns the bool that is associated with the valueIndex of the variableIndex.
    • aiPlanSetVariableString

      public void aiPlanSetVariableString(int planID, int variableIndex, int valueIndex, String value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanGetVariableVector

      public Vector aiPlanGetVariableVector(int planID, int variableIndex, int valueIndex)
      Returns the vector that is associated with the valueIndex of the variableIndex.
    • aiPlanSetVariableBool

      public void aiPlanSetVariableBool(int planID, int variableIndex, int valueIndex, boolean value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanGetVariableFloat

      public float aiPlanGetVariableFloat(int planID, int variableIndex, int valueIndex)
      Returns the float that is associated with the valueIndex of the variableIndex.
    • aiPlanSetVariableVector

      public void aiPlanSetVariableVector(int planID, int variableIndex, int valueIndex, Vector value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanGetVariableInt

      public int aiPlanGetVariableInt(int planID, int variableIndex, int valueIndex)
      Returns the int that is associated with the valueIndex of the variableIndex.
    • aiPlanSetVariableFloat

      public void aiPlanSetVariableFloat(int planID, int variableIndex, int valueIndex, float value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanRemoveVariableValue

      public void aiPlanRemoveVariableValue(int planID, int variableIndex, int valueIndex)
      Removes the valueIndex for the variableIndex; Note here that this is a completely removal and the number of values will decrease too.
    • aiPlanSetVariableInt

      public void aiPlanSetVariableInt(int planID, int variableIndex, int valueIndex, int value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanGetNumberVariableValues

      public int aiPlanGetNumberVariableValues(int planID, int variableIndex)
      Returns the number of values that can be set for the variableIndex.
    • aiPlanSetNumberVariableValues

      public void aiPlanSetNumberVariableValues(int planID, int variableIndex, int numberValues, boolean clearCurrentValues)
      Sets the number of possible values for the variableIndex.
    • aiPlanSetUnitStance

      public void aiPlanSetUnitStance(int planID, int stance)
      Sets unit stance for the given plan.
    • aiPlanSetBaseID

      public void aiPlanSetBaseID(int planID, int baseID)
      Sets the baseID for the given plan.
    • aiPlanSetWaypoints

      public void aiPlanSetWaypoints(int planID, int pathID)
      Sets the waypoints of the given plan to the waypoints of the given path.
    • aiPlanAddWaypoint

      public void aiPlanAddWaypoint(int planID, Vector waypoint)
      Adds the waypoint to the given plan.
    • aiPlanRemoveUnit

      public void aiPlanRemoveUnit(int planID, int unitID)
      Removes the unit from the plan.
    • aiPlanSetInitialPosition

      public void aiPlanSetInitialPosition(int planID, Vector position)
      Sets the initial positon for this plan.
    • aiPlanAddUnitType

      public void aiPlanAddUnitType(int planID, int unitTypeID, int numberNeed, int numberWant, int numberMax, boolean relative, boolean popImmediately)
      Adds a unit type to the plan, you MUST do this before assigning any unit or the plan wont allow them to be assigned; If relative is set to false these new numbers wont be added onto the previous numbers, but will overwrite the previous numbers instead; If popImmediately is set it will instantly remove any units from the plan that may now be excessive; (if you lowered the numbers).
    • aiPlanAddUnit

      public boolean aiPlanAddUnit(int planID, int unitID, boolean loan)
      Adds the unit to the plan; If the unit is currently in a plan that the provided planID is a child of then the unit will automatically be loaned; If loan is true then this will attempt to loan the unit to the new plan; If we end up loaning via either of the 2 ways described earlier, then you dont need to manually call aiPlanAddUnitType, it's automatically done for the unit; If this unit is currently part of a child plan it will be removed from the child + parent automatically.
    • aiPlanGetNumberChildren

      public int aiPlanGetNumberChildren(int planID)
      Gets the number of child plans the planID has.
    • aiPlanGetChildIDByIndex

      public int aiPlanGetChildIDByIndex(int planID, int index)
      Returns the planID of the child plan at the given index, use in combination with aiPlanGetNumberChildren to know how many indexes there are.
    • aiPlanSetParentID

      public void aiPlanSetParentID(int planID, int parentPlanID, boolean persistentChild)
      Sets the parent plan of the given plan; If persistentChild is true the child plan will not be destroyed upon parent plan state change, unless that parent disallows persistent children too.
    • aiPlanRemoveParent

      public void aiPlanRemoveParent(int planID)
      Removes the parent plan of the given plan.
    • aiPlanSetName

      public void aiPlanSetName(int planID, String name)
      Sets the name of the plan.
    • aiPlanSetPriority

      public void aiPlanSetPriority(int planID, int priority)
      Sets the priority of the plan.
    • aiPlanGetBaseID

      public int aiPlanGetBaseID(int planID)
      Return the baseID of the given plan.
    • aiPlanGetUnitCost

      public float aiPlanGetUnitCost(int planID, boolean considerHitPoints)
      Returns the total aiCost of the given plans units, weighted for HP if requested; This cost is calculated using values set via kbSetAICostWeight.
    • aiGetResourceBreakdownPlanPriority

      public int aiGetResourceBreakdownPlanPriority(int resourceID, int resourceSubTypeID, int baseID)
      Gets the priority of the plans for the given breakdown.
    • aiGetResourceBreakdownPercentage

      public float aiGetResourceBreakdownPercentage(int resourceID, int resourceSubTypeID, int baseID)
      Gets the percentage for the given breakdown.
    • aiGetNumberGatherers

      public int aiGetNumberGatherers(int gathererPUID, int resourceID, int resourceSubType, int resourcePUID)
      Iterates through all gather plans; Optionally filters out plans based on the given resourceID and resourceSubType (must provide resourceID in order to use resourceSubType); If not provided just takes all gather plans; Optionally filters on the resourcePUID to look for specific resources; Likecutting from a specific Tree PU if desired; Returnshow many of gathererPUID the plans combined have.
    • aiGetResourceBreakdownNumberPlans

      public int aiGetResourceBreakdownNumberPlans(int resourceID, int resourceSubTypeID, int baseID)
      Gets the number of plans for the given breakdown.
    • aiSetResourcePercentage

      public void aiSetResourcePercentage(int resourceID, boolean normalize, float percentage)
      Sets the resource percentage for the given resource (if normalized is true, the percentages will be normalized to 1.0).
    • aiNormalizeResourcePercentages

      public void aiNormalizeResourcePercentages()
      Normalizes all of the resource percentages to 1.0.
    • aiGetMinimumFutureNeedsCost

      public float[] aiGetMinimumFutureNeedsCost(int escrowID, int planPriority)
      Returns the minimum future costs of all plans with higher priority than planPriority.
    • aiGetResourcePercentage

      public float aiGetResourcePercentage(int resourceID)
      Returns the resource percentage for the given resource.
    • aiPlanGetFutureNeedsCost

      public float[] aiPlanGetFutureNeedsCost(int planID)
      Returns the future costs of the plan.
    • aiGetMinimumFutureNeedsCostPerResource

      public float aiGetMinimumFutureNeedsCostPerResource(int escrowID, int planPriority, int resourceID)
      Returns the minimum future cost of all plans with higher priority than planPriority on the given resource; Difference with aiPlanGetFutureNeedsCostPerResource is that the train plans only return the cost of 1 unit.
    • aiSetHandler

      public void aiSetHandler(String handlerName, int type)
      Connect an XS function (handlerName) to a handler; All handlers can be found in the constants under "XS AI handler type constants".
    • aiPlanGetFutureNeedsCostPerResource

      public float aiPlanGetFutureNeedsCostPerResource(int planID, int resourceID)
      Returns the future cost of the plan on the given resource; Build plans return the cost for their buildings; Research plans return the cost of their upgrades, but only if they have a valid research building alive; Train plans return the cost for the units it can train within the next 30 seconds.
    • aiPlanIsFlagSet

      public boolean aiPlanIsFlagSet(int planID, int flag)
      Gets if the flag for the plan is set to true.
    • aiPlanSetEventHandler

      public void aiPlanSetEventHandler(int planID, int eventType, String handlerName)
      Connect an XS function (handlerName) to a plan + eventType; All plan events can be found in the constants, cPlanEventStateChange is the best way to keep track of the entire lifecycle of a plan.
    • aiPlanGetUserVariableString

      public String aiPlanGetUserVariableString(int planID, int variableIndex, int valueIndex)
      Returns the string that is associated with the given valueIndex of the variableIndex.
    • aiPlanSetFlag

      public void aiPlanSetFlag(int planID, int flag, boolean state)
      Sets the flag for the plan to the state.
    • aiPlanAddUserVariableString

      public void aiPlanAddUserVariableString(int planID, int variableIndex, String name, int numberValues)
      Adds a string variable to the plan.
    • aiPlanSetUserVariableString

      public void aiPlanSetUserVariableString(int planID, int variableIndex, int valueIndex, String value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanSetUserVariableBool

      public void aiPlanSetUserVariableBool(int planID, int variableIndex, int valueIndex, boolean value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanGetUserVariableBool

      public boolean aiPlanGetUserVariableBool(int planID, int variableIndex, int valueIndex)
      Returns the bool that is associated with the given valueIndex of the variableIndex.
    • aiPlanGetUserVariableVector

      public Vector aiPlanGetUserVariableVector(int planID, int variableIndex, int valueIndex)
      Returns the vector that is associated with the valueIndex of the variableIndex.
    • aiPlanAddUserVariableBool

      public void aiPlanAddUserVariableBool(int planID, int variableIndex, String name, int numberValues)
      Adds a bool variable to the plan.
    • aiPlanAddUserVariableVector

      public void aiPlanAddUserVariableVector(int planID, int variableIndex, String name, int numberValues)
      Adds a vector variable to the plan.
    • aiPlanSetUserVariableVector

      public void aiPlanSetUserVariableVector(int planID, int variableIndex, int valueIndex, Vector value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanSetUserVariableFloat

      public void aiPlanSetUserVariableFloat(int planID, int variableIndex, int valueIndex, float value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanGetUserVariableFloat

      public float aiPlanGetUserVariableFloat(int planID, int variableIndex, int valueIndex)
      Returns the float that is associated with the valueIndex of the variableIndex.
    • aiPlanGetUserVariableInt

      public int aiPlanGetUserVariableInt(int planID, int variableIndex, int valueIndex)
      Returns the int that is associated with the valueIndex of the variableIndex.
    • aiPlanAddUserVariableFloat

      public void aiPlanAddUserVariableFloat(int planID, int variableIndex, String name, int numberValues)
      Adds a float variable to the plan.
    • aiPlanAddUserVariableInt

      public void aiPlanAddUserVariableInt(int planID, int variableIndex, String name, int numberValues)
      Adds an int variable to the plan.
    • aiPlanSetUserVariableInt

      public void aiPlanSetUserVariableInt(int planID, int variableIndex, int valueIndex, int value)
      Sets the contents of the valueIndex of the variableIndex to the value.
    • aiPlanRemoveUserVariable

      public void aiPlanRemoveUserVariable(int planID, int variableIndex)
      Removes the user variable at the variableIndex.
    • aiPlanRemoveUserVariableValue

      public void aiPlanRemoveUserVariableValue(int planID, int variableIndex, int valueIndex)
      Removas the valueIndex for the variableIndex; Note here that this is a completely removal and the number of values will decrease too.
    • aiGetAgeUpListCount

      public int aiGetAgeUpListCount(int age)
      Gets the number of Minor Gods avaiable for Age X.
    • aiGetAgeUpListByIndex

      public int aiGetAgeUpListByIndex(int age, int index)
      Gets the index-th Minor God avaiable for Age X.
    • aiUnitAddForbiddenPlanID

      public void aiUnitAddForbiddenPlanID(int unitID, int planID)
      Adds the provided planID to the unitIDs forbidden plan list.
    • aiPopulateAgeUpList

      public void aiPopulateAgeUpList()
      Call this to make the AI fill out what Minor Gods are available.
    • aiUnitSetStance

      public void aiUnitSetStance(int unitID, int stance)
      Sets the stance for the given unit.
    • aiUnitGetForbiddenPlanIDs

      public void aiUnitGetForbiddenPlanIDs(int unitID)
      Returns an array of planIDs that the provided unitID is currently banned from.
    • aiUnitSetRallyPointToPosition

      public void aiUnitSetRallyPointToPosition(int sourceUnitID, Vector position)
      Sets the economic rally point of the given unit to the given position.
    • aiUnitSetRallyPointToUnit

      public void aiUnitSetRallyPointToUnit(int sourceUnitID, int targetUnitID)
      Sets the military rally point of the given sourceUnitID to the given targetUnitID.
    • aiCommsGetStatementPlayerID

      public int aiCommsGetStatementPlayerID(int recordID)
      Get the player ID of a given statement.
    • aiCommsGetStatementPosition

      public Vector aiCommsGetStatementPosition(int id)
      Get the position of a given statement.
    • aiCommsGetTauntCode

      public int aiCommsGetTauntCode(int tauntID)
      Get code for specified taunt.
    • aiCommsGetStatementPromptType

      public int aiCommsGetStatementPromptType(int recordID)
      Get the prompt type of a given statement.
    • aiCommsSetEventHandler

      public void aiCommsSetEventHandler(String handlerFunctionName)
      Sets the handler for the communications system (invalid name unsets the handler).
    • aiCommsGetSendingPlayer

      public int aiCommsGetSendingPlayer(int tauntID)
      Get sending player for specified taunt.
    • aiCommsSendStatement

      public void aiCommsSendStatement(int targetPlayerID, int promptType)
      Sends a statement to the designated player.
    • aiCommsSendStatementWithVector

      public void aiCommsSendStatementWithVector(int targetPlayerID, int promptType, Vector position)
      Sends a statement to the designated player; Adds a location flare.
    • aiChat

      public void aiChat(int playerID, String chatString)
      CP AI chat to playerID.
    • aiCommsAllowChat

      public void aiCommsAllowChat(boolean enable)
      Enables or disables the chats from this ai player.
    • aiSetFullUnitAssignmentTime

      public void aiSetFullUnitAssignmentTime(int time)
      Sets the next time that the unit distribution is updated.
    • aiUpdateFullUnitAssignment

      public void aiUpdateFullUnitAssignment(boolean allowPlanTransfer)
      Reassigns units to plans and removes them if needed.
    • aiSetUnassignedUnitAssignmentTime

      public void aiSetUnassignedUnitAssignmentTime(int time)
      Sets the next time that the unassigned unit assigment is updated.
    • aiGetFullUnitAssignmentTime

      public int aiGetFullUnitAssignmentTime()
      Gets the next time when the unit distribution will be updated.
    • aiSetNextGathererDistributionTime

      public void aiSetNextGathererDistributionTime(int time)
      Sets the next time that the gatherer distribution is updated.
    • aiGetUnassignedUnitAssignmentTime

      public int aiGetUnassignedUnitAssignmentTime()
      Gets the next time when the unassigned units assigment gets updated.
    • aiResourceIsLocked

      public boolean aiResourceIsLocked(int resourceID)
      Returns if the resource is locked.
    • aiGetNextGathererDistributionTime

      public int aiGetNextGathererDistributionTime()
      Returns the next time when the gatherer distribution will be updated.
    • aiResourceLock

      public void aiResourceLock(int resourceID)
      Prevent a resource from being spent by the AI.
    • aiResourceUnlock

      public void aiResourceUnlock(int resourceID)
      Allow a resource to be spent by the AI.
    • aiRemoveResourceBreakdown

      public void aiRemoveResourceBreakdown(int resourceID, int resourceSubTypeID, int baseID)
      Removes the given breakdown.
    • aiGetResourceBreakdownID

      public int aiGetResourceBreakdownID(int resourceID, int resourceSubTypeID, int baseID)
      Gets breakdown id.
    • aiSetResourceBreakdown

      public void aiSetResourceBreakdown(int resourceID, int resourceSubTypeID, int numberPlans, int planPriority, float percentage, int baseID, int[] numNeeded, int[] numWanted, int[] numMax, int[] kbResourceIDs)
      Sets a subtype breakdown for a resource.
    • aiAddToResourceBreakdown

      public void aiAddToResourceBreakdown(int resourceID, int resourceSubTypeID, int numberPlans, int planPriority, float percentage, int baseID, int[] numNeeded, int[] numWanted, int[] numMax, int[] kbResourceIDs)
      Increments an existing breakdown.
    • aiGetMicroFlags

      public int aiGetMicroFlags()
      Gets micro management flags.
    • aiCanUseAbility

      public boolean aiCanUseAbility(int unitID, int protoPowerID)
      Checks whether an unit can use the ability associated with the proto power.
    • aiGetExploreDangerThreshold

      public float aiGetExploreDangerThreshold()
      Gets the ais Explore Danger Threshold value.
    • aiSetMicroFlags

      public void aiSetMicroFlags(int flags)
      Sets micro management flags.
    • aiSetAttackResponseDistance

      public void aiSetAttackResponseDistance(float v)
      Set the attack response distance.
    • aiSetExploreDangerThreshold

      public void aiSetExploreDangerThreshold(float value)
      Sets the ais Explore Danger Threshold value.
    • aiRandLocation

      public Vector aiRandLocation()
      Returns a random location guaranteed to be on the map.
    • aiGetAttackResponseDistance

      public float aiGetAttackResponseDistance()
      Returns the attack response distance.
    • aiBreakpointSet

      public void aiBreakpointSet(int playerID, String filename, int lineNumber, boolean on)
      Sets a breakpoint.
    • aiBreakpointGo

      public void aiBreakpointGo(int playerID)
      Restart XS execution after the current breakpoint.
    • aiGetMostHatedNavalPlayerID

      public int aiGetMostHatedNavalPlayerID()
      Returns the scriptdefined most hated naval player ID.
    • aiSetMostHatedNavalPlayerID

      public void aiSetMostHatedNavalPlayerID(int v)
      Sets the scriptdefined most hated naval player ID.
    • aiGetMostHatedPlayerID

      public int aiGetMostHatedPlayerID()
      Returns the scriptdefined most hated player ID.
    • aiSetMostHatedPlayerID

      public void aiSetMostHatedPlayerID(int v)
      Sets the scriptdefined most hated player ID.
    • aiGetCurrentMilitaryPop

      public int aiGetCurrentMilitaryPop()
      Returns the current military pop.
    • aiGetAvailableMilitaryPop

      public int aiGetAvailableMilitaryPop()
      Returns the scriptdefined military pop.
    • aiSetMilitaryPop

      public void aiSetMilitaryPop(int v)
      Set the scriptdefined military pop.
    • aiGetMilitaryPop

      public int aiGetMilitaryPop()
      Returns the scriptdefined military pop.
    • aiGetCurrentNavalMilitaryPop

      public int aiGetCurrentNavalMilitaryPop()
      Returns the current naval military pop.
    • aiGetAvailableNavalMilitaryPop

      public int aiGetAvailableNavalMilitaryPop()
      Returns the scriptdefined naval military pop.
    • aiSetNavalMilitaryPop

      public void aiSetNavalMilitaryPop(int v)
      Set the scriptdefined naval military pop.
    • aiGetNavalMilitaryPop

      public int aiGetNavalMilitaryPop()
      Returns the scriptdefined naval military pop.
    • aiGetCurrentEconomyPop

      public int aiGetCurrentEconomyPop()
      Returns the current economy pop.
    • aiGetAvailableEconomyPop

      public int aiGetAvailableEconomyPop()
      Returns the available economy pop.
    • aiSetEconomyPop

      public void aiSetEconomyPop(int v)
      Set the scriptdefined economy pop.
    • aiGetEconomyPop

      public int aiGetEconomyPop()
      Returns the scriptdefined economy pop.
    • aiGetCurrentNavalEconomyPop

      public int aiGetCurrentNavalEconomyPop()
      Returns the current naval economy pop.
    • aiGetAvailableNavalEconomyPop

      public int aiGetAvailableNavalEconomyPop()
      Returns the available naval economy pop.
    • aiSetNavalEconomyPop

      public void aiSetNavalEconomyPop(int v)
      Set the scriptdefined naval economy pop.
    • aiGetNavalEconomyPop

      public int aiGetNavalEconomyPop()
      Returns the scriptdefined naval economy pop.
    • aiSellResourceOnMarket

      public void aiSellResourceOnMarket(int resourceID)
      Sells 100 of the given resource.
    • aiBuyResourceOnMarket

      public void aiBuyResourceOnMarket(int resourceID)
      Buys 100 of the given resource.
    • aiTaskDeleteUnits

      public boolean aiTaskDeleteUnits(int[] unitIDs)
      Deletes given units.
    • aiTaskGarrisonUnit

      public boolean aiTaskGarrisonUnit(int unitID, int targetID)
      Does a lightweight (no plan) garrison tasking of the given unit for the given target ID.
    • aiTaskSpecialPowerUnit

      public boolean aiTaskSpecialPowerUnit(int unitID, int powerID, int targetID, Vector position, boolean setAsQueued)
      Does a lightweight (no plan) research tasking of the given unit for the given special power.
    • aiTaskDeleteUnit

      public boolean aiTaskDeleteUnit(int unitID)
      Deletes the given unit.
    • aiTaskTrainUnit

      public boolean aiTaskTrainUnit(int unitID, int unitTypeID)
      Does a lightweight (no plan) train tasking of the given unit for the given target unit type.
    • aiTaskResearchUnit

      public boolean aiTaskResearchUnit(int unitID, int techID)
      Does a lightweight (no plan) research tasking of the given unit for the given tech ID.
    • aiTaskBuildUnit

      public boolean aiTaskBuildUnit(int unitID, int buildingTypeID, Vector position, boolean queue, int heading)
      Does a lightweight (no plan) build tasking of the given unit to build the given building.
    • aiTaskBuildUnits

      public boolean aiTaskBuildUnits(int[] unitIDs, int buildingTypeID, Vector position, boolean queue, int heading)
      Does a lightweight (no plan) build tasking of given units to build the given building.
    • aiTaskWorkUnit

      public boolean aiTaskWorkUnit(int unitID, int targetUnitID, boolean queue)
      Does a lightweight (no plan) work tasking of the given unit on the given target unit.
    • aiTaskWorkUnits

      public boolean aiTaskWorkUnits(int[] unitIDs, int targetUnitID, boolean queue)
      Does a lightweight (no plan) work tasking of given units on the given target unit.
    • aiTaskMoveUnit

      public boolean aiTaskMoveUnit(int unitID, Vector position, boolean queue)
      Does a lightweight (no plan) move tasking of the given unit to the given location.
    • aiTaskMoveUnits

      public boolean aiTaskMoveUnits(int[] unitIDs, Vector position, boolean queue)
      Does a lightweight (no plan) move tasking of given units to the given location.
    • aiSendNotificationFoundNotEnoughWoodGatheringSpots

      public void aiSendNotificationFoundNotEnoughWoodGatheringSpots()
      No description.
    • aiSendNotificationFoundNotEnoughGoldGatheringSpots

      public void aiSendNotificationFoundNotEnoughGoldGatheringSpots()
      No description.
    • aiSetAutomaticallyUngarrisonUnits

      public void aiSetAutomaticallyUngarrisonUnits(boolean v)
      The AI automatically ungarrisons units from buildings if theyre not in a garrison plan; Setting this to false turns off that behavior.
    • aiSendNotificationFoundNotEnoughFoodGatheringSpots

      public void aiSendNotificationFoundNotEnoughFoodGatheringSpots()
      No description.
    • aiSetOutpostLimit

      public void aiSetOutpostLimit(int limit)
      Sets the limit for how many Outposts the AI can build.
    • aiGetOutpostLimit

      public int aiGetOutpostLimit()
      Gets the limit for how many Outposts the AI can build.
    • aiSetDefaultStance

      public void aiSetDefaultStance(int defaultStance)
      Sets your default stance for all of your units.
    • aiSetEscrowsEnabled

      public void aiSetEscrowsEnabled(boolean v)
      Turns escrow system on/off, Chairon has this off.
    • aiNumberUnassignedUnits

      public int aiNumberUnassignedUnits(int unitTypeID)
      Returns the number of unassigned units of the given type, must provide a unitTypeID or it wont work.
    • aiSwitchMainBase

      public void aiSwitchMainBase(int newBaseID)
      Switch the newBaseID to be the main base.
    • aiResign

      public void aiResign()
      Resigns this player.
    • aiAttemptResign

      public void aiAttemptResign(int promptType)
      Asks the player if its ok to resign.
    • aiGetAllowBuildings

      public boolean aiGetAllowBuildings()
      Returns allow buildings on/off.
    • aiSetAllowBuildings

      public void aiSetAllowBuildings(boolean v)
      Sets allow buildings on/off.
    • aiGetWorldDifficultyName

      public String aiGetWorldDifficultyName(int difficulty)
      Returns the name of the difficulty.
    • aiGetMaxAge

      public int aiGetMaxAge(int playerID)
      Returns the maximum age for the given player.
    • aiSetMilitaryGatherPointBlocksWalls

      public void aiSetMilitaryGatherPointBlocksWalls(boolean enabled)
      If this is set to true then all the military gather points (all bases with a Town Center create one) will not block wall building placements; This can be false and aiSetMilitaryGatherPointBlocksBP true, causing walls to still be eligible to be built on military gather points, this is also the default setup.
    • aiTribute

      public void aiTribute(int playerID, int resourceID, float amount)
      Tributes the given player.
    • aiSetMilitaryGatherPointBlocksBP

      public void aiSetMilitaryGatherPointBlocksBP(boolean enabled)
      If this is set to true then all the military gather points (all bases with a Town Center create one) will block all building placement checks; These points will be shown as if another BP already claimed the spot; This defaults to true; If this is false then aiSetMilitaryGatherPointBlocksDropsites/Walls dont do anything anymore.
    • aiSetMilitaryGatherPointBlocksDropsites

      public void aiSetMilitaryGatherPointBlocksDropsites(boolean enabled)
      If this is set to true then all the military gather points (all bases with a Town Center create one) will not block dropsite building placements; This can be false and aiSetMilitaryGatherPointBlocksBP true, causing dropsites to still be eligible to be built on military gather points, this is also the default setup.
    • aiTransformWallIntoGate

      public void aiTransformWallIntoGate(int wallLongID)
      Transforms the given wallLongID into a gate.
    • aiCastGodPowerAtUnit

      public boolean aiCastGodPowerAtUnit(int protoPowerID, int unitID, boolean setAsQueued)
      Casts the given God power at the specified unit.
    • aiPrePurchaseGodPower

      public boolean aiPrePurchaseGodPower(int protoPowerID, int numUses)
      Prepurchases the specified number of uses of the given God Power.
    • aiCastGodPowerAtPosition

      public boolean aiCastGodPowerAtPosition(int protoPowerID, Vector position, boolean setAsQueued)
      Casts the given God power at the specified position.
    • aiCastGodPowerAtDualPosition

      public boolean aiCastGodPowerAtDualPosition(int protoPowerID, Vector position1, Vector position2)
      Casts the given God power at the specified 2 positions.
    • aiTaskStopUnit

      public boolean aiTaskStopUnit(int unitID)
      Does a lightweight (no plan) stopping of the unit.
    • aiTaskStopUnits

      public boolean aiTaskStopUnits(int[] unitIDs)
      Does a lightweight (no plan) stopping of the units.
    • aiTaskUngarrisonUnits

      public boolean aiTaskUngarrisonUnits(int[] unitIDs, Vector position)
      Does a lightweight (no plan) ungarrison tasking of given units for the given position.
    • aiTaskCancelUnit

      public boolean aiTaskCancelUnit(int unitID, int actionID)
      Does a lightweight (no plan) cancel tasking of the given unit for the given action.
    • aiTaskGarrisonUnits

      public boolean aiTaskGarrisonUnits(int[] unitIDs, int targetID)
      Does a lightweight (no plan) garrison tasking of given units for the given target ID.
    • aiTaskUngarrisonUnit

      public boolean aiTaskUngarrisonUnit(int unitID, Vector position)
      Does a lightweight (no plan) ungarrison tasking of the given unit for the given position.
    • trWaypointAddPoint

      public void trWaypointAddPoint(Vector v)
      Adds the waypoint into the trigger selection system.
    • trWaypointAddUnitPosition

      public void trWaypointAddUnitPosition(int unitID)
      Adds the units position as a waypoint in the trigger selection system.
    • trDelayedRuleActivation

      public void trDelayedRuleActivation(String name, boolean checkForTrigger)
      Adds a rule to the runtime to be activated on the next update.
    • trWaypointClear

      public void trWaypointClear()
      Clears the waypoints in the trigger selection system.
    • trCounterAddGenericXS

      public void trCounterAddGenericXS(String name, String msg, String appendMsg, String xsCall, int eventID, int intialVal, int finalVal, boolean finalAsMin, boolean showFinal, boolean reverseCount, boolean startAtZero)
      Start an XSbased counter, that may or may not fire an event; The name of this counter is also a QV under the hood that can be adjusted at will; If you attached an xsCall to this counter the QV variable will be updated each frame so doing custom things to it wont have an effect.
    • trGamePause

      public void trGamePause(boolean pause)
      Pause or unpause the game.
    • trCounterPlayerSpecific

      public void trCounterPlayerSpecific(String name, boolean playerSpecific, int playerID)
      Sets whether or not a given counter should be restricted to specific players, and, if so, assigns the given player to the counter.
    • trClearCounterDisplay

      public void trClearCounterDisplay()
      TODO.
    • trCounterPersistent

      public void trCounterPersistent(String name, boolean persistent)
      Enables or disables persistency for a counter; Persistent counters arent deleted even after reaching their maximum value.
    • trCounterAbort

      public void trCounterAbort(String name)
      Abort a counter.
    • trSetCounterDisplay

      public void trSetCounterDisplay(String message)
      TODO.
    • trCounterSetVisibility

      public void trCounterSetVisibility(String name, boolean visible)
      Hides or displays a counter.
    • trCounterGetValue

      public int trCounterGetValue(String name)
      Returns the current value of the given counter.
    • trCounterAddTimeMs

      public void trCounterAddTimeMs(String name, int start, int stop, String message, int eventID)
      Start a counter that may or may not fire an event.
    • trCounterPause

      public void trCounterPause(String name, boolean pause)
      Pause a counter.
    • trCounterAddTime

      public void trCounterAddTime(String name, int start, int stop, String message, int eventID)
      Start a counter that may or may not fire an event.
    • trCounterTimeDecrement

      public void trCounterTimeDecrement(String name, int value)
      Decrements the current value of a given time counter by the provided value.
    • trCounterTimeIncrement

      public void trCounterTimeIncrement(String name, int value)
      Increments the current value of a given time counter by the provided value.
    • trCounterTimeSetValue

      public void trCounterTimeSetValue(String name, int value)
      Forcibly sets the current value of a given counter.
    • trCounterAddString

      public boolean trCounterAddString(String name, String message)
      Displays a string as a counter.
    • trCounterSetPlayerName

      public boolean trCounterSetPlayerName(String name, int playerID)
      Changes the player name to be displayed on a given player name pseudocounter.
    • trCounterSetManualString

      public boolean trCounterSetManualString(String name, String message)
      Changes the string to be displayed on a given string pseudocounter.
    • trCounterAddPlayerName

      public boolean trCounterAddPlayerName(String name, String message, int playerID)
      Displays a player name as a counter.
    • trCounterDecrementManual

      public boolean trCounterDecrementManual(String name, int amount)
      Decrement the current value of the counter.
    • trCounterSetManual

      public boolean trCounterSetManual(String name, int val)
      Sets the current value of the given manual counter.
    • trFormatString

      public String trFormatString(String format, String[] inserts)
      Inserts (loc)strings into (loc)strings.
    • trCounterIncrementManual

      public boolean trCounterIncrementManual(String name, int amount)
      Increment the current value of the counter.
    • trUnitVisibleToPlayer

      public boolean trUnitVisibleToPlayer()
      Returns true if the player can see the selected unit, and it is on screen; Desync sensitive.
    • trUnitHasLOS

      public boolean trUnitHasLOS(int playerID)
      Returns true if the player can see the selected unit, otherwise returns false.
    • trUnitSetHeading

      public boolean trUnitSetHeading(int degrees)
      Sets the units heading.
    • trUnitGetPosition

      public Vector trUnitGetPosition(int unitID)
      Returns the unit's position.
    • trRelicForce

      public boolean trRelicForce(int unitID, String relicname)
      Changes type of selected relic to the given relic name.
    • trUnitGetHeading

      public int trUnitGetHeading(int unitID)
      Returns the unit's heading.
    • trUnitCreateForced

      public int trUnitCreateForced(String protoName, float x, float y, float z, int heading, int playerID, boolean skipBirth)
      Creates a new unit, ignoring placement rules.
    • trRelicCreate

      public boolean trRelicCreate(float x, float y, float z, int heading, String relicname)
      Creates a new relic from defined relic name.
    • trUnitDestroy

      public boolean trUnitDestroy(boolean ejectContained)
      Destroys the selected unit(s).
    • trUnitCreate

      public int trUnitCreate(String protoName, float x, float y, float z, int heading, int playerID, boolean skipBirth)
      Creates a new unit.
    • trUnitFullyBuilt

      public boolean trUnitFullyBuilt()
      Returns true if all selected units are fully built.
    • trUnitDelete

      public boolean trUnitDelete(boolean remove)
      Removes or kills the selected unit(s).
    • trUnitAlive

      public boolean trUnitAlive()
      Returns true if all selected units are alive.
    • trUnitDead

      public boolean trUnitDead()
      Returns true if all selected units are dead.
    • trUnitSetAnimation

      public boolean trUnitSetAnimation(String animName, int versionIndex, boolean loop, int eventID, boolean destroyOnNextControlAction)
      Sets the cinematic animation version for the selected unit(s).
    • trUnitSetAnimationPath

      public boolean trUnitSetAnimationPath(String animName, String animPath, boolean loop, int eventID, boolean destroyOnNextControlAction)
      Sets the cinematic animation version for the selected unit(s).
    • trUnitDistanceToUnitID

      public float trUnitDistanceToUnitID(int blockID)
      Returns the shortest distance between the trRT units and the given unit.
    • trUnitRemoveControlAction

      public void trUnitRemoveControlAction()
      Removes the current control action so the next thing can take effect immediately.
    • trImmediateUnitGarrison

      public boolean trImmediateUnitGarrison(int unitID)
      Instantly garrisons units inside another unit without considering distance.
    • trUnitDistanceToPoint

      public float trUnitDistanceToPoint(float x, float y, float z)
      Returns the shortest distance between the trRT units and the point.
    • trUnitDoWorkOnUnit

      public boolean trUnitDoWorkOnUnit(int unitID, int eventID)
      Tasks the selected unit(s) to perform work on the given unit.
    • trUnitGarrison

      public boolean trUnitGarrison(int unitID, int eventID)
      Tasks the selected unit(s) to garrision into another unit.
    • trUnitMoveFromArea

      public boolean trUnitMoveFromArea(float x, float y, float z, int eventID, boolean bAttackMove, int playerID, String unitType, float radius)
      Moves all matching units near the selected unit(s) to the given position.
    • trUnitBuildUnit

      public boolean trUnitBuildUnit(String protoName, Vector position, Vector forward)
      Selects units and makes the build a unit at specified location.
    • trSetRevealerActiveState

      public void trSetRevealerActiveState(String revealerName, boolean active)
      Finds the specified revealer and sets it to active or inactive.
    • trCreateRevealer

      public void trCreateRevealer(int playerID, String revealerName, Vector position, float revealerLOS, boolean blackmapOnly)
      Creates a revealer with the given attributes.
    • trUnitMoveToPoint

      public boolean trUnitMoveToPoint(float x, float y, float z, int eventID, boolean bAttackMove, boolean bUnitRun, float runSpeedMultiplier)
      Moves the selected unit(s) to the given position.
    • trUnitMoveToUnit

      public boolean trUnitMoveToUnit(int unitID, int eventID, boolean bAttackMove, boolean bUnitRun, float runSpeedMultiplier)
      Moves the selected unit(s) to the spot occupied by the given unit.
    • trPlayerControlsSocket

      public boolean trPlayerControlsSocket(int playerID, int unitID)
      Returns true if the specified player is built on the specified socket.
    • trObjectGettingWorked

      public boolean trObjectGettingWorked(int unitID)
      Returns true if the object is currently being worked.
    • trUnitSelectClear

      public void trUnitSelectClear()
      Clears the units in the trigger selection system.
    • trUnitSelectByID

      public void trUnitSelectByID(int unitID)
      Selects the unit in the trigger selection system.
    • trPlayerModifyLOS

      public void trPlayerModifyLOS(int destPlayer, boolean canSee, int srcPlayer)
      Adds/removes LOS between players.
    • trPlayerSetActive

      public void trPlayerSetActive(int playerID)
      Sets the active player.
    • trPlayerSetDiplomacy

      public void trPlayerSetDiplomacy(int player1, int player2, String status, boolean mutual)
      Sets the diplomacy status between players.
    • trPlayerGetDiplomacy

      public String trPlayerGetDiplomacy(int player1, int player2)
      Gets the diplomacy status between players.
    • trPlayerIsActive

      public boolean trPlayerIsActive(int playerID)
      Returns true/false if the player is active.
    • trPlayerSetDefeated

      public void trPlayerSetDefeated(int i)
      Call this when a player is defeated on the local machine (meaning that this func must be called synchronously on all machines, it will not pass around a command).
    • trPlayerTribute

      public void trPlayerTribute(int playerID, String resource, int amount, int toPlayerID)
      Tributes resources to a player.
    • trPlayerIsDefeated

      public boolean trPlayerIsDefeated(int playerID)
      Returns true/false if the player has been defeated.
    • trProtoUnitHighlight

      public void trProtoUnitHighlight(int playerID, String protoName, float duration, boolean flash)
      Highlights all units belonging to the given protounit for a player.
    • trBuildingIsOnCursor

      public boolean trBuildingIsOnCursor(String proto)
      Returns true if the proto unit specified is on the cursor and is a building.
    • trUnitSetScale

      public void trUnitSetScale(float x, float y, float z)
      Sets the scale for the given set of units.
    • trUnitHighlight

      public void trUnitHighlight(float duration, boolean flash)
      Does something to highlight the units selected.
    • trUnitIsNotOwnedBy

      public boolean trUnitIsNotOwnedBy(int playerID)
      Determines if the selected units are not owned by the player specified.
    • trUnitSetStance

      public void trUnitSetStance(String stance)
      Set the stance for the given set of units.
    • trUnitTypeIsHovered

      public boolean trUnitTypeIsHovered(String proto)
      Returns if the cursor is hovering over the given unit type.
    • trUnitIsOwnedBy

      public boolean trUnitIsOwnedBy(int playerID)
      Determines if the selected units are owned by the player specified.
    • trUnitIsSelected

      public boolean trUnitIsSelected()
      Returns if the specified unit is selected.
    • trUnitTypeIsSelected

      public boolean trUnitTypeIsSelected(String proto, boolean checkIdle)
      Returns if at least one unit of the specified unit type is selected.
    • trUnitGetNumberManuallySelected

      public int trUnitGetNumberManuallySelected()
      Fetches number of selected units.
    • trAnythingIsSelected

      public boolean trAnythingIsSelected()
      Returns true if any unit is selected.
    • trUnitSetGatherPointUnitForPlayer

      public void trUnitSetGatherPointUnitForPlayer(int playerID, int sourceID, int targetID)
      Sets the gather point of the unit on this unit.
    • trUnitUngarrisonContained

      public void trUnitUngarrisonContained()
      Ungarrisons all contained units.
    • trUnitSetGatherPointPosForPlayer

      public void trUnitSetGatherPointPosForPlayer(int playerID, int sourceID, float x, float y, float z)
      Sets the gather point of the unit on this position.
    • trBuildingTimeShiftAtPos

      public boolean trBuildingTimeShiftAtPos(int unitID, float x, float y, float z)
      Cast timeshift on this unit at this position.
    • trUnitTransformCommand

      public void trUnitTransformCommand()
      Performs the transformation defined by the units transform command (eg heroization, etc) immediately, whenever applicable.
    • trMarketReset

      public void trMarketReset()
      Resets Market buy and sell prices to default values.
    • trUnitChangeProtoUnit

      public void trUnitChangeProtoUnit(String protoName, boolean skipBirth, boolean forceFoundation)
      Changes the proto unit for a given set of units.
    • trUnitDelayedTransform

      public void trUnitDelayedTransform()
      Activates delayed transform (eg as used for Roc state change) action within selected units, whenever applicable.
    • trUnitPercentDamaged

      public float trUnitPercentDamaged()
      Returns the percent damaged as 0 to 100.
    • trUnitTeleport

      public boolean trUnitTeleport(float x, float y, float z)
      Moves units from current position to position specified.
    • trUnitConvert

      public void trUnitConvert(int playerID)
      Converts the selected units to player.
    • trUnitPercentComplete

      public int trUnitPercentComplete()
      Returns the percent complete as 0 to 100.
    • trPlayerGrantResources

      public void trPlayerGrantResources(int playerID, String resource, int amount)
      Advances the campaign.
    • trFakifySelection

      public void trFakifySelection(int fakePlayerIndex)
      Sets the selected unit as having the fake player with the specified index (07).
    • trPlayerResetBlackMapForAllPlayers

      public void trPlayerResetBlackMapForAllPlayers()
      TrPlayerResetBlackMapForAllPlayers(Resets the black map for all HUMAN players.
    • trPlayerKillAllBuildings

      public void trPlayerKillAllBuildings(int playerID)
      Kills all of the buildings of a given player.
    • trCameraShake

      public void trCameraShake(float shakeDuration, float shakeStrength)
      Makes the camera shake.
    • trPlayerResetBlackMap

      public void trPlayerResetBlackMap(int playerID)
      Resets the black map for a given HUMAN player.
    • trRatesReset

      public void trRatesReset()
      Resets all the rates to normal (1.0f).
    • trMinimapFlare

      public void trMinimapFlare(int playerID, float duration, Vector pPosition, boolean unused)
      Sends a Minimap flare to a certain player.
    • trRateTrain

      public void trRateTrain(float rate)
      Modify training rate.
    • trRateResearch

      public void trRateResearch(float rate)
      Modify research rate.
    • trFormationScale

      public void trFormationScale(float scale)
      Scales the formation size of formations in the game.
    • trRateConstruction

      public void trRateConstruction(float rate)
      Modify construction rate.
    • trArmySelectInt

      public void trArmySelectInt(int playerID, int armyID)
      Selects the units in the army specified.
    • trArmyDispatch

      public boolean trArmyDispatch(String army, String protoname, int count, float x, float y, float z, int heading, boolean clearExisting, boolean skipBirth)
      Creates the units in the army specified.
    • trSetFogAndBlackmap

      public void trSetFogAndBlackmap(boolean fog, boolean black)
      Turn fog and black map on/off; (SP modes only).
    • trArmySelect

      public void trArmySelect(String parameters)
      Selects the units in the army specified.
    • trPlayerGetVillagerPriority

      public int trPlayerGetVillagerPriority(int playerID)
      Gets the villager priority preset for player.
    • trTechSetStatus

      public void trTechSetStatus(int playerID, int techID, int status)
      Sets the tech status for the player.
    • trTechStatusResearching

      public boolean trTechStatusResearching(int playerID, int techID)
      Returns true if tech is being researched for player.
    • trTechStatusCheck

      public boolean trTechStatusCheck(int playerID, int techID, int status)
      Returns true if techs status is techStatus.
    • trSoundTimer

      public void trSoundTimer(int ms, int eventID)
      TrSoundTimer(int32 milliseconds, int32 eventID) creates a high performance sound timer and passes the eventID as data.
    • trTechStatusActive

      public boolean trTechStatusActive(int playerID, int techID)
      Returns true if tech is active for player.
    • trSoundPlayFN

      public void trSoundPlayFN(String filename, int eventID, String subtitle, String portrait)
      Plays the sound associated with the filename.
    • trSoundPlayPaused

      public void trSoundPlayPaused(String filename, String seconds, int eventID, String subtitle, String portrait)
      Plays the sound associated with the filename.
    • trSetUnitIdleProcessing

      public void trSetUnitIdleProcessing(boolean v)
      Sets whether or not units can do their idle processing.
    • trSetObscuredUnits

      public void trSetObscuredUnits(boolean v)
      Sets whether or not units can be drawn obscured or not.
    • trEventSetHandler

      public boolean trEventSetHandler(int eventID, String functionName)
      Sets a handler function for an event id.
    • trEventFire

      public void trEventFire(int eventID)
      Cause an event to occur.
    • trObjectiveShow

      public void trObjectiveShow(int objectiveID, boolean playSound)
      Shows the specified objective on the UI.
    • trPlayerAtPopCap

      public boolean trPlayerAtPopCap(int playerID)
      Returns true if player is at pop cap.
    • trObjectiveComplete

      public void trObjectiveComplete(int objectiveID, boolean forceComplete, boolean playSound)
      Completes the specified objective; Forces a reoccurring objective complete if forceComplete is true.
    • trObjectiveHide

      public void trObjectiveHide(int objectiveID)
      Hides the specified objective on the UI.
    • trCameraPanWithUnit

      public void trCameraPanWithUnit(boolean bEnable, int eventID)
      Moves the camera in the same direction that a particular unit moves.
    • trCameraLock

      public void trCameraLock(boolean lock)
      Toggles camera movement locking over the current position.
    • trCameraCut

      public void trCameraCut(Vector pos, Vector dir, Vector up, Vector right)
      Puts the camera in the specified location.
    • trCameraLockOnUnit

      public void trCameraLockOnUnit(boolean bEnable, int timer, int eventID)
      Orients the camera to the selected unit, and keeps it locked on that unit.
    • trCameraTrackPlayPlayer

      public void trCameraTrackPlayPlayer(String camTrackName, int playerID, boolean blendWithGameCamera, float blendDurationMS)
      Loads and plays a camera track for a given player, if blend with game camera is true, it will best fit the strategy camera location at the last waypoint and smooth transition to it.
    • trCameraCutPlayer

      public void trCameraCutPlayer(int playerID, Vector pos, Vector dir, Vector up, Vector right)
      Puts the camera in the specified location for the given player.
    • trCameraTrackCreate

      public int trCameraTrackCreate(String trackName, float durationMs)
      Adds a camera track. (Nottud loves this)
    • trCameraTrackAddWaypoint

      public int trCameraTrackAddWaypoint(int trackIdx, Vector position, Vector dir, Vector up, Vector right, float fov)
      Adds the provided camera position as a waypoint to the given track index.
    • trCameraTrackWaypointSetTime

      void trCameraTrackWaypointSetTime(int trackIdx, int waypointIdx, float timeMs)
      Sets the time for a provided waypoint index in the given track index.
    • trCameraTrackWaypointSetTension

      void trCameraTrackWaypointSetTension(int trackIdx, int waypointIdx, float tension)
      Sets the tension for a provided waypoint index in the given track index.
    • trCameraTrackWaypointSetContinuity

      void trCameraTrackWaypointSetContinuity(int trackIdx, int waypointIdx, float continuity)
      Sets the continuity for a provided waypoint index in the given track index.
    • trCameraTrackWaypointSetBias

      void trCameraTrackWaypointSetBias(int trackIdx, int waypointIdx, float bias)
      Sets the bias for a provided waypoint index in the given track index.
    • trCinematicIsAborted

      public boolean trCinematicIsAborted()
      Returns the abort cinematic status.
    • trCinematicDoAbort

      public void trCinematicDoAbort()
      Aborts the cinematic.
    • trCameraTrackLoad

      public void trCameraTrackLoad(String szName)
      Loads a camera track.
    • trCameraTrackPlay

      public void trCameraTrackPlay(float fDuration, int eventID, boolean blendWithGameCamera, float blendDurationMS)
      Plays the current camera track, if blend with game camera is true, it will best fit the strategy camera location at the last waypoint and smooth transition to it.
    • trUnitFaceUnit

      public boolean trUnitFaceUnit(int unitID, int eventID)
      Moves the selected unit(s) to face the given unit.
    • trLetterBox

      public void trLetterBox(boolean on, boolean letterbox)
      Turns letter box mode on or off; Letterbox toggles the black border around the screen while in cinematic mode.
    • trQuestVarGet

      public float trQuestVarGet(String varName)
      Retrieve value of a trigger scratch variable, returns zero if unset.
    • trQuestVarEcho

      public void trQuestVarEcho(String varName)
      Chats out the value of one of the trigger scratch variables.
    • trQuestVarSetFromRand

      public void trQuestVarSetFromRand(String varName, float minVal, float maxVal, boolean round)
      Sets one of the trigger scratch variables within a random range.
    • trQuestVarSetFromRandUnique

      public void trQuestVarSetFromRandUnique(String varName, float minVal, float maxVal, boolean round)
      Sets one of the trigger scratch variables within a random range, while avoiding repeating consecutive values.
    • trQuestVarSet

      public void trQuestVarSet(String varName, float val)
      Sets one of the trigger scratch variables.
    • trQuestVarCopy

      public void trQuestVarCopy(String destName, String fromName)
      Copies value of one of the trigger scratch variables.
    • trDamageUnitsInArea

      public void trDamageUnitsInArea(int playerID, String unitTypeName, float range, float dmg)
      All units within dist of the selected ref object that match type take dmg.
    • trDamageUnitPercent

      public void trDamageUnitPercent(float damagePercent)
      Does percent of a unit's total HP in instant typeless damage.
    • trDamageUnit

      public void trDamageUnit(float damageAmt)
      Does a specific amount of damage to HP in instant typeless damage.
    • trSetPauseInObjectiveWindow

      public void trSetPauseInObjectiveWindow(boolean val)
      TODO.
    • trRevealEntireMap

      public void trRevealEntireMap()
      Shows whole map, similar to how revealed mode works (SP modes only).
    • trSelectionGetUnitID

      public int trSelectionGetUnitID(int index)
      Returns the ID of the selected unit.
    • trSetPauseOnAgeUpgrade

      public void trSetPauseOnAgeUpgrade(boolean val)
      TODO.
    • trDefakifySelectionSubModels

      public void trDefakifySelectionSubModels()
      Resets all submodels back to using the player colour of the parent model.
    • trSelectionGetNumber

      public int trSelectionGetNumber()
      Returns how many units you currently have selected.
    • trDefakifyArmy

      public void trDefakifyArmy(String armyName)
      Defakifies the army.
    • trFakifySelectionSubModelByOverrideName

      public void trFakifySelectionSubModelByOverrideName(String overrideName, int fakePlayerIndex)
      Sets named submodels of the selection to fake player with the specified index (07).
    • trFakifyArmy

      public void trFakifyArmy(String armyName, int fakePlayerIndex)
      Fakifies the army to the specified fake player index.
    • trDefakifySelection

      public void trDefakifySelection()
      Sets the selected unit as not having a fake player trDefakifySelection.
    • trUnitSetPassiveMode

      public boolean trUnitSetPassiveMode(boolean enable)
      Enables or disables Passive Mode for selected Units.
    • trUnitTeleportToUnit

      public boolean trUnitTeleportToUnit(int unitID)
      Teleport the selected unit(s) to the spot occupied by the given unit.
    • trUnitGetTargetID

      public int trUnitGetTargetID(int srcUnit, boolean actionOnly)
      Returns the attack target for the given unit.
    • trUnitIsAttacking

      public boolean trUnitIsAttacking()
      Returns true if all selected units are attacking.
    • trPlayerGetType

      public int trPlayerGetType(int playerID)
      Returns whether the given player is a human or a computer/AI player.
    • trUnitHasTarget

      public boolean trUnitHasTarget(boolean actionOnly)
      Returns true if all selected units have an attack target or are attacking.
    • trProtoUnitSetIcon

      public void trProtoUnitSetIcon(String protoUnitName, int playerID, String iconPath, String minimapIconPath)
      Modify the icon of a proto unit.
    • trArmyUnitChangeName

      public void trArmyUnitChangeName(String newName, String protoUnitName)
      Set an override name for a specific unit in an army.
    • trProtoUnitActionSetEnabled

      public void trProtoUnitActionSetEnabled(String protoUnitName, int playerID, String actionName, boolean enable)
      Enables or disables an action for a proto unit.
    • trProtoUnitChangeName

      public void trProtoUnitChangeName(String protoUnitName, int playerID, String nameStrId, String rolloverStrId, String shortRolloverStrId)
      Modify the name and rollover text of a proto unit.
    • trRemoveUnitsInArea

      public void trRemoveUnitsInArea(int playerID, String unitTypeName, float range, boolean ejectContained)
      All units within dist of the selected ref object that match type are killed.
    • trPlayerOverrideCivName

      public void trPlayerOverrideCivName(int playerID, String StringID)
      Overrides the string used for the displayed civilization name.
    • trConvertUnitsInArea

      public void trConvertUnitsInArea(int srcPlayer, int trgPlayer, String unitTypeName, float range)
      All units within dist of the selected ref object that match type are converted to the target player.
    • trKillUnitsInArea

      public void trKillUnitsInArea(int playerID, String unitTypeName, float range)
      All units within dist of the selected ref object that match type are killed.
    • trEnforceAIAssist

      public void trEnforceAIAssist(boolean enable)
      Sets whether or not AI assist support should be enforced for this scenario.
    • trDisableConquestCheck

      public void trDisableConquestCheck(boolean disable)
      Temporarily disables or reenables conquest victory check in a scenario that supports it.
    • trExecuteConsoleCommand

      void trExecuteConsoleCommand(String command)
      Executes the given console command.
    • trDisablePowerNotifications

      public void trDisablePowerNotifications(boolean disable)
      Sets whether or not power casting notifications should be disabled for this scenario.
    • trDisablePowerTimers

      public void trDisablePowerTimers(boolean disable)
      Sets whether or not displaying timers for active powers should be disabled for this scenario.
    • trDisablePopCapNotifications

      public void trDisablePopCapNotifications(boolean disable)
      Sets whether or not persistent popcap notifications should be disabled for this scenario.
    • trDisableNotificationSounds

      public void trDisableNotificationSounds(boolean disable)
      Sets whether or not notification sounds should be disabled for this scenario.
    • trObjectiveIncomplete

      public void trObjectiveIncomplete(int objectiveID, boolean playSound)
      Marks a specified objective as incomplete.
    • trDisableUnitDeletion

      public void trDisableUnitDeletion(boolean disable)
      Sets whether or not unit and building deletion should be disabled for this scenario.
    • trPlayerOverrideArtCulture

      public void trPlayerOverrideArtCulture(int playerID, String culture)
      Overrides the culture used for choosing the players art.
    • trPlayerRemoveAllUnits

      public void trPlayerRemoveAllUnits(int playerID)
      Removes all of the units of a given player without affecting Player Stats.
    • trSetShadowFarClip

      public void trSetShadowFarClip(boolean enabled, float distance)
      Enable or disables the shadow far clippping plane.
    • trAISetAttackResponseDistance

      public void trAISetAttackResponseDistance(int playerID, float attackResponseDistance)
      Sets the attack response distance for the provided playerIDs AI if it has one; This distance controls from what within distance the AI will call other units to help if one of its units gets attacked.
    • trAddArmyToPlan

      public void trAddArmyToPlan(String armyName, String planName)
      Adds the units in the specified army to the specified plan.
    • trUnitMakeInvulnerable

      public void trUnitMakeInvulnerable(boolean bEnable)
      Makes a unit invulnerable to damage; Turn it off to return the unit to normal.
    • trKillAIPlan

      public void trKillAIPlan(int playerID, String planName)
      No help.
    • trSetLighting

      public void trSetLighting(String setName, float fadeTime)
      Fades to the specified lighting set over fadetime.
    • trDisableTrigger

      public void trDisableTrigger(int eventID)
      Disables (sets active = false) the trigger specified by the given eventID.
    • trUnitCreateFromSource

      public boolean trUnitCreateFromSource(String protoName, int srcUnitID, int trgUnitID, int playerID)
      Creates a new unit.
    • trUnitSetConvertible

      public void trUnitSetConvertible(int playerID, boolean forbid)
      Sets forbid conversion accordingly for the selected units towards the given player.
    • trDamageUnitsPercentInArea

      public void trDamageUnitsPercentInArea(int playerID, String unitTypeName, float range, float healPercent)
      All units within dist of the selected ref object are damaged by the given factor.
    • trSocketIsEmpty

      public boolean trSocketIsEmpty(int unitID)
      Returns true if there isnt a fullybuilt building occupying the specified socket.
    • trPlayerGetCivilization

      public boolean trPlayerGetCivilization(int playerID, String civilization)
      Returns true/false if the player civilization matches the given parameter.
    • trHealUnitsPercentInArea

      public void trHealUnitsPercentInArea(int playerID, String unitTypeName, float range, float healPercent)
      All units within dist of the selected ref object have their HPs adjusted by the given factor.
    • trTechHideEffects

      public void trTechHideEffects(int techID, int playerID, boolean display)
      Sets whether or not effects should be hidden in the rollover for the given technology for this scenario only.
    • trLightingSetParamFloat

      void trLightingSetParamFloat(int paramID, float value)
      Sets the given floating point lighting set parameter to the provided value for this scenario only.
    • trLightingSetParamInt

      void trLightingSetParamInt(int paramID, int value)
      Sets the given integer lighting set parameter to the provided value for this scenario only.
    • trLightingSetParamBool

      void trLightingSetParamBool(int paramID, boolean value)
      TODO
    • trLightingSetParamColor

      void trLightingSetParamColor(int paramID, int r, int g, int b)
      TODO
    • trLightingSetParamColorAttr

      void trLightingSetParamColorAttr(int paramID, float attrRed, float attrGreen, float attrBlue)
      TODO
    • trPlayerIsDefeatedOrResigned

      public boolean trPlayerIsDefeatedOrResigned(int playerID)
      Returns true/false if the player has resigned or has been defeated.
    • trTechReplaceIconByTech

      public void trTechReplaceIconByTech(int techID, int playerID, int iconTechID)
      Replaces the icon of a technology for this scenario only.
    • trTechSetIconPath

      public void trTechSetIconPath(int techID, int playerID, String iconPath)
      Replaces the icon of a technology for this scenario only.
    • trTechModifyCost

      public void trTechModifyCost(int techID, int playerID, int resourceID, float delta, int techRelativity)
      Modifies the cost of the given technology for this scenario only.
    • trTechSetStringID

      public void trTechSetStringID(int techID, int playerID, String StringID, int techStringFieldIdx)
      Sets a given string field of a technology to the given string ID for this scenario only.
    • trProtounitRemoveCommand

      public void trProtounitRemoveCommand(String protoUnitName, int playerID, String puCmdName)
      Removes a protoUnitCommand entry from the given protoUnit for this scenario only.
    • trTechModifyResearchPoints

      public void trTechModifyResearchPoints(int techID, int playerID, float delta, int techRelativity)
      Modifies the reseach points of the given technology for this scenario only.
    • trProtounitRemoveTrain

      public void trProtounitRemoveTrain(String protoUnitName, int playerID, String trainPUName)
      Removes a train entry from the given protoUnit for this scenario only.
    • trProtounitRemoveTech

      public void trProtounitRemoveTech(String protoUnitName, int playerID, int techID)
      Removes a tech entry from the given protoUnit for this scenario only.
    • trProtounitAddTech

      public void trProtounitAddTech(String protoUnitName, int playerID, int techID, int row, int column)
      Assigns a tech entry towards the given protoUnit for this scenario only.
    • trProtounitAddCommand

      public void trProtounitAddCommand(String protoUnitName, int playerID, String puCmdName, int row, int column)
      Assigns a protoUnitCommand entry towards the given protoUnit for this scenario only.
    • trProtoUnitMovementType

      public void trProtoUnitMovementType(String unitTypeName, int playerID, String movementType)
      Modifies proto unit movement type for this scenario only.
    • trProtounitAddTrain

      public void trProtounitAddTrain(String protoUnitName, int playerID, String trainPUName, int row, int column)
      Assigns a train entry towards the given protoUnit for this scenario only.
    • trProtounitActionSpecialEffectModifier

      public void trProtounitActionSpecialEffectModifier(String unitTypeName, String actionName, int playerID, int effectField, String targetType, float value, int modifyType, int dmgType)
      Modifies proto unit action data by adding a new or adjusting an existing onHitEffect and assigning a new stat modifier to it for this scenario only.
    • trProtounitActionSpecialEffectActive

      public void trProtounitActionSpecialEffectActive(String unitTypeName, String actionName, int playerID, int effectField, String targetType, int dmgType, boolean active)
      Modifies proto unit action data by setting a specified existing onHitEffect as active or inactive.
    • trProtounitActionSpecialEffectProtoUnit

      public void trProtounitActionSpecialEffectProtoUnit(String unitTypeName, String actionName, int playerID, int effectField, String targetType, String protoUnit, float duration, float value)
      Modifies proto unit action data by adding a new or adjusting an existing onHitEffect taking a protoUnit parameter for this scenario only.
    • trProtounitActionSpecialEffectDuration

      public void trProtounitActionSpecialEffectDuration(String unitTypeName, String protoUnitActionName, int playerID, int efectType, String targetType, int damageType, float delta, int relativity)
      Modifies the duration of an existing onHitEffect within the given protoAction for this scenario only.
    • trModifyProtounitActionUnitType

      public void trModifyProtounitActionUnitType(String unitTypeName, String actionName, String unitType, int playerID, int puField, float delta, int relativity)
      Modifies proto unit action data taking a unittype parameter for this scenario only.
    • trProtounitActionSpecialEffect

      public void trProtounitActionSpecialEffect(String unitTypeName, String actionName, int playerID, int effectField, String targetType, int dmgType, float duration, float value)
      Modifies proto unit action data by adding a new or adjusting an existing onHitEffect for this scenario only.
    • trModifyProtounitData

      public void trModifyProtounitData(String unitTypeName, int playerID, int puField, float delta, int relativity)
      Modifies proto unit data for this scenario only.
    • trModifyProtounitResource

      public void trModifyProtounitResource(String unitTypeName, String resource, int playerID, int puField, float delta, int relativity)
      Modifies proto unit data taking a resource parameter for this scenario only.
    • trModifyProtounitUnitType

      void trModifyProtounitUnitType(String unitTypeName, String trgUnitType, int playerID, int puField, float delta, int puRelativity)
      Modifies proto unit data taking a unit type parameter for this scenario only.
    • trProtounitAssignAction

      void trProtounitAssignAction(String unitTypeName, String protoUnitName, String protoUnitActionName, int playerID)
      Assigns an action from the provided proto unit to all units belonging to the given unittype for this scenario only.
    • trHealUnitsInArea

      public void trHealUnitsInArea(int playerID, String unitTypeName, float range, float healAmt)
      All units within dist of the selected ref object have their HPs adjusted by the given value.
    • trModifyProtounitAction

      public void trModifyProtounitAction(String unitTypeName, String protoUnitActionName, int playerID, int puField, float delta, int relativity)
      Modifies proto unit action data for this scenario only.
    • trHealUnit

      public void trHealUnit(float healAmt)
      Adjust the units hitpoints by the given value.
    • trHealUnitPercent

      public void trHealUnitPercent(float healPercent)
      Heals the selected units by a percentage of their total HP.
    • trSocketPlaceFoundation

      public int trSocketPlaceFoundation(int playerID, int socketID, String protoName)
      Places a foundation into this socket unit.
    • trUnitPatrolToPoint

      public boolean trUnitPatrolToPoint(float x, float y, float z, boolean bUnitRun, float runSpeedMultiplier)
      Moves the selected unit(s) to the given position.
    • trPlayerSetColor

      public void trPlayerSetColor(int playerID, int playerColorID, int r, int g, int b)
      Sets the player color for the given player.
    • trPlaceFoundation

      public int trPlaceFoundation(String protoName, float x, float y, float z, int heading, int playerID, float pctComplete)
      Places a foundation for the given building and returns the ID of the foundation.
    • trUnitMoveFromAreaToUnit

      public boolean trUnitMoveFromAreaToUnit(int unitID, boolean bAttackMove, int playerID, String unitType, float radius)
      Moves all matching units near the selected unit(s) to the given target unit.
    • trPlayerSetName

      public void trPlayerSetName(int playerID, String name)
      Sets the displayed name for the given player.
    • trGodPowerRedefine

      public void trGodPowerRedefine(int playerID, String protoPowerName, String iconPath, String displayName, String rollover)
      Replaces the icon, and display name and rollover strings of a power for the given player.
    • trUnitPlayerFakifyInArea

      public void trUnitPlayerFakifyInArea(int fakePlayerIndex, int srcPlayerID, String unitTypeName, float range)
      Sets all units within dist of the selected ref object as having the fake player with the specified index (07).
    • trGodPowerSetUsedTimes

      public void trGodPowerSetUsedTimes(int playerID, String protoPowerName, int numUses)
      Overrides the number of timesthe specified God Power has been used.
    • trGodPowerSetCooldown

      public void trGodPowerSetCooldown(int playerID, String protoPowerName, int cooldown)
      Sets the cooldown of the specified God Power for the given player.
    • trGodPowerSetCost

      public void trGodPowerSetCost(int playerID, String protoPowerName, float initialCost, float repeatCost)
      Sets the cost of the specified God Power for the given player.
    • trGodPowerSetUseCount

      public void trGodPowerSetUseCount(int playerID, String protoPowerName, int numUses)
      Sets the number of charges of the specified God Power for the given player.
    • trPlayerTechTreeEnabledGodPowers

      public void trPlayerTechTreeEnabledGodPowers(int playerID, boolean bEnable)
      Enables/Disables the Tech Tree from granting God Powers to a player; Default=ON.
    • trGodPowerEnableBlocking

      public void trGodPowerEnableBlocking(boolean bEnable)
      Sets whether or not God Power blocking is enabled; Default=ON.
    • trGodPowerInvoke

      public void trGodPowerInvoke(int playerID, String protoPowerName, Vector pos1, Vector pos2, boolean ignoreCooldown, boolean setAsQueued)
      Invokes the specified God Power.
    • trPlayerKillAllGodPowers

      public void trPlayerKillAllGodPowers(int playerID)
      Kills all of the current God Powers of a player.
    • trGodPowerGrantAtSlot

      public void trGodPowerGrantAtSlot(int playerID, String protoPowerName, int numUses, int position, int cooldown, boolean useCost, boolean repeatAtEnd)
      Grants X uses of the specified god power in a specific God Power UI slot.
    • trGodPowerPrePurchase

      public boolean trGodPowerPrePurchase(int playerID, String protoPowerName, int numUses)
      Prepurchases X uses of the specified God Power to the player, if applicable.
    • trTechRemove

      public void trTechRemove(int playerID, String protoUnitName, int techID)
      Disables the given tech for the player, and removes it from the UI of the given protoUnit.
    • trGodPowerGrant

      public void trGodPowerGrant(int playerID, String protoPowerName, int numUses, int cooldown, boolean useCost, boolean repeatAtEnd)
      Grants X uses of the specified God Power to the player.
    • trCameraStateView

      public void trCameraStateView(int id, int playerID)
      Puts the camera in the location of a saved camera state, for the given player, or for all players, if no player is set.
    • trExecuteOnAI

      public boolean trExecuteOnAI(int playerID, String command)
      Executes a command on the AI player.
    • trObjectiveRemoveMarker

      public void trObjectiveRemoveMarker(int objectiveID, String name)
      Removes the specified objective marker from the given objective.
    • trForceShowObjectivePanel

      public void trForceShowObjectivePanel(boolean value)
      Forces the objective panel to always display.
    • trObjectiveFailed

      public void trObjectiveFailed(int objectiveID, boolean playSound)
      Sets the specified objective as failed.
    • trObjectiveCreateMarker

      public void trObjectiveCreateMarker(int objectiveID, String name, Vector markerPos)
      Instantiates an objective marker and binds it to the given objective.
    • trPlayerModifyResourceData

      public void trPlayerModifyResourceData(int playerID, int dataField, int resourceID, float delta, int relativity)
      Modifies player data for this scenario only.
    • trUnitCreateFromSourceMulti

      public boolean trUnitCreateFromSourceMulti(String protoName, int srcUnitID, int trgUnitID, int playerID, int count)
      Creates multiple units from a source object.
    • trPlayerTimeshiftModifyCost

      public void trPlayerTimeshiftModifyCost(int playerID, String protoName, float delta, int relativity)
      Modifies timeshifting cost ratio for a given protoUnit for this scenario only.
    • trPlayerTimeshiftAddEntry

      public void trPlayerTimeshiftAddEntry(int playerID, String protoName, float costRatio, float timeRatio)
      Adds a timeshifting entry towards the given protoUnit to a player for this scenario only.
    • trSocketBuild

      public void trSocketBuild(int playerID, int socketID, String protoName)
      Autoconstructs a building over a given socket unit.
    • trPlayerModifyData

      public void trPlayerModifyData(int playerID, int dataField, int attribute, float delta, int relativity)
      Modifies player data for this scenario only.
    • trUnitRotateZ

      public boolean trUnitRotateZ(int degrees, boolean disableTying)
      Rotates the selected units around the Z axis by the given amount of degrees.
    • trUnitSetOrientationForward

      public boolean trUnitSetOrientationForward(int degrees, boolean disableTying)
      Rotates the selected units around the Y axis by the given amount of degrees.
    • trUnitRotateY

      public boolean trUnitRotateY(int degrees, boolean disableTying)
      Rotates the selected units around the Y axis by the given amount of degrees.
    • trUnitRotateX

      public boolean trUnitRotateX(int degrees, boolean disableTying)
      Rotates the selected units around the X axis by the given amount of degrees.
    • trUnitAdjustModifier

      public void trUnitAdjustModifier(int modifyType, int dmgType, float delta, int relativity)
      Adjust existing modifier for given modify type and parameter, when applicable, to selected units.
    • trUnitSetShading

      public void trUnitSetShading(int shadingType, float opacity)
      Assign the given shading type with the set opacity to the selected units.
    • trUnitModifyResourceInventory

      public void trUnitModifyResourceInventory(int resourceID, float delta, int relativity)
      Modifies resource inventory for the selected units.
    • trUnitAddModifier

      public void trUnitAddModifier(int modifyType, int dmgType, float amount, float duration)
      Adds modifier for given modify type and parameter, when applicable, to selected units.
    • trUnitImmobilized

      public boolean trUnitImmobilized()
      Returns true if all selected units are immobilized by a Freeze Action.
    • trGetWorldDifficulty

      public int trGetWorldDifficulty()
      Returns the world difficulty.
    • trUnitReveal

      public void trUnitReveal(int playerID, boolean reveal)
      Reveals the currently selected units to the given player.
    • trUnitSetVeterancyRank

      public void trUnitSetVeterancyRank(int rank)
      Sets the veterancy level for the selected units to the given rank, whenever applicable.
    • trChangeProtoUnitInArea

      public void trChangeProtoUnitInArea(int playerID, String unitTypeName, float range, String dstProtoName, boolean skipBirth)
      All units within dist of the selected ref object are changed into the given protoUnit.
    • trUnitCancelAllQueued

      public void trUnitCancelAllQueued(int unitID)
      Cancels all queued items for the unit.
    • trGenerateLush

      public void trGenerateLush()
      Generates lush for all selected buildings, if owning player supports lush generation.
    • trQueueStartingUnits

      public void trQueueStartingUnits(int playerID)
      Queues starting units for player if they have a starting TC.
    • trArmyClear

      public void trArmyClear(String army)
      Clears the given army, removing all unit IDs from army data.
    • trUnitInLush

      public boolean trUnitInLush(int playerID)
      Returns true if all selected units are within terrain lush belonging to the given player.
    • trTownBellUnrung

      public boolean trTownBellUnrung(int unitID)
      Returns true if town bell has been recently unrung on the given unit.
    • trTownBellRung

      public boolean trTownBellRung(int unitID)
      Returns true if town bell has been recently rung on the given unit.
    • trProtoUnitSetUnitType

      public void trProtoUnitSetUnitType(int playerID, String protoUnit, String unitTypeName, boolean set)
      Sets or unsets the given unit type within the given protounit.
    • trProtoUnitSetFlag

      public void trProtoUnitSetFlag(int playerID, String srcUnitTypeName, String unitTypeName, boolean set)
      Sets or unsets the given flag within the given protounit.
    • trPlayerEnablePartisans

      public void trPlayerEnablePartisans(int playerID, boolean allow)
      Sets whether or not partisan spawning will be enabled for the given player.
    • trPlayerEnableTimeshift

      public void trPlayerEnableTimeshift(int playerID, boolean allow)
      Sets whether or not timeshifting will be enabled for the given player.
    • trPlayerAllowAgeUpSpawning

      public void trPlayerAllowAgeUpSpawning(int playerID, boolean allowSpawning)
      Sets whether or not units will be spawned through ageup techs.
    • trPlayerAllowShades

      public void trPlayerAllowShades(int playerID, boolean allow)
      Sets whether or not the given player will be allowed to spawn shades.
    • trArmyDoWorkOnArmy

      public boolean trArmyDoWorkOnArmy(String srcArmy, String trgArmy, int eventID)
      Tasks the selected army to perform work on the first valid unit within the given arny.
    • trPlayerAllowStartingUnitsSpawning

      public void trPlayerAllowStartingUnitsSpawning(int playerID, boolean allowSpawning)
      Sets whether or not starting units will be spawned for the given player.
    • trUnitSetHitpoints

      public void trUnitSetHitpoints(float value)
      Set the units hitpoints to the given value, respecting maximum hitpoints.
    • trArmyDispatchAtUnit

      public boolean trArmyDispatchAtUnit(String army, String protoname, int count, int trgUnitID, int heading, boolean clearExisting, boolean skipBirth)
      Creates the units in the army specified at the location of the target unit.
    • trGodPowerInvokeAtArmy

      public boolean trGodPowerInvokeAtArmy(int powerPlayerID, String army, String protoPowerName, boolean ignoreCooldown, boolean setAsQueued)
      Invokes the specified God Power at the specified army.
    • trGodPowerCancelAll

      public void trGodPowerCancelAll()
      Cancels all active god powers; You have to be in an active game to use this.
    • trGetNextUnitID

      public int trGetNextUnitID()
      Returns the ID for the next unit to be allocated.
    • trGetRecentUnits

      public int[] trGetRecentUnits()
      Returns an array containing recently created units; If autoresetting is set, returns units created on the last frame.
    • trGetTerrainHeight

      public float trGetTerrainHeight(Vector position)
      Returns the terrain height at the given map position.
    • trPlayerSetCiv

      public void trPlayerSetCiv(int playerID, String civName)
      Replaces the civilization for the given player.
    • trGetWaterType

      public int trGetWaterType(Vector position)
      Fetches the water type ID for the given map position.
    • trWaterAtPosition

      public boolean trWaterAtPosition(String waterTypeName, Vector position)
      Checks if the water at the given map position matches the expected water type.
    • trGetTerrainSubtype

      public int trGetTerrainSubtype(Vector position)
      Fetches the terrain subtype ID for the given map position.
    • trTerrainAtPosition

      public boolean trTerrainAtPosition(String subTypeName, Vector position)
      Checks if the terrain at the given map position matches the expected terrain subtype.
    • trChangeTerrainHeightCircular

      public void trChangeTerrainHeightCircular(Vector center, float radius, float height, boolean removeWater)
      Sets the terrain elevation for the provided circular region.
    • trGetTerrainType

      public int trGetTerrainType(Vector position)
      Fetches the terrain type ID for the given map position.
    • trPaintWaterCircular

      public void trPaintWaterCircular(String waterName, Vector center, float radius, boolean updateObstructions)
      Paints a circular area by the water entry identified by the given name.
    • trChangeTerrainHeight

      public void trChangeTerrainHeight(float x0, float z0, float x1, float z1, float height, boolean removeWater)
      Sets the terrain elevation for the provided rectangular region.
    • trPaintWater

      public void trPaintWater(int waterID, float minX, float minZ, float maxX, float maxZ, boolean circular, boolean updateObstructions)
      Paints an area by the water entry identified by the given ID.
    • trPaintWaterRectangular

      public void trPaintWaterRectangular(String waterName, float x0, float z0, float x1, float z1, boolean updateObstructions)
      Paints a rectangular area by the water entry identified by the given name.
    • trPaintTerrainCircular

      public void trPaintTerrainCircular(int terrainType, int terrainSubtype, Vector center, float radius, boolean updateObstructions)
      Paints a circular area by the given terrain type and subtype.
    • trPaintTerrainCircularBySubtypeName

      public void trPaintTerrainCircularBySubtypeName(String subtypeName, Vector center, float radius, boolean updateObstructions)
      Paints a circular area by the terrain identified by the given terrain subtype UI name.
    • trPaintTerrain

      public void trPaintTerrain(int terrainType, int terrainSubtype, float minX, float minZ, float maxX, float maxZ, boolean updateObstructions)
      Paints a rectangular area by the given terrain type and subtype.
    • trPaintTerrainBySubtypeName

      public void trPaintTerrainBySubtypeName(String subtypeName, float x0, float z0, float x1, float z1, boolean updateObstructions)
      Paints a rectangular area by the terrain identified by the given terrain subtype UI name.
    • trPlayerMutateUnits

      public void trPlayerMutateUnits(int playerID, String srcUnitType, String trgProtoName, boolean fullHitpoints)
      Transforms all units for a player belonging to the given unit type into the set protoUnit through PU mutation, maintaining original BUnit pointer.
    • trPlayerChangeProtoUnit

      public void trPlayerChangeProtoUnit(int playerID, String srcUnitType, String trgProtoName, boolean skipBirth, boolean forceFoundation)
      Transforms all units for a player belonging to the given unit type into the set protoUnit; Does not use PU mutation, and does not maintain original BUnit data.
    • trUnitThrow

      public void trUnitThrow(int direction, float distance, int numBounces, float maxHeight, float maxVelocity, float spinPeriod)
      Throws the selected units with the provided parameters.
    • trMapMutateUnits

      public void trMapMutateUnits(String srcUnitType, String trgProtoName, boolean fullHitpoints)
      Transforms all units on the map belonging to the given unit type into the set protoUnit through PU mutation, maintaining original BUnit pointer.
    • trUnitApplyEffectDamage

      public void trUnitApplyEffectDamage(int effectID, float duration, float damage, int dmgType)
      Applys a given effect with a damage value towards the selected units.
    • trUnitApplyEffectProtoUnit

      public void trUnitApplyEffectProtoUnit(int effectID, float duration, int playerID, String protoName)
      Applys a given effect towards the selected units.
    • trUnitPerformAction

      public void trUnitPerformAction(String actionName, int targetID, Vector targetPos, boolean bypassCharge)
      Performs a given protoAction through the selected units.
    • trUnitApplyEffect

      public void trUnitApplyEffect(int effectID, float duration)
      Applys a given effect towards the selected units.
    • trUnitSetVariation

      public boolean trUnitSetVariation(int variation)
      Sets the variation for the selected units to the given value.
    • trUnitMutate

      public void trUnitMutate(String protoName, boolean fullHitpoints)
      Transforms selected units into the given protoUnit through PU mutation, maintaining original BUnit pointer.
    • trUnitReposition

      public boolean trUnitReposition(float x, float y, float z, boolean disableTying, boolean immediate)
      Sets the position for the selected units to the given absolute coordinates.
    • trUnitRepositionToUnit

      public boolean trUnitRepositionToUnit(int unitID, boolean disableTying, boolean immediate)
      Sets the position for the selected units to the coordinates of the given unit.
    • trUnitSetOrientationUp

      public boolean trUnitSetOrientationUp(int degrees, boolean disableTying)
      Rotates the selected units around the X axis by the given amount of degrees.
    • trUnitSetOrientationRight

      public boolean trUnitSetOrientationRight(int degrees, boolean disableTying)
      Rotates the selected units around the Z axis by the given amount of degrees.
    • trGetCurrentSkyboxUnitID

      public int trGetCurrentSkyboxUnitID()
      Returns the unit ID for the current skybox, if applicable.
    • trRenderSky

      public void trRenderSky(boolean val, String skyName, int orientation, float height, boolean terrainHeight)
      Turn sky rendering on/off and set which sky to use.
    • trDisableRule

      public void trDisableRule(String ruleName)
      Tells the challenge system this rule was activated.
    • trGetSkyboxVariationID

      public int trGetSkyboxVariationID(String skyboxName)
      Returns the variation ID for the given skybox.
    • trPlayerSetScore

      public void trPlayerSetScore(int playerID, int score)
      Overrides the score for a player by the given value.
    • trPlayerAdjustScore

      public void trPlayerAdjustScore(int playerID, int delta)
      Adjust the overridden score value for a player by the given delta.
    • trResetRecentUnits

      public void trResetRecentUnits()
      Resets list of recentlycreated units.
    • trSetAutoResetRecentUnits

      public void trSetAutoResetRecentUnits(boolean enable)
      Sets whether or not the list of recentlycreated units should be reset at each frame; Set to true by default.
    • kbArmyGetUnitID

      public int kbArmyGetUnitID(int armyID, int unitNumber)
      Returns the appropriate unitID from the given army.
    • kbArmyGetNumberUnits

      public int kbArmyGetNumberUnits(int armyID)
      Returns the number of units in the given army.
    • kbArmyGetName

      public String kbArmyGetName(int armyID)
      Returns the name of the given army.
    • kbArmyGetID

      public int kbArmyGetID(String name)
      Returns the ID of the given army.
    • kbArmyGetIDByIndex

      public int kbArmyGetIDByIndex(int index)
      Returns the index-th army ID.
    • kbArmyGetNumber

      public int kbArmyGetNumber()
      Returns the number of armies.
    • kbArmyDestroy

      public void kbArmyDestroy(int armyID)
      Destroys the given army.
    • kbArmyCreate

      public int kbArmyCreate(String name, boolean exclusiveUnits)
      Creates an army with the given name.
    • kbArmyGetIsIDValid

      public boolean kbArmyGetIsIDValid(int armyID)
      Return whether the armyID is valid.
    • kbArmyGetMaximumAICost

      public float kbArmyGetMaximumAICost(int armyID)
      Returns the maximum AI cost (worth) for the given army.
    • kbArmyGetCurrentAICost

      public float kbArmyGetCurrentAICost(int armyID)
      Returns the current AI cost (worth) for the given army.
    • kbArmyGetNumberWithHealth

      public int kbArmyGetNumberWithHealth(int armyID, float minimumHealth)
      Returns the number of units with at least the minimum amount of health specified for the given army.
    • kbArmyGetHealth

      public float kbArmyGetHealth(int armyID)
      Returns the health for the given army.
    • kbArmyGetMaximumHitpoints

      public float kbArmyGetMaximumHitpoints(int armyID)
      Returns the maximum total hitpoints for the given army.
    • kbArmyGetCurrentHitpoints

      public float kbArmyGetCurrentHitpoints(int armyID)
      Returns the current total hitpoints for the given army.
    • kbArmyGetNumberWithinLocation

      public int kbArmyGetNumberWithinLocation(int armyID, Vector location, float range)
      Returns the number of units within range of the given point in the given army (minimum 1.0).
    • kbArmyGetLocation

      public Vector kbArmyGetLocation(int armyID)
      Returns the vector location for the given army.
    • kbArmyGetMembershipTime

      public int kbArmyGetMembershipTime(int armyID)
      Returns the creation time for the given army.
    • kbArmyGetCreationTime

      public int kbArmyGetCreationTime(int armyID)
      Returns the creation time for the given army.
    • kbArmyRemoveUnits

      public void kbArmyRemoveUnits(int armyID)
      Removes all units from the given army.
    • kbArmyRemoveUnitByIndex

      public void kbArmyRemoveUnitByIndex(int armyID, int unitIndex)
      Removes the unitIndex-th unit from the given army.
    • kbArmyRemoveUnit

      public void kbArmyRemoveUnit(int armyID, int unitID)
      Removes the unitID from the given army.
    • kbArmyAddUnit

      public void kbArmyAddUnit(int armyID, int unitID)
      Adds the unitID to the given army.
    • kbTechGetDataEffectData6

      public int kbTechGetDataEffectData6(int techID, int effectIndex)
      The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetDataEffectData5

      public int kbTechGetDataEffectData5(int techID, int effectIndex)
      The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetDataEffectData4

      public int kbTechGetDataEffectData4(int techID, int effectIndex)
      The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetDataEffectData3

      public int kbTechGetDataEffectData3(int techID, int effectIndex)
      The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetDataEffectData2

      public int kbTechGetDataEffectData2(int techID, int effectIndex)
      The value that is returned here is different for each cDataEffect variation, have to figure out yourself what it gives back; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetDataEffectAmount

      public float kbTechGetDataEffectAmount(int techID, int effectIndex)
      Returns the data effects amount at the given effectIndex of the given techID; In the techtree.xml these are denoted by " amount= "; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetDataEffectTargetID

      public int kbTechGetDataEffectTargetID(int techID, int effectIndex)
      Returns the effects target ID of the given techID at the given effectIndex; The return value is the cUnitType constant of the PUID/Abstract defined, the following would return cUnitTypeHoplite
    • kbTechGetDataEffectTargetType

      public int kbTechGetDataEffectTargetType(int techID, int effectIndex)
      Returns the effects target type of the given techID at the given effectIndex; The return values correspond with the cEffectTargetType constants; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetDataEffectType

      public int kbTechGetDataEffectType(int techID, int effectIndex)
      Returns the data effect type at the given effectIndex of the given techID; In the techtree.xml these are denoted by " subtype= "The return values correspond to the cDataEffect constants; Reports warnings as kbTechGetDataEffectMember.
    • kbTechGetNumberEffects

      public int kbTechGetNumberEffects(int techID)
      Returns the number of "" nodes of the tech; CAUTION: this number also includes effects that we're unable to give any information for. Only the " type='Data' " is supported with all other syscalls. For example: a technology could have 4 effects, 3 are data changing effects and one effect sets another tech to active ("type='TechStatus'"). Using this syscall will give you back the number 4. But if you now loop over these 4 effects you only have syscalls to access information from the Data effect one. So the index at which the TechStatus effect lives will return -1 for all syscalls and should be immediately skipped in the script.
    • kbTechGetEffectType

      public int kbTechGetEffectType(int techID, int effectIndex)
      Returns the effect type of the given techID at the given effectIndex; The return values correspond with the cEffectType constants; For anything else than cDataEffect there is no way to get more information sadly.
    • kbTechGetCost

      public float[] kbTechGetCost(int techID)
      Returns the cost of the provided techID, without taking AI weights into account.
    • kbTechGetCostTotal

      public float kbTechGetCostTotal(int techID)
      Returns the total cost of the provided techID, takes AI weights into account.
    • kbTechCanAfford

      public boolean kbTechCanAfford(int techID, int escrowID)
      Returns if the player can afford the provided techID with the current resource stockpile; If provided the escrow will be taken into account.
    • kbTechCostPerResource

      public float kbTechCostPerResource(int techID, int resourceID)
      Returns the cost of the provided techID for the given resourceID.
    • kbTechAffectsUnitType

      public boolean kbTechAffectsUnitType(int techID, int unitTypeID)
      Returns if the provided techID affects the provided unitTypeID; DETAIL: this only looks at cEffectTypeData effects.
    • kbTechAffectsWorkRate

      public boolean kbTechAffectsWorkRate(int techID, int resourceID)
      Returns if the techID affects work rate in any way, for this resourceID must be left at -1; If resourceID is defined it will return if the techID affects the work rate of a specific resourceID.
    • kbTechTreeGetAllObtainableTechnologies

      public int[] kbTechTreeGetAllObtainableTechnologies(boolean needAliveResearcher)
      Returns all technology IDs of the technologies that are obtainable to us (excluding age ups and technologies which prereqs we havent met), the IDs correspond to the cTech constants; If needAliveResearcher is true we exclude technologies for which we have no building alive to research it.
    • kbTechTreeGetResearchers

      public int[] kbTechTreeGetResearchers(int techID)
      Returns all PUIDs that are accessible to us and that can research the provided techID. This will also return PUIDs that are currently not available to us, like locked in a later age.
    • kbTechTreeGetCheapestUnitUpgrade

      public int kbTechTreeGetCheapestUnitUpgrade(int unitTypeID, int researcherTypeID)
      Gets cheapest researchable unit upgrade, optionally for specified unit/unit line.
    • kbTechGetFlag

      public boolean kbTechGetFlag(int techID, int flag)
      Returns if the flag is set for the given techID, cTechFlag constants.
    • kbTechGetType

      public String kbTechGetType(int techID, int typeID)
      Returns if the type is set for the provided techID, these types are defined in tech_types.xml; Related constants are "cTechType".
    • kbTechGetName

      public String kbTechGetName(int techID)
      Returns the name for the provided techID.
    • kbTechGetPercentComplete

      public float kbTechGetPercentComplete(int techID)
      Returns the percent complete for the provided techID; The return value will be within 0.0 and 1.0 (inclusive).
    • kbTechGetResearchPoints

      public float kbTechGetResearchPoints(int techID)
      Returns the research points for the provided techID.
    • kbTechGetID

      public int kbTechGetID(String techName)
      Returns the ID of the technology with the provided techName.
    • kbTechGetStatus

      public int kbTechGetStatus(int techID, boolean checkPrereqs)
      Returns the current tech status for the provided techID; Takes prereqs into account if checkPrereqs is set to true; The return values correspond with the cTechStatus constants.
    • kbCreateTechProgression

      public int kbCreateTechProgression(String techName, String name)
      Creates a tech progression of the given name.
    • kbCreateUnitProgression

      public int kbCreateUnitProgression(String unitName, String name)
      Creates a unit progression of the given name.
    • kbProgressionGetNodeData

      public int kbProgressionGetNodeData(int progressionID, int nodeIndex)
      Returns the data at nodeIndex, either UnitID or TechID, depending on the type.
    • kbProgressionGetNodeType

      public int kbProgressionGetNodeType(int progressionID, int nodeIndex)
      Returns the type of node at the given index, either Unit type or Tech type.
    • kbProgessionGetTotalResourceCost

      public float kbProgessionGetTotalResourceCost(int progressionID, int resourceID)
      Returns the total cost of the given resource for this progressionID; A resourceID of -1 will return the total Cost.
    • kbProgressionGetTotalNodes

      public int kbProgressionGetTotalNodes(int progressionID)
      Returns the total number of steps to complete the progression.
    • xsEnableRule

      public void xsEnableRule(String ruleName)
      Enables the given rule.
    • xsIsRuleEnabled

      public boolean xsIsRuleEnabled(String ruleName)
      Returns true if the rule is enabled.
    • xsDisableRule

      public void xsDisableRule(String ruleName)
      Disables the given rule.
    • xsDisableSelf

      public void xsDisableSelf()
      Disables the current rule.
    • log10

      public float log10(float x)
      Returns the common logarithm of x.
    • sin

      public float sin(float x)
      Returns the sine of x.
    • log

      public float log(float x)
      Returns the natural logarithm of x.
    • log2

      public float log2(float x)
      Returns the binary logarithm of x.
    • sqrt

      public float sqrt(float x)
      Returns the square root of x.
    • ceil

      public float ceil(float x)
      Rounds x up to the next higher integer and returns it as a float.
    • pow

      public float pow(float x, float y)
      Returns the yth power of x (x^y).
    • min

      public float min(float a, float b)
      Returns the smaller of the two values as a float.
    • clamp

      public float clamp(float val, float minVal, float maxVal)
      Clamps a value to the provided interval.
    • floor

      public float floor(float x)
      Rounds x down to the next lower integer and returns it as a float.
    • max

      public float max(float a, float b)
      Returns the larger of the two values as a float.
    • hypot

      public float hypot(float x, float y)
      Returns the hypothenuse between x and y (ie, sqrt(x^2 + y^2)).
    • sgn

      public int sgn(float x)
      Returns the signum of x as an integer (1 if x > 0, -1 if x < 0, or 0 if x == 0).
    • atan

      public float atan(float x)
      Returns the arctangent of x.
    • atan2

      public float atan2(float y, float x)
      Returns the 2-argument arctangent.
    • asin

      public float asin(float x)
      Returns the arcsine of x.
    • acos

      public float acos(float x)
      Returns the arccosine of x.
    • cos

      public float cos(float x)
      Returns the cosine of .
    • tan

      public float tan(float x)
      Returns the tangent of x.
    • xsRandBool

      public boolean xsRandBool(float chanceTrue)
      Returns true with a probability of trueChance in [0.0, 1.0], and false otherwise.
    • xsIntToFloat

      public float xsIntToFloat(int i)
      Casts an int to a float.
    • xsRandInt

      public int xsRandInt(int min, int max)
      Returns a random integer number in the range (inclusive).
    • xsRandFloat

      public float xsRandFloat(float min, float max)
      Returns a random floating point number in the range (inclusive).
    • xsRandSetSeed

      public void xsRandSetSeed(int seed)
      Sets the seed of the random number generator.
    • xsRandGetSeed

      public int xsRandGetSeed()
      Gets the current seed of the random number generator.
    • degToRad

      public float degToRad(float degrees)
      Converts an angle from degrees to radians.
    • radToDeg

      public float radToDeg(float radians)
      Converts an angle from radians to degrees.
    • xsBoolToFloat

      public float xsBoolToFloat(boolean b)
      Casts a bool to a float (1.0 if true, 0.0 if false).
    • xsBoolToString

      public String xsBoolToString(boolean b)
      Casts a bool to a string.
    • xsFloatToString

      public String xsFloatToString(float f)
      Casts a float to a string.
    • xsBoolToInt

      public int xsBoolToInt(boolean b)
      Casts a bool to an int (1 if true, 0 if false).
    • xsFloatToInt

      public int xsFloatToInt(float f)
      Casts a float to an int, truncating the fractional part.
    • xsFloatToBool

      public boolean xsFloatToBool(float f)
      Casts a float to a bool (false if == 0.0, true otherwise).
    • xsIntToBool

      public boolean xsIntToBool(int i)
      Casts an int to a bool (false if == 0, true otherwise).
    • xsIntToString

      public String xsIntToString(int i)
      Casts an int to a string.
    • xsRuleIgnoreIntervalOnce

      public void xsRuleIgnoreIntervalOnce(String ruleName)
      Ignores the next interval and updates as soon as possible.
    • xsEnableRuleGroup

      public void xsEnableRuleGroup(String ruleGroupName)
      Enables all rule in the given rule group.
    • xsSetRuleMaxInterval

      public void xsSetRuleMaxInterval(String ruleName, int interval)
      Sets the max interval of the given rule.
    • xsSetRuleMaxIntervalSelf

      public void xsSetRuleMaxIntervalSelf(int interval)
      Sets the max interval of the current rule.
    • xsSetRuleMinInterval

      public void xsSetRuleMinInterval(String ruleName, int interval)
      Sets the min interval of the given rule.
    • xsSetRuleMinIntervalSelf

      public void xsSetRuleMinIntervalSelf(int interval)
      Sets the min interval of the current rule.
    • xsSetRulePriority

      public void xsSetRulePriority(String ruleName, int priority)
      Sets the priority of the given rule.
    • xsSetRulePrioritySelf

      public void xsSetRulePrioritySelf(int priority)
      Sets the priority of the current rule.
    • xsVectorDistance

      public float xsVectorDistance(Vector v, Vector other)
      Returns the distance between two vectors.
    • xsVectorDistanceSqr

      public float xsVectorDistanceSqr(Vector v, Vector other)
      Returns the squared distance between two vectors.
    • xsVectorDot

      public float xsVectorDot(Vector v, Vector other)
      Returns the dot product of two vectors.
    • xsVectorCross

      public Vector xsVectorCross(Vector v, Vector other)
      Returns the cross product of two vectors.
    • xsVectorCreate

      public Vector xsVectorCreate(float x, float y, float z)
      Set the 3 components into a vector, returns the new vector.
    • xsRuleGroupIgnoreIntervalOnce

      public void xsRuleGroupIgnoreIntervalOnce(String ruleGroupName)
      Ignores the next interval and updates as soon as possible.
    • xsVectorNormalize

      public Vector xsVectorNormalize(Vector v)
      Returns a normalized copy of the given vector.
    • xsVectorLength

      public float xsVectorLength(Vector v)
      Returns the length of the given vector.
    • xsDisableRuleGroup

      public void xsDisableRuleGroup(String ruleGroupName)
      Disables all rules in the given rule group.
    • xsIsRuleGroupEnabled

      public boolean xsIsRuleGroupEnabled(String ruleGroupName)
      Returns true if any rule in the group is enabled.
    • xsVectorRotateXZ

      public Vector xsVectorRotateXZ(Vector v, float theta, Vector offset)
      Returns a rotated copy of the vector on the XZ plane by a given angle; If provided, the offset is used as the center (instead of 0.0/0.0).
    • xsVectorTranslateXZ

      public Vector xsVectorTranslateXZ(Vector v, float radius, float theta)
      Returns a translated copy of the vector on the XZ plane by the given radius and angle.
    • xsVectorAngleBetweenVector

      public float xsVectorAngleBetweenVector(Vector v, Vector other)
      Returns the (smaller) angle between two vectors in radians.
    • xsVectorAngleAroundY

      public float xsVectorAngleAroundY(Vector v, Vector offset)
      Returns the angle of a vector around the Y axis in radians; If provided, the offset is used as the center (instead of 0.0/0.0).
    • xsVectorDistanceToLine

      public float xsVectorDistanceToLine(Vector v, Vector pointOnLine, Vector dir)
      Returns the distance between a point and a line defined by a point on the line and a direction.
    • xsVectorDistanceToLineSegment

      public float xsVectorDistanceToLineSegment(Vector v, Vector p1, Vector p2)
      Returns the distance between a point and a line defined by two points.
    • xsVectorDistanceXZ

      public float xsVectorDistanceXZ(Vector v, Vector other)
      Returns the distance between two vectors without considering the Y dimension.
    • xsVectorDistanceXZSqr

      public float xsVectorDistanceXZSqr(Vector v, Vector other)
      Returns the squared distance between two vectors without considering the Y dimension.
    • abs

      public float abs(float x)
      Returns the absolute value of x as a float.
    • round

      public float round(float x)
      Rounds x to the nearest integer and returns it as a float.
    • xsStartTimer

      public void xsStartTimer()
      Starts the timer.
    • xsEchoTimerMS

      public void xsEchoTimerMS()
      Prints the time in milliseconds that elapsed since the timer was last started.
    • xsGetTime

      public int xsGetTime()
      Returns the current gametime (in seconds).
    • xsGetTimeMS

      public int xsGetTimeMS()
      Returns the current gametime (in milliseconds).
    • xsGetContextPlayer

      public int xsGetContextPlayer()
      Returns the current context player ID.
    • xsSetContextPlayer

      public void xsSetContextPlayer(int playerID)
      Sets the current context player ID (DO NOT DO THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING).
    • xsStringFindLast

      public int xsStringFindLast(String s, String sub, int startIdx, boolean caseSensitive)
      Returns the index of the last occurrence of a string in another string, searching backwards from the given index; Returns1 if the substring is not found.
    • xsStringContains

      public boolean xsStringContains(String s, String sub, boolean caseSensitive)
      Returns true if the given substring is present in the string, and false otherwise.
    • xsStringCharAt

      public String xsStringCharAt(String s, int index)
      Returns the character at the given index of a string as a string(or an empty string on invalid index).
    • xsStringFindFirst

      public int xsStringFindFirst(String s, String sub, int startIdx, boolean caseSensitive)
      Returns the index of the first occurrence of a string in another string, searching from the given index; Returns1 if the substring is not found.
    • xsStringToBool

      public boolean xsStringToBool(String s)
      Parses a bool from a string(returning false on invalid input).
    • xsStringLength

      public int xsStringLength(String s)
      Returns the length of a string.
    • xsStringToInt

      public int xsStringToInt(String s)
      Parses an integer from a string(returning 0 on invalid input).
    • xsStringToFloat

      public float xsStringToFloat(String s)
      Parses a float from a string(returning 0.0 on invalid input).
    • xsStringToUpper

      public String xsStringToUpper(String s)
      Returns a string in upper case.
    • xsStringSubString

      public String xsStringSubString(String s, int startIdx, int endIdx)
      Returns a substring in the range of the given indices (inclusive) for a string.
    • xsStringToLower

      public String xsStringToLower(String s)
      Returns a string in lower case.
    • xsStringStartsWith

      public boolean xsStringStartsWith(String s, String sub, boolean caseSensitive)
      Returns true if the string starts with the given substring, and false otherwise.
    • xsStringEndsWith

      public boolean xsStringEndsWith(String s, String sub, boolean caseSensitive)
      Returns true if the string ends with the given substring, and false otherwise.