Page 1 of 1
Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Mon Sep 14, 2020 9:40 pm
by raiguard
EDIT: This really should be in modding interface requests. Could a mod please move it there? I'm sorry!
I would like to be able to specify a list of required mods for a specific scenario. For example, my Editor Extensions mod includes a "testing" scenario, and I would like to specify that players should have EE and
flib enabled for the scenario to work. The reason being, the scenario relies on both of these mods existing, and if the user removes flib specifically, the scenario will simply crash on a bad require.
Perhaps there should be a way to bypass this list and load anyway (just in case), but it should at least warn the users of what they're doing.
Of course, it would be ideal if there was a "sync mods with scenario" button on the choose scenario screen as well.
Thank you!
Re: Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Mon Sep 14, 2020 9:57 pm
by Koub
Raiguard wrote: Mon Sep 14, 2020 9:40 pmThis really should be in modding interface requests. Could a mod please move it there?
[Koub] Indeed. Moved to Modding interface requests
Re: Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Tue Sep 15, 2020 7:30 pm
by Rseding91
If the scenario *requires* the mod; why not just put the code in the mod and skip the scenario?
Re: Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Wed Sep 16, 2020 2:10 am
by raiguard
In the case of flib, it's a library mod, so that just doesn't make sense.
For EE I can see your argument for this basic scenario, but for more complex scenarios, they might be expecting various mods to be present to provide the experience they intend. I can imagine that there are a lot of usecases for something like this, even if I personally can't come up with many.
Re: Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Fri Sep 18, 2020 1:40 pm
by eradicator
Rseding91 wrote: Tue Sep 15, 2020 7:30 pm
If the scenario *requires* the mod; why not just put the code in the mod and skip the scenario?
That approach doesn't work for "scenario pack" type mods where not all included scenarios have the same requirements. Especially when the library author and the scenario author are not the same person.
Also as far as i know scenarios are copied to the user directory after being played once (MP server), so disabling the mod that originally contained the scenario doesn't remove the scenario from the menu.
Re: Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Fri Sep 18, 2020 2:08 pm
by Bilka
+1 to this. My usecase is a debugging scenario in
https://mods.factorio.com/mod/AbandonedRuins that spawns every single ruin. Obviously this is not part of normal gameplay and obviously it requires the mod to be present. Putting the code directly in the mod is not an option because that makes it impossible to start the game into the debug setup with a command line parameter.
Now, the problem is that if the player starts a multiplayer game with the scenario (without saving anything), the scenario will then show up in the "User scenarios" and can be started with the mod disabled. This fails because the scenario requires files from the mod it is from.
For now, I set the scenario to be multiplayer incompatible, but that is a workaround, not a solution. In my opinion it is nonsensical that mods can contain scenarios that rely on mod content, yet the game allows them to be started without the mod that originally contained them and without any indication that the scenario was part of a mod.
Re: Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Fri Sep 18, 2020 2:23 pm
by eradicator
Bilka wrote: Fri Sep 18, 2020 2:08 pm
Now, the problem is that if the player starts a multiplayer game with the scenario (without saving anything), the scenario will then show up in the "User scenarios" and can be started with the mod disabled.
This whole concept of "copy scenario to user scenarios" should probably be revied too (in a different topic). As far as i remember it can also lead to outdated versions of a scenario being selectable *despite* the containing mod being installed with a newer version.
Re: Scenario "required mods" and sync-mods-with-scenario functionality
Posted: Wed Oct 28, 2020 6:50 pm
by raiguard
After a
conversation on the #mod-making channel of the Factorio Discord, this is now more important than ever. Some scenarios that previously worked with vanilla will now require a mod to re-add some removed entities, but there is no way for scenarios to specify that certain mods are required in order for them to work properly.
Additionally, it was brought up that maybe it would be better if scenarios were tied more closely with mods, so you had to create a mod in order to create a scenario. But that is another topic for another thread.