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

Add mod dependencies to other mods #708

Open
SmalkiGroove opened this issue Feb 22, 2023 · 13 comments
Open

Add mod dependencies to other mods #708

SmalkiGroove opened this issue Feb 22, 2023 · 13 comments

Comments

@SmalkiGroove
Copy link

Hi,

So I made a mod named "Mixed Combat Pack" that I recently uploaded to FAF.
This mod cherry-picks units from other mods (TM, BrewLAN, Extreme Wars ...) and mixes everything consistently with often some customization from me and balancing, as well as AI builders, platoons, etc.
To respect the copyright, I only included bp and lua files in the mod, which means that to play it, we have to download all mods that originally contain the units models, animations and texturing.

Currently in the mod_info.lua file, we can set requires but it's not what I need. The requires keywork is for other mods that need to be enabled to have the mod working.
For example, scoreboard mod requires to have UI tools mod enabled simultaneously.
In my case, I only want the other mods downloaded, but inactive.

Problem is, if I host a game with my mod, people who join won't necessarily have the dependencies, which obviously lead to game crashing when creating a unit that has a missing mesh.
What I have to do to be able to play on FAF is hosting the game with the 12 mods enabled, then when everybody joined I disable all the dependencies to play with only Mixed Combat Pack.

That's a bypass but not a solution in my opinion, because :
1 - many people are not willing to join a game with 12 mods because it's a mess and they are right, so it's difficult to get people in my games
2 - people who join are often confused because they thought they could make some unit from another mod that I didn't cherry-pick in mine. They look at the unit list before the game starts and it contains everything from every mod
3 - some guys have rated my mod lower because they say they are having crashes, and when I contact them to ask if they read the mod description (where I list the required mods), they say no, which I can understand

=> My suggestion is to add a keyword in mod_info.lua like 'dependencies' with the list of mods that needs to be downloaded automatically when mine is downloaded.

It is comparable to FAF client downloading automatically all mods enabled when we join a modded game, in terms of logic.

This would happen in 2 situations :

  • when you click the download button in the mod vault : it checks the dependencies and also download them
  • when you join a game with, for example, Mixed Combat Pack mod : it downloads the mod, which triggers the download of the dependencies

I took my mod as an example but I know there are many mods that have the same need (perhaps not with 12 mods but still), such as TotalMayhemLite, rebalancing mods, for mods that are libraries of lua code or custom straticons or whatever.

Cheers

@Sheikah45 Sheikah45 transferred this issue from FAForever/downlords-faf-client Feb 22, 2023
@Uveso
Copy link

Uveso commented Feb 22, 2023

@SmalkiGroove
Copy link
Author

No I tried, but it forces me to enable the other mods in the game.
And if I try to disable one of the dependencies if automatically disables my mod too.

@Brutus5000
Copy link
Member

Currently in the mod_info.lua file, we can set requires but it's not what I need. The requires keywork is for other mods that need to be enabled to have the mod working.
For example, scoreboard mod requires to have UI tools mod enabled simultaneously.

So having the other mods enabled would cause your mod to not work?
From a user perspective I see little difference between a game that has 1 mod and it's 5 dependencies active versus it has 1 mod and 5 inactive dependencies. Even worse if you don't show the "hidden" dependencies people will assume a client bug because it starts downloading mods that aren't in the mod list of the game.

@SmalkiGroove
Copy link
Author

What ? It is totally different to have mods enabled or just installed. If you enable a mod, its content is available in the game obviously and I don't want that.

And no people will not assume that it is a client bug because that's exactly what happens when a new FAF patch is released, the first game you join makes you download the updated files and it is not written anywhere that the client is downloading the update.

@Garanas
Copy link
Member

Garanas commented Feb 23, 2023

@Brutus5000 this pattern is suggested by Balthazar when you do not have the rights to edit the mods you'd like to combine / work with, just like Smalki is doing here.

The problem is that his mod clearly depends on those other mods (because that is where the files are such as textures, models, ...) but he doesn't want to activate the other mods because that would load in all the units (while he only wants a selection).

He's asking to automatically download the mods that his mod relies on, because without them his mod doesn't work. But they shouldn't be activated, and because of that the game / client doesn't auto-download them. He's asking for a field so that they do auto download, but are not activated.

@SmalkiGroove correct me if I'm wrong 😄

@SmalkiGroove
Copy link
Author

That is a perfect summary thank you 🙂

@Uveso
Copy link

Uveso commented Feb 23, 2023

why not activate the mods and then restrict all unwanted units ?

@SmalkiGroove
Copy link
Author

That would be such a pain in the backside to disable 90% of units in 12 mods each game tbh it's an even worse bypass that the one I'm currently doing.

@Brutus5000
Copy link
Member

What ? It is totally different to have mods enabled or just installed. If you enable a mod, its content is available in the game obviously and I don't want that.

Ok. I understood you load all the files and then overwrite the behavior. But you just import the files you want?

And no people will not assume that it is a client bug because that's exactly what happens when a new FAF patch is released, the first game you join makes you download the updated files and it is not written anywhere that the client is downloading the update.

You have no clue what people complain about or report as bugs...

@Brutus5000
Copy link
Member

With regards to the topic @Sheikah45 I still see this as client task. Even if we'd add it to the database, if you have mods, referencing mods, referencing other mods the API will not resolve this dependency tree. The client will have to do this on it's own and parse it from the lua imho.

@Sheikah45
Copy link
Member

Well I imagined that we would first need to store the dependencies inside of the database if we were for resolution.

And honestly I figure the dependency resolution belongs in the game code not the client

@Sheikah45
Copy link
Member

Also for knowing before download what the dependencies are it would have to be in the database and the API.

@Brutus5000
Copy link
Member

The same applies for mods in replays and yet we don't store them there 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants