I believe at least some/most mods do a dynamic ID mapping system (That or forge attempts this). They search for an unused ID and then assign themselves that ID (and put it in their config file for future reference). From my 2-3 months of using mods and my programming experience these are my guesses as to why there's a difference. (Thus I may be making some assumptions that are very wrong, any mod makers please correct me)
- Mods were initially loaded in a different order than the other machine
- The first computer had the mods loaded from previous versions which eventually upgraded. This can lead to some weirdness.
- The new version of the mod needed a new ID (or multiple), so it then dynamically finds a free ID to use and sets it in the config file. The second computer using this later mod for the first time allocates all of the IDs in one go before the next mod loads
- The new version of the mod removed or was able to condense IDs using metadata. The IDs may or may not be released but the other mods have already decided what ID it will use and your save games would be screwy if it tried to 'condense/reuse' the IDs. Another reason the mod may not 'release' the other IDs is because old save games will still use these IDs, which it can detect and replace them with the new ID with a metadata value. The second computer using this mod for the first time allocates only the IDs it needs to for the mod and then the next mod has a go at it (and most likely will use IDs just after the mod which were previously occupied in the first computer)
Some examples would probably be better:
Suppose you have 3 Mods: Alice, Bob, and Charlie
Alice v1.0 needs 3 IDs
Bob v0.9 needs 5 IDs
Charlie v2.1 needs 2 IDs
First time on the first computer you load the mods in (alphabetical) order
- System loads Alice v1.0 for the first time and allocates IDs 400, 401, and 402
- System loads Bob v0.9 for the first time and allocates IDs 403, 404, 405, 406, and 407
- System loads Charlie v2.1 for the first time and allocates IDs 408, and 409
Scenario 1: Loading mods in a different order
You then load the mods on the second machine but not in the same order
- System loads Alice v1.0 for the first time and allocates IDs 400, 401, and 402
- System loads Charlie v2.1 for the first time and allocates IDs 403, and 404
- System loads Bob v0.9 for the first time and allocates IDs 405, 406, 407, 408, and 409
Note the disparity between IDs and Mods
Scenario 2: Mod Updates on for first computer but you load the latest on the second machine
Mod Alice updates to 1.1 but there's no change in how many IDs it uses
Mod Bob updates to 1.0 and discovers metadata in blocks and now only needs 1 ID (instead of 5)
Mod Charlie updates to v2.2 adds a new block ID for its use
First computer updates
- System loads Alice v1.1, no more or less IDs needed so no change, still uses 400, 401, and 402
- System loads Bob v1.0 which now needs only 1 ID, it still uses 403, and possibly deallocates 404, 405, 406, and 407 (though unlikely because your save games would have IDs that aren't mapped to any mod)
- System loads Charlie v2.2 which still uses 408 and 409, requests a new ID, most likely this will be 410 depending on how it decides to find a new ID and if Bob actually deallocates the IDs it was using
Second computer uses latest mods for the first time, even in the same order
- System loads Alice v1.1 for the first time and allocates IDs 400, 401, and 402
- System loads Bob v1.0 for the first time and allocates IDs 403
- System loads Charlie v2.2 for the first time and allocates IDs 404, 405 and 406