Hey everyone.
If you’ve ever added a new car pack and watched the lightbars on three other vehicles break, you already know the problem. GTA V only gives you 255 siren slots, 255 light slots, and 1023 modkit slots, and most packs don’t coordinate their numbering. The moment two cars land on the same ID, sirens flash the wrong pattern, lightbars show the wrong color, modkits go missing from LSC.
The usual fix is opening every carcols.meta by hand. Then you add another pack and do it all again.
I built carcols-id-fixer because I didn’t think anyone should have to pay 20 euros for the script that solves this. It’s one file, ~600 lines, MIT licensed, zero dependencies.
What it does
- Scans every
carcols.metaandcarvariations.metain yourresources/tree - Finds every duplicate siren, light, and modkit ID across every pack at once
- Picks a free number inside the valid range and rewrites the loser
- Updates the matching
<Item>N_kitname</Item>references incarvariations.metaautomatically so the engine still finds the kit - Saves a
.bakof every changed file before touching it - One-command rollback (
node . --revert) restores every original
Built for messy real-world packs
- Handles packs where the kitName number doesn’t match the
<id>(more common than you’d think) - Skips engine-default modkit
0 - Catches out-of-range IDs and reassigns them to valid slots
- Preserves formatting, comments, indents, and line endings byte-for-byte
ignorelist in config so you can keep specific resources untouched
How to run it
Drop the folder next to your server.cfg:
fxserver/
- server.cfg
- resources/
- carcols-id-fixer/
Then:
cd carcols-id-fixer
node . # find clashes, fix them, save backups
node . --revert # roll everything back
node . scan # report only, no writes
node . fix --dry # preview without writing
Restart your vehicle resources after a fix and you’re done.
Why free
Honestly because the math behind this script is not worth €20 to anyone, and I think the FiveM community is better when this kind of basic infrastructure is open.
Download
Clone it, read the README, run it on a backup first if you’re nervous. Issues and PRs welcome.
Code is accessible | Yes
Subscription-based | No
Lines (approximately) | 600
Requirements | Node.js 18+
Support | Yes (via GitHub Issues)
