[FLEXI][SUGGESTION] Add warning regarding deletion of excess files

Started by Dullstar, June 06, 2016, 05:00:58 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dullstar

TIFU while doing a test of custom music and Flexi so I'd know how it behaves, and ended up deleting some levels. (I think only one of them wasn't backed up in some form somewhere, so not too destructive, as the majority of my levels are saved in a different folder than I was using anyway).  While the tutorial does mention this, it may be a good idea to add a bit of a warning "Are you sure? Other files in this directory will be deleted" message just in case anyone doesn't read the entire tutorial before using the program.

namida

Here's the problem with that:

We've had complaints when it doesn't delete those files.
We've had complaints about excessive notifying / questioning users.

So, which point outweighs the other two here?
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Dullstar

Hmmmm...  Maybe have a "don't show this warning again" checkbox to handle that?

Nepster

Here two more suggestions how to deal with this problem:

1) When saving a System.dat or a .nxp, add a warning text "It is recommended to select an empty directory" resp. "It is recommended to select the directory containing the System.dat" to the file browser. This way, users don't have to read the tutorial to see this warning.
I have no idea, how easy it is to modify the standard file selection browser in Delphi though.

2) Let the FlexiToolkit save the levels not in the subdirectory "levels", but in the subdirectory "FlexiLevels" (or something like that). The idea is: Users may already have directories called "levels" containing their levels, but they rarely use a subdirectory "FlexiLevels" for creating their own levels. So if the FlexiToolkit messes around in "FlexiLevels", it will probably only delete levels the Toolkit itself has copied there.
Of course this does not help, if users change/update/backroute-fix levels directly in the subdirectory "FlexiLevels" after the Toolkit has copied their levels there. But losing newer versions of a level seems to me to be less severe than losing a level completely. 

namida

Quote1) When saving a System.dat or a .nxp, add a warning text "It is recommended to select an empty directory" resp. "It is recommended to select the directory containing the System.dat" to the file browser. This way, users don't have to read the tutorial to see this warning.
I have no idea, how easy it is to modify the standard file selection browser in Delphi though.

It's not very open to customization; but I could put a warning dialog before it opens.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

Quote from: namida on June 07, 2016, 08:52:31 AM
...but I could put a warning dialog before it opens.
An explicit warning dialog when saving data is something very unusual. ;)
Given that it does not warn about some immediate damage, but only about the possibility of future data loss (which often even is intended by the user), I am somewhat sceptical whether this is really helpful. Especially as it will only be useful the very first time a user sees this message.

I assume that the "Import/Export SYSTEM.DAT" buttons have the same function as "File -> Open/Save"? Then (apart from renaming the buttons to use identical words for identical functions) one could perhaps add a warning text directly below the "Export SYSTEM.DAT" button?

namida

Quote from: Nepster on June 08, 2016, 04:56:05 PM
I assume that the "Import/Export SYSTEM.DAT" buttons have the same function as "File -> Open/Save"? Then (apart from renaming the buttons to use identical words for identical functions) one could perhaps add a warning text directly below the "Export SYSTEM.DAT" button?

No; these save only the SYSTEM.DAT file itself. They probably don't need to be there anymore, seeing as no other program can actually edit SYSTEM.DAT these days.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

@Dullstar:
I should have asked these questions already some days ago, but:
- Would any of my suggestions have helped to prevent your data loss?
- Is your FlexiToolkit.exe in the same directory as the NeoLemmix.exe or somewhere else? If somewhere else: Where?
- If you create levels, in which (sub)directories do you usually save them?
- In which (sub)directory did you save the System.dat from the FlexiToolkit?

Dullstar

Quote from: Nepster on June 09, 2016, 03:57:24 PM
@Dullstar:
I should have asked these questions already some days ago, but:
- Would any of my suggestions have helped to prevent your data loss?

I assume you mean of these?
Quote1) When saving a System.dat or a .nxp, add a warning text "It is recommended to select an empty directory" resp. "It is recommended to select the directory containing the System.dat" to the file browser. This way, users don't have to read the tutorial to see this warning.
I have no idea, how easy it is to modify the standard file selection browser in Delphi though.

2) Let the FlexiToolkit save the levels not in the subdirectory "levels", but in the subdirectory "FlexiLevels" (or something like that). The idea is: Users may already have directories called "levels" containing their levels, but they rarely use a subdirectory "FlexiLevels" for creating their own levels. So if the FlexiToolkit messes around in "FlexiLevels", it will probably only delete levels the Toolkit itself has copied there.
Of course this does not help, if users change/update/backroute-fix levels directly in the subdirectory "FlexiLevels" after the Toolkit has copied their levels there. But losing newer versions of a level seems to me to be less severe than losing a level completely. 
Those would probably both work.  I think the second is better, but both should work.
Quote- Is your FlexiToolkit.exe in the same directory as the NeoLemmix.exe or somewhere else? If somewhere else: Where?
It's in a different folder, inside my downloads directory that I should probably tidy up one of these days.

