Add "copy to clipboard" to mod error dialogue.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Add "copy to clipboard" to mod error dialogue.

Post by eradicator »

What?

Add a [Copy] button to the "Notice" message to make useful bug reports much more intuitive.

Why?

I've been into factorio modding for years, and only today someone told me that it's actually possible to *select* the text in a notice box. I've seen hundrets of bugreports where people make screenshots of the error message to upload it to some random image hoster to then post a link to the picture on the forum. This could all be much easier if the Notice provided a simply "[Copy]" button like the one in the blueprint string export window.
Attachments
copybutton.png
copybutton.png (29.08 KiB) Viewed 2911 times
bpstringcopy.png
bpstringcopy.png (41.72 KiB) Viewed 2911 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by Pi-C »

+1
eradicator wrote: Sat Sep 07, 2019 11:30 pm I've been into factorio modding for years, and only today someone told me that it's actually possible to *select* the text in a notice box. I've seen hundrets of bugreports where people make screenshots of the error message to upload it to some random image hoster to then post a link to the picture on the forum.
Yes, I always wondered why people post the screen shots of error messages instead of just plain text. Reminds me a lot of those who save the screenshot of an error message as PDF, then import the PDF into MS Word and attach the word document to a mail instead of mailing you three lines of plain text. :-)

That being said, I *think* I used "copy text from notice" before, but since doing more with Factorio than just playing, I always start the game from the command line and copy directly from logging output. Perhaps it would help to add a notice to error messages that the text of the message can be copied from $PATH_TO_LOGFILE, or even suggest to send the complete logfile when reporting errors? (The latter may be too much in many cases, just the error message would usually be enough -- in some cases it might be good to have the complete log though to see whether there might be issues with other mods.)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by darkfrei »

Here must be some easier way to report the mod author about the mod error by data stage and control stage.

The one-click "copy to clipboard" is a small part of solution for it.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by Pi-C »

darkfrei wrote: Mon Sep 09, 2019 10:29 am Here must be some easier way to report the mod author about the mod error by data stage and control stage.
Automatic mails to mod author, perhaps? Obviously, it would be a bad idea if the game would send a mail to that address directly (privacy reasons), so on crash, compressed logfile, unlocalised error message, and mod name should be sent to the mod portal where a script forwards the log file to the email address associated with the mod author.

How about a bug in a popular mod with hundreds or even thousands of users? The modder's mail account could easily be flooded in such a case. -- Well, if the mail forwarder kept count of received and sent mails about a particular error (store unlocalised error message), it could forward only the first log file for a particular error and discard all following! Just send one mail, keep the counter running, and at the end of a day (or a week, or whatever period you like), send a mail like this:
$MOD_NAME:
This error has been reported $X times during the past $PERIOD_OF_TIME:

$ERROR_MESSAGE"
Ideally, the mail would also contain a link that the mod author could use to delete the counter when the bug is fixed. Hmm, sounds almost too easy -- where is my mistake? :-D
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by darkfrei »

Not the log file, but the error message and game/mod version, you can choose the latest versions only, multiple times of the same error gives bigger number by same bug report, but not more bug reports.

Normally modders need not more than just a message with only screenshot or text of the error:
Attachments
2019-09-07T15_14_49-Factorio 0.17.68.png
2019-09-07T15_14_49-Factorio 0.17.68.png (22.28 KiB) Viewed 2859 times
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by Pi-C »

darkfrei wrote: Mon Sep 09, 2019 5:08 pm Not the log file, but the error message and game/mod version, you can choose the latest versions only, multiple times of the same error gives bigger number by same bug report, but not more bug reports.
That's what I meant: Don't spam the modder with countless bugreports, but send only one + number of times it was reported. First time a bug report is submitted, it could include the logfile. I agree that this would increase the load for the proxy server passing on the bug reports to modders. (Just managed to spam my local logfile by accidentally logging recursively all key/value pairs below data.raw.entity[$relevant-entity] -- in a for-loop with about 80 iterations. When I interrupted the loading process, Factorio had written almost 1 GB to the log. :-D)
Normally modders need not more than just a message with only screenshot or text of the error:
Yes, normally, if only their own mod is concerned. But sometimes there may be errors that only appear if certain other mods are present. Perhaps a list of the installed mods would be better than the complete logfile. :-)
Last edited by Pi-C on Tue Dec 15, 2020 2:34 pm, edited 2 times in total.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by eradicator »

I'd just like an obvious button. Not an overengieered cloud-based automatic logging service that would trigger the whole opt-in/opt-out flameware again (and is unrealistic anyway).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
AlveKatt
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Sun Apr 14, 2019 1:44 pm
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by AlveKatt »

eradicator wrote: Sat Sep 07, 2019 11:30 pm I've been into factorio modding for years, and only today someone told me that it's actually possible to *select* the text in a notice box.
I had no idea until you told me, either...

I fully support this suggestion.
User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 232
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: Add "copy to clipboard" to mod error dialogue.

Post by picklock »

+1 for this suggestion.

It would be nice to have this.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Post Reply

Return to “Modding interface requests”