[Request] Magic Research 2

Ask about cheats/tables for single player games here
Post Reply
koza32
What is cheating?
What is cheating?
Posts: 1
Joined: Sat Feb 05, 2022 10:18 am
Reputation: 0

[Request] Magic Research 2

Post by koza32 »

Hi everyone,

I'm looking for a cheat table for Magic Research 2, which was released yesterday.

I'm a newbie with Python, but thanks to ChatGPT, I was able to decode the save file, but I'm not able to encode it back.
Spoiler
import base64
import gzip
import json
from io import BytesIO

# La chaîne encodée que vous avez fournie
encoded_string = (
"
past save file code here
"
)
# Étape 1: Décoder la chaîne encodée en Base64 une première fois
decoded_base64_first = base64.b64decode(encoded_string)

# Étape 2: Décoder à nouveau la chaîne obtenue en Base64
decoded_base64_second = base64.b64decode(decoded_base64_first)

# Étape 3: Décompresser les données gzip
with gzip.GzipFile(fileobj=BytesIO(decoded_base64_second)) as gzip_file:
decompressed_data = gzip_file.read()

# Étape 4: Lire le contenu JSON
json_data = json.loads(decompressed_data)

# Afficher le contenu JSON
print(json.dumps(json_data, indent=4))
Can someone help me by creating a CT table or a PY script to encode it back ?

Thanks all !

Terydin
Cheater
Cheater
Posts: 42
Joined: Tue Aug 21, 2018 9:17 pm
Reputation: 3

Re: [Request] Magic Research 2

Post by Terydin »

So far, from what I've been able to do, you can do a Double Search for most of your resources. Gold starts at x*2, but after modifying, you have to search for it again as a double. I'm not very good at pointer scans, so I am hoping that someone can help with that. What I've done is:

1. Get Mana to max
2. Search for mana
3. Use mana and then do a Decrease Value search (Not and exact search. It won't find it.)
4. Get Mana back to max and then search again.

This works best if you are doing it after a retirement, but, again, I am terrible at pointer scans.

coolbond
Novice Cheater
Novice Cheater
Posts: 15
Joined: Mon May 27, 2019 11:25 pm
Reputation: 0

Re: [Request] Magic Research 2

Post by coolbond »

If someone can figure out how to reencode the save so that the game accepts it then that would be perfect as there are things that are easier to do in save than with cheat engine.

Didz
What is cheating?
What is cheating?
Posts: 1
Joined: Sat Sep 02, 2023 3:56 pm
Reputation: 0

Re: [Request] Magic Research 2

Post by Didz »

? It's easy. Just reverse. You do a GZIP first and then BASE64

coolbond
Novice Cheater
Novice Cheater
Posts: 15
Joined: Mon May 27, 2019 11:25 pm
Reputation: 0

Re: [Request] Magic Research 2

Post by coolbond »

tried that, did not get accepted

BoscoDev
What is cheating?
What is cheating?
Posts: 1
Joined: Sat May 25, 2024 2:34 pm
Reputation: 3

Re: [Request] Magic Research 2

Post by BoscoDev »

Sup, my first post here. You can decode and reencode like this
1. From Base64
2. From Base64
3. Gunzip
4. Change whatever you want.
5. Gzip
6. To Base64
7. To Base64
8. Success

Using CyberChef for doing it is nice. [Link]

If you're lazy (it's Python so .txt=>.py. google can help with the rest):
Decoding:

Code: Select all

import os
import base64
import gzip

# Uses the folder where the script is located as root.
script_dir = os.path.dirname(os.path.abspath(__file__))
encoded_dir = os.path.join(script_dir, 'Encoded')
decoded_dir = os.path.join(script_dir, 'Decoded')

# Stuff
os.makedirs(decoded_dir, exist_ok=True)

# Things
encoded_file_path = None
for file_name in os.listdir(encoded_dir):
    encoded_file_path = os.path.join(encoded_dir, file_name)
    break

if not encoded_file_path:
    raise FileNotFoundError("No file found in the 'Encoded' directory")

# Who knows
with open(encoded_file_path, 'r') as file:
    encoded_str = file.read()

# Step 1: Decode from Base64
decoded_bytes = base64.b64decode(encoded_str)

# Step 2: Decode again from Base64
decoded_bytes = base64.b64decode(decoded_bytes)

# Step 3: Decompress using gzip
decompressed_bytes = gzip.decompress(decoded_bytes)

# Saves the file to 'decoded_file' inside the folder 'root//Decoded'.
decoded_file_path = os.path.join(decoded_dir, 'decoded_file')
with open(decoded_file_path, 'wb') as file:
    file.write(decompressed_bytes)

print(f"Decoded file saved to {decoded_file_path}")
Re-Encode:

Code: Select all

import os
import base64
import gzip
import io

# Uses the folder where the script is located as root.
script_dir = os.path.dirname(os.path.abspath(__file__))
decoded_dir = os.path.join(script_dir, 'Decoded')

# Stuff
decoded_file_path = None
for file_name in os.listdir(decoded_dir):
    decoded_file_path = os.path.join(decoded_dir, file_name)
    break

if not decoded_file_path:
    raise FileNotFoundError("No file found in the 'Decoded' directory")

# Things
with open(decoded_file_path, 'rb') as file:
    decompressed_bytes = file.read()

