Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

A lua script hook for the game "The Settlers 6" and "The Settlers 6: History Edition".

License

Notifications You must be signed in to change notification settings

Eisenmonoxid/EMXHookingLibrary

Repository files navigation

EMXHookingLibrary

A lua script hook for the games "The Settlers 6" and "The Settlers 6: History Edition". Will very likely never be truly finished ;)

If you want to use the hook library in your map and you need help, ask on my Discord.

Uses the "BigNum.lua" library. Special thanks to the authors!

Usage

Include the file "emxhooklib.bin" in your map folder and load it with "Script.Load()" in the global map script. Then call the function EMXHookLibrary.Initialize(_useLoadGameOverride, _maxMemorySizeToAllocate, _useGeneralGameBugfixes) and after that, you can use the exported methods (listed below) however you like. All three function arguments are optional. The boolean return value suggests if the initialization was successful.

Hint: To reset the hooked values, use the function argument EMXHookLibrary.Initialize(true) and have the function EMXHookLibrary_ResetValues(_source, _stringParam) in your global map script, which will be automatically called when the map is closed. Put all your functions in there to reset your changed values.

Should you be interested in an example map script that uses the features of the HookLibrary extensively, look Here and Here.

Bugfixes

Currently, the Hook supports the following general game bug fixes. These become active when the third argument to the Initialize function is true. In Multiplayer maps, set the first argument _useLoadGameOverride to nil.

  • Fix Entertainercrash: When dismissing an entertainer, the game would crash.
  • Fix GUI.SendScriptCommand: In the History Edition Multiplayer (without activated Development-Mode), the function was not executed.

Features

For a comprehensive list of features, take a look at either the German Features or the English Features file.

About

A lua script hook for the game "The Settlers 6" and "The Settlers 6: History Edition".

Topics

Resources

License

Stars

Watchers

Forks

Languages