mri-fivem-skills
All skills

mri-upstream-wrap

Changing upstream resources without editing them

Changing third-party FiveM resources (qbx_*, ox_*, any upstream) without editing their code, so updates stay a clean copy.

An upstream resource (someone else's repo) is updated by replacing its files. Anything edited inside them is lost or turns every update into a merge. So:

Hooks a wrapper can use

templates/wrapper.lua shows them together.

Settings from your resource to the upstream

Publish a small key in GlobalState (e.g. myorg:needs): your resource writes it on start and sets it to nil on stop (nil = the upstream's default). The wrapper reads it.

Keybinds

FiveM stores each player's key by command name. Changing the default key in RegisterKeyMapping only affects players who never joined. To change it for everyone, register the command under a new name (your prefix) in the wrapper, with the new default.

Replacing a resource (provide)

provide 'old_resource' in your resource's fxmanifest:

Restart quirks