rfuzzo / Cyberpunk-utility

Some utility tools for Cyberpunk 2077 modding.
24 stars 0 forks source link

conflicts - Request: Add right click option to put mod on default position #8

Open Phaz42 opened 10 months ago

Phaz42 commented 10 months ago

Great tool! Sorry if this is not the place for requests.

I keep adding mods to my playthrough, which get added to the bottom of the list when next running the conflict tool. Thereby keeping the order which I already set, for which I'm grateful. :D But it would be nice if we could right click the mods (in the left Load Order pane) and had an option to "Set to default order position". I have many mods, and manually dragging to the default position is pretty tedious.

For example, I just added some Eye mods, one of the archives is called 000EyeMaterial.archive, but it's sitting at the bottom of the list, which does not fit in to the default expected order with other related mods.

The ultimate solution btw would be a rule based system. Like Vortex has for individual file conflicts. Where you just define rules when two files conflict and set something like "mod A goes after mod B". The rest of the list would still be dynamic. But I understand that is a completely different approach then this tool is currently using.

rfuzzo commented 10 months ago

That's a great solution, I have some ideas.

  1. I need to think about the default position hmm 🤔 Not sure how that would work best.
  2. The local rules idea is great! An easy idea would be to simply have another text file just for this app where you can add mod rules. I would also need to think a bit how that would be structured best tbh
  3. and lastly: I actually have started work on a global cyberpunk-mod rules set here: https://github.com/rfuzzo/cmop It is similar to LOOT for Bethesda games, and would be a community-powered mod order set.

However, it doesn't solve the issue that new mods get sorted in the back hmm...

Phaz42 commented 10 months ago

Now that I think about it some more, it's actually not so easy to determine the default position programmatically.

Another approach may be (on startup) to sort the list (excluding the new mods), then compare the sorted list with the current list in modlist.txt. All mods (excluding new mods) that are not in the sorted position must have been put there manually by the user. Remember those mods and their position. (Their position should probably be, "it went after/before mod X" or something like this, not a numbered position.) Then sort the complete list (including the new mods) and after that move the remembered mods back to their unsorted position (after/before the mod they came previously).

If you go to a real rule based system, I think a rule could just be a defined relationship between two archives that have a conflict. A most basic rule could be something like: ModB.archive;ModA.archive. This would mean that ModB went before (has a higher prio than) ModA. If the tool starts fresh and either ModA or ModB no longer exist, the rule is invalid and should be scrapped.

And besides that, after the tool runs a scan, it could show you each conflict and let you decide the order between each one, thereby defining a rule.