does this mean i can play mods from the official library OFFLINE because i put in a few files? can you please help me do it with the Spells enhacned 19 spells and share the files here please to test? my game always runs offline because i dont play with an active internet when im far from router in my PC, so could you please tell me if its possible to do it?
It SHOULD be possible to perform an offline installation of a mod file.
I did some testing, and I was able to take a mod downloaded from curse, and make an offline version of it that doesn't link back to curse.
So, the way that it's storing mods is in two locations. The first Location is in the Appdata mods folder at " %localappdata%\Hogwarts Legacy\Mods " There is a Userdata folder, I see a number, and in that folder are two files. user_info.json is probably our session token, so probably don't share that, and library.json. Stored in library.json is most of the metadata for your mods. That metadata includes links to download the mod, the mod status, some hashes that I'm not entirely sure where they are from.
The place the mods are actually stored is " %USERPROFILE%/Documents/Hogwarts Legacy/Mods "
Now, I suspect that the first folder will have a different name , but within that folder will be strings of numbers, each matching the ID's of mods found in library.json. You can take one of these change the IDs to something else.
Now, lets go back to library.json. As long as the changed IDs match in library .json, it appears to point at the file correctly. (Additionally, I replaced all of the URLs by replacing the end of them with NULL so they didn't actually point to pages that exist, just in-case it wanted to try to validate it or something)
So, if you were to share this string associated with your mod, as well as the mod file the game itself is reading and the 3 IDs matched up to the file path to that mod correctly, I see no reason why this shouldn't work.
Obviously someone can make a tool to do this automatically, but proof of concept for not having to wait for mods to be approved, and being able to upload our mods wherever we want?
I was thinking, if you can test your mod in game before publishing, that requires an install of your mod, so there would be a folder with your unpublished mod created in your mods folder. Then you can just share that file with others without needing to publishing it i'm assuming.
If you can share the 2 things I talked about in my post; Your mod as downloaded by their launcher in the documents folder, as well as your library.json file from appdata I can test it to see if it just works as a drag-and-drop solution to install mods that aren't available for download (IE, Not "Approved"), since I've only been able to test it with mods I have downloaded from curse. I don't know if the structure of the mod's entry for library.json is different because it's unapproved or if it will flag the mod as it's not actively accessible on curseforge.
(Oh, if you share library.json, I'd appreciate it if you removed any other mods you downloaded so it's just the entry for your mod, but I should still be able to find it if not)
I'll upload the library,json sometime tomorrow but I'm not gonna uninstall my mods because I'm in the middle of a playthrough, you should be able to edit the json file tho
Thank you for supporting this, I'm glad I have some support here. And thanks to BrokenMirror1 for inspiring the new method. Love all you guys, you too WizardBoy16
brokenmirror1 if you're on windows I'd suggest sysinternals process monitor to monitor what the hogwarts legacy process is doing in terms of file writing to see if you see any other files
Now if somone makes a tool to automatically generate the data for existing mods and edit the library.json file then it would make it easy for people to install mods
The folder naming scheme seems to be CURSEPROJECTID_FILEIDENTIFIER
CURSEPROJECTID:
The project ID you'd find on a mod page on curse forge
for example the mod https://www.curseforge.com/hogwarts-legacy/mods/moreridingattire has the project id "1139722"
FILEIDENTIFIER:
The number in the url for the files page on curse forge
For example https://www.curseforge.com/hogwarts-legacy/mods/moreridingattire/files/all?page=1&pageSize=20 has a list of files and the latest file at the time of writing this has the URL https://www.curseforge.com/hogwarts-legacy/mods/moreridingattire/files/6032335 and the file identifier is at the end of that URL "6032335"
and together that makes the folder name "1139722_6032335" which matches the folder name because i downloaded this mod to have a look at the files
"CURSEPROJECTID" and "FILEIDENTIFIER" are just arbitrary terms i came up with to help explain things, they dont mean anything
24 comments
I did some testing, and I was able to take a mod downloaded from curse, and make an offline version of it that doesn't link back to curse.
So, the way that it's storing mods is in two locations. The first Location is in the Appdata mods folder at " %localappdata%\Hogwarts Legacy\Mods " There is a Userdata folder, I see a number, and in that folder are two files. user_info.json is probably our session token, so probably don't share that, and library.json. Stored in library.json is most of the metadata for your mods. That metadata includes links to download the mod, the mod status, some hashes that I'm not entirely sure where they are from.
The place the mods are actually stored is " %USERPROFILE%/Documents/Hogwarts Legacy/Mods "
Now, I suspect that the first folder will have a different name , but within that folder will be strings of numbers, each matching the ID's of mods found in library.json. You can take one of these change the IDs to something else.
Now, lets go back to library.json. As long as the changed IDs match in library .json, it appears to point at the file correctly. (Additionally, I replaced all of the URLs by replacing the end of them with NULL so they didn't actually point to pages that exist, just in-case it wanted to try to validate it or something)
So, if you were to share this string associated with your mod, as well as the mod file the game itself is reading and the 3 IDs matched up to the file path to that mod correctly, I see no reason why this shouldn't work.
Obviously someone can make a tool to do this automatically, but proof of concept for not having to wait for mods to be approved, and being able to upload our mods wherever we want?
(Oh, if you share library.json, I'd appreciate it if you removed any other mods you downloaded so it's just the entry for your mod, but I should still be able to find it if not)
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
see if you can see what the process is doing with process monitor when downloading mods
EDIT:
wireshark would be good for monitoring network processes but it requires setup on windows to extract ssl certificates
CURSEPROJECTID:
The project ID you'd find on a mod page on curse forge
for example the mod https://www.curseforge.com/hogwarts-legacy/mods/moreridingattire has the project id "1139722"
FILEIDENTIFIER:
The number in the url for the files page on curse forge
For example https://www.curseforge.com/hogwarts-legacy/mods/moreridingattire/files/all?page=1&pageSize=20 has a list of files and the latest file at the time of writing this has the URL https://www.curseforge.com/hogwarts-legacy/mods/moreridingattire/files/6032335 and the file identifier is at the end of that URL "6032335"
and together that makes the folder name "1139722_6032335" which matches the folder name because i downloaded this mod to have a look at the files
"CURSEPROJECTID" and "FILEIDENTIFIER" are just arbitrary terms i came up with to help explain things, they dont mean anything
replacing files didn't work