Mod list sharing for the purpose of reporting issues with a mod
Mod list sharing for the purpose of reporting issues with a mod
What's the best way to obtain a mod list of the active save, in a human readable format (i.e. that contains the mod names and not their site IDs, for example... or perhaps the names in addition to their IDs,) for issue reporting purposes?
Is there a way to dump the mod list while in-game via the console, for example? I haven't find any mention or questions related to this about this in my searches, but granted, didn't look at the wiki.
I usually just take the list from the current log, where the game dumps the mods as they are being loaded, but they are repeated in that list and it's hard to know where the repetitions start when you are using 100+ mods. Besides, some mods dump info in the middle of the loading process when makes it hard to follow and exactly find just the mods and not any extraneous stuff.
There's also the mod-list.json file, but I don't consider that human readable, and it doesn't contain the mod's name there... just their IDs.
You could just share the save file, I suppose... but reaching end-game the saves tend to bloat a bit, and it might not be convenient for a mod author to download a big file just to know the mods being used.
Best regards!
Is there a way to dump the mod list while in-game via the console, for example? I haven't find any mention or questions related to this about this in my searches, but granted, didn't look at the wiki.
I usually just take the list from the current log, where the game dumps the mods as they are being loaded, but they are repeated in that list and it's hard to know where the repetitions start when you are using 100+ mods. Besides, some mods dump info in the middle of the loading process when makes it hard to follow and exactly find just the mods and not any extraneous stuff.
There's also the mod-list.json file, but I don't consider that human readable, and it doesn't contain the mod's name there... just their IDs.
You could just share the save file, I suppose... but reaching end-game the saves tend to bloat a bit, and it might not be convenient for a mod author to download a big file just to know the mods being used.
Best regards!
Re: Mod list sharing for the purpose of reporting issues with a mod
Yeah there's no easy way to work around this in order to provide a simple text list.leeux wrote: Mon Aug 15, 2022 3:26 am I usually just take the list from the current log, where the game dumps the mods as they are being loaded, but they are repeated in that list and it's hard to know where the repetitions start when you are using 100+ mods. Besides, some mods dump info in the middle of the loading process when makes it hard to follow and exactly find just the mods and not any extraneous stuff.
Definitely this, or create a new save with exactly the same modset and share that. Then the person you're reporting it too can very easily sync their mods with the save (and the downloading now happens in parallel so it is very fast!).leeux wrote: Mon Aug 15, 2022 3:26 am You could just share the save file, I suppose... but reaching end-game the saves tend to bloat a bit, and it might not be convenient for a mod author to download a big file just to know the mods being used.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: Mod list sharing for the purpose of reporting issues with a mod
Good point! I honestly didn't thought of that! I'll keep it in mind for the next time I need to report an issue. Thanks for the idea!Xorimuth wrote: Mon Aug 15, 2022 3:40 amDefinitely this, or create a new save with exactly the same modset and share that. Then the person you're reporting it too can very easily sync their mods with the save (and the downloading now happens in parallel so it is very fast!).
For the moment I took the list from the log and used Notepad++ to clean it up a bit and posted it on pastebin and shared that.
EDIT: removed misplaced text
Re: Mod list sharing for the purpose of reporting issues with a mod
Space Exploration Postprocess uses code to log all the active mods and their versions in an easy-to-read section of the log. One could write a console command to do the same thing, or even write it to a separate file in the script-output folder.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: Mod list sharing for the purpose of reporting issues with a mod
Thank you for the tip! Gonna have it in mind for next time... I can't play SE on my current hardware, but I can certainly download it and check the code!robot256 wrote: Mon Aug 15, 2022 2:59 pm Space Exploration Postprocess uses code to log all the active mods and their versions in an easy-to-read section of the log. One could write a console command to do the same thing, or even write it to a separate file in the script-output folder.
Re: Mod list sharing for the purpose of reporting issues with a mod
Just need to loop over the mods variable - it is a dictionary with all the loaded mods in it.leeux wrote: Mon Aug 15, 2022 6:25 pmThank you for the tip! Gonna have it in mind for next time... I can't play SE on my current hardware, but I can certainly download it and check the code!robot256 wrote: Mon Aug 15, 2022 2:59 pm Space Exploration Postprocess uses code to log all the active mods and their versions in an easy-to-read section of the log. One could write a console command to do the same thing, or even write it to a separate file in the script-output folder.
Code: Select all
for name, version in pairs(mods) do
log(name .. " version " .. version)
end
Re: Mod list sharing for the purpose of reporting issues with a mod
Awesome! Thank you very much for that code snippet! I'd put it to good use, if I can, next time the need arises. I'd assume you could also type it in the console using /c, right?Silari wrote: Mon Aug 15, 2022 11:29 pm
Just need to loop over the mods variable - it is a dictionary with all the loaded mods in it.
Code: Select all
for name, version in pairs(mods) do log(name .. " version " .. version) end
Gotcha, understand. Yeah, if the issue is too severe, I'd normally just attach the factorio-current.log (or post a link to gdrive containing it!) and only explicitly name the mods I think are responsible, or that the game said caused the issue.Silari wrote: Mon Aug 15, 2022 11:29 pm Only downside is the calling mod is added into the log. You could write it to a separate file using game.write_file, but that only works during the control stage (ie when a game is loaded) so it may be problematic to use if a mod is preventing the game from loading.
Meanwhile, during these past days I found that using a regular expression of the form:
Code: Select all
"Loading mod .* \(data\.lua\)$"
I match the "data" stage in this case because I felt it was the "normal" loading state, where the mod proper is being loaded... the other two are pre- and post-, I think... correct me if I'm wrong on this! So that would produce a more correct list w.r.t the order of the mods being loaded, in case that matters.
Thank you again for the reply!
Re: Mod list sharing for the purpose of reporting issues with a mod
It's possible for a mod to be missing any or all of data.lua, data-updates.lua, or data-final-fixes.lua. If the mod only has control.lua, it won't show up in the data stage at all but will show up in the control stage initialization (when loading a save).
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: Mod list sharing for the purpose of reporting issues with a mod
Nope, not quite. The console is available only in the control stage, but "mods" exists only during the data stage. In the control stage, you must read "script.active_mods" instead.leeux wrote: Tue Aug 16, 2022 5:41 pmAwesome! Thank you very much for that code snippet! I'd put it to good use, if I can, next time the need arises. I'd assume you could also type it in the console using /c, right?Silari wrote: Mon Aug 15, 2022 11:29 pm Just need to loop over the mods variable - it is a dictionary with all the loaded mods in it.
Code: Select all
for name, version in pairs(mods) do log(name .. " version " .. version) end
It's even possible that a mod contains nothing but info.json, so it wouldn't ever show up! Granted, such a mod wouldn't do anything at all. (@leeux: It would be useless on its own, and should never be uploaded to the mod portal!) But if you have such a mod installed locally, you could use it like a flag:robot256 wrote: Tue Aug 16, 2022 6:05 pm It's possible for a mod to be missing any or all of data.lua, data-updates.lua, or data-final-fixes.lua. If the mod only has control.lua, it won't show up in the data stage at all but will show up in the control stage initialization (when loading a save).
Code: Select all
if mods["my_empty_mod"] then
do_stuff()
else
do_other_stuff()
end
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Mod list sharing for the purpose of reporting issues with a mod
Thank you all for the replies!
I managed to make the code posted by @Silari (with further caveat added by Pi-C) work in the console,
When executed from the console, this printed to the log the list of active mods... I was confused at first because I kinda expected it to print something in the console too, but then when I looked inside the factorio-current.log I saw the list of mods, here's minimal a excerpt of what printed in my case:
Thanks again!
I managed to make the code posted by @Silari (with further caveat added by Pi-C) work in the console,
Code: Select all
/c for name, version in pairs(script.active_mods) do
log(name .. " version " .. version)
end
Code: Select all
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: base version 1.1.61
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: rusty-locale version 1.0.16
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: simhelper version 1.1.4
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: WideChests version 4.0.2
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: aai-containers version 0.2.11
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: aai-signal-transmission version 0.4.7
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: aai-signals version 0.6.1
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: aai-vehicles-chaingunner version 0.6.1
4072.930 Script for name, version in pairs(script.active_mods) do log(name .. " version " .. version) end:1: aai-vehicles-flame-tank version 0.5.1
Re: Mod list sharing for the purpose of reporting issues with a mod
You can do that by using game.print() instead of log(). This will print just the mod names and versions, without prepending each line of output with the command. Then again, you can't copy/paste text from the console …leeux wrote: Wed Aug 17, 2022 4:02 am I was confused at first because I kinda expected it to print something in the console too
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!