# Step 1: Compress using gzip
compressed_bytes_io = io.BytesIO()
with gzip.GzipFile(fileobj=compressed_bytes_io, mode='wb') as gzip_file:
    gzip_file.write(decompressed_bytes)
compressed_bytes = compressed_bytes_io.getvalue()

# Step 2: Encode to Base64
encoded_bytes = base64.b64encode(compressed_bytes)

# Step 3: Encode again to Base64
encoded_str = base64.b64encode(encoded_bytes).decode('utf-8')

# cba
reencoded_file_path = os.path.join(script_dir, 'reencoded_file')
with open(reencoded_file_path, 'w') as file:
    file.write(encoded_str)

print(f"Re-encoded file saved to {reencoded_file_path}")
1. Make a folder for the scripts.
2. create 2 more folders next to the scripts. One called 'Decoded' and one called 'Encoded'.
3. place the save file you want to edit inside 'Encoded'.
4. Run the Script to decode it.
5. edit the 'decoded_file' however you want (it's inside the 'Decoded' folder).
6. run the Encode script.
7. Load the edited and re-encoded file.
8. Success.

I take no resposibility. Cheers :)

coolbond
Novice Cheater
Novice Cheater
Posts: 15
Joined: Mon May 27, 2019 11:25 pm
Reputation: 0

Re: [Request] Magic Research 2

Post by coolbond »

BoscoDev wrote:
Sat May 25, 2024 2:52 pm
Sup, my first post here. You can decode and reencode like this
1. From Base64
2. From Base64
3. Gunzip
4. Change whatever you want.
5. Gzip
6. To Base64
7. To Base64
8. Success

Using CyberChef for doing it is nice. [Link]

If you're lazy (it's Python so .txt=>.py. google can help with the rest):
Decoding:

Code: Select all

import os
import base64
import gzip

# Uses the folder where the script is located as root.
script_dir = os.path.dirname(os.path.abspath(__file__))
encoded_dir = os.path.join(script_dir, 'Encoded')
decoded_dir = os.path.join(script_dir, 'Decoded')

# Stuff
os.makedirs(decoded_dir, exist_ok=True)

# Things
encoded_file_path = None
for file_name in os.listdir(encoded_dir):
    encoded_file_path = os.path.join(encoded_dir, file_name)
    break

if not encoded_file_path:
    raise FileNotFoundError("No file found in the 'Encoded' directory")

# Who knows
with open(encoded_file_path, 'r') as file:
    encoded_str = file.read()

# Step 1: Decode from Base64
decoded_bytes = base64.b64decode(encoded_str)

# Step 2: Decode again from Base64
decoded_bytes = base64.b64decode(decoded_bytes)

# Step 3: Decompress using gzip
decompressed_bytes = gzip.decompress(decoded_bytes)

# Saves the file to 'decoded_file' inside the folder 'root//Decoded'.
decoded_file_path = os.path.join(decoded_dir, 'decoded_file')
with open(decoded_file_path, 'wb') as file:
    file.write(decompressed_bytes)

print(f"Decoded file saved to {decoded_file_path}")
Re-Encode:

Code: Select all

import os
import base64
import gzip
import io

# Uses the folder where the script is located as root.
script_dir = os.path.dirname(os.path.abspath(__file__))
decoded_dir = os.path.join(script_dir, 'Decoded')

# Stuff
decoded_file_path = None
for file_name in os.listdir(decoded_dir):
    decoded_file_path = os.path.join(decoded_dir, file_name)
    break

if not decoded_file_path:
    raise FileNotFoundError("No file found in the 'Decoded' directory")

# Things
with open(decoded_file_path, 'rb') as file:
    decompressed_bytes = file.read()

# Step 1: Compress using gzip
compressed_bytes_io = io.BytesIO()
with gzip.GzipFile(fileobj=compressed_bytes_io, mode='wb') as gzip_file:
    gzip_file.write(decompressed_bytes)
compressed_bytes = compressed_bytes_io.getvalue()

# Step 2: Encode to Base64
encoded_bytes = base64.b64encode(compressed_bytes)

# Step 3: Encode again to Base64
encoded_str = base64.b64encode(encoded_bytes).decode('utf-8')

# cba
reencoded_file_path = os.path.join(script_dir, 'reencoded_file')
with open(reencoded_file_path, 'w') as file:
    file.write(encoded_str)

print(f"Re-encoded file saved to {reencoded_file_path}")
1. Make a folder for the scripts.
2. create 2 more folders next to the scripts. One called 'Decoded' and one called 'Encoded'.
3. place the save file you want to edit inside 'Encoded'.
4. Run the Script to decode it.
5. edit the 'decoded_file' however you want (it's inside the 'Decoded' folder).
6. run the Encode script.
7. Load the edited and re-encoded file.
8. Success.

I take no resposibility. Cheers :)
Thank you, this worked like a treat!

xeno4441
What is cheating?
What is cheating?
Posts: 3
Joined: Wed Jan 31, 2024 4:52 pm
Reputation: 0

Re: [Request] Magic Research 2

Post by xeno4441 »

any way to make the speedhack work? I know in the magic research 1 there was a script in the install files that you could disable, but it doesnt appear to be the same for this one. anyone know?

Post Reply

Who is online

Users browsing this forum: Bing [Bot], chinet2007, eahernantst83, Experox, Johnni, lanooner destiny