Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
God of War Chains of Olympus HD
05-14-2026, 10:12 PM (This post was last modified: 05-14-2026 10:13 PM by MESKH4H4.)
Post: #4
RE: God of War Chains of Olympus HD
rxzaa , What I did was get the PS3 ISO and extract it with 7-Zip. After that, I used the QuickBMS script god_of_war_bin.bms on the BIN files.

The extracted files included the IDAR files, which contain the textures. Then, with the help of Gemini/AI Studio, we created a Python script that analyzes the file hex data and reconstructs them into DDS files, allowing all the textures to be extracted properly.

After that, I just converted the DDS textures into PNG using XnConvert.

Here’s the Python script I used. You can use it if you want — just make sure you have QuickBMS and the correct .bms script set up first:

Code:
import os
import struct
import subprocess
import time

# --- CONFIGURAÇÃO ---
QUICKBMS_EXE = r"path quickbms.exe" # edit
BMS_SCRIPT = r"path script" # edit
GAME_FOLDER = r"path bins" # edit
OUTPUT_FOLDER = r"path exit" # edit


def converter_idar_para_dds(caminho_arquivo):
    try:
        with open(caminho_arquivo, "rb") as f:
            if f.read(4) != b"IDAR":
                return False
            f.seek(0x0C)
            width = struct.unpack(">I", f.read(4))[0]
            height = struct.unpack(">I", f.read(4))[0]
            f.seek(0x100)
            dados = f.read()
            if not dados:
                return False

            pixels_totais = width * height
            formato = b"DXT1" if len(dados) <= (pixels_totais / 2) else b"DXT5"

            header = struct.pack(
                "<4sIIIIIII44xII4s20xIIII4x",
                b"DDS ",
                124,
                0x00081007,
                height,
                width,
                len(dados),
                0,
                1,
                32,
                0x00000004,
                formato,
                0x00001000,
                0,
                0,
                0,
            )

            novo_nome = caminho_arquivo.replace(
                ".ida", f"_{width}x{height}_{formato.decode()}.dds"
            )
            with open(novo_nome, "wb") as out:
                out.write(header + dados)
            return True
    except Exception:
        return False


# --- PASSO 1: EXTRAÇÃO ---
print(f"[*] Escaneando arquivos em: {PASTA_DO_JOGO}")

if not os.path.exists(PASTA_SAIDA_BASE):
    os.makedirs(PASTA_SAIDA_BASE)

for raiz, _, arquivos in os.walk(PASTA_DO_JOGO):
    for arquivo in arquivos:
        if arquivo.lower().endswith(".bin"):
            # Caminhos absolutos para evitar erros de diretório
            caminho_bin = os.path.abspath(os.path.join(raiz, arquivo))
            nome_pasta_bin = os.path.splitext(arquivo)[0]
            pasta_destino = os.path.abspath(
                os.path.join(PASTA_SAIDA_BASE, nome_pasta_bin)
            )

            if not os.path.exists(pasta_destino):
                os.makedirs(pasta_destino)

            print(f"[*] Extraindo: {arquivo}...")

            # CORREÇÃO DA ORDEM DOS ARGUMENTOS:
            # quickbms.exe -o [script] [arquivo_bin] [pasta_saida]
            comando = [
                QUICKBMS_EXE,
                "-o",  # Sobrescrever se já existir
                BMS_SCRIPT,  # O script .bms
                caminho_bin,  # O arquivo de entrada (.bin)
                pasta_destino,  # A pasta de saída
            ]

            try:
                # Rodando o comando e esperando terminar
                subprocess.run(
                    comando, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
                )
            except subprocess.CalledProcessError as e:
                print(f"  [!] Erro no QuickBMS ao processar {arquivo}")
                # Se quiser ver o erro real do QuickBMS, descomente a linha abaixo:
                # print(e.stderr.decode(errors='ignore'))

# --- PASSO 2: CONVERSÃO ---
print("\n[*] Convertendo IDAR -> DDS...")
convertidos = 0
for raiz, _, arquivos in os.walk(PASTA_SAIDA_BASE):
    for f in arquivos:
        if f.lower().endswith(".ida"):
            caminho = os.path.join(raiz, f)
            if converter_idar_para_dds(caminho):
                convertidos += 1
                os.remove(caminho)

print(f"\nFinalizado! {convertidos} texturas geradas em {PASTA_SAIDA_BASE}")
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
God of War Chains of Olympus HD - MESKH4H4 - 04-27-2026, 01:16 AM
RE: God of War Chains of Olympus HD - MESKH4H4 - 05-14-2026 10:12 PM

Forum Jump: