How to Import Animated Models into FusionFall – 4 Essential Custom Modding Scripts

How to Import Animated Models into FusionFall – 4 Essential Custom Modding Scripts

How to Import Animated Models into FusionFall – 4 Essential Custom Modding Scripts
I've developed a deletion script called remove2.py that successfully removed over 200,000 unnecessary path IDs from this asset bundle. The script doesn't just delete IDs—it carefully remaps the remaining ones, ensuring your target item continues to function flawlessly. This is essential groundwork for importing animations, later stages will require a similar, yet more complex method. In the future, we'll need to not only add new path IDs but also meticulously preserve the integrity of crucial data structures such as m_Name, m_PreloadTable, m_Container, and the corresponding preloadIndex values. You can review the #notes within the script for additional details on exactly how this process works.

To summarize clearly:
  • remove2.py: This script efficiently deletes and remaps path IDs within asset bundles while preserving the original formatting. This exact method will also be necessary for handling animated assets.
  • ogv.py: This script serves as a replacement tool specifically for movie textures. You can expand upon its logic to develop another script capable of replacing animations.
These scripts require the UnityPackFF Library:
UnityPackFF - FusionFall-oriented UnityPack fork, Python deserialization library for asset bundles
Python Modding Scripts for UnityPackFF (backport, convert bundle, academy item)

Screenshot_2025-02-14_013732.png


Below are screenshots provided of Devan, the project lead of FF Retro, where he clearly explains the process for importing animated models:

Screenshot_17-4-2025_234528_cdn.discordapp.com.jpeg

Screenshot_17-4-2025_234541_cdn.discordapp.com.jpeg

Screenshot_17-4-2025_234555_cdn.discordapp.com.jpeg

Screenshot_17-4-2025_234615_cdn.discordapp.com.jpeg


Below is an example demonstrating how animated models function within Unity 2.0 asset bundles. It illustrates the Clyde NPC from Toonami, showcasing how animated models are structured within a clearly organized dictionary of keys. When adding new NPCs, this exact formatting approach needs to be precisely replicated. You can view this with an older crack of DevX unpacker.

clyde.png


🧩 Technical Structure for Animated Models​

For importing animated models into FusionFall, understanding the Unity asset bundle structure is crucial:
  • m_Name: Identifies the asset bundle or container group.
  • m_Container: An ordered dictionary mapping asset names to object pointers.
  • m_PreloadTable: Lists all objects to be loaded at runtime.
  • preloadIndex: Within m_Container entries, this value points to the corresponding index in m_PreloadTable.

    Maintaining the integrity of these structures is essential. For example, when adding new animated NPCs, it's imperative to:
    1. Ensure all related assets (models, animations, rigs) are correctly referenced in m_Container.
    2. Include these assets in m_PreloadTable in the appropriate order.
    3. Set each preloadIndex to match the asset's position in m_PreloadTable.
    4. Preserve the m_MainAsset reference to indicate the primary asset to load.
    This structure mirrors that of existing animated models in FusionFall.

✅ Summary of remove2.py Behavior​

Purpose:
To strip an asset bundle down to only the objects within a specified path_id range (237426 to 237436), renumber them cleanly, and rebuild the container data to reflect only the allowed entries. This makes the bundle smaller, targeted, and ideal for reverse engineering animated assets like NPCs.

✅ How It Works (Step-by-Step)​

  1. Reads the Asset Bundle
    It opens a CustomAssetBundle asset using unitypackff.
  2. Selects Valid Objects
    It checks all asset objects and keeps only those with path_id between 237426 and 237436.
  3. Builds a Mapping
    A new path ID mapping is created:
    • orig_id → new_id (starting at 2)
    • Object 1 is preserved as the main container
  4. Updates Object References
    • Recursively walks through every object’s internal pointers (via ObjectPointer)
    • Replaces old path_id values with new ones according to the mapping
    • Ensures all references inside object fields, lists, dicts, etc., are valid and consistent
  5. Rebuilds the Container (m_Container)
    • Filters the original m_Container entries so that only valid assets are kept
    • For each kept asset, updates its preloadIndex to match its position in the new m_PreloadTable
    • This step ensures assets load correctly, which is critical for animated models that rely on correct dependency resolution
  6. Preserves m_Name, m_MainAsset, m_PreloadTable
    • These fields are copied from the original and rebuilt in a new FFOrderedDict
    • This maintains compatibility with FusionFall's asset structure
  7. Writes the New Asset Bundle
    • Outputs a clean, minimal asset bundle that only includes relevant, correctly linked objects

      ✅ Why This Is Important for Animated Model Reverse Engineering​

      • Maintains internal integrity of Unity serialized fields (m_Container, m_PreloadTable, preloadIndex)
      • Preserves main asset container (ID = 1) so the asset is still bootable
      • Only includes relevant objects, making it easier to study dependencies and structure of things like animation controllers, rigs, meshes, etc.
      • Avoids broken references, which would otherwise crash Unity-based tools or clients

The script 256.py converts MP4 video files into a compatible format that ogv.py can import. (Requires FFMpeg)

An improved version of this script, bestvidtest.py, performs the same conversion but retains higher video quality.

Included with these scripts is a reference OGV file used for testing these conversions.

Latest updates

  1. N/A

    N/A
  2. Bump

    Bump
  3. Bump

    Bump
Top