|
|
Line 1: |
Line 1: |
− | {{Game Modification Infobox
| + | Acolyte the best treaty player of all Time |
− | | type = Game Enhancement
| |
− | | environment = ESOC Patch
| |
− | | latest_release_date = December 18, 2018
| |
− | | initial_release_date = May 28, 2018
| |
− | | status = Actively maintained
| |
− | | developer = Eaglemut
| |
− | | developer2 = musketeer925
| |
− | }}
| |
| | | |
− | '''''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 Script]]ing or [[User Interface development]]. The plugin is distributed together with [[ESOC Patch]] since version 5.0.0.0.
| + | Esoc Community Staff are the most hypocrite poeple |
− | | |
− | | |
− | == List of available syscalls ==
| |
− | | |
− | 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:
| |
− | <blockquote><pre>
| |
− | string forestType = "z87 Australian Woodland"; // special forest only available on EP
| |
− | if (rmIsEnvironmentESOC() == false)
| |
− | {
| |
− | forestType = "great plains forest";
| |
− | }
| |
− | </pre></blockquote>
| |
− | | |
− | === ''Included from version 5.0.0.0'' ===
| |
− | | |
− | ====int '''kbUnitGetTactic'''(int unitID)====
| |
− | Originally aiUnitGetTactic, exported to [[KB context]] for use outside [[AI script]]s. Gets the specified [[unit]]'s current [[tactic]].<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====int '''rmGetGameMode'''()====
| |
− | Originally aiGetGameMode, exported to [[RM context]] for use outside [[AI script]]s. Returns the current [[game mode]].<br />
| |
− | Possible return values: cGameModeSupremacy, cGameModeDeathmatch, cGameModeConquest (probably irrelevant), cGameModeLightning (probably irrelevant)<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====int '''rmGetWorldDifficulty'''()====
| |
− | Originally aiGetWorldDifficulty, exported to [[RM context]] for use outside [[AI script]]s. Returns the current [[difficulty level]].<br />
| |
− | Possible return values: cDifficultySandbox, cDifficultyEasy, cDifficultyModerate, cDifficultyHard, cDifficultyExpert<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1''' on regular maps, '''0''' on [[Aizamk's Spectator UI|Observer UI]] maps (equal to cDifficultySandbox)
| |
− | | |
− | ====bool '''rmIsEnvironmentESOC'''()====
| |
− | Simply returns true to indicate script is run in the '''''ESOC UHC Plugin''''' environment. Useful to define conditional logic dependent on the [[ESOC Patch|ESOC environment]] and unavailable in other environments ([[Official Patch|RE]]/[[Wars of Libery|WoL]]/[[Napoleonic Era|NE]]..).<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''kbIsEnvironmentESOC'''
| |
− | | |
− | === ''Included from version 5.1.0.0'' ===
| |
− | | |
− | ====bool '''trUnitSetTactic'''(int unitID, int tacticID)====
| |
− | Originally aiUnitSetTactic, exported to [[TR context]] for use outside [[AI script]]s. Sets specified [[tactic]] on the specified [[unit]].<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====void '''trRepairUnit'''(int unitID)====
| |
− | Originally repairUnit, exported for use outside [[UI command]]s. [[Repair]]s the specified [[unit]].<br />
| |
− | In [[ESOC Compatible Map Pack]], any usage of this function is removed.<br />
| |
− | Aliases in other contexts: '''aiRepairUnit'''
| |
− | | |
− | ====int '''kbGetScore'''(int playerID)====
| |
− | Originally aiGetScore, exported to [[KB context]] for use outside [[AI script]]s. Gets the specified [[player]]'s current [[score]].<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====string '''kbGetTacticName'''(int tacticID)====
| |
− | Gets [[tactic]] name by ID.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by string: '''EUPL_UNKNOWN_VALUE'''
| |
− | | |
− | ====int '''kbGetTacticIDByName'''(string tacticName)====
| |
− | Gets [[tactic]] ID by name.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====int '''kbGetTechIDByName'''(string techName)====
| |
− | Gets [[tech]] ID by name.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====int '''kbGetUnitTypeIDByName'''(string unitTypeName)====
| |
− | Gets [[unit type]] ID by name.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====int '''kbGetCivIDByName'''(string civName)====
| |
− | Gets [[civilization]] ID by name.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''
| |
− | | |
− | ====bool '''kbIsMultiplayer'''()====
| |
− | Originally aiIsMultiplayer, exported for use outside [[AI script]]s. Returns true if currently in [[multiplayer]], false otherwise.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''rmIsMultiplayer'''
| |
− | | |
− | ====Persistent Storage API====
| |
− | | |
− | 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)=====
| |
− | Returns true if given key exists in the persistent array of integers.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageIntIsSet'''
| |
− | | |
− | =====int '''kbPersistentStorageIntGet'''(string key)=====
| |
− | Returns value for the specified key in the persistent array of integers, or -1 if no value is set for the key.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageIntGet'''
| |
− | | |
− | =====void '''kbPersistentStorageIntSet'''(string key, int value)=====
| |
− | Sets value for the specified key in the persistent array of integers.<br />
| |
− | In [[ESOC Compatible Map Pack]], any usage of this function is removed.<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageIntSet''', '''uiPersistentStorageIntSet'''
| |
− | | |
− | =====bool '''kbPersistentStorageFloatIsSet'''(string key)=====
| |
− | Returns true if given key exists in the persistent array of floats.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageFloatIsSet'''
| |
− | | |
− | =====float '''kbPersistentStorageFloatGet'''(string key)=====
| |
− | Returns value for the specified key in the persistent array of floats, or -1 if no value is set for the key.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageFloatGet'''
| |
− | | |
− | =====void '''kbPersistentStorageFloatSet'''(string key, float value)=====
| |
− | Sets value for the specified key in the persistent array of floats.<br />
| |
− | In [[ESOC Compatible Map Pack]], any usage of this function is removed.<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageFloatSet''', '''uiPersistentStorageFloatSet'''
| |
− | | |
− | =====bool '''kbPersistentStorageStringIsSet'''(string key)=====
| |
− | Returns true if given key exists in the persistent array of strings.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageStringIsSet'''
| |
− | | |
− | =====string '''kbPersistentStorageStringGet'''(string key)=====
| |
− | Returns value for the specified key in the persistent array of strings, or an empty string if no value is set for the key.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by string: '''EUPL_UNKNOWN_VALUE'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageStringGet''', '''uiPersistentStorageStringGet'''
| |
− | | |
− | =====void '''kbPersistentStorageStringSet'''(string key, string value)=====
| |
− | Sets value for the specified key in the persistent array of strings.<br />
| |
− | In [[ESOC Compatible Map Pack]], any usage of this function is removed.<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageStringSet''', '''uiPersistentStorageStringSet'''
| |
− | | |
− | =====bool '''kbPersistentStorageBoolIsSet'''(string key)=====
| |
− | Returns true if given key exists in the persistent array of booleans.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageBoolIsSet'''
| |
− | | |
− | =====bool '''kbPersistentStorageBoolGet'''(string key)=====
| |
− | Returns value for the specified key in the persistent array of booleans, or false if no value is set for the key.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageBoolGet'''
| |
− | | |
− | =====void '''kbPersistentStorageBoolSet'''(string key, bool value)=====
| |
− | Sets value for the specified key in the persistent array of booleans.<br />
| |
− | In [[ESOC Compatible Map Pack]], any usage of this function is removed.<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageBoolSet''', '''uiPersistentStorageBoolSet'''
| |
− | | |
− | =====bool '''kbPersistentStorageVectorIsSet'''(string key)=====
| |
− | Returns true if given key exists in the persistent array of vectors.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''false'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageVectorIsSet'''
| |
− | | |
− | =====vector '''kbPersistentStorageVectorGet'''(string key)=====
| |
− | Returns value for the specified key in the persistent array of vectors, or cInvalidVector if no value is set for the key.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''cInvalidVector'''<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageVectorGet'''
| |
− | | |
− | =====void '''kbPersistentStorageVectorSet'''(string key, vector value)=====
| |
− | Sets value for the specified key in the persistent array of vectors.<br />
| |
− | In [[ESOC Compatible Map Pack]], any usage of this function is removed.<br />
| |
− | Aliases in other contexts: '''rmPersistentStorageVectorSet''', '''uiPersistentStorageVectorSet'''
| |
− | | |
− | === ''Included from version 5.1.1.0'' ===
| |
− | | |
− | The "time" collection of helper functions is designed to make functionalities dependent on real date/time possible.
| |
− | | |
− | =====int '''kbTimeGetCurrentCalendarYear'''(bool gmt)=====
| |
− | Returns current calendar year in either gmt or local time.<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''<br />
| |
− | Aliases in other contexts: '''rmTimeGetCurrentCalendarYear'''
| |
− | | |
− | =====int '''kbTimeGetCurrentCalendarMonth'''(bool gmt)=====
| |
− | Returns current calendar month in either gmt or local time (1-12).<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''<br />
| |
− | Aliases in other contexts: '''rmTimeGetCurrentCalendarMonth'''
| |
− | | |
− | =====int '''kbTimeGetCurrentCalendarDay'''(bool gmt)=====
| |
− | Returns current calendar day in either gmt or local time (1-31).<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''<br />
| |
− | Aliases in other contexts: '''rmTimeGetCurrentCalendarDay'''
| |
− | | |
− | =====int '''kbTimeGetCurrentHour'''(bool gmt)=====
| |
− | Returns current hour of the current day in either gmt or local time (0-23).<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''<br />
| |
− | Aliases in other contexts: '''rmTimeGetCurrentHour'''
| |
− | | |
− | =====int '''kbTimeGetCurrentMinute'''(bool gmt)=====
| |
− | Returns current minute of the current hour in either gmt or local time (0-59).<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by: '''-1'''<br />
| |
− | Aliases in other contexts: '''rmTimeGetCurrentMinute'''
| |
− | | |
− | =====string '''kbTimeGetCurrentFormatted'''(bool gmt, string format)=====
| |
− | Returns current date/time as a string in either gmt or local time, formatted per the format argument. See the documention of put_time for all available formats: https://en.cppreference.com/w/cpp/io/manip/put_time<br />
| |
− | In [[ESOC Compatible Map Pack]], usage of this function is replaced by string: '''EUPL_UNKNOWN_VALUE'''<br />
| |
− | Aliases in other contexts: '''rmTimeGetCurrentFormatted'''
| |
− | | |
− | == List of available cheat codes ==
| |
− | | |
− | === ''Included from version 5.0.0.0'' ===
| |
− | | |
− | ====cowhax====
| |
− | * Turn all enemy [[villager]]s into [[cow]]s.
| |
− | ====this is a complication====
| |
− | * Gain 100 [[shipment]]s.
| |
− | ====kill 'em all====
| |
− | * Spawn 50 [[heavy cannon]]s.
| |
− | ====fear the elifents====
| |
− | * Spawn 10 of each [[mansabdar]] elephant.
| |
− | ====it's raining men====
| |
− | * Spawn 20 [[Coureur des Bois]] and a rain effect.
| |
− | ====dev====
| |
− | * Invokes "it's raining men" + "this is a complication". Grants ten thousand of each [[resource]], turns off [[fog of war|fog]] & [[blackmap]], increases research rate times 100.<br />
| |
− | * ''Since 5.1.0.0:'' Also grants 50 [[population space]].
| |
− | ====devx====
| |
− | * Can only be used in singleplayer. Invokes "dev", grants x100 [[handicap]] and x100 train rate.
| |
− | ====devr====
| |
− | * Reset research/train rates to normal, reset handicap to none, reactivate fog & blackmap.
| |
− | | |
− | | |
− | == External links ==
| |
− | | |
− | * [https://eso-community.net/viewtopic.php?f=110&t=14686 Forum thread for feedback and reporting issues]
| |