Page 1 of 2
Save game names
Posted: Tue Dec 02, 2014 8:24 pm
by Nova
Please, please please please please remove the weird restrictions on the save names. Not being able to use nearly anything to format the names is really, really annoying. No dot, no comma, no space(!!!), no colon, no semicolon. Only letters and numbers. The best idea would be to encode the name. Something like the url encoding. Or base64, but that's not readable. (But you would have to replace the "/")
"Oh, already 10 am? I should go to sleep. Better save the game. Okay, the name... 'Factory 1'..." - Evil name, can't save, you idiot! - "NOOOOO!!!"... er, well...
Re: Save game names
Posted: Tue Dec 02, 2014 8:54 pm
by FishSandwich
I use underscores in place of spaces.
Re: Save game names
Posted: Tue Dec 02, 2014 11:21 pm
by Boogieman14
While I agree the file naming rules are somewhat restrictive, I think that encoding in any form reduces readability, which doesn't seem like a good idea in general. Given the multitude of platforms factorio runs on, I can understand certain limitations should be in place. Colon is out because of Windows, backslash is out because of windows (directory separator) and *nix (Linux/Mac - escape character), forward slash is out because of *nix. Space and dot should be reasonably safe (although filenames starting with a dot are probably a bad idea in *nix) and characters such as !@#$%^&() will probably also be safe on most platforms.
That said, until this post I wasn't even aware there were any restrictions enforced, so to an IT-oldtimer like myself these restrictions are perfectly natural. I always use the - (dash) to separate parts of the filename.
Re: Save game names
Posted: Wed Dec 03, 2014 3:22 am
by Nova
Readability is no problem. The encoding is only on file level, not ingame. The user will never see it if they don't search for the save files.
"these restrictions are perfectly natural" << What the? They are stupid and should be removed as soon as possible.
Oh, and NEVER EVER use a dot as the beginning of a file or a directory. At least if the program should ever run on Windows. I hate minecraft for using a ".minecraft" directory.
I don't really want alternatives for this problem, but thanks for the try. It's just something which had do be solved a few versions ago.
Re: Save game names
Posted: Wed Dec 03, 2014 7:55 am
by bobingabout
modern windows is okay with the . at the front, .htaccess I think is the name of a file to control some internet access stuff, and saves fine on my hard drive now that I'm using windows 7, not XP.
Re: Save game names
Posted: Wed Dec 03, 2014 9:35 am
by MF-
I remember there being issues when
factorio itself is installed in a path containing spaces.
Also it won't start and throw a cryptic message when the install path is non-latin?
https://forums.factorio.com/forum/vie ... =25&t=7026
As long as underscores(_), dashes(-) and plus(+) are allowed, I'll be fine.
Automatically replacing input spaces with underscores instead of
throwing an error at the user might improve the situation a bit.
Re: Save game names
Posted: Wed Dec 03, 2014 12:25 pm
by ssilk
The problem is, that the requester allows to enter these chars. So it would be fine to change the input-field so, that the forbidden chars cannot be used.
I also would recommend to name a world on start. In the World-generator. Cause that would be a useful default filename.
So, I would make an alternative suggestion, to be complete:
https://forums.factorio.com/forum/vie ... f=6&t=7050
Re: Save game names
Posted: Wed Dec 03, 2014 1:58 pm
by MF-
ssilk wrote:The problem is, that the requester allows to enter these chars. So it would be fine to change the input-field so, that the forbidden chars cannot be used.
+1
A some kind of popup saying which characters are allowed would be needed, though.
(Similar to what windows (used to?) do when renaming a file using the explorer GUI.)
Re: Save game names
Posted: Wed Dec 03, 2014 8:44 pm
by Nova
What the hell? Why do you all want to restrict the input characters??? That makes no sense at all and is a very annoying thing. Why not just allow ANY character? If you really want less characters, just don't write them.
Re: Save game names
Posted: Thu Dec 04, 2014 1:19 am
by LordFedora
Because the save name must be a valid name on every OS factorio will run on, you are already limited the ascii-standard, the other chars you can't type are all because of various OS's saying you can't, that's why you can't have a space in the path, because Windows (i think XP and up fixed it, but it's only "fixed") can't handle strings that have a space in them unless they are surrounded in double quotes, we've been living with these limitations for a while now... where have you been?
The only strange char that might be in-excusable is the space, and that's because of the reason i gave, they must be passing it to a command-line somewhere and haven't escaped it, but allowing ANY char as a filename? no, not going to happen until they choose a specific OS, and even then, you aren't going to get ascii-extended, let alone unicode allowed ANY time soon
Re: Save game names
Posted: Thu Dec 04, 2014 9:32 am
by Nova
Like I said, just use an encoding. There's only minimal effort needed and if it was done right the save names would still be readable if someone looks for them in the file structure.
Oh, and I forged to mention that with ".foo" about Windows: Just try to rename a file to this. Windows will complain and not allow that. Makes it very annoying if someone uses this kind of name and you can't rename or recreate it.
Re: Save game names
Posted: Thu Dec 04, 2014 10:20 am
by Boogieman14
Nova wrote:What the hell? Why do you all want to restrict the input characters???
Probably because the reality is that restricting characters is still a necessity in a cross-platform world. Encoding adds an extra layer of complexity (which requires extra development and testing effort - on
every platform) and makes things less userfriendly (because, yes, many users seem to like to exchange save games, so recognisable names are essential).
Re: Save game names
Posted: Thu Dec 04, 2014 11:17 am
by Xecutor
There is quite easy solution for names with weird characters - store real name inside of the savefile and replace illegal characters with underscores in filename.
In case of duplicate files after replacement - add 01, 02, 03 etc at the end of filename.
Re: Save game names
Posted: Thu Dec 04, 2014 11:42 am
by Boogieman14
Which creates a mismatch between what the user sees inside the game and what he has to look for in the filesystem. The underscores aren't so bad, but the added sequence numbers make things confusing. The more I read and think about possible alternatives, the more I realise the solution the devs have picked may actually be the best way (with possibly a few extra allowed characters)
Re: Save game names
Posted: Thu Dec 04, 2014 12:34 pm
by Nova
Boogieman14 wrote:Encoding adds an extra layer of complexity (which requires extra development and testing effort - on every platform)
Come on, that's not even one day of work. And the code should be independend of the plattform. I don't talk about only encoding the specific character per plattform, but every character which has a problem on one plattform or another.
Boogieman14 wrote:makes things less userfriendly (because, yes, many users seem to like to exchange save games, so recognisable names are essential).
They could just use names without specials chars then?
Re: Save game names
Posted: Thu Dec 04, 2014 2:41 pm
by LordFedora
Nova wrote:
Boogieman14 wrote:makes things less userfriendly (because, yes, many users seem to like to exchange save games, so recognisable names are essential).
They could just use names without specials chars then?
hang on... did you just... space is a special char on some platforms... maybe you could just... not use special chars?
Re: Save game names
Posted: Thu Dec 04, 2014 3:12 pm
by User_Name
There is nothing special about space on any platform for the past 15 years or so
Re: Save game names
Posted: Thu Dec 04, 2014 3:49 pm
by LordFedora
Having spaces in file names causes enough problems that can be avoided entirely by just using what everybody else does, replace them with underscores...
Re: Save game names
Posted: Thu Dec 04, 2014 5:04 pm
by User_Name
LordFedora wrote:Having spaces in file names causes enough problems that can be avoided entirely by just using what everybody else does, replace them with underscores...
I don't know who you mean by "everybody", but Apple and Microsoft use names like "c:\Program Files" and "/Library/Application Support/".
Re: Save game names
Posted: Thu Dec 04, 2014 5:54 pm
by Nova
LordFedora wrote:Nova wrote:
Boogieman14 wrote:makes things less userfriendly (because, yes, many users seem to like to exchange save games, so recognisable names are essential).
They could just use names without specials chars then?
hang on... did you just... space is a special char on some platforms... maybe you could just... not use special chars?
If you really need to not have any special encoding in the file name, don't use special chars. It would be like it is now: Only letters, numbers and _ and - (or other characters. Don't want to try everything out).
Special characters should be encoded with a system. Whatever, how about +[number of ascii] for everything which can't be used? "test/" would be "test+2f" (2f is the hex rendering of "/" in ASCII. The plus itself would be encoded as "+2b". As far as I know, every file system can use the plus as character. If not, that another character could be used. For UTF8 character we can use more than one byte (two hexadecimal characters). For convenience, we should encode the space as an underscore and the underscore with this system. That would make names with space more readable on file level.