Retsam Posted August 28, 2023 Share Posted August 28, 2023 Fallout 4 modding questionThis is such a dumb question, but my searches failed to find the info I'm looking for.I have a mod I made for personal use and have been using in my game from almost the beginning.I've decided to publish it, but I did not give the esp a decent name when I made it.Ignoring the dependency changes required, meshes etc, that I can do easily enough, I was was hoping that a save game would not fail when the esp name is changed. Alas, it did.Apparently I do not properly understand record IDs. I thought they were unique and agnostic of the file name, and that's how mods are kept from conflicting even if they give item X the same name.After my little experiment I'm assuming the unique ID for an object the game is tracking is most likely some compilation of the esp name and the record ID, but I'd like someone to either drop some technical details or point me to the right reading material.And if possible, is there a way to change an esp name without breaking my save? I can redo the mod easily. It's very small. But I figure this is a good learning opportunity.Thanks Edit: I forgot to mention I also use Vortex, which might be a factor in this. Link to comment Share on other sites More sharing options...
EgoBallistic Posted August 29, 2023 Share Posted August 29, 2023 Wrye Bash allows you to safely rename the plugins a save depends on. Go to the Saves tab, select a save, then in the right-hand panel scroll down to the mod you need to change. Right-click, select the plugin with the new name, then hit Save below the plugins list. Now when you load your save it will use the new plugin in place of the old one, and all existing forms will still work as before. Make sure you have the latest version of Bash, this feature didn't work properly with some older versions. Link to comment Share on other sites More sharing options...
Retsam Posted August 30, 2023 Author Share Posted August 30, 2023 Wrye Bash allows you to safely rename the plugins a save depends on. Go to the Saves tab, select a save, then in the right-hand panel scroll down to the mod you need to change. Right-click, select the plugin with the new name, then hit Save below the plugins list. Now when you load your save it will use the new plugin in place of the old one, and all existing forms will still work as before. Make sure you have the latest version of Bash, this feature didn't work properly with some older versions.Great tip. I did not know about that feature. I will try it out. Thanks! Link to comment Share on other sites More sharing options...
DlinnyLag Posted September 1, 2023 Share Posted September 1, 2023 (edited) I'd like someone to either drop some technical details or point me to the right reading material. FormID (at runtime) is 4 bytes integer number.The bits of this number interpreted in following ways:For ESM/ESP:High 8 bits - [01-FD] - index of ESM/ESP in an ordered list of mods (excluding ESLs). Note: 00 is invalid, FE is reserved for ESL flagged files, FF - not sure, I've never tried to investigate the exact meaning of it.Low 24 bits - id of the record inside of ESM/ESPFor ESL:High 8 bits - always FENext 12 bits - index of ESL in an ordered list of ESL mods (excluding ESM/ESP)Low 12 bits - id of the record inside ESL. The exact value of Form Id at runtime indirectly depends on the file where record is declared.System orders mod files and the index of file in the ordered list is used to separate records of one file from records declared in another file. So records gets unique id at runtime. For example, you have 2 mods A.esp and B.espIn the particular gamer environment mods are ordered as A.esp and B.esp and has corresponding indexes in the ordered list of mods - 1C and 2E, for example.In this case at runtime records from A.esp will have IDs started from 1C (like 1C003456) and records from B.esp will have IDs started from 2E (like 2E006543)When game saved to the file then ordered list of mods is also saved to this file. This gives game a chance to reconstruct previous unique FormIds. When game lodaded - previously saved ordered mod list is used to understand how to map IDs of forms against the new ordered list of mods.For example given above, lets assume that at the moment of loading A.esp and B.esp changed their order in the list of mods. And now they has corresponding order number - 3B and 2CSo record 1C003456 from the save file becomes 3B003456 and 2E006543 becomes 2C006543. And so on. It can be safe to assume that system internally has 2 independent list of mods - for ESM/ESP and ESL mods. Rules are same for ESL files.This idea of assining IDs to records causes following problems:1) If name of mod changed (for example, rename A.esp to newA.esp) - then on the stage of loading saved file there is no information how to map records from A.esp to newA.esp - records will be lost. Workaround - patch save files with the new file name.2) Maximum theoretically possible number of the ESM/ESP files - 253 (maybe 254, if FF at high 8 bits is valid)3) Maximum theoretically possible records in a ESL file - 4095 (local id=0 is invalid). In practice this number is twice lower. [001-7FF]. Seems like details of implementation.4) Potential problems when the file gain or lose ESL flag. But it depends on exact situation. 5) If records in a file renumbered somehow between save/load, then it will not be possible to restore data as there is no mapping between old IDs and new IDs Edited September 1, 2023 by DlinnyLag Link to comment Share on other sites More sharing options...
Recommended Posts