If a mod contains multiple scenarios, the name of the scenario folder can impact the game being able to load files properly.
Consider the case where a mod contains two scenarios, named "Scenario" and "Scenario-2"
Loading "Scenario-2" will succeed, and loading "Scenario" will silently fail, only when loading directly from the mod, if the folder name of the scenarios matches anything up to whitespace or dashes. So "Scenario 2" will also cause "Scenario" to fail to load.
If the scenarios are extracted to the /scenarios/ directory and loaded there, they work fine.
If the second scenario is named "Scenario_2" it will also work.
Attached is an example mod which contains two scenarios as described. The control.lua in each scenario contains only a call to error(...); the first scenario will load instead with no control.lua at all.
Expected behaviour if the folders were improperly named would be for Factorio to refuse to load the mod.
Expected behaviour if the folder names are fine would be for Factorio to load the files for both cases.
Nothing shows up in Factorio-current.log when this occurs.
[0.16.45] Scenarios in mods can fail to find lua files
[0.16.45] Scenarios in mods can fail to find lua files
- Attachments
-
- example-scenario_1.0.0.zip
- (1.83 KiB) Downloaded 145 times
Re: [0.16.45] Scenarios in mods can fail to find lua files
Thanks for the report. It should be fixed for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.