TurBoss / 7h

Final Fantasy 7 wrapper tool by Iros
Microsoft Public License
21 stars 31 forks source link

Implement nexus mods open api #35

Open TurBoss opened 5 years ago

TurBoss commented 5 years ago

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

picklejar76 commented 5 years ago

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? :)

TurBoss commented 5 years ago

was told on discord by @Kaldarasha

Kaldarasha commented 5 years ago

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.

picklejar76 commented 5 years ago

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 commented 5 years ago

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

TurBoss commented 5 years ago

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#/

demanson commented 5 years ago

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 commented 5 years ago

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.

Pickysaurus commented 5 years ago

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 :)