Skip to content

resource info: warn when a ymap's internal CMapData name does not match its filename #11

Description

@VIRUXE

RAGE registers a map data entry under the file's name, while parent/child links and _manifest.ymf imapName entries reference the internal CMapData.name hash. When someone renames a .ymap in the explorer without renaming it inside CodeWalker, the two drift apart and everything downstream silently stops binding. Nothing about the file looks wrong, and resource info prints the internal name without comment:

File:      stream/casas_praia_extras.ymap
Map:       hash_AEC13995  parent -          # hash_AEC13995 == joaat("map1")

Three resources in one batch I went through had exactly this (casas_praia_extras.ymap, skatepark.ymap, bomba2.ymap, all internally map1), and it only surfaced because I cross-checked manifest declarations against filenames by hand.

Proposed: when the input is a loose file on disk and CMapData.name != joaat(basename), print a warning next to the Map: line. The check is one hash comparison and the information is already parsed. It does not apply to entries read out of an archive with --archive, where the lookup name and the file name are the same thing by construction.

Same idea would fit _manifest.ymf: flag imapName entries that match no ymap sitting next to it. Those are either references to vanilla imaps (fine, and the common case for a resource that edits base-game maps) or dead leftovers — in that same batch, nine manifests still declared an imap map1 that no longer existed anywhere in their resource. Telling the two apart needs a name list, so it depends on #10.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions