Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit e1432b5

Browse files
committed
Support Armored Core 6
Version bump to 2.1.0
1 parent b84f2ee commit e1432b5

20 files changed

+111
-20
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
55
include(GetGitRevisionDescription)
66
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
77

8-
set(version "2.0.1")
8+
set(version "2.1.0")
99
set(VCPKG_TOOLS "${CMAKE_BINARY_DIR}/vcpkg_installed/x64-windows")
1010

1111
# Detours currently has no CMake manifests: https://github.com/microsoft/Detours/pull/48.

cmake/ModEngineInstaller.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set(CPACK_PACKAGE_NAME "ModEngine")
22
set(CPACK_PACKAGE_VENDOR "https://github.com/soulsmods/modengine2")
33
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mod Engine 2 - Mod companion framework for Souls games")
4-
set(CPACK_PACKAGE_VERSION "2.0.0.1")
4+
set(CPACK_PACKAGE_VERSION "2.1.0.0")
55
set(CPACK_PACKAGE_INSTALL_DIRECTORY "modengine2")
66
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/installer/resources/LICENSE.txt")
77
set(CPACK_WIX_UPGRADE_GUID "1bf93396-5829-4275-8e34-01e443d54a98")
@@ -71,8 +71,10 @@ install(FILES tools/scylla/InjectorCLIx64.exe
7171
install(FILES
7272
installer/dist/config_darksouls3.toml
7373
installer/dist/config_eldenring.toml
74+
installer/dist/config_armoredcore6.toml
7475
installer/dist/launchmod_darksouls3.bat
7576
installer/dist/launchmod_eldenring.bat
77+
installer/dist/launchmod_armoredcore6.bat
7678
installer/dist/README.txt
7779
DESTINATION .
7880
COMPONENT application)

include/modengine/extension.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ class ModEngineExtension {
110110
}
111111

112112
template <typename T>
113-
void register_hook(GameType type, ScannedHook<T> *hook, const ScanPattern &signature, T detour, HookScanMode mode)
113+
void register_hook(GameType type, ScannedHook<T> *hook, const ScanPattern &signature, int64_t offset, T detour, HookScanMode mode)
114114
{
115115
hook->mode = mode;
116116
hook->pattern = signature;
117+
hook->offset = offset;
117118
hook->replacement = detour;
118119

119120
m_ext_connector->register_hook(type, (ScannedHook<GenericFunctionPointer>*) hook);

include/modengine/game_type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ enum GameType : std::uint32_t {
1010
DS3 = 1 << 2,
1111
SEKIRO = 1 << 3,
1212
ELDEN_RING = 1 << 4,
13+
ARMORED_CORE_6 = 1 << 5,
1314
ALL = 0xFFFFFFFF
1415
};
1516

include/modengine/hook.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,18 @@ template <typename T>
5252
struct ScannedHook {
5353
ScannedHook()
5454
: mode(SCAN_FUNCTION)
55+
, pattern()
56+
, offset(0)
5557
, original(nullptr)
5658
, replacement(nullptr)
5759
, applied(false)
5860
{
5961
}
6062

61-
ScannedHook(HookScanMode _mode, ScanPattern _pattern, T _replacement)
63+
ScannedHook(HookScanMode _mode, ScanPattern _pattern, int64_t _offset, T _replacement)
6264
: mode(_mode)
6365
, pattern(_pattern)
66+
, offset(_offset)
6467
, original(nullptr)
6568
, replacement(_replacement)
6669
, applied(false)
@@ -75,6 +78,7 @@ struct ScannedHook {
7578
bool applied;
7679
HookScanMode mode;
7780
ScanPattern pattern;
81+
int64_t offset;
7882
T original;
7983
T replacement;
8084
};

installer/dist/README.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Mod Engine 2 Preview release:
22

3-
This is a preview release of Mod Engine 2 for Elden Ring. Mod Engine 2 is a utility for injecting various code into the game
4-
for the use of mods. Among other things, Mod Engine 2 allows the usage of mods that modify the game files without having to
5-
go through the hassle of unpacking the game archives and patching the game exe. Mod Engine 2 does this by injecting code into
6-
the game's asset system, and redirecting the game to load a modded file inside your mod folder if one exists instead of loading
7-
the original file in the game's big archives.
3+
This is a preview release of Mod Engine 2 for Elden Ring and Armored Core 6. Mod Engine 2 is a utility for injecting various
4+
code into the game for the use of mods. Among other things, Mod Engine 2 allows the usage of mods that modify the game files
5+
without having to go through the hassle of unpacking the game archives and patching the game exe. Mod Engine 2 does this
6+
by injecting code into the game's asset system, and redirecting the game to load a modded file inside your mod folder if
7+
one exists instead of loading the original file in the game's big archives.
88

99
Mod Engine 2 is a ground up rewrite of Mod Engine and is designed to improve over the existing user experience while also being
1010
more reliable and having more infrastructure to diagnose issues. This public release currently only supports modded file injection,
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Global mod engine configuration
2+
[modengine]
3+
# If set to true the debug console will appear while the game is running
4+
debug = false
5+
6+
# List of files that will be loaded into the game as DLL mods.
7+
# Absolute paths to mods are supported but must use '\\' to separate path items. For example, if your mod is at E:\coolstuff\coolmod.dll, you must enter
8+
# the path in the config as "E:\\coolstuff\\coolmod.dll".
9+
# If there's no drive specifier (C:, D:, etc), the path is relative to where the launcher is located. For example, having the path as "mod.dll" will tell
10+
# Mod Engine 2 to look for the directory mod inside the Mod Engine 2 directory with the launcher.
11+
#
12+
# Multiple mods must be separated with commas. For example if you have 3 mods, you will have something like the following:
13+
# external_dlls = [ "coolmod.dll", "D:\\nicemods\\nicemod.dll", "sosofolder\sosomod.dll" ]
14+
external_dlls = []
15+
16+
# Mod loader configuration
17+
[extension.mod_loader]
18+
enabled = true
19+
20+
# Not applicable for Armored Core 6
21+
loose_params = false
22+
23+
# List of directories that contain modded files in order of prioritization. Inside each specified mod directory must have the game
24+
# assets in Fromsoft's asset structure. I.e. if you mod parts/something.partsbnd.dcx, the modded version must be at mod/parts/something.partsbnd.dcx.
25+
# Absolute paths to mods are supported but must use '\\' to separate path items. For example, if your mod is at E:\coolstuff\coolmod, you must enter
26+
# the path in the config as "E:\\coolstuff\\coolmod".
27+
# If there's no drive specifier (C:, D:, etc), the path is relative to where the launcher is located. For example, having the path as "mod" will tell
28+
# Mod Engine 2 to look for the directory mod inside the Mod Engine 2 directory with the launcher.
29+
#
30+
# Multiple mods must be separated with commas. For example if you have 3 mods, you will have something like the following:
31+
# mods = [
32+
# { enabled = true, name = "coolmod", path = "mod1" },
33+
# { enabled = true, name = "nicemod", path = "mod2" },
34+
# { enabled = true, name = "sosomod", path = "mod3" }
35+
# ]
36+
# Note that modengine 2 currently has no way to resolve conflicting files including regulation.bin, and thus the mod with the highest priority
37+
# will have the modded file be loaded in the case of conflict. Some support for merging of params and potentially other assets is considered for
38+
# a future release.
39+
mods = [
40+
{ enabled = true, name = "default", path = "mod" }
41+
]
42+
43+
# When enabled, scylla hide will be injected into the game. This allows for antidebug measures in the game to be bypassed so that you can attach
44+
# debuggers such as Cheat Engine, x64dbg, windbg, etc to the game without as much trouble. If you're not reverse engineering the game, this option
45+
# is probably not for you.
46+
[extension.scylla_hide]
47+
enabled = false

installer/dist/config_eldenring.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ mods = [
4040
{ enabled = true, name = "default", path = "mod" }
4141
]
4242

43-
# When enabled, scylly hide will be injected into the game. This allows for antidebug measures in the game to be bypassed so that you can attach
43+
# When enabled, scylla hide will be injected into the game. This allows for antidebug measures in the game to be bypassed so that you can attach
4444
# debuggers such as Cheat Engine, x64dbg, windbg, etc to the game without as much trouble. If you're not reverse engineering the game, this option
4545
# is probably not for you.
4646
[extension.scylla_hide]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
chcp 65001
2+
:: The above line is necessary in case you edit this file to lead to a path with Unicode characters.
3+
.\modengine2_launcher.exe -t ac6 -c .\config_armoredcore6.toml

launcher/launcher.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,25 @@ enum LaunchTarget {
3030
AUTODETECT,
3131
DS3,
3232
ELDEN_RING,
33+
ARMORED_CORE_6,
3334
};
3435

3536
static std::map<LaunchTarget, LaunchTargetParams> launch_targets {
3637
{ DS3, { L"374320", L"Game/DarkSoulsIII.exe", L"config_darksouls3.toml" } },
37-
{ ELDEN_RING, { L"1245620", L"Game/eldenring.exe", L"config_eldenring.toml" } }
38+
{ ELDEN_RING, { L"1245620", L"Game/eldenring.exe", L"config_eldenring.toml" } },
39+
{ ARMORED_CORE_6, { L"1888160", L"Game/armoredcore6.exe", L"config_armoredcore6.toml" } }
3840
};
3941

4042
static std::map<std::string, LaunchTarget> launch_target_names {
4143
{ "ds3", DS3 },
4244
{ "er", ELDEN_RING },
45+
{ "ac6", ARMORED_CORE_6 },
4346
};
4447

4548
static std::map<std::string, LaunchTarget> exe_names {
4649
{ "DarkSoulsIII.exe", DS3 },
4750
{ "eldenring.exe", ELDEN_RING },
51+
{ "armoredcore6.exe", ARMORED_CORE_6 },
4852
};
4953

5054
std::wstring GetCurrentDirectory()

0 commit comments

Comments
 (0)