Quote- If you create levels, in which (sub)directories do you usually save them?
I usually save them in a subdirectory of the Levels folder; but there were a relatively small number saved outside of it (no more than 2 that hadn't been uploaded here, neither of which would be hard to recreate, so relatively minor data loss), which were the ones that were lost. The test level that I put in the .nxp was from the default levels folder, not the subdirectory.  I have not tested what would happen if the levels came from a different directory.
Quote- In which (sub)directory did you save the System.dat from the FlexiToolkit?
In the same folder as the editor .exe.

namida

QuoteI have not tested what would happen if the levels came from a different directory.

The original file is never modified or erased in any way by Flexi. It creates a copy of it in the project's "levels" folder.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Apjjm

From what i can gather the reason the toolkit needs to delete levels (and i guess other resources) is that it makes copies of them. Perhaps the toolkit could just not take copies of the files, then it wouldn't need to delete anything? But before i describe my suggestion i would first like to describe my current usage of the toolkit.

Currently i version the pack i am working on using git. I have my folder structure for my pack set up similar to below:

Pack - Packs root directory
Pack/Dat - Contains all the stuff like rank signs & the .dat files used by flexitoolkit.
Pack/Dat/Levels - Contains all my levels
Pack/Replay - Contains replays for all levels
..And some other folders


As you can see, i store my levels in the dat/levels folder as i find it annoying to have to remember all the levels i updated since i last opened up the flexi-toolkit which i then need to go through and replace - because otherwise it would have outdated copies (I have already almost sent out versions of my pack with levels to test where i forgot to update something quite a few times). However, this means that the toolkit likes to delete any levels that are not included in the pack already. If it encounters an error during saving it can wind up deleting lots of levels! (Bug topic incoming on this)

Therefore i would like to propose the following system for storing level files:
Flexi-toolkit should not use a "levels" directory for storing levels at all. Instead it will store one .ini file per rank in this folder instead (maybe rename it to ranks). Levels being here will be entirely optional, maybe discouraged.
Each .ini file will list, in order of inclusion, a path to each .lvl file in that rank (The toolkit appears to somewhat support this already for hand edited .ini files - but it still makes a copy and resets the path on save).
There will then be a file called ranks.ini which will list the name of each rank, in order.

Example:

Pack/Levels/ - Folder where all the levels are stored in this example.
Pack/Dat/ranks.ini:
    easy
    hard

Pack/Dat/levels/easy.ini
    ../../Levels/just dig.lvl
    ../../Levels/we all fall down.lvl

Pack/Dat/levels/hard.ini
  ../../Levels/no added colors or lemmings.lvl
  ../../Levels/save me.lvl

If the toolkit encounters an error loading a .ini file (For example, it was deleted by the user, or moved), it can present an error about the missing file and continue on - it doesn't need to worry about leaving any copies behind, because at worst there will be an unused .ini file. The toolkit could either automatically clean up unused .ini files on save, or just list them in a separate tab with checkboxes and give the user a delete selected option. This  cleaning process shouldn't really need to be done often, as any dangling files can probably be treated as some kind of warning, if the user was exclusively using the tool these should not be present unless something already went wrong - in which case the best thing the tool can probably do is not make recovery harder by deleting things until the user is happy they have fixed the problem.

Ultimately it would be nice if all the settings in the toolkit were stored in a human readable way (I.e. do away with .dat files entirely) with path references to resources & that graphic sets / music / custom images etc could be stored using a file layout which is most amenable to the user's workflow rather than how the toolkit necessitates. Of course, this adds some responsibility to the user to structure their data in a reasonable way so that they don't end up breaking all the paths, but i would have thought people working on a pack does something like that already, if only to make it easier to make backups of anything they are working on.
My Level Packs: Quartet

namida

Your ideas are good, but they would be a significant overhaul to how the toolkit works. Since there will likely be significant changes needed with the new version of NL anyway, I'm a bit hesitant to do anything too significant at this point.

In regards to not knowing which levels to replace - you can simply close the toolkit, then edit the LVL files in the Levels directory directly. This is what I've been doing for LPV.

The problem here is relating to the balance between "don't make more-advanced users go through the toolkit for every little thing" and "don't make it too easy to screw up a level pack". Using your suggestion, the problem arises that the user could be tidying up their files elsewhere, or moving to a different PC with a different folder setup, etc, which would then break a lot of things. With the current setup, it's very hard to outright break a pack beyond easy repair without deliberately trying to do so, except perhaps by deleting LEVELS.INI (even a lost SYSTEM.DAT isn't too hard to recover from).
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

Coming back to this since I'm doing fairly decent amounts of work on Flexi at the moment:

Quote1) When saving a System.dat or a .nxp, add a warning text "It is recommended to select an empty directory" resp. "It is recommended to select the directory containing the System.dat" to the file browser. This way, users don't have to read the tutorial to see this warning.

The latter is not nessecary (for saving an NXP). When saving an NXP, Flexi essentially builds the NXP file inside the folder containing the SYSTEM.DAT file, then moves it to wherever you wanted to save it to.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)