Skip to content

Building single archive with ig_build #2

@tSlappy

Description

@tSlappy

I have issues with building g05s000 archive with ig_build.py

My steps:

  1. Created "toc.json" file with ig_csvjs.py (my game folder is f:
    Steam\steamapps\common\SunsetOverdrive\assets_archive)

  2. Unpacked all archives into "built" folder

  3. unpacked toc with ig_unzip.py -> resulting toc also copied into "built" folder

  4. I am running: python ig_build.py f:
    Steam\steamapps\common\SunsetOverdrive\assets_archive\toc.json f:\Steam\steamapps\common\SunsetOverd
    rive\assets_archive\built\ f:\Steam\steamapps\common\SunsetOverdrive\assets_archive\abc\ g05s000

I got this error:

Traceback (most recent call last):
File "ig_build.py", line 146, in
struct.pack_into("<I", intoc, in_sizes_pos + asset_id_map[assetname] * 0x0C + 4, len(data))
KeyError: '0xEACED759'

Problematic lines:

                elif archive_name != "all":
                    # update offsets and sizes in toc
                    struct.pack_into("<I", intoc, in_sizes_pos + asset_id_map[assetname] * 0x0C + 4, len(data))
                    struct.pack_into("<II", intoc, in_offsets_pos + asset_id_map[assetname] * 0x08, arc["index"], arc_sizes[arcname])

I noticed possible issue in
for asset in sorted(asset_to_arcidx.keys()):

sorted() is causing troubles with big numbers so I removed it, but still there is an issue.

This is my toc.json

"g05s000": {
  "index": 19,
  "chunkmap": 5000,
  "real_file_count": 743,
  "full_file_count": 743,
  "files": {
    "0xEACED759": "sound\\banks\\init.soundbank",
    "0x2F0C877C": "localization\\localization_all.localization",
    "0x404E2009": "ui\\textures\\buttons\\pc\\key_0.texture",
    "0x5735344A": "ui\\textures\\buttons\\pc\\key_1.texture",

and this print(asset_to_arcidx)

Key 0xEACED759 is not present there but 3939424089 is:

{3939424089: 19, 789350268: 19, 1078861833: 19, 1463104586: 19, 1857554575: 19,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions