-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game project becomes inconsistent if not saved after deleting translation #2414
Comments
I tried to replicate this in 3.6.0. (Running 3.6.0.58) Editor does not save when adding translations. On contrary, it warns you on exit if translation was created, but game not saved:
Same happens if you create and then instantly delete a translation, then quit. Editor saves when you do "Update Translation", and warns about that too:
@Crystal-Shard , please double check your steps to reproduce this problem. |
Ok, I've double-checked and the editor does give warnings. But I do find this approach problematic; First, when creating a translation, I get a query whether I'd like to fill the new translation with existing text. Note that this is a false choice for the user: if I don't do this, then the translation is completely pointless. Second, when exiting the editor, I get a warning that if I don't save now, this might break the game. Note that again this is a false choice: if I don't do this, then I end up with a broken and unusable .AGF file. I'm not a fan of choices like these. If there's and A-or-B choice and choosing A will cause the game (or translation) to fail, then this should not be asked of the user, and B should be automatic. |
Can you create a small example of such broken agf file? I can't figure out any case that causes this with the provided steps. |
This is not accurate, if you don't save, then agf won't be broken, there will be a unused translation file remaining in a folder, but agf won't contain anything invalid (since it was not saved). Same thing happens if you create a room, and don't save: a room file remains, but the agf is not invalid, it simply does not mention this room. |
It's the reverse: if you delete the TRS from the editor, then it gets removed from disk. If you then do not save the game, then the .AGF file will contain a reference to a file that does not exist, and will refuse to load (although as mentioned above, in 3.6.1 this is fixed). (edit) Step 3 in my initial report is inaccurate, because I had missed the fact that filling the TRS file automatically saves the game. |
Okay, I see now, so this is when you
Probably same may happen with other items, like rooms and fonts. |
Yes. So my issue here is with the warning "If you don't save the game now, you may not be able to successfully open this game next time." Instead of this warning, simply save the game. The game is also saved automatically when you compile, when you fill a TRS file, and probably in a few other situations. It's not really helpful to ask the user "If you don't do X, your game file will be unusable. Do you want to X?" |
Alright, so there are two things
Loading a project with missing translations was fixed in 3.6.1.
Regarding the version, since 3.6.1 was released, I'm now not patching previous versions like 3.6.0, unless there's a critical error that cannot be worked around. |
@Crystal-Shard can you 100% reproduce this in the latest 3.6.1 Editor? |
That's fine. I'm simply reporting bugs for the AGS version I'm currently using, I don't always keep pace with the latest builds. If an issue is important to me and has been fixed in a later engine, well that's a good reason for me to upgrade :) |
The problem reproduces in 3.6.1 using above steps, with the exception of editor failing to load. Game.agf keeps mentioning a non-existing translation file, and it gets recreated after loading a project. |
I gave this some thought, and, in regards to saving the project unconditionally, I would not take such step lightly. There are couple of considerations here:
For this reason, I'd rather suggest going other way, not save without a question, but ensure that Editor:
|
Well it's true that saving unconditionally shouldn't be done lightly... but the editor already saves unconditionally whenever you build the game, or rebuild one of the translation sources, or probably in some other cases. So maybe it's not such a big deal to save unconditionally? |
I don't know what is the right way to deal with this just yet. I may be overthinking this case, but my head is occupied with other things now; and I'd like to discuss this with other developers first. What should be certainly done in the meantime, is double check that Editor can recover the project if any auxiliary files are missing, e.g. by creating a dummy (empty) replacement. |
Describe the bug
Sometimes the editor will save the Game.agf file when the user doesn't ask to. This behavior is inconsistent and can break the game.
AGS Version
3.6.0
Game
n/a
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either (1) do not save unless the user presses save, or (2) be consistent when to save (e.g. BOTH when creating a translation AND when deleting the translation).
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: