Actions

ESOC UHC Plugin

From The ESOC wiki for Age of Empires 3

ESOC UHC Plugin

Mod type
Game Enhancement
Part of
ESOC Patch
Initial release
May 28, 2018
Stable release
November 28, 2018
Status
Actively maintained
Developed by
Eaglemut
musketeer925

Contents



ESOC UHC Plugin is a game plugin developed primarily for ESOC Patch, though it can be utilized by any game version through the UHC Plugin System. Features include new cheat codes and an expanded number of helpful syscalls for Random Map Scripting or User Interface development. The plugin is distributed together with ESOC Patch since version 5.0.0.0.


List of available syscalls[edit | edit source]

The syscall replacement as defined in this specification makes it possible to develop cross-compatible maps that work to a certain extent even on environments without ESOC UHC Plugin included. Syscall replacement for ESOC Compatible Map Pack currently works in a rudimentary way by detecting first closing bracket as the end of function call. It is therefore not allowed to use the closing bracket for any other purpose inside a function's parameter list, such as calling another function.

Example of implementing a compatible fallback in a Random Map Script, based on the syscall replacement specification:

string forestType = "z87 Australian Woodland"; // special forest only available on EP
if (rmIsEnvironmentESOC() == false)
{
	forestType = "great plains forest";
}

Included from version 5.0.0.0[edit | edit source]

int kbUnitGetTactic(int unitID)[edit | edit source]

Originally aiUnitGetTactic, exported to KB context for use outside AI scripts. Gets the specified unit's current tactic.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

int rmGetGameMode()[edit | edit source]

Originally aiGetGameMode, exported to RM context for use outside AI scripts. Returns the current game mode.
Possible return values: cGameModeSupremacy, cGameModeDeathmatch, cGameModeConquest (probably irrelevant), cGameModeLightning (probably irrelevant)
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

int rmGetWorldDifficulty()[edit | edit source]

Originally aiGetWorldDifficulty, exported to RM context for use outside AI scripts. Returns the current difficulty level.
Possible return values: cDifficultySandbox, cDifficultyEasy, cDifficultyModerate, cDifficultyHard, cDifficultyExpert
In ESOC Compatible Map Pack, usage of this function is replaced by: -1 on regular maps, 0 on Observer UI maps (equal to cDifficultySandbox)

bool rmIsEnvironmentESOC()[edit | edit source]

Simply returns true to indicate script is run in the ESOC UHC Plugin environment. Useful to define conditional logic dependent on the ESOC environment and unavailable in other environments (RE/WoL/NE..).
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: kbIsEnvironmentESOC

Included from version 5.1.0.0[edit | edit source]

bool trUnitSetTactic(int unitID, int tacticID)[edit | edit source]

Originally aiUnitSetTactic, exported to TR context for use outside AI scripts. Sets specified tactic on the specified unit.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

void trRepairUnit(int unitID)[edit | edit source]

Originally repairUnit, exported for use outside UI commands. Repairs the specified unit.
In ESOC Compatible Map Pack, any usage of this function is removed.
Aliases in other contexts: aiRepairUnit

int kbGetScore(int playerID)[edit | edit source]

Originally aiGetScore, exported to KB context for use outside AI scripts. Gets the specified player's current score.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

string kbGetTacticName(int tacticID)[edit | edit source]

Gets tactic name by ID.
In ESOC Compatible Map Pack, usage of this function is replaced by string: EUPL_UNKNOWN_VALUE

int kbGetTacticIDByName(string tacticName)[edit | edit source]

Gets tactic ID by name.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

int kbGetTechIDByName(string techName)[edit | edit source]

Gets tech ID by name.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

int kbGetUnitTypeIDByName(string unitTypeName)[edit | edit source]

Gets unit type ID by name.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

int kbGetCivIDByName(string civName)[edit | edit source]

Gets civilization ID by name.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1

bool kbIsMultiplayer()[edit | edit source]

Originally aiIsMultiplayer, exported for use outside AI scripts. Returns true if currently in multiplayer, false otherwise.
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: rmIsMultiplayer

Persistent Storage API[edit | edit source]

The persistent storage syscalls are designed to allow implementing session-like logic. Values stored using these syscalls will persist throughout a game session until the game client is fully closed by user, this makes it easy to implement behavior affected by results of a previous match.

bool kbPersistentStorageIntIsSet(string key)[edit | edit source]

Returns true if given key exists in the persistent array of integers.
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: rmPersistentStorageIntIsSet

int kbPersistentStorageIntGet(string key)[edit | edit source]

Returns value for the specified key in the persistent array of integers, or -1 if no value is set for the key.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1
Aliases in other contexts: rmPersistentStorageIntGet

void kbPersistentStorageIntSet(string key, int value)[edit | edit source]

Sets value for the specified key in the persistent array of integers.
In ESOC Compatible Map Pack, any usage of this function is removed.
Aliases in other contexts: rmPersistentStorageIntSet, uiPersistentStorageIntSet

bool kbPersistentStorageFloatIsSet(string key)[edit | edit source]

Returns true if given key exists in the persistent array of floats.
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: rmPersistentStorageFloatIsSet

float kbPersistentStorageFloatGet(string key)[edit | edit source]

Returns value for the specified key in the persistent array of floats, or -1 if no value is set for the key.
In ESOC Compatible Map Pack, usage of this function is replaced by: -1
Aliases in other contexts: rmPersistentStorageFloatGet

void kbPersistentStorageFloatSet(string key, float value)[edit | edit source]

Sets value for the specified key in the persistent array of floats.
In ESOC Compatible Map Pack, any usage of this function is removed.
Aliases in other contexts: rmPersistentStorageFloatSet, uiPersistentStorageFloatSet

bool kbPersistentStorageStringIsSet(string key)[edit | edit source]

Returns true if given key exists in the persistent array of strings.
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: rmPersistentStorageStringIsSet

string kbPersistentStorageStringGet(string key)[edit | edit source]

Returns value for the specified key in the persistent array of strings, or an empty string if no value is set for the key.
In ESOC Compatible Map Pack, usage of this function is replaced by string: EUPL_UNKNOWN_VALUE
Aliases in other contexts: rmPersistentStorageStringGet, uiPersistentStorageStringGet

void kbPersistentStorageStringSet(string key, string value)[edit | edit source]

Sets value for the specified key in the persistent array of strings.
In ESOC Compatible Map Pack, any usage of this function is removed.
Aliases in other contexts: rmPersistentStorageStringSet, uiPersistentStorageStringSet

bool kbPersistentStorageBoolIsSet(string key)[edit | edit source]

Returns true if given key exists in the persistent array of booleans.
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: rmPersistentStorageBoolIsSet

bool kbPersistentStorageBoolGet(string key)[edit | edit source]

Returns value for the specified key in the persistent array of booleans, or false if no value is set for the key.
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: rmPersistentStorageBoolGet

void kbPersistentStorageBoolSet(string key, bool value)[edit | edit source]

Sets value for the specified key in the persistent array of booleans.
In ESOC Compatible Map Pack, any usage of this function is removed.
Aliases in other contexts: rmPersistentStorageBoolSet, uiPersistentStorageBoolSet

bool kbPersistentStorageVectorIsSet(string key)[edit | edit source]

Returns true if given key exists in the persistent array of vectors.
In ESOC Compatible Map Pack, usage of this function is replaced by: false
Aliases in other contexts: rmPersistentStorageVectorIsSet

vector kbPersistentStorageVectorGet(string key)[edit | edit source]

Returns value for the specified key in the persistent array of vectors, or cInvalidVector if no value is set for the key.
In ESOC Compatible Map Pack, usage of this function is replaced by: cInvalidVector
Aliases in other contexts: rmPersistentStorageVectorGet

void kbPersistentStorageVectorSet(string key, vector value)[edit | edit source]

Sets value for the specified key in the persistent array of vectors.
In ESOC Compatible Map Pack, any usage of this function is removed.
Aliases in other contexts: rmPersistentStorageVectorSet, uiPersistentStorageVectorSet


List of available cheat codes[edit | edit source]

Included from version 5.0.0.0[edit | edit source]

cowhax[edit | edit source]

this is a complication[edit | edit source]

kill 'em all[edit | edit source]

fear the elifents[edit | edit source]

it's raining men[edit | edit source]

dev[edit | edit source]

  • Invokes "it's raining men" + "this is a complication". Grants ten thousand of each resource, turns off fog & blackmap, increases research rate times 100.
  • Since 5.1.0.0: Also grants 50 population space.

devx[edit | edit source]

  • Can only be used in singleplayer. Invokes "dev", grants x100 handicap and x100 train rate.

devr[edit | edit source]

  • Reset research/train rates to normal, reset handicap to none, reactivate fog & blackmap.


External links[edit | edit source]