Skip to content

How to replace base content using uri-replace resource

uri-replace is a FiveM resource designed to dynamically override files from other resources at runtime, without directly modifying their source files.

Location: resources/[addons]/uri-replace

This is especially useful for:

  • Removing default behavior

  • Overwriting logic files, assets, or configurations

  • Customizing resources safely and modularly

  • 💡 Maintaining overrides during version updates

When you update a core resource (like monsters-wrapper or uri-core), any custom edits you've made will be lost during the update process unless you manually reapply them. With uri-replace, you can keep your changes separate and persistent across versions, making it perfect for automated version updates.

This makes uri-replace an essential tool for long-term server maintenance and safe update management.


Resource Structure

The resource includes its own resources/ directory.
Inside that folder, create subfolders with the same name as the resources you want to override.

Example:

resources
└── [addons]
    └── uri-replace
        ├── fxmanifest.lua
        └── resources
            └── monsters-wrapper
                └── data
                    └── skin.json      ← (will replace original)

This structure mirrors the resource you want to override.
The path must match exactly for the replacement to apply.


What Can You Replace?

You can replace any file type:

  • .json, .js, .lua, .uriloc, .uri...
  • Assets like images, videos, audio...

✔️ Files are compared before replacing.
If the file already matches the replacement, it won't be overwritten.


How to Disable a File

If you want to remove or neutralize behavior from a base resource:

  • Create a file with the same name and path inside uri-replace/resources/<resource>/...

This will replace the original file at runtime.

⚠️ If the file is a .json, it's recommended to insert minimal valid content ([]) instead of leaving it empty, to prevent runtime errors.

Example:

resources/[addons]/uri-replace/resources/uri-core/addonscontent/dlc/content/achievements.json

Content of that file (for safe replacement):

[]


Adding New Files

In addition to replacing existing files, uri-replace can also inject new files into other resources, even if those files didn't originally exist.

This is especially useful when you want to:

  • Add new assets (like images, videos, or sounds)

As long as the file is placed inside the correct mirrored path, it will be written into the target resource at runtime.

🧠 This makes uri-replace not only a tool for replacement, but also a lightweight way to expand existing resources with new content.


How It Activates

uri-replace is automatically triggered when your server starts. It scans for files inside its resources/ folder and applies overrides to the corresponding target resources.

On Server Start

When the server starts and uri-replace is ensured, it will automatically apply all overrides before the target resources are initialized.


While the Server Is Running

If you add or change files inside uri-replace/resources/... while the server is already running, simply run ensure uri-replace. This will automatically restart the modified resources.

🧠 This makes it easy to test and apply changes in real time without restarting the entire server.


Safety & Backup

When a file is replaced, the original is saved as:

resources/[addons]/uri-replace/backup/<resource>/<path>/<file>

You can restore it manually if needed.


Summary

uri-replace is an override system for Fivemon that allows you to safely replace or neutralize files from other resources without editing them directly.

It's ideal for customizing behavior, disabling unwanted features, and maintaining overrides across version updates.

  • ✅ Works automatically on server start

  • ♻️ Supports live reload with ensure uri-replace

  • 🧩 Supports any file type: .json, .uri, .lua, assets...

  • 🛡️ Creates automatic backups of replaced files

  • 🔄 Perfect for update-safe customization