From the feedback of multiple users and some tests of my own, it seems very likely that there is a problem with the way Valkyrie's saving/loading system works in regards to D2 campaign play.
While the campaign works absolutely fine in Valkyrie during play, a problem occurs after loading a save file. Then the game just stops at the point, where a new quest.ini is supposed to be called.
My guesses would be, that either the save system does not yet take into account that quests can now start other quests, and is thus missing some required information, or that Valkyrie might have a problem getting the correct file path to call the next quest after loading a game.
To reproduce the error simply download "The Shadow Rune" from within Valkyrie, start a game, save the game, load this save and continue the quest. At the point where the next quest is then supposed to start nothing happens.
Due to the gravity of this problem playing a campaign with Valkyrie is currently practically impossible, and it would be great to get this problem solved as soon as possible.
2.0.1
Hi @DelphiDie @MrTantum
I do not reproduce the issue.
Loading takes some time but it loads for me.
I did this:
Did I miss something ?
Can you please share your savegame so I can try with your file ?
Hello @BenRQ ,
thanks for looking at this.
It sounds like you tried the quest "The Shadow Rune - Act 1 The Cardinals Plight".
This quest was not made by us, and I'm unsure if the problem can be reproduced here, since this seems to be a single quest.
Could you please try it again with the Quest "The Shadow Rune"?
If needed I can provide you a savegame, but it's pretty easy to reproduce.
After a quick investigation, it seems that the save system only copies the current quest.
As the current loaded quest is running in a temporary directory, you can't access any other quest from there.
I have the explanation but not the fix, and I can't say how complex it will be to fix it.
There is probably a reason for not using the quest content in the original directory but use everything in the save directory, but I don't know it.
If we can reference the original directory, then it would also fix #809, and you won't have to use the ../
Your event would just look like this :
event1=CP/quest.ini
instead of
event1=../CP/quest.ini
@NPBruce if you have a bit of time to give us your opinion on this?
I don't want to start changing the save system and lose my time working in the wrong direction :)
The reason for the temp folder lies within the valkyrie packages. They get extracted there, when you load a scenario. The temp directory is deleted every time when the app starts.
The scenarios were in folders, before valkyrie packages were introduced. That change may have broken the campaign functionality.
Maybe we can modify the valkyrie packages to hold multiple scenarios? Auto download the right scenario? Auto extract the right scenario? Have a message, when a scenario is missing and the user must download it manually?
Maybe we could auto generate a GUID and put it in the quest.ini. That way we can check if the scenario is installed locally and then have a message, if it's not.
To stay compatible, we could just interpret the last part of the path (like you suggested) and crawl the zip folder structure and the directories (user created senarios are still stored in a folder structure). I have already done the zip crawling in that functionality, which extracts the valkyrie version info on android. See here: https://github.com/NPBruce/valkyrie/blob/ff574fb760e51bb86004b7208dcce9c7a6790625/libraries/FFGAppImport/AssetImport/AppFinder.cs#L164
OK I see : the app extracts all packages content everytime you open the list of quests by pressing "start quest". That's why it takes a bit of time to load.
When loading a game, it loads only the savegame packages which is incomplete (you can see it if you manually unzip the archive).
And this savegame is NOT extracted in the same directory by the way : AppData\Local\Temp\Valkyrie\Load\quest
Savegame packages should definitely hold the full scenario and not only the current quest.
Now it seems a bit extreme to save the full package everytime doesn't it ?
And I like the idea of the autodownload. I've started thinking how we could merge the list of quest and the download page already. This is another topic though, for a future release :)
A reason not to bundle all scenarios in the valkyrie package could be size and complexity. Another reason might be, that the full scenario is still not complete and some quests will be completed by the scenario editor, later.
I see three 'small' changes in the feature design that would fix this issue, issue #809 and @scrubbless performance issue on his last scenario :
1) the quest package is not fully extracted when displaying the quest list, only required files ( thanks for the way to do it @redwolf2 )
2) save feature would only write the save.ini without the quest package (risk of incoherence with the scenario when the quest is being updated)
3) the full package is only extracted when starting a quest, or loading a savegame
Risk pointed out in the sec2 is not a blocker from my point of view as update is not automatic, and the issue is kind of obvious for me, but please tell me what you think.
Improvement on performance during game, and during quest selection would be quite high.
There would be small performance impact when loading / starting a scenario.
I like the changes.
Android would also benefit from deleting the temp scenario dir after the scenario is no longer in use. Storage space can be sparse, especially internal storage. This is not a huge priority, but could prevent problems in edge cases.
Risk pointed out in the sec2 is not a blocker from my point of view as update is not automatic, and the issue is kind of obvious for me, but please tell me what you think.
Before an update you could have a warning, that there are save files that may not work or only allow the update if the save is killed.
https://github.com/NPBruce/valkyrie/issues/809 might be due to windows path restictions of 255 characters max. https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file. It would be better not to rely on the file path at all since that path will be different on every platform. This may lead to save files might not be compatible among different platforms. A GUID per package (as mentioned before) would be nice and if there is none, we could interpret the last part of the path to be compatible with quest formats below. Issue 809 might be fixed by not beeing relieant on those ..\ path backnavigation, but resolving to the absolute path or implement a custom resolver if necessary.
Thanks for looking into this. Your comments show that this is not an easy bugfix. Would be fantastic if you are able to solve this. 馃憤
I spent some time on this, and I think I now have something working.
It will be available for test in the beta Valkyrie Brynhildr_2.1.0a.
I did not implement any warning when deleting/updating quest.
It's a small dev, but I'd rather concentrate on releasing the beta for now.
Thanks for your efforts BenRQ.
Once we have an official release I will update the quest structure in our campaign.
Regards
Delphi
Beta test version is now available with implementation of this issue:
https://github.com/BenRQ/valkyrie/releases/tag/release%2F2.1%2FBrynhildr_2.1.0b
I suggest you point out the required Valkyrie version in the description of the scenario, when version is officially released.
Also please close this issue if you are happy with the fix.
Hello @BenRQ,
I reworked the quests to point to absolute paths, and they work flawlessly with the beta release. Also saving and loading does no longer break the campaign and works as expected.
This is such good news. I already prepared a new campaign release and can push it as soon as there is a new official Valkyrie release. Thanks so much for fixing this problem!
Regards
Delphi
Reopen, because it is fixed in Brynhildr, but not in Valkyrie. I created the label "Brynhildr" to track, what is covered by it.
Thanks @redwolf2 & @BenRQ. Would you happen to know is there is a new official release in development?
@BenRQ: Could I distribute the Brynhildr release as a workaround via direct download (for ease of use), or would you prefer that I link to your release section?
Regards,
Delphi
@NPBruce is busy at least this year. After that he might pick up where he left. So no official releases until he is back. Development continues in @BenRQ branch, which Bruce might just merge into his (I know I would).
Hi @DelphiDie, I think it is better to share the link to the release section, as you don't know what is the system the player will be using (windows, android, mac ...)
Thanks to both of you. I guess I will post a Link to the Brynhildr Release then. The OS is indeed something I hadn't thought about and a very valid point.
@BenRQ
Sorry to bother you again with this, but the issue seems to have reappeared in the latest Valkyrie release.
After saving the game, quitting Valkyrie, restarting it and the reloading the save, that game can not be continued as intended, because the next quest.ini call after loading does not happen.
The following steps can be done to reproduce the issue:
Note: If you just continue the game after step 8 or load the savegame from the main menu after step 9, everything seems to work fine. Closing and restarting Valkyrie however leads to the problem.
This is of course a very serious issue, because the save system is pretty much useless in this case.
Could you please take a look at the problem?
@redwolf2 Could you perhaps reopen this issue until further notice?
@redwolf2 @BenRQ I also get stuck in a scenario if I save, leave and continue to play. See #1174
Fixed in 2.4
Thanks a bunch @NPBruce. Will test over the weekend. Really looking forward to be able to play the custom campagn
Thanks for the fix @NPBruce saving and restarting works now perfectly.
Most helpful comment
Fixed in 2.4