Closed Remco32 closed 1 month ago
I'm trying to work out this issue and PR it, I'm currently having issues trying to load the addonlist.txt because while I was reading the source code, I noticed this project was first intended to be a general mod manager rather than a L4D2 one. Because of this I get caught up with what should I do and has me thinking if the code I write should be as general purpose as that first view of the project and make a game specific workaround section code (Gmod doesn't have a addonlist.txt for example), or code it as this were a L4D2 mod manager first and foremost.
Also something I noticed, is that supporting the addonlist.txt would make it easier to add the feature of changing mod loading order, which is a thing that steam properly supports.
For future reference, it would make it easier, since the addonlist.txt order is defined by what's shown in the steam interface, which then applies that to the addonlist.txt, more details on how load order is managed on the following steam community post.
Yup, funky was first designed to work for many source games (with their various differences in terms of mod loading, as you've mentioned) but at some point I just wanted to focus on left 4 dead. The systems still sorta stayed, and I even have full L4D1 support implemented, but I wanted to focus on L4D2 specifically as I knew it best and could focus on it.
I have a "vdf" branch on-going that focuses on reading and writing KeyValue files, such as addonlist.txt, but I haven't been able to work much on it as of late.
For load order support, I'll have to first consider how shuffles and "bundles" (combining multiple mods into one item within Funky) will affect it, so I'd rather focus on bundles first, as it's a more requested feature, and go on from there.
Importing your current addonlist.txt is a nice feature thought, I'd love to add that, I just have to get around to doing it.
Let me know about any future progress / feedback. I appreciate the effort.
I was able to read the addonlist.txt and implement it on a sane-ish way, following your window.api code, I should have a prototype that enables/disables addons reading the list, tomorrow or soon :tm:, it's a bit messy since I have never used TS and I'm not very familiar with the codebase yet, but it's there
I was able to update the libraryActiveAddons variable and fill it with addons read from the file, but it seems there's something I'm missing since doing so, instantly makes all enabled tags to dissappear, but the number seems to be updating correctly with the L4D2 addon enabling changes.
https://github.com/user-attachments/assets/609d1454-36b9-4a89-8b5d-919e294bd5f7 (The video showcases the corner number being updated, and the current issues with enabled labels)
It seems I will take a bit more of time, since I'll have to read the database stuff that's going on when clicking stuff and enabled labels, my progress is over this fork on the main branch, I'm also open to code style changes and other comments on how should I improve my code.
Sweet! Unfortunately I won't have time until Saturday to check this stuff out, but big thanks for the work. I'll let you know my thoughts ASAP.
Do let me know how you found navigating the source code... The project was quite rushed in some ways and if you have any tips on making it easier to read, feel free to let me know.
I finally finished it. Finished product video for those who are interested.
https://github.com/user-attachments/assets/3a301cf6-10a1-482f-a381-5c468df76312
Navigating the source code was a bit confusing at first, but that may be related with this PR being my first time touching TS and Svelte, my background is with other web dev stuff like React and Laravel, but when I familiarized myself with the codebase (I took about 2 days), making changes was a lot easier, the only confusing stuff is the remnants of the legacy code for other games.
As for tips, I don't really know what to say, maybe doing an uplift on those places where the code was being prepared was for other games as well is too much of a refactor and that may also be related to my lack of experience.
TBH I did the PR because I started using the tool and thought fixing this issue would be a nice addition + I saw some passive aggressive comment and decided to contribute
That one shitty comment ended up doing some good in the end lol
I'm not sure if this is intended behaviour.
I would like for my currently set addonlist.txt to be read, to have a starting point when starting to use Funky. Now, after first use, I seem to need to manually activate all the mods I have activated in-game in Funky to achieve parity.
This might be related to #6 though.