7h icon indicating copy to clipboard operation
7h copied to clipboard

Implement nexus mods open api

Open TurBoss opened this issue 5 years ago • 9 comments

some references https://github.com/Nexus-Mods/node-nexus-api https://github.com/Nexus-Mods/node-winapi-bindings https://github.com/Nexus-Mods/Nexus-Mod-Manager

TurBoss avatar Jun 04 '19 20:06 TurBoss

Hey TurBoss, did you create this because of our earlier conversation when we considered the idea of doing a POC to translate 7H from C-sharp to Node + Electron? Or is this needed for something else? :)

picklejar76 avatar Jun 05 '19 01:06 picklejar76

was told on discord by @Kaldarasha

TurBoss avatar Jun 05 '19 01:06 TurBoss

It would be great if you could implement Nexus support. I think it would be good to have it separated from the current download tab. Like an extra catalogue from Nexus.

Kaldarasha avatar Jun 05 '19 04:06 Kaldarasha

Whoa. I just discovered what Nexus actually is. And it sounds nice.

From their home page: "We host 221,580 files for 723 games from 92,305 authors serving 17,453,353 members with 3,162,161,469 downloads to date. We support modding for all PC games. If you can mod it, we'll host it."

picklejar76 avatar Jun 05 '19 12:06 picklejar76

BTW, they are re-writing their Nexus Mod Manager. It's going to be replaced by Vortex. More info:

https://www.nexusmods.com/site/mods/1

picklejar76 avatar Jun 05 '19 12:06 picklejar76

we can do the following

add a tab that fetches mods from their api using something like this https://stackoverflow.com/questions/7929013/making-a-curl-call-in-c-sharp

using System.Net.Http;

var client = new HttpClient();

// Create the HttpContent for the form to be posted.
var requestContent = new FormUrlEncodedContent(new [] {
    new KeyValuePair<string, string>("text", "This is a block of text"),
});

// Get the response.
HttpResponseMessage response = await client.PostAsync(
    "http://api.repustate.com/v2/demokey/score.json",
    requestContent);

// Get the response content.
HttpContent responseContent = response.Content;

// Get the stream of the content.
using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
{
    // Write the output.
    Console.WriteLine(await reader.ReadToEndAsync());
}

using this :

https://app.swaggerhub.com/apis-docs/NexusMods/nexus-mods_public_api_params_in_form_data/1.0#/

TurBoss avatar Jun 05 '19 19:06 TurBoss

Vortex mod manager does something similar to 7th heaven mod manager, it installs mod's using a virtual file system so... Vortex would install in it's own folder for game mods, then it links the mods thru a virtual file system into the games mod folder or whatever folder the mod has in it's zip file.. so if it's set up as base game folder then the file structure would be mods/music or data/mods music whatever the game is set up to run mods in ect. not all games have a /mod folder. But you can use the nexus api to download mods without using there program. Tho I wonder if there program would be able to mod our version of ff7.

demanson avatar Jun 07 '19 22:06 demanson

Although 7th heaven uses hook's to alter the game, but with this linking method we could possibly do away with using hook's to alter the game there by reducing system load when altering the game.

demanson avatar Jun 07 '19 22:06 demanson

There's really two ways to work our API in. You could either add the functionality directly into 7th Heaven or make an addon for Vortex that allows the two applications to play nice :)

Pickysaurus avatar Jun 08 '19 09:06 Pickysaurus