Hi!
Wouldn't it be better to have a separate directory for savegames and options in the user's home, instead of having it in the assets dir? Maybe ~/.config/julius. On multiuser systems each user must install the same assets in his homedir. The config file could also include the path to the assets, instead of adding it to the commandline. When installing the game, a desktop entry is created, but without assets path or screen scaling.
For example OpenRCT2 is doing it this way.
Hi @mase76, thanks for your interest.
Wouldn't it be better to have a separate directory for savegames and options in the user's home, instead of having it in the assets dir? Maybe ~/.config/julius. On multiuser systems each user must install the same assets in his homedir.
The idea of Julius is to retain 100% compatibility with the original Caesar 3, so savegames saved on one game should be able to be loaded on the other and vice-versa. That means that the savegame structure must be identical to C3's (meaning, it must be in the same directory as the assets), otherwise the original C3 won't be able to find the games.
That being said, I can see why multi-user support would be useful. In fact, SDL_GetPrefPath is perfect for this, so it shouldn't even be too hard to implement. To retain compatibility, this could be added to the extra Options menu.
The config file could also include the path to the assets, instead of adding it to the commandline.
You don't need to add the path to the assets to the command line. If the game can't find the assets, it will display a dialog asking you to provide the path, and then store the path so it won't have to ask you again.
Strange, I did not get a file dialog asking for the assets.
Starting julius from the commandline threw many file not found messages.
When I start julius now, such a dialog appears.
When I start julius now, such a dialog appears.
So it didn't appear at first? Only errors then it crashed/closed?
Exactly. I patched the desktop file and added the assets path and the scaling to it, when I built a Debian package.
I want to try to replicate this problem.
Can you please tell me what file you downloaded and which steps you took when Julius gave the error without showing the dialog window?
I have built it from source on Debian Bullseye from this tarball:
https://github.com/bvschaik/julius/archive/v1.4.0.tar.gz
The same with Augustus from:
https://github.com/Keriew/julius/archive/v1.2.0.tar.gz
Both with the same issue. I copied the assets to ~/.local/share/julius. First I tried to launch from the starter. As nothing happened, I started from terminal with the julius command, which threw the errors. Then I started from terminal with julius ~/.local/share/julius, which worked.
Can you still reproduce the error messages somehow to display them here?
I believe this is a problem with tinyfiledialogs (it's rather sensitive to installed libraries) but since debian is so configurable it's nearly impossible to replicate the exact system you have.
I cannot find the config in my homedir, where the current assets path is stored. I need to delete this to get a fresh installation.
I cannot find the config in my homedir
Try ~/.local/share/bvschaik/julius
Did so. The dialog appears. I cannot reproduce the issue any more.
That is strange. Maybe you installed some UI component meanwhile that made tinyfiledialogs work.
Regarding the save directory issue, @bvschaik, what do you think? I think adding an option and then, when the config is changed, showing a dialog informing of the new location of the save dir could work.
The thing is, the method of storing the savegames directly in the application folder is about 20 years old. I think, the julius engine should store it in ~/.local/share/bvschaik/julius. Also all game options should go there. That would make only one assets set for all users necessary. To use the savegamers with the original Caesar 3, whyever you want to do this, you could copy the savefiles into that folder.
After speaking with @bvschaik, we concluded it's best not to implement this in Julius. Doing so would also require user-specific settings, which would break compatibility with C3.
Since Julius is meant as a drop-in replacement, that change would be too big.
However, this may be doable in Augustus.
I was able to reproduce the assets error by doing a fresh install. This is the terminal output:
INFO: Julius version 1.4.0
INFO: Initializing SDL
INFO: SDL initialized
INFO: Loading game from working directory
INFO: No key found on layout for [
INFO: No key found on layout for ]
INFO: No key found on layout for =
ERROR: 'c3.eng' or 'c3_mm.eng' files not found or too large.
INFO: Loading game from base path /usr/bin/
INFO: No key found on layout for [
INFO: No key found on layout for ]
INFO: No key found on layout for =
ERROR: 'c3.eng' or 'c3_mm.eng' files not found or too large.
File "<string>", line 1
import Tkinter,tkFileDialog;root=Tkinter.Tk();root.withdraw();print tkFileDialog.askdirectory(title='Julius requires the original files from Caesar 3 to run.
^
SyntaxError: EOL while scanning string literal
INFO: Exiting: game pre-init failed
Thank you for the report, as I suspected it's a problem with tinyfiledialogs, I'll have a look.
@mase76 Can you please try the latest build? Your problem should be fixed.
Yes, that fixed the issue. Will this also flow into Augustus, which has the same problem?
Glad it's fixed :smiley:
Yes, it will eventually flow when the most recent changes from Julius are merged.