FF12 VM Script Decompiler and Compiler

⭐ ⭐ (165 endorsements) 📥 5,932 downloads 📌 v2.83 📅 9/25/2019
⚪ Last updated 2023

By ffgriever · Utilities

⬇ Download Mod Source: Nexus Mods ↗ 📅 Updated: 8/7/2023 📅 Created: 9/25/2019

🔍 Analysis

  • 👍 2.8% endorsement rate — high engagement, a strong quality signal
  • 🏆 #6 of 18 Utilities mods in this game by downloads

📋 About This Mod

This tool can decompile FF12 VM binary scripts into c-like high level language and compile them back. Additional tools are included in the package.

Final Fantasy XII Virtual Machine Script Decompiler and Compiler

ABOUT THIS TOOL

Here is something I've been working on for past few months. Tool that is able to properly disassemble, assemble, decompile and compile Final Fantasy XII Virtual Machine scripts.

These scripts are used in all event and map files and are responsible for most of the things that happen on screen (except menus), including positioning NPCs, playing animations, displaying text, etc. In other words - the logic of the game.

The tool is already in a very advanced state of development, but bear in mind, that it's still a Work in Progress. Also, while I'm doing everything I can to keep it bug free, I can't guarantee it will work without a hitch in all cases.

If you find any bugs, please report them with as much details as possible (including steps, code that causes issues, etc.).

REQUIREMENTS AND SUPPORTED GAME VERSIONS

The tool is compiled for x64 Windows system and that's pretty much only hard requirement. Obviously, the better the CPU, the better it will work. CPU is not an issue in case of decompilation, but compiling large scripts does take some time.

Supported game versions:

  • []Final Fantasy XII (all PS2 versions)

    []Final Fantasy XII International Zodiac Job System (PS2)

    []Final Fantasy XII The Zodiac Age (PC/Steam)

    Technically the tool supports also PS4/XB/Switch versions of FFXII:TZA, but it requires an update to call target map, to support new calls (if there is any need for that and switch modding is a case, just let me know).

    USAGE

    Scripts are contained within EBP files. They're always in the very first section of EBP files. Before decompiling a script, you have to unpack EBP file into sections. Tools able to do that are available within bin folder.

    ff12-ebpunpack.exe file.ebp (to unpack into file.ebp_unc directory)

    ff12-ebppack.exe file.ebp (to pack file.ebp_unc directory into file.ebp file)

    ALL SUPPLIED EXECUTABLES ARE COMMAND LINE TOOLS. IF YOU DOUBLE CLICK IT AND A BLACK WINDOW POPS UP FOR A SPLIT SECOND AND THEN DISAPPEARS, EVERYTHING WORKS AS INTENDED. FOR USERS NOT FAMILIAR WITH COMMAND LINE I SUPPLIED A FEW . BAT FILES, THAT ARE ABLE TO PERFORM BOTH UNPACK/DECOMPILATION and COMPILATION/REPACK. I WOULD SUGGEST LEARNING COMMAND LINE USAGE ANYWAY - IT'S MUCH FASTER, EASIER AND HASSLE FREE THAN ANY OF THE GUI TOOLS!

    ebp_unpack_dir.bat

    Drop a directory with ebp files onto this bat and all will be unpacked, decompiled and text sections will be unpacked. (works recursively for all subdirectories, too)

    ebp_unpack_single.bat

    Drop a single ebp file onto this bat and it will be unpacked, decompiled and text sections will be unpacked.

    ebp_repack_dir.bat

    Drop a directory with ebp files onto this bat and all will be compiled, text sections will be packed and then new ebp files will be created. Always keeps a copy of the last file and always keeps the original file. (works recursively for all subdirectories, too)

    ebp_repack_signle.bat

    Drop a single ebp file onto this bat and it will be compiled, text sections will be packed and then new ebp files will be created. Always keeps a copy of the last file and always keeps the original file.

    And the decompiler/compiler itself:

    -d     - disassembles script into VM's assembler (now used mostly to analyze

    binary if issues arrise)

    -dc    - decompiles script into high level c-like language

    -c     - assembles VM assembly into binary file (use if you need to do something

    not available in the high level language)

    -cc    - compiles c-like high level language into script binary

    -v     - enables verbose output (the amount of text is huge, so I advise

    redirecting it into a file)

    -Dname       - define a macro for preprocessor (so it will pass #ifdef and fail

    #ifndef check)

    -Dname=value - define a macro name to have a value "value" (useful for

    conditional compilation)

    -Ipath       - add include search path for #include preprocessor directive (by

    default, "include" path is added)

    BASIC LANGUAGE FEATURES[/b

📊 Mod Details

Game
Finalfantasy12 Mods
Author
ffgriever
Version
2.83
Downloads
5,932
Endorsements
165
Category
Utilities
Created
9/25/2019
Updated
8/7/2023
Tags
English, Utilities for Modders

🔧 How to Install Final Fantasy XII: The Zodiac Age Mods

Install via a mod manager (Vortex or Mod Organizer 2). Most mods drop into the game folder.

📖 Full step-by-step install guide for Final Fantasy XII: The Zodiac Age →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Final Fantasy XII: The Zodiac Age commands, item IDs, and more.

Keep browsing — more Final Fantasy XII: The Zodiac Age mods await

📋 All Final Fantasy XII: The Zodiac Age Mods 🏆 Top 25 📂 More Utilities 👤 More by ffgriever 🔎 Similar Mods 🌐 Best Utilities (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods