Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Vortex mod manager #9

Closed
focustense opened this issue Jun 16, 2021 · 1 comment
Closed

Support for Vortex mod manager #9

focustense opened this issue Jun 16, 2021 · 1 comment
Labels
easynpc Issues/requests relating the EasyNPC app enhancement New feature or request
Milestone

Comments

@focustense
Copy link
Owner

Vortex has a staging directory that looks a lot like Mod Organizer's mod directory, although the subdirectories are named differently.

In particular, multiple files or versions from the same mod are not merged in Vortex, so you can end up with:

  • ModName-{NexusID}-{VersionInfo}
  • ModName-{NexusID}-{OtherVersionInfo}
  • OptionalFileName-{NexusID}-{VersionInfo}

etc.

Thus it is possible, albeit quirky, to infer the concept of a "mod". We have to group by the Nexus ID and perhaps try to figure out the "primary" mod name in a context-dependent way, or perhaps some combination of heuristics such as total size (could be tricked by a 4K texture addon) or the presence of ESPs/BSAs (tricked by updates/patches) and other checks. Individually none of them are reliable, but put together, they might be useful. Alternatively, maybe there is some metadata in the file system that could tell us without having to use the Nexus API, or maybe there is some other Vortex file we could read to get that info. I'm not a Vortex user so I don't know offhand.

But there is probably some way to do this, quirky though it may be, and if so, then there is no reason why EasyNPC needs to be a Mod Organizer exclusive.

The final question is whether the generated mod directory will actually show up in Vortex. Possibly, it happens automatically or after a refresh/restart, as Vortex does support "offline" mods. Or possibly it has to be registered somehow and instructions need to be provided in the docs. Will require testing and/or input from Vortex users to figure out.

Ideally this would be made available with the first Nexus release, since Vortex is obviously prevalent there.

@focustense focustense added enhancement New feature or request easynpc Issues/requests relating the EasyNPC app labels Jun 16, 2021
@focustense focustense added this to the v0.9-beta milestone Jun 16, 2021
focustense added a commit that referenced this issue Jul 9, 2021
This isn't being used yet, but eventually we are going to start keeping track of which mods are actually installed, both for Mod Organizer (#10) and Vortex (#9). This supports the Vortex half.
focustense added a commit that referenced this issue Jul 9, 2021
This will make it easier to deal with some of the more complex options coming up, like the Vortex manifest (#9).

Note that this changes the old slash syntax to GNU-style dash/double-dash args.
focustense added a commit that referenced this issue Jul 9, 2021
These cause failures during deserialization in app startup from Vortex (#9).
focustense added a commit that referenced this issue Jul 9, 2021
This allows us to have a many-to-one mapping from directories (which are "files" in Nexus/Vortex world, #9) to mods, while still doing all of our selections by mod.

One limitation is that it is subject to whatever order is in the Vortex manifest, which might not reflect proper priorities in terms of patch files - it always just takes the last one available if there are multiple copies. If this causes problems, it may be required to either look at the "primary/main" bit in the mod metadata, or try to hook into the actual Vortex conflict-resolution settings. But for now this works pretty well.
focustense added a commit that referenced this issue Jul 9, 2021
This uses two checks: (1) the parent process, so as to detect first-time launches before a mod directory has been configured, and (2) the presence of the staging marker ("__vortex_staging_folder") in the mod root directory, for subsequent launches even if the tool has been launched from _outside_ Vortex.

If Vortex is detected without the accompanying manifest argument, it will display a warning pointing users to the Vortex extension hosted on Nexus, and - we hope - avoid a lot of negative experiences and spurious bug reports from users who might not be aware of the special requirements for Vortex. This is important for actually being able to claim to support Vortex (#9).
@focustense
Copy link
Owner Author

Tons of good progress here, and I'm almost ready to say that Vortex is fully supported. There are two small improvements that I think should go in before launch:

  1. Pass the staging directory from Vortex on initial launch, when using the extension.

    For users who read the documentation - which will need to be updated - and install/use the extension before running EasyNPC for the first time, it just makes sense to save them the effort. We know what the staging directory is already. Also, there may be some users who discover EasyNPC from the extension, and again, we can save them a step.

  2. Show the Vortex warning/extension link when the mod root directory is changed to a Vortex staging directory.

    This is really about making sure all the bases are covered. If some users decide to skip steps or follow a weird or unexpected process to get themselves set up, it's a good idea to make sure they don't get lost in the shuffle.

The first one is important, in my opinion. The second can maybe wait a bit, as I don't expect a ton of users to actually do that, or switch to Vortex from Mod Organizer, etc. And if part 1 is implemented, then part 2 becomes unnecessary 99% of the time.

focustense added a commit that referenced this issue Jul 10, 2021
This uses a hacky file-based "IPC" to inform Vortex of when and where the new mod is, and make Vortex recognize it immediately as an installed mod.

Prior to this, the mod would only be visible after restarting vortex and confirming a warning message. Now there is no need to restart, and no warning after a restart.

Ref #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easynpc Issues/requests relating the EasyNPC app enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant