Use HTML to execute code before the game does.
This project and its derivatives are only intented to be used for learning purposes. This repository won't contain any anti-anti-cheat.
The responsibility arising from the use of this project and its derivatives in multiplayer games shall be borne by the users themselves.
This project is designed to work exclusively with assembly logic code generated by compiled languages. Execution on interpreted languages or bytecode virtual machine executables may cause unexpected results.
- Download latest mod loader in releases.
- Put
winhttp.dlltogether with the game's executable (e.g.Sky.exe). - Create
htmodloaderfolder in the folder containsSky.exe. Your directory should look like this:
<Game installation directory>
├─Sky.exe
├─htmodloader
│ └─mods
│ ├─<A single mod>
│ │ ├─manifest.json
│ │ └─<mod executable>.dll
│ └─<...>
├─html-config.json
├─winhttp.dll
└─<...>
- Place each mod in a separated folder within
mods. Every mod should contain an executable file (dll) and amanifest.jsonat least. - Start the game, and view loaded mods in
HTML Main Menu.
Use MinGW-w64 15.1.0 to build the project.
- Clone the repository.
- Change the working directory to
HTML-Sky, then executemingw32-make.exe allon the first compilation. - If you have some issues on
libraries/leveldb/lib/leveldb.lib, clone and buildhttps://github.com/extremeheat/leveldb-mcpe.git, and replaceleveldb.libwith your own building. HTModLoader uses C API of leveldb-mcpe only, so we don't care about binary compatibility.
The pre-compiled sky- versions only contain the backends that Sky needs (Vulkan layer and the sky game backend). full- versions contains the logger and all avaliable backends.
Download the version you need.
- Download the latest HTML SDK zip in releases.
- Write your own dll codes with HTML APIs and internal ImGui. You should include the provided ImGui headers by the SDK.
- Compile and link
htmodloader.libwith MinGW. HTML is compiled under MinGW, and it may cause problems due to different ABIs if compiling with MSVC. The mod should use c11 and c++17 standard. - Write
manifest.jsonfor the mod. Please remove the comments before put it into the game.
{
// Internal mod id, must be unique.
"package_name": "modtest",
// Mod version.
"version": "1.0.0",
// Compatible game edition flags. Check the backends for further information.
// -1 for all games.
"game_edition": 3,
// Display name.
"mod_name": "Mod Test",
// Mod description.
"description": "Test mod of HT's Mod Loader",
// Executable file of the mod.
"main": "modtest.dll",
// Mod dependencies. Unused.
"dependencies": {},
// Unused.
"keywords": [
"test"
],
// Mod author and license.
"author": "HTMonkeyG",
"license": "MIT",
// Mod website.
"website": ""
}- Place your mod DLL and the
manifest.jsonfile together in a folder within thehtmodsdirectory. The subfolder can have any name.
- Download the latest HTML SDK zip in releases.
- Download the
libraries/imgui-*directory located under the tag that corresponds to the SDK version, and add them into your project. - Write your own dll codes with HTML APIs and downloaded ImGui. On the first
HTModRenderGui()call, useHTImGuiDispatch()to get ImGui contexts, then useImGui::SetCurrentContext()andImGui::SetAllocatorFunctions()to set the context. Invoke ImGui functions withinHTModRenderGui()only. - The same as
How to create a mod?.