Valkyrie: Problems with deleting scenarios in SE

Created on 19 Feb 2019  路  11Comments  路  Source: NPBruce/valkyrie

A major issue with deleting scenarios in SE. There are two scenarios that I created to reproduce the issue.

bug

Most helpful comment

I agree we should add a confirmation.
But for 2.2, we will just remove the delete button for editor scenarios.

Let's avoid the big drama of someone losing weeks of work because he thought he was deleting something else.

All 11 comments

The scenario of the problem of scenarios not being deleted:

  1. Download any scenario. Turn off the app.
  2. Go to %appdata%\Valkyrie\Download, copy the scenario file to %appdata%\Valkyrie\MoM\Editor and unzip it.
  3. Open the app. Go to Editor, modify the scenario's name to identify it easily. Go to Main Menu and New game. Below notice the downloaded '22.30h at the bird shop' scenario on the list.
    image
  4. Click Go offline. Notice two scenarios '22.30h at the bird shop' and '22.30h at the bird shop_local' on the list
    image
  5. Open local scenario and try deleting it. Notice the scenario neither of the scenarios is deleted from the list.
  6. Go Online. Notice that '22.30h at the bird shop' is deleted from the list here but it isn't deleted from disc
    image
    Interestingly enough, if you Go Offline, you can play the 'online' scenario without issues. To play it in 'Online mode' you need to download it again as the list sees it as not downloaded.

If you try the other way around by deleting a scenario from 'Go Online' list, no scenario is not deleted from the Offline list either.

It looks like the dictionary is not built properly. A fix to deleting scenarios should be done in this kind of situations.

Another scenario which occasionally causes a black screen.
Once I had it, other time literally nothing happened.
I think the black screen happens when you create a copy of a certain scenario for the first time. If you happened to create it in the past, it will do nothing. So, create a copy of a scenario that you've never done it.

  1. Open app, go to Editor, copy any scenario, open the clone and rename it for easier identification.
  2. Go back to Main menu, New game, 'Go Offline', click Play on the local scenario.
  3. Click Delete. Black screen.

According to the output_log 'The given key was not present in the dictionary.'.
https://github.com/NPBruce/valkyrie/files/2881605/output_log.txt

There are possibly two problems:

  1. wrong way of creating a dictionary,
  2. wrong way of deleting things from multiple dictionaries.
    In terms of the 'black screen' issue. It should be checked:
    -when the exception happens,
    -how a scenario is deleted from the dictionary,
    -if it's possible that two scenarios can be deleted from the dictionary by one operation of deleting a scenario while leaving data in another dictionary so a scenario exists in one list and doesn't in another.

OK thanks for all the details I will have a look.

OK I have a fix.
The editor scenario were not supported properly, and directories were not deleted.

The tests and error cases created some side effect on the management of quest list for .valkyrie files.

In the fix I made for this issue, I made it possible to delete the scenario being edited (the scenarios that are in the /editor directory).
I'm not sure this is such a good idea.

@scrubbless @redwolf2 what do you think ?

Maybe we could later add a safety dialog "Delete scenario? Yes/No" or add a dialog that says: "Scenarios created in the Editor can only be deleted from the Scenario Editor selection dialog".

I think deleting scenarios, no matter of a kind, should be possible from a splash screen so there is no need going back to Editor menu.

@redwolf2, I like your idea of the confirmation dialog. It could be a simple thing:

  1. I personally think the Delete button should stand out more and should be red-coloured. Moreover, all Back buttons in the app should have a neutral colour, i.e. be grey as the Delete is now or white. They don't do anything major/serious/dangerous to be red. But it's a topic for a different discussion.
    image
  2. Clicking the Delete button causes appearing of the confirmation text and two new buttons:
    image
    PSD: delete_confirmation.zip

The design is plain and simple. It'd could be an enhancement for another release.

PS. Grey vs White Back button:
image

I agree we should add a confirmation.
But for 2.2, we will just remove the delete button for editor scenarios.

Let's avoid the big drama of someone losing weeks of work because he thought he was deleting something else.

Sure. I created new tickets for the confirmation enhancement (https://github.com/NPBruce/valkyrie/issues/1081) and the buttons' colours enhancement (https://github.com/NPBruce/valkyrie/issues/1082).

Fix done.
To make it simple, I do not show the delete button for directories.
I only show it for .valkyrie files.

I will now close this ticket as you have created other tickets for the points we have discussed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

copytco picture copytco  路  4Comments

Rass1968 picture Rass1968  路  8Comments

scrubbless picture scrubbless  路  4Comments

scrubbless picture scrubbless  路  3Comments

jlederer2 picture jlederer2  路  7Comments