Skip to content

Commit

Permalink
1.1.68
Browse files Browse the repository at this point in the history
  • Loading branch information
oorzkws committed Sep 3, 2022
1 parent 896dad1 commit 9c6e3aa
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
38 changes: 25 additions & 13 deletions main_dll/src/DoPatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,50 @@ void do_patch(HMODULE base) {
// Search and replace with generic patterns
auto engine = new SnR_Engine::SnR_Engine(base);
std::vector<std::vector<ubyte>> searches = {
//1: AchievementStats::allowed
//1: AchievementStats::allowed, 75 CB 48 8B 9B ?? 03 00 00 48 85 DB 74
{
SnR_Engine::SearchMode_Search, 12,
0x48, 0x8b, 0x9b, 0xa0, 0x03, 0x00, 0x00, 0x48, 0x85, 0xdb, 0x74, 0x64,
SnR_Engine::SearchMode_Search, 5,
0x75, 0xCB, 0x48, 0x8B, 0x9B,
SnR_Engine::SearchMode_Skip, 1,
SnR_Engine::SearchMode_Search, 7,
0x03, 0x00, 0x00, 0x48, 0x85, 0xDB, 0x74,
SnR_Engine::SearchMode_EOF
},
//2: PlayerData::PlayerData (2 matches)
//2: PlayerData::PlayerData (2 matches), 48 3B C2 74 1F 48 8B 08 80 79 3E 00 74 0C 80 79 40 00 74 06 80 79 41 00 74 06 48 83 C0 08 EB E0
{
SnR_Engine::SearchMode_Search, 32,
0x48, 0x3b, 0xc2, 0x74, 0x1f, 0x48, 0x8b, 0x08, 0x80, 0x79, 0x3e, 0x00, 0x74, 0x0c, 0x80, 0x79, 0x40, 0x00,
0x74, 0x06, 0x80, 0x79, 0x41, 0x00, 0x74, 0x06, 0x48, 0x83, 0xc0, 0x08, 0xeb, 0xe0,
SnR_Engine::SearchMode_EOF
},
//3: AchievementGUI::AchievementGUI
//3: AchievementGUI::AchievementGUI, 48 3B C2 0F 84 DF 01 00 00
{
SnR_Engine::SearchMode_Search, 9,
0x48, 0x3b, 0xc2, 0x0f, 0x84, 0xdf, 0x01, 0x00, 0x00,
SnR_Engine::SearchMode_EOF
},
//4: SteamContext::onUserStatsReceived
//4: SteamContext::onUserStatsReceived, 8B ?? 08 ?? 3B ?? 74 22 48 8B 01 80 78
{
SnR_Engine::SearchMode_Search, 14,
0x4c, 0x8b, 0x40, 0x08, 0x49, 0x3b, 0xc8, 0x74, 0x22, 0x48, 0x8b, 0x01, 0x80, 0x78,
SnR_Engine::SearchMode_EOF
SnR_Engine::SearchMode_Search, 1,
0x8B,
SnR_Engine::SearchMode_Skip, 1,
SnR_Engine::SearchMode_Search, 1,
0x08,
SnR_Engine::SearchMode_Skip, 1,
SnR_Engine::SearchMode_Search, 1,
0x3B,
SnR_Engine::SearchMode_Skip, 1,
SnR_Engine::SearchMode_Search, 7,
0x74, 0x22, 0x48, 0x8B, 0x01, 0x80, 0x78,
SnR_Engine::SearchMode_EOF
},
//5: SteamContext::setStat, SteamContext::unlockAchievement (2 matches)
//5: SteamContext::setStat, SteamContext::unlockAchievement (2 matches), C2 74 1E 48 8B 08 80 79 3E 00 74 0C 80 79 40 00 74 06 80 79 41 00 74
{
SnR_Engine::SearchMode_Search, 23,
0xc2, 0x74, 0x1e, 0x48, 0x8b, 0x08, 0x80, 0x79, 0x3e, 0x00, 0x74, 0x0c, 0x80, 0x79, 0x40, 0x00, 0x74, 0x06, 0x80, 0x79, 0x41, 0x00, 0x74,
SnR_Engine::SearchMode_EOF
},
//6: SteamContext::unlockAchievementsThatAreOnSteamButArentActivatedLocally
//6: SteamContext::unlockAchievementsThatAreOnSteamButArentActivatedLocally, 48 8B 02 80 78 3E 00 74 10 80 78 40 00 74
{
SnR_Engine::SearchMode_Search, 14,
0x48, 0x8b, 0x02, 0x80, 0x78, 0x3e, 0x00, 0x74, 0x10, 0x80, 0x78, 0x40, 0x00, 0x74,
Expand All @@ -65,7 +77,7 @@ void do_patch(HMODULE base) {
std::vector<std::vector<ubyte>> patches = {
//1
{
SnR_Engine::SearchMode_Skip, 10,
SnR_Engine::SearchMode_Skip, 12,
// jnz -> jmp
SnR_Engine::SearchMode_Replace, 1,
0xEB,
Expand All @@ -89,7 +101,7 @@ void do_patch(HMODULE base) {
},
//4
{
SnR_Engine::SearchMode_Skip, 7,
SnR_Engine::SearchMode_Skip, 6,
// jz -> jnz
SnR_Engine::SearchMode_Replace, 1,
0x75,
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Grab the latest from [releases](/../../releases) and place the version.dll in th

This won't enable achievements on saves where cheats or console commands have been used, it only covers mods. Patches just pulled from IDA.

Updated as of Factorio **1.1.61**. If it doesn't work on the current version, please file an [issue](/../../issues/new) if there isn't one already.
Updated as of Factorio **1.1.68**. If it doesn't work on the current version, please file an [issue](/../../issues/new) if there isn't one already.
You can include a log by running `path/to/Factorio.exe > path/to/output.log`.

Built with CMake, VC++ configs might not work.
Expand Down

0 comments on commit 9c6e3aa

Please sign in to comment.