Skip to content

Runtime IMG container#4757

Open
Xenius97 wants to merge 1 commit intomultitheftauto:masterfrom
Xenius97:new/runtime_image
Open

Runtime IMG container#4757
Xenius97 wants to merge 1 commit intomultitheftauto:masterfrom
Xenius97:new/runtime_image

Conversation

@Xenius97
Copy link
Contributor

Summary

This PR adds runtime image containers through engineLoadIMG folder support.

When engineLoadIMG receives a folder path, the client builds a temporary IMG archive in the resource root directory, then streams models from that generated IMG the same way as a normal archive. This lets resources update individual files instead of forcing players to redownload one large static IMG every time. Runtime archives are created in the resource root with names like runtime-image-<tick>-<pid>.tmp and deleted automatically when resource stops (also cleared when it starts, so if your game crashes for some reason at next time this will do a cleanup)

Motivation

Updating model containers is currently expensive for players.
If one file changes inside a large IMG, clients must download the whole archive again.

With this change, resources can ship model files individually, and the client assembles a runtime IMG locally. This reduces client-side update overhead and saves server bandwidth, because players no longer need to redownload hundreds of MB when only a few files change.

Test plan

Resource:
runtime_img.zip

Everything works same as normal img containers.
image

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@Xenius97 Xenius97 requested a review from a team as a code owner March 13, 2026 10:54
@Xenius97 Xenius97 mentioned this pull request Mar 13, